	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_to_boot_order
_add_to_boot_order:                     ## @add_to_boot_order
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	addq	$4, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_strtoul
	movl	%eax, %r14d
	movq	_EFI_GLOBAL_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	leaq	-36(%rbp), %r8
	callq	_efi_get_variable
	testq	%rax, %rax
	jns	LBB0_4
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	$0, -24(%rbp)
	movq	$0, -32(%rbp)
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movq	-24(%rbp), %rdi
	addq	$4, %rdi
	movq	%rdi, -24(%rbp)
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_le16enc
	movq	-24(%rbp), %rdx
	cmpq	$5, %rdx
	jb	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	-32(%rbp), %rsi
	addq	$-4, %rdx
	callq	_memcpy
	movq	-24(%rbp), %rdx
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_set_bootvar
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movq	%rbx, %rdi
	callq	_free
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFI_GLOBAL_GUID,4,2            ## @EFI_GLOBAL_GUID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BootOrder"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"efi_get_variable BootOrder"

L_.str.2:                               ## @.str.2
	.asciz	"malloc"

L_.str.3:                               ## @.str.3
	.asciz	"set_bootvar"

	.no_dead_strip	_add_to_boot_order
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_to_boot_order
_add_to_boot_order:                     ; @add_to_boot_order
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, x0, #4
	mov	x1, #0
	mov	w2, #16
	bl	_strtoul
	mov	x19, x0
Lloh0:
	adrp	x8, _EFI_GLOBAL_GUID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFI_GLOBAL_GUID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #24
	add	x4, sp, #20
	bl	_efi_get_variable
	tbz	x0, #63, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _ENOENT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	str	xzr, [sp, #24]
	str	xzr, [sp, #8]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	x8, [sp, #24]
	add	x0, x8, #4
	str	x0, [sp, #24]
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_le16enc
	ldr	x2, [sp, #24]
	cmp	x2, #5
	b.lo	LBB0_8
; %bb.7:
	add	x0, x20, #16
	ldr	x1, [sp, #8]
	sub	x2, x2, #4
	bl	_memcpy
	ldr	x2, [sp, #24]
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_set_bootvar
	tbz	x0, #63, LBB0_10
; %bb.9:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	mov	x0, x20
	bl	_free
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EFI_GLOBAL_GUID,4,2            ; @EFI_GLOBAL_GUID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BootOrder"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"efi_get_variable BootOrder"

l_.str.2:                               ; @.str.2
	.asciz	"malloc"

l_.str.3:                               ; @.str.3
	.asciz	"set_bootvar"

	.no_dead_strip	_add_to_boot_order
.subsections_via_symbols
