	.file	"extr_opal.c_opal_check.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/ibm,opal"
.LC1:
	.string	"opal-base-address"
.LC2:
	.string	"opal-entry-address"
	.text
	.p2align 4
	.globl	opal_check
	.type	opal_check, @function
opal_check:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	r12d, DWORD PTR opal_initialized[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r12d, r12d
	je	.L13
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	OF_finddevice@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L5
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	OF_hasprop@PLT
	test	eax, eax
	jne	.L4
.L5:
	mov	r12d, DWORD PTR ENOENT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rsi, .LC2[rip]
	mov	edi, ebp
	call	OF_hasprop@PLT
	test	eax, eax
	je	.L5
	mov	r13, rsp
	mov	ecx, 8
	lea	rsi, .LC1[rip]
	mov	edi, ebp
	mov	rdx, r13
	call	OF_getencprop@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	ecx, 8
	mov	edi, ebp
	mov	rdx, r13
	lea	rsi, .LC2[rip]
	mov	DWORD PTR opal_data[rip], eax
	call	OF_getencprop@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR opal_entrypoint[rip], eax
	xor	eax, eax
	call	mfmsr@PLT
	mov	DWORD PTR opal_initialized[rip], 1
	mov	r8d, eax
	mov	eax, DWORD PTR PSL_EE[rip]
	or	eax, DWORD PTR PSL_IR[rip]
	or	eax, DWORD PTR PSL_DR[rip]
	or	eax, DWORD PTR PSL_SE[rip]
	not	eax
	and	eax, r8d
	mov	DWORD PTR opal_msr[rip], eax
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	opal_check, .-opal_check
	.comm	opal_msr,4,4
	.comm	opal_initialized,4,4
	.comm	opal_entrypoint,4,4
	.comm	opal_data,4,4
	.comm	PSL_SE,4,4
	.comm	PSL_IR,4,4
	.comm	PSL_EE,4,4
	.comm	PSL_DR,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_opal.c_opal_check.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/ibm,opal\000"
	.align	2
.LC1:
	.ascii	"opal-base-address\000"
	.align	2
.LC2:
	.ascii	"opal-entry-address\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	opal_check
	.syntax unified
	.arm
	.fpu softvfp
	.type	opal_check, %function
opal_check:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L15
	ldr	r3, .L15+4
	ldr	r4, [r6]
	sub	sp, sp, #16
	cmp	r4, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	movne	r4, #0
	beq	.L13
.L1:
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r0, .L15+8
	bl	OF_finddevice
	cmn	r0, #1
	mov	r5, r0
	beq	.L5
	ldr	r1, .L15+12
	bl	OF_hasprop
	cmp	r0, #0
	bne	.L4
.L5:
	ldr	r3, .L15+16
	ldr	r4, [r3]
	b	.L1
.L4:
	mov	r0, r5
	ldr	r1, .L15+20
	bl	OF_hasprop
	cmp	r0, #0
	beq	.L5
	mov	r3, #8
	ldr	r1, .L15+12
	add	r2, sp, #4
	mov	r0, r5
	bl	OF_getencprop
	ldr	ip, .L15+24
	ldr	lr, [sp, #8]
	ldr	r1, .L15+20
	mov	r3, #8
	add	r2, sp, #4
	mov	r0, r5
	str	lr, [ip]
	bl	OF_getencprop
	ldr	r3, .L15+28
	ldr	r2, [sp, #8]
	str	r2, [r3]
	bl	mfmsr
	mov	r2, #1
	ldr	r1, .L15+32
	ldr	r3, .L15+36
	ldr	ip, .L15+40
	ldr	lr, [r1]
	ldr	r3, [r3]
	ldr	r1, .L15+44
	ldr	ip, [ip]
	ldr	r1, [r1]
	orr	r3, r3, lr
	orr	r3, r3, ip
	orr	r3, r3, r1
	ldr	r1, .L15+48
	bic	r3, r0, r3
	str	r3, [r1]
	str	r2, [r6]
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	opal_initialized
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	ENOENT
	.word	.LC2
	.word	opal_data
	.word	opal_entrypoint
	.word	PSL_IR
	.word	PSL_EE
	.word	PSL_DR
	.word	PSL_SE
	.word	opal_msr
	.size	opal_check, .-opal_check
	.comm	opal_msr,4,4
	.comm	opal_initialized,4,4
	.comm	opal_entrypoint,4,4
	.comm	opal_data,4,4
	.comm	PSL_SE,4,4
	.comm	PSL_IR,4,4
	.comm	PSL_EE,4,4
	.comm	PSL_DR,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
