	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bi_load                        ## -- Begin function bi_load
	.p2align	4, 0x90
_bi_load:                               ## @bi_load
	.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	%rdx, %r14
	movq	%rsi, %r15
	callq	_bi_getboothowto
	movl	%eax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	_archsw@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	*(%rcx)
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	callq	_efi_fmtdev
	movl	%eax, %edi
	callq	_getrootmount
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_file_findfile
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rax), %ecx
	addl	(%rax), %ecx
	cmpl	%ecx, %ebx
	cmovlel	%ecx, %ebx
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movq	%r15, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%ebx, %edi
	callq	_roundup
	movl	%eax, -52(%rbp)
	movl	%eax, %edi
	callq	_bi_copyenv
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_roundup
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	callq	_panic
	xorl	%ebx, %ebx
LBB0_8:
	movl	$0, -44(%rbp)
	movq	_MODINFOMD_HOWTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_file_addmetadata
	movq	_MODINFOMD_ENVP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_file_addmetadata
	movq	_MODINFOMD_KERNEND@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_file_addmetadata
	movq	_MODINFOMD_FW_HANDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ST@GOTPCREL(%rip), %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_file_addmetadata
	movq	%rbx, %rdi
	callq	_bi_load_efi_data
	movl	%r13d, (%r14)
	xorl	%edi, %edi
	callq	_bi_copymodules
	movl	%r13d, %edi
	addl	%eax, %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roundup
	movl	%eax, -44(%rbp)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_file_findmetadata
	movq	(%rax), %rax
	movl	-44(%rbp), %ecx
	movl	%ecx, (%rax)
	movl	%r13d, %edi
	callq	_bi_copymodules
	jmp	LBB0_9
LBB0_1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rootdev"

	.comm	_archsw,8,3                     ## @archsw
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"elf kernel"

L_.str.3:                               ## @.str.3
	.asciz	"elf64 kernel"

L_.str.4:                               ## @.str.4
	.asciz	"can't find kernel file"

	.comm	_MODINFOMD_HOWTO,4,2            ## @MODINFOMD_HOWTO
	.comm	_MODINFOMD_ENVP,4,2             ## @MODINFOMD_ENVP
	.comm	_MODINFOMD_KERNEND,4,2          ## @MODINFOMD_KERNEND
	.comm	_MODINFOMD_FW_HANDLE,4,2        ## @MODINFOMD_FW_HANDLE
	.comm	_ST,4,2                         ## @ST
	.comm	_MODINFOMD_DTBP,4,2             ## @MODINFOMD_DTBP
	.comm	_MODINFOMD_ESYM,4,2             ## @MODINFOMD_ESYM
	.comm	_MODINFOMD_SSYM,4,2             ## @MODINFOMD_SSYM
	.comm	_relocation_offset,4,2          ## @relocation_offset
L_str:                                  ## @str
	.asciz	"Can't determine root device."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bi_load                        ; -- Begin function bi_load
	.p2align	2
_bi_load:                               ; @bi_load
	.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, x2
	mov	x20, x1
	bl	_bi_getboothowto
	str	w0, [sp, #12]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x1, x0
Lloh2:
	adrp	x8, _archsw@GOTPAGE
Lloh3:
	ldr	x8, [x8, _archsw@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x0, sp, #24
	mov	x2, #0
	blr	x8
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_7
; %bb.1:
	bl	_efi_fmtdev
	bl	_getrootmount
	mov	x0, #0
	mov	x1, #0
	bl	_file_findfile
	mov	w8, #0
	cbz	x0, LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w10, [x0]
	add	w9, w10, w9
	cmp	w8, w9
	csel	w8, w8, w9, gt
	ldr	x0, [x0, #8]
	cbnz	x0, LBB0_2
LBB0_3:
Lloh5:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x8
	bl	_roundup
	str	w0, [sp, #16]
	bl	_bi_copyenv
	ldr	w1, [x23]
	bl	_roundup
	mov	x21, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_6
; %bb.4:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_panic
LBB0_6:
	str	wzr, [sp, #20]
Lloh13:
	adrp	x8, _MODINFOMD_HOWTO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MODINFOMD_HOWTO@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
Lloh16:
	adrp	x8, _MODINFOMD_ENVP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MODINFOMD_ENVP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
Lloh19:
	adrp	x24, _MODINFOMD_KERNEND@GOTPAGE
Lloh20:
	ldr	x24, [x24, _MODINFOMD_KERNEND@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x3, sp, #20
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
Lloh21:
	adrp	x8, _MODINFOMD_FW_HANDLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MODINFOMD_FW_HANDLE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x3, _ST@GOTPAGE
Lloh25:
	ldr	x3, [x3, _ST@GOTPAGEOFF]
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
	mov	x0, x22
	bl	_bi_load_efi_data
	str	w21, [x20]
	mov	w0, #0
	bl	_bi_copymodules
	add	w0, w0, w21
	ldr	w1, [x23]
	bl	_roundup
	str	w0, [sp, #20]
	str	w0, [x19]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_file_findmetadata
	ldr	x8, [x0]
	ldr	w9, [sp, #20]
	str	w9, [x8]
	mov	x0, x21
	bl	_bi_copymodules
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x0, l_str@PAGE
Lloh27:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
LBB0_8:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rootdev"

	.comm	_archsw,8,3                     ; @archsw
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"elf kernel"

l_.str.3:                               ; @.str.3
	.asciz	"elf64 kernel"

l_.str.4:                               ; @.str.4
	.asciz	"can't find kernel file"

	.comm	_MODINFOMD_HOWTO,4,2            ; @MODINFOMD_HOWTO
	.comm	_MODINFOMD_ENVP,4,2             ; @MODINFOMD_ENVP
	.comm	_MODINFOMD_KERNEND,4,2          ; @MODINFOMD_KERNEND
	.comm	_MODINFOMD_FW_HANDLE,4,2        ; @MODINFOMD_FW_HANDLE
	.comm	_ST,4,2                         ; @ST
	.comm	_MODINFOMD_DTBP,4,2             ; @MODINFOMD_DTBP
	.comm	_MODINFOMD_ESYM,4,2             ; @MODINFOMD_ESYM
	.comm	_MODINFOMD_SSYM,4,2             ; @MODINFOMD_SSYM
	.comm	_relocation_offset,4,2          ; @relocation_offset
l_str:                                  ; @str
	.asciz	"Can't determine root device."

.subsections_via_symbols
