	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md_load_dual
_md_load_dual:                          ## @md_load_dual
	.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
	movl	%ecx, %r12d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	leal	4(,%rax,4), %eax
	movq	_align@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	callq	_md_getboothowto
	movl	%eax, -60(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
LBB0_2:
	movq	%rax, %rdi
	callq	_getrootmount
	xorl	%ebx, %ebx
	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
	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_4
LBB0_5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_roundup
	movq	%rax, %r13
	movq	%rax, -80(%rbp)
	movq	%rax, %rdi
	callq	_md_copyenv
	movl	(%r14), %esi
	movq	%rax, %rdi
	callq	_roundup
	movq	%rax, %r15
	testl	%r12d, %r12d
	movq	$0, -48(%rbp)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.4(%rip), %rsi
	xorl	%edi, %edi
	callq	_file_findfile
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.5(%rip), %rdi
	callq	_panic
	xorl	%r14d, %r14d
LBB0_8:
	movq	_MODINFOMD_HOWTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rcx
	movq	%r14, %rdi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_file_addmetadata
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.9:
	movq	%r13, -56(%rbp)
	movq	_MODINFOMD_ENVP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rbx
	movq	%r14, %rdi
	movl	$8, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_file_addmetadata
	movq	$0, -56(%rbp)
	jmp	LBB0_11
LBB0_10:
	movq	_MODINFOMD_ENVP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	movl	$8, %edx
	xorl	%eax, %eax
	callq	_file_addmetadata
	leaq	-48(%rbp), %rbx
LBB0_11:
	movq	_MODINFOMD_KERNEND@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$8, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_file_addmetadata
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%edi, %edi
	movl	%r12d, %esi
	callq	_md_copymodules
	movq	%r15, %rdi
	addq	%rax, %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roundup
	movq	%rax, -48(%rbp)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_file_findmetadata
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rcx
	movq	%rcx, -56(%rbp)
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_13:
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx
LBB0_14:
	movq	%rcx, (%rax)
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_md_copymodules
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_align,4,2                      ## @align
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rootdev"

L_.str.1:                               ## @.str.1
	.asciz	"currdev"

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

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

L_.str.4:                               ## @.str.4
	.asciz	"elf 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
	.comm	_MODINFOMD_DTBP,4,2             ## @MODINFOMD_DTBP
	.comm	_MODINFOMD_DTLB,4,2             ## @MODINFOMD_DTLB
	.comm	_MODINFOMD_DTLB_SLOTS,4,2       ## @MODINFOMD_DTLB_SLOTS
	.comm	_MODINFOMD_ESYM,4,2             ## @MODINFOMD_ESYM
	.comm	_MODINFOMD_ITLB,4,2             ## @MODINFOMD_ITLB
	.comm	_MODINFOMD_ITLB_SLOTS,4,2       ## @MODINFOMD_ITLB_SLOTS
	.comm	_MODINFOMD_SSYM,4,2             ## @MODINFOMD_SSYM
	.comm	_dtlb_slot,4,2                  ## @dtlb_slot
	.comm	_dtlb_store,8,3                 ## @dtlb_store
	.comm	_itlb_slot,4,2                  ## @itlb_slot
	.comm	_itlb_store,8,3                 ## @itlb_store
	.comm	_relocation_offset,4,2          ## @relocation_offset
	.no_dead_strip	_md_load_dual
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function md_load_dual
_md_load_dual:                          ; @md_load_dual
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x1
	mov	w8, #8
	mov	w9, #4
	cmp	w3, #0
	csel	w8, w9, w8, eq
Lloh0:
	adrp	x9, _align@GOTPAGE
Lloh1:
	ldr	x9, [x9, _align@GOTPAGEOFF]
Lloh2:
	str	w8, [x9]
	bl	_md_getboothowto
	str	w0, [sp, #20]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
LBB0_2:
	bl	_getrootmount
	mov	x0, #0
	mov	x1, #0
	bl	_file_findfile
	cbz	x0, LBB0_5
; %bb.3:
	mov	x8, x0
	mov	x0, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x10, [x8]
	add	x9, x10, x9
	cmp	x0, x9
	csel	x0, x0, x9, gt
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_4
LBB0_5:
Lloh7:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_roundup
	mov	x23, x0
	str	x0, [sp, #32]
	bl	_md_copyenv
	ldr	w1, [x24]
	bl	_roundup
	mov	x21, x0
	str	xzr, [sp, #40]
Lloh9:
	adrp	x8, l_.str.2@PAGE
Lloh10:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh11:
	adrp	x9, l_.str.3@PAGE
Lloh12:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
	mov	x0, #0
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.6:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_file_findfile
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_panic
LBB0_8:
Lloh17:
	adrp	x8, _MODINFOMD_HOWTO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MODINFOMD_HOWTO@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x8, sp, #20
	str	x8, [sp]
	mov	x0, x22
	mov	w2, #4
	bl	_file_addmetadata
	cbz	w19, LBB0_10
; %bb.9:
	str	x23, [sp, #24]
Lloh20:
	adrp	x8, _MODINFOMD_ENVP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MODINFOMD_ENVP@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x23, sp, #24
	str	x23, [sp]
	mov	x0, x22
	mov	w2, #8
	bl	_file_addmetadata
	str	xzr, [sp, #24]
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x8, _MODINFOMD_ENVP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MODINFOMD_ENVP@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x8, sp, #32
	str	x8, [sp]
	mov	x0, x22
	mov	w2, #8
	bl	_file_addmetadata
	add	x23, sp, #40
LBB0_11:
Lloh26:
	adrp	x25, _MODINFOMD_KERNEND@GOTPAGE
Lloh27:
	ldr	x25, [x25, _MODINFOMD_KERNEND@GOTPAGEOFF]
	ldr	w1, [x25]
	str	x23, [sp]
	mov	x0, x22
	mov	w2, #8
	bl	_file_addmetadata
	str	x21, [x20]
	mov	x0, #0
	mov	x1, x19
	bl	_md_copymodules
	add	x0, x0, x21
	ldr	w1, [x24]
	bl	_roundup
	str	x0, [sp, #40]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_file_findmetadata
	cbz	w19, LBB0_13
; %bb.12:
	ldr	x8, [sp, #40]
	str	x8, [sp, #24]
	ldr	x9, [x0]
	str	x8, [x9]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x0]
	ldr	x9, [sp, #40]
	str	x9, [x8]
LBB0_14:
	mov	x0, x21
	mov	x1, x19
	bl	_md_copymodules
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_align,4,2                      ; @align
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rootdev"

l_.str.1:                               ; @.str.1
	.asciz	"currdev"

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

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

l_.str.4:                               ; @.str.4
	.asciz	"elf 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
	.comm	_MODINFOMD_DTBP,4,2             ; @MODINFOMD_DTBP
	.comm	_MODINFOMD_DTLB,4,2             ; @MODINFOMD_DTLB
	.comm	_MODINFOMD_DTLB_SLOTS,4,2       ; @MODINFOMD_DTLB_SLOTS
	.comm	_MODINFOMD_ESYM,4,2             ; @MODINFOMD_ESYM
	.comm	_MODINFOMD_ITLB,4,2             ; @MODINFOMD_ITLB
	.comm	_MODINFOMD_ITLB_SLOTS,4,2       ; @MODINFOMD_ITLB_SLOTS
	.comm	_MODINFOMD_SSYM,4,2             ; @MODINFOMD_SSYM
	.comm	_dtlb_slot,4,2                  ; @dtlb_slot
	.comm	_dtlb_store,8,3                 ; @dtlb_store
	.comm	_itlb_slot,4,2                  ; @itlb_slot
	.comm	_itlb_store,8,3                 ; @itlb_store
	.comm	_relocation_offset,4,2          ; @relocation_offset
	.no_dead_strip	_md_load_dual
.subsections_via_symbols
