	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_physmap_entry
_add_physmap_entry:                     ## @add_physmap_entry
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, %r14d
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.1:
	movq	%rsi, %r13
	movq	%rdi, %rax
	movl	(%rcx), %edi
	movl	%edi, %esi
	testl	%edi, %edi
	js	LBB0_10
## %bb.2:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, 8(%rdx,%rsi,8)
	jg	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$2, %rsi
	cmpl	%esi, %edi
	jge	LBB0_3
## %bb.8:
	movl	%edi, %esi
	jmp	LBB0_10
LBB0_4:
	leaq	(%rax,%r13), %r8
	movl	%esi, %ebx
	andl	$-2, %ebx
	cmpq	(%rdx,%rbx,8), %r8
	jle	LBB0_9
## %bb.5:
	movq	_boothowto@GOTPCREL(%rip), %rax
	movq	_RB_VERBOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_22
## %bb.6:
	leaq	L_str.3(%rip), %rdi
	callq	_puts
	jmp	LBB0_22
LBB0_9:
	cmpl	%esi, %edi
	jl	LBB0_12
LBB0_10:
	leaq	(%rax,%r13), %r8
	movslq	%esi, %rbx
	cmpq	(%rdx,%rbx,8), %r8
	jne	LBB0_12
## %bb.11:
	movq	%rax, (%rdx,%rbx,8)
	jmp	LBB0_22
LBB0_12:
	testl	%esi, %esi
	jle	LBB0_15
## %bb.13:
	leal	-1(%rsi), %r8d
	cmpq	%rax, (%rdx,%r8,8)
	jne	LBB0_15
## %bb.14:
	addq	%r13, %rax
	movq	%rax, (%rdx,%r8,8)
	jmp	LBB0_22
LBB0_15:
	addl	$2, %edi
	movl	%edi, (%rcx)
	movq	_PHYS_AVAIL_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	jne	LBB0_16
## %bb.18:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_16:
	movslq	%esi, %r8
	cmpl	%esi, %edi
	jle	LBB0_17
## %bb.19:
	movslq	%edi, %rcx
	movslq	%esi, %rdi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rdx,%rcx,8), %xmm0
	movups	%xmm0, (%rdx,%rcx,8)
	leaq	-2(%rcx), %rbx
	movq	%rbx, %rcx
	cmpq	%rdi, %rbx
	jg	LBB0_20
	jmp	LBB0_21
LBB0_17:
	movq	%r8, %rdi
LBB0_21:
	movq	%rax, (%rdx,%rdi,8)
	addq	%rax, %r13
	leal	1(%rsi), %r15d
	movq	%r13, 8(%rdx,%r8,8)
	leaq	L_.str.2(%rip), %r12
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_printf
LBB0_22:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_boothowto,4,2                  ## @boothowto
	.comm	_RB_VERBOSE,4,2                 ## @RB_VERBOSE
	.comm	_PHYS_AVAIL_ENTRIES,4,2         ## @PHYS_AVAIL_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"physmap[%d] = 0x%016lx\n"

L_str:                                  ## @str
	.asciz	"Too many segments in the physical address map, giving up"

L_str.3:                                ## @str.3
	.asciz	"Overlapping memory regions, ignoring second region"

	.no_dead_strip	_add_physmap_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_physmap_entry
_add_physmap_entry:                     ; @add_physmap_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x1, LBB0_28
; %bb.1:
	ldr	w9, [x3]
	tbnz	w9, #31, LBB0_5
; %bb.2:
	mov	x8, #0
	add	x10, x2, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x8, lsl #3]
	cmp	x11, x0
	b.gt	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #2
	cmp	w9, w8
	b.ge	LBB0_3
LBB0_5:
	mov	x8, x9
