	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efibc_set_variable
_efibc_set_variable:                    ## @efibc_set_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_LINUX_EFI_LOADER_ENTRY_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	%rsi, %rdi
	callq	_strlen
	cltq
	leaq	4(,%rax,4), %r15
	cmpq	$9, %r15
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r12
	movq	16(%rax), %rsi
	movq	%r14, %rdi
	callq	_efibc_str_to_str16
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	callq	_efibc_str_to_str16
	movq	%r12, %rdi
	addq	$8, %rdi
	leaq	-36(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	16(%r12), %rdi
	movl	8(%r12), %esi
	movq	_EFI_VARIABLE_NON_VOLATILE@GOTPCREL(%rip), %rax
	movq	_EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_EFI_VARIABLE_RUNTIME_ACCESS@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	(%r12), %r9
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_efivar_entry_set_safe
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_err
LBB0_5:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LINUX_EFI_LOADER_ENTRY_GUID,4,2 ## @LINUX_EFI_LOADER_ENTRY_GUID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"value is too large (%zu bytes) for '%s' EFI variable\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate efivar entry for '%s' EFI variable\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFI_VARIABLE_NON_VOLATILE,4,2  ## @EFI_VARIABLE_NON_VOLATILE
	.comm	_EFI_VARIABLE_BOOTSERVICE_ACCESS,4,2 ## @EFI_VARIABLE_BOOTSERVICE_ACCESS
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ## @EFI_VARIABLE_RUNTIME_ACCESS
L_.str.2:                               ## @.str.2
	.asciz	"failed to set %s EFI variable: 0x%x\n"

	.no_dead_strip	_efibc_set_variable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efibc_set_variable
_efibc_set_variable:                    ; @efibc_set_variable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _LINUX_EFI_LOADER_ENTRY_GUID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LINUX_EFI_LOADER_ENTRY_GUID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #28]
	mov	x0, x1
	bl	_strlen
	add	w8, w0, #1
	sbfiz	x21, x8, #2, #32
	cmp	x21, #9
	b.lo	LBB0_2
; %bb.1:
	stp	x21, x19, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	x1, [x0, #16]
	mov	x0, x19
	bl	_efibc_str_to_str16
	ldr	x1, [x20]
	mov	x0, x22
	bl	_efibc_str_to_str16
	add	x0, x20, #8
	add	x1, sp, #28
	mov	w2, #4
	bl	_memcpy
	ldr	x0, [x20, #16]
	ldr	w1, [x20, #8]
Lloh10:
	adrp	x8, _EFI_VARIABLE_NON_VOLATILE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFI_VARIABLE_NON_VOLATILE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	x5, [x20]
	mov	w3, #0
	mov	x4, x21
	bl	_efivar_entry_set_safe
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.4:
	stp	x19, x21, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_5:
	mov	x0, x20
	bl	_kfree
	b	LBB0_8
LBB0_6:
	str	x19, [sp]
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LINUX_EFI_LOADER_ENTRY_GUID,4,2 ; @LINUX_EFI_LOADER_ENTRY_GUID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"value is too large (%zu bytes) for '%s' EFI variable\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate efivar entry for '%s' EFI variable\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFI_VARIABLE_NON_VOLATILE,4,2  ; @EFI_VARIABLE_NON_VOLATILE
	.comm	_EFI_VARIABLE_BOOTSERVICE_ACCESS,4,2 ; @EFI_VARIABLE_BOOTSERVICE_ACCESS
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ; @EFI_VARIABLE_RUNTIME_ACCESS
l_.str.2:                               ; @.str.2
	.asciz	"failed to set %s EFI variable: 0x%x\n"

	.no_dead_strip	_efibc_set_variable
.subsections_via_symbols
