	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bi_load64                      ## -- Begin function bi_load64
	.p2align	4, 0x90
_bi_load64:                             ## @bi_load64
	.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
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_bi_checkcpu
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_bi_getboothowto
	movl	%eax, -48(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	leaq	-80(%rbp), %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_userboot_getdev
	movq	-80(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	callq	_userboot_fmtdev
	movl	%eax, %edi
	callq	_getrootmount
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_file_findfile
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	addq	(%rax), %rcx
	movq	16(%rax), %rdx
	cmpq	%rcx, %rbx
	cmovleq	%rcx, %rbx
	movq	%rdx, %rax
	testq	%rdx, %rdx
	jne	LBB0_7
LBB0_8:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_roundup
	movl	%eax, -52(%rbp)
	movq	%rax, %rdi
	callq	_bi_copyenv
	movl	(%r14), %esi
	movq	%rax, %rdi
	callq	_roundup
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rdi
	callq	_panic
	xorl	%ebx, %ebx
LBB0_11:
	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), %r14
	movq	%rbx, %rdi
	movl	$4, %edx
	movq	%r14, %rcx
	callq	_file_addmetadata
	movq	%rbx, %rdi
	callq	_bios_addsmapdata
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	xorl	%edi, %edi
	callq	_bi_copymodules64
	movq	%r12, %rdi
	addq	%rax, %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roundup
	movl	%eax, -44(%rbp)
	cltq
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_file_findmetadata
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_bcopy
	movq	%r12, %rdi
	callq	_bi_copymodules64
	jmp	LBB0_12
LBB0_1:
	leaq	L_str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_str.6(%rip), %rdi
LBB0_2:
	callq	_puts
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"rootdev"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"elf kernel"

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

L_.str.5:                               ## @.str.5
	.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
L_str:                                  ## @str
	.asciz	"CPU doesn't support long mode"

L_str.6:                                ## @str.6
	.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_load64                      ; -- Begin function bi_load64
	.p2align	2
_bi_load64:                             ; @bi_load64
	.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
	mov	x21, x0
	bl	_bi_checkcpu
	cbz	w0, LBB0_8
; %bb.1:
	mov	x0, x21
	bl	_bi_getboothowto
	str	w0, [sp, #12]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	mov	x1, x0
	add	x0, sp, #24
	mov	x2, #0
	bl	_userboot_getdev
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_9
; %bb.2:
	bl	_userboot_fmtdev
	bl	_getrootmount
	mov	x0, #0
	mov	x1, #0
	bl	_file_findfile
	mov	x8, #0
	cbz	x0, LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x10, [x0]
	add	x9, x10, x9
	cmp	x8, x9
	csel	x8, x8, x9, gt
	ldr	x0, [x0, #16]
	cbnz	x0, LBB0_3
LBB0_4:
Lloh2:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh3:
	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
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, #0
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_7
; %bb.5:
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh8:
	adrp	x0, l_.str.5@PAGE
Lloh9:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_panic
LBB0_7:
	str	wzr, [sp, #20]
Lloh10:
	adrp	x8, _MODINFOMD_HOWTO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MODINFOMD_HOWTO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
Lloh13:
	adrp	x8, _MODINFOMD_ENVP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MODINFOMD_ENVP@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
Lloh16:
	adrp	x24, _MODINFOMD_KERNEND@GOTPAGE
Lloh17:
	ldr	x24, [x24, _MODINFOMD_KERNEND@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x3, sp, #20
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
	mov	x0, x22
	bl	_bios_addsmapdata
	str	x21, [x20]
	mov	x0, #0
	bl	_bi_copymodules64
	add	x0, x0, x21
	ldr	w1, [x23]
	bl	_roundup
	str	w0, [sp, #20]
	sxtw	x8, w0
	str	x8, [x19]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_file_findmetadata
	ldr	w1, [x0]
	add	x0, sp, #20
	mov	w2, #4
	bl	_bcopy
	mov	x0, x21
	bl	_bi_copymodules64
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh18:
	adrp	x0, l_str@PAGE
Lloh19:
	add	x0, x0, l_str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x0, l_str.6@PAGE
Lloh21:
	add	x0, x0, l_str.6@PAGEOFF
LBB0_10:
	bl	_puts
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
LBB0_11:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"rootdev"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"elf kernel"

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

l_.str.5:                               ; @.str.5
	.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
l_str:                                  ; @str
	.asciz	"CPU doesn't support long mode"

l_str.6:                                ; @str.6
	.asciz	"can't determine root device"

.subsections_via_symbols
