	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bs_remap_earlyboot             ## -- Begin function bs_remap_earlyboot
	.p2align	4, 0x90
_bs_remap_earlyboot:                    ## @bs_remap_earlyboot
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_earlyboot_map_idx@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.1:
	xorl	%r13d, %r13d
	movq	_earlyboot_mappings@GOTPCREL(%rip), %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	movq	_earlyboot_map_idx@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	movq	%rdx, %r12
	movq	%r15, %rbx
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%r12), %rcx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	shlq	$5, %r14
	movq	(%rcx,%r14), %r15
	movq	_hw_direct_map@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_PHYS_TO_DMAP
	movq	(%r12), %rcx
	cmpq	8(%rcx,%r14), %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rcx,%r14), %rsi
	movq	%r15, %rdi
	callq	_pmap_dev_direct_mapped
	testq	%rax, %rax
	movq	%r12, %rdx
	movq	%r15, %rax
	movq	%rbx, %r15
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdx), %rcx
	movq	%rdx, %r12
	movq	%r15, %rbx
	movq	%rax, %r15
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
	movl	24(%rcx,%r14), %ecx
	movq	_VM_MEMATTR_DEFAULT@GOTPCREL(%rip), %rax
	cmpl	$128, %ecx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_VM_MEMATTR_PREFETCHABLE@GOTPCREL(%rip), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r15
	cmpl	$129, %ecx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_VM_MEMATTR_CACHEABLE@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_trunc_page
	movq	%rax, %rbx
	movq	(%r12), %rax
	movq	8(%rax,%r14), %rdi
	callq	_trunc_page
	movq	%r12, %rdx
	movq	%rax, %r12
	movq	(%rdx), %rax
	movq	16(%rax,%r14), %rax
	addq	%r13, %rax
	cmpq	%rbx, %rax
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %r14
	movq	%r13, %r15
	movq	%rdx, %r13
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_pmap_kenter_attr
	movq	%r13, %rdx
	movq	%r15, %r13
	movq	%r14, %r15
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r15), %rax
	addq	%rax, %r12
	addq	%rax, %rbx
	movq	(%rdx), %rax
	movq	16(%rax,%r14), %rax
	addq	%r13, %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
	jmp	LBB0_13
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_earlyboot_map_idx,4,2          ## @earlyboot_map_idx
	.comm	_earlyboot_mappings,8,3         ## @earlyboot_mappings
	.comm	_hw_direct_map,8,3              ## @hw_direct_map
	.comm	_VM_MEMATTR_DEFAULT,4,2         ## @VM_MEMATTR_DEFAULT
	.comm	_VM_MEMATTR_CACHEABLE,4,2       ## @VM_MEMATTR_CACHEABLE
	.comm	_VM_MEMATTR_PREFETCHABLE,4,2    ## @VM_MEMATTR_PREFETCHABLE
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bs_remap_earlyboot             ; -- Begin function bs_remap_earlyboot
	.p2align	2
_bs_remap_earlyboot:                    ; @bs_remap_earlyboot
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x23, _earlyboot_map_idx@GOTPAGE
Lloh1:
	ldr	x23, [x23, _earlyboot_map_idx@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x24, #0
Lloh2:
	adrp	x25, _earlyboot_mappings@GOTPAGE
Lloh3:
	ldr	x25, [x25, _earlyboot_mappings@GOTPAGEOFF]
Lloh4:
	adrp	x26, _hw_direct_map@GOTPAGE
Lloh5:
	ldr	x26, [x26, _hw_direct_map@GOTPAGEOFF]
Lloh6:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x25]
	lsl	x27, x24, #5
	ldr	x19, [x8, x27]
	ldr	x9, [x26]
	cbz	x9, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_PHYS_TO_DMAP
	ldr	x8, [x25]
	add	x9, x8, x24, lsl #5
	ldr	x10, [x9, #8]
	cmp	x0, x10
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x9, #16]
	mov	x0, x19
	bl	_pmap_dev_direct_mapped
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x27
	ldr	w8, [x8, #24]
	cmp	w8, #128
Lloh8:
	adrp	x9, _VM_MEMATTR_PREFETCHABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VM_MEMATTR_PREFETCHABLE@GOTPAGEOFF]
Lloh10:
	adrp	x10, _VM_MEMATTR_DEFAULT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _VM_MEMATTR_DEFAULT@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	cmp	w8, #129
Lloh12:
	adrp	x8, _VM_MEMATTR_CACHEABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VM_MEMATTR_CACHEABLE@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w20, [x8]
	mov	x0, x19
	bl	_trunc_page
	mov	x21, x0
	ldr	x8, [x25]
	add	x8, x8, x27
	ldr	x0, [x8, #8]
	bl	_trunc_page
	ldr	x8, [x25]
	add	x8, x8, x27
	ldr	x8, [x8, #16]
	add	x8, x8, x19
	cmp	x8, x21
	b.le	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_pmap_kenter_attr
	ldr	x8, [x28]
	add	x22, x22, x8
	add	x21, x8, x21
	ldr	x8, [x25]
	add	x8, x8, x24, lsl #5
	ldr	x8, [x8, #16]
	add	x8, x8, x19
	cmp	x21, x8
	b.lt	LBB0_9
	b	LBB0_2
LBB0_10:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_earlyboot_map_idx,4,2          ; @earlyboot_map_idx
	.comm	_earlyboot_mappings,8,3         ; @earlyboot_mappings
	.comm	_hw_direct_map,8,3              ; @hw_direct_map
	.comm	_VM_MEMATTR_DEFAULT,4,2         ; @VM_MEMATTR_DEFAULT
	.comm	_VM_MEMATTR_CACHEABLE,4,2       ; @VM_MEMATTR_CACHEABLE
	.comm	_VM_MEMATTR_PREFETCHABLE,4,2    ; @VM_MEMATTR_PREFETCHABLE
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