LBB0_6:
	ldr	x10, [x2, w8, sxtw #3]
	add	x11, x1, x0
	cmp	x11, x10
	b.ne	LBB0_13
; %bb.7:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x8, w8
	str	x0, [x2, x8, lsl #3]
	b	LBB0_28
LBB0_8:
	and	x10, x8, #0xfffffffe
	ldr	x10, [x2, x10, lsl #3]
	add	x11, x1, x0
	cmp	x11, x10
	b.le	LBB0_11
; %bb.9:
Lloh0:
	adrp	x8, _boothowto@GOTPAGE
Lloh1:
	ldr	x8, [x8, _boothowto@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RB_VERBOSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RB_VERBOSE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.10:
Lloh6:
	adrp	x0, l_str.3@PAGE
Lloh7:
	add	x0, x0, l_str.3@PAGEOFF
	bl	_puts
	b	LBB0_28
LBB0_11:
	cmp	w9, w8
	b.ge	LBB0_25
; %bb.12:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_13:
	subs	w10, w8, #1
	b.lt	LBB0_16
; %bb.14:
	ldr	x11, [x2, w10, uxtw #3]
	cmp	x11, x0
	b.ne	LBB0_16
; %bb.15:
	add	x8, x0, x1
	str	x8, [x2, x10, lsl #3]
	b	LBB0_28
LBB0_16:
	add	w9, w9, #2
	str	w9, [x3]
Lloh8:
	adrp	x10, _PHYS_AVAIL_ENTRIES@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PHYS_AVAIL_ENTRIES@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.17:
Lloh11:
	adrp	x0, l_str@PAGE
Lloh12:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #0
	b	LBB0_29
LBB0_18:
	cmp	w9, w8
	b.le	LBB0_26
; %bb.19:
	sxtw	x13, w9
	mov	x9, x8
	sxtw	x9, w9
	mvn	x10, x9
	add	x11, x10, x13
	mov	x10, x13
	cmp	x11, #2
	b.lo	LBB0_23
; %bb.20:
	lsr	x10, x11, #1
	add	x11, x10, #1
	and	x12, x11, #0xfffffffffffffffe
	sub	x10, x13, x12, lsl #1
	add	x13, x2, x13, lsl #3
	sub	x13, x13, #16
	mov	x14, x12
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	sub	x15, x13, #16
	ld2.2d	{ v0, v1 }, [x15]
	st2.2d	{ v0, v1 }, [x13]
	sub	x13, x13, #32
	sub	x14, x14, #2
	cbnz	x14, LBB0_21
; %bb.22:
	cmp	x11, x12
	b.eq	LBB0_27
LBB0_23:
	add	x12, x2, x10, lsl #3
	mov	x11, x12
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	sub	x10, x10, #2
	ldr	q0, [x11, #-16]!
	str	q0, [x12]
	mov	x12, x11
	cmp	x10, x9
	b.gt	LBB0_24
	b	LBB0_27
LBB0_25:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_6
LBB0_26:
	mov	x9, x8
	sxtw	x9, w9
LBB0_27:
	str	x0, [x2, x9, lsl #3]
	add	x20, x1, x0
	add	w21, w8, #1
	str	x20, [x2, w21, sxtw #3]
	stp	x8, x0, [sp]
Lloh13:
	adrp	x19, l_.str.2@PAGE
Lloh14:
	add	x19, x19, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_printf
	stp	x21, x20, [sp]
	mov	x0, x19
	bl	_printf
LBB0_28:
	mov	w0, #1
LBB0_29:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_boothowto,4,2                  ; @boothowto
	.comm	_RB_VERBOSE,4,2                 ; @RB_VERBOSE
	.comm	_PHYS_AVAIL_ENTRIES,4,2         ; @PHYS_AVAIL_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"physmap[%d] = 0x%016lx\n"

l_str:                                  ; @str
	.asciz	"Too many segments in the physical address map, giving up"

l_str.3:                                ; @str.3
	.asciz	"Overlapping memory regions, ignoring second region"

	.no_dead_strip	_add_physmap_entry
.subsections_via_symbols
