	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_variable               ## -- Begin function efi_get_variable
	.p2align	4, 0x90
_efi_get_variable:                      ## @efi_get_variable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	%edi, %r13d
	xorl	%eax, %eax
	callq	_efi_open_dev
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	leaq	-72(%rbp), %rdi
	callq	_efi_var_reset
	leaq	-68(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_utf8_to_ucs2
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	%r13d, -48(%rbp)
	leaq	_efi_get_variable.buf(%rip), %r13
	movq	%r13, -56(%rbp)
	movl	$131072, -72(%rbp)              ## imm = 0x20000
	movq	_efi_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EFIIOC_VAR_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	callq	_ioctl
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movslq	-72(%rbp), %rax
	movq	%rax, (%r12)
LBB0_5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%r13, (%r15)
LBB0_7:
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movl	-64(%rbp), %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	-68(%rbp), %edi
	callq	_free
	movl	%ebx, %edi
	callq	_rv_to_linux_rv
	jmp	LBB0_10
LBB0_1:
	movl	$-1, %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_efi_get_variable.buf,131072,4 ## @efi_get_variable.buf
	.comm	_efi_fd,4,2                     ## @efi_fd
	.comm	_EFIIOC_VAR_GET,4,2             ## @EFIIOC_VAR_GET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_variable               ; -- Begin function efi_get_variable
	.p2align	2
_efi_get_variable:                      ; @efi_get_variable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_efi_open_dev
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	mov	x24, sp
	mov	x0, sp
	bl	_efi_var_reset
	orr	x1, x24, #0x4
	add	x2, x24, #28
	mov	x0, x22
	bl	_utf8_to_ucs2
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.2:
	str	w23, [sp, #24]
Lloh0:
	adrp	x23, _efi_get_variable.buf@PAGE
Lloh1:
	add	x23, x23, _efi_get_variable.buf@PAGEOFF
	str	x23, [sp, #16]
	mov	w8, #131072
	str	w8, [sp]
Lloh2:
	adrp	x8, _efi_fd@GOTPAGE
Lloh3:
	ldr	x8, [x8, _efi_fd@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _EFIIOC_VAR_GET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFIIOC_VAR_GET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	mov	x22, x0
	cbz	x21, LBB0_4
; %bb.3:
	ldrsw	x8, [sp]
	str	x8, [x21]
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	str	x23, [x20]
LBB0_6:
	cbz	x19, LBB0_8
; %bb.7:
	ldr	w8, [sp, #8]
	str	w8, [x19]
LBB0_8:
	ldr	w0, [sp, #4]
	bl	_free
	mov	x0, x22
	bl	_rv_to_linux_rv
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_efi_get_variable.buf,131072,2 ; @efi_get_variable.buf
	.comm	_efi_fd,4,2                     ; @efi_fd
	.comm	_EFIIOC_VAR_GET,4,2             ; @EFIIOC_VAR_GET
.subsections_via_symbols
