	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ofw_real_map
_ofw_real_map:                          ## @ofw_real_map
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_of_bounce_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movq	_of_bounce_virt@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_of_bounce_size@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_pmap_bootstrapped@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_3
## %bb.4:
	leaq	_ofw_real_map.emergency_buffer(%rip), %rdi
	movq	%rdi, (%rax)
	movq	_DMAP_BASE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	%edi, %ecx
	andl	%eax, %ecx
	movq	_of_bounce_phys@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_of_bounce_size@GOTPCREL(%rip), %rax
	movl	$255, (%rax)
	movl	$255, %eax
LBB0_5:
	movq	_of_bounce_offset@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	andl	$-4, %ecx
	addl	$4, %ecx
	movl	%ecx, (%r15)
	movslq	%ecx, %rcx
	leaq	(%rcx,%r14), %rdx
	cmpq	%rax, %rdx
	jbe	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_panic
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	addq	%rcx, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	_of_bounce_phys@GOTPCREL(%rip), %rax
	movl	(%r15), %ecx
	movl	(%rax), %ebx
	addl	%ecx, %ebx
	addl	%ecx, %r14d
	movl	%r14d, (%r15)
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_3:
	movq	_DMAP_BASE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ofw_real_map.emergency_buffer,255,4 ## @ofw_real_map.emergency_buffer
	.comm	_of_bounce_mtx,4,2              ## @of_bounce_mtx
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_of_bounce_virt,8,3             ## @of_bounce_virt
	.comm	_pmap_bootstrapped,4,2          ## @pmap_bootstrapped
	.comm	_DMAP_BASE_ADDRESS,8,3          ## @DMAP_BASE_ADDRESS
	.comm	_of_bounce_phys,4,2             ## @of_bounce_phys
	.comm	_of_bounce_size,4,2             ## @of_bounce_size
	.comm	_of_bounce_offset,4,2           ## @of_bounce_offset
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Oversize Open Firmware call!"

	.no_dead_strip	_ofw_real_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ofw_real_map
_ofw_real_map:                          ; @ofw_real_map
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _of_bounce_mtx@GOTPAGE
Lloh4:
	ldr	x0, [x0, _of_bounce_mtx@GOTPAGEOFF]
	bl	_mtx_assert
Lloh5:
	adrp	x9, _of_bounce_virt@GOTPAGE
Lloh6:
	ldr	x9, [x9, _of_bounce_virt@GOTPAGEOFF]
	ldr	x8, [x9]
	cbz	x8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x9, _of_bounce_size@GOTPAGE
Lloh8:
	ldr	x9, [x9, _of_bounce_size@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	b	LBB0_4
LBB0_2:
Lloh10:
	adrp	x8, _pmap_bootstrapped@GOTPAGE
Lloh11:
	ldr	x8, [x8, _pmap_bootstrapped@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.3:
Lloh13:
	adrp	x8, _ofw_real_map.emergency_buffer@PAGE
Lloh14:
	add	x8, x8, _ofw_real_map.emergency_buffer@PAGEOFF
	str	x8, [x9]
Lloh15:
	adrp	x9, _DMAP_BASE_ADDRESS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMAP_BASE_ADDRESS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _of_bounce_phys@GOTPAGE
Lloh19:
	ldr	x10, [x10, _of_bounce_phys@GOTPAGEOFF]
	bic	w9, w8, w9
Lloh20:
	str	w9, [x10]
Lloh21:
	adrp	x10, _of_bounce_size@GOTPAGE
Lloh22:
	ldr	x10, [x10, _of_bounce_size@GOTPAGEOFF]
	mov	w9, #255
Lloh23:
	str	w9, [x10]
LBB0_4:
Lloh24:
	adrp	x21, _of_bounce_offset@GOTPAGE
Lloh25:
	ldr	x21, [x21, _of_bounce_offset@GOTPAGEOFF]
	ldr	w10, [x21]
	and	w10, w10, #0xfffffffc
	add	w10, w10, #4
	str	w10, [x21]
	sxtw	x10, w10
	add	x11, x10, x19
	cmp	x11, x9
	b.ls	LBB0_6
; %bb.5:
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	cbz	x20, LBB0_8
; %bb.7:
	add	x0, x8, x10
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
Lloh28:
	adrp	x8, _of_bounce_phys@GOTPAGE
Lloh29:
	ldr	x8, [x8, _of_bounce_phys@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w0, w9, w8
	add	w8, w9, w19
	str	w8, [x21]
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh31:
	adrp	x8, _DMAP_BASE_ADDRESS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DMAP_BASE_ADDRESS@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	bic	w0, w20, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ofw_real_map.emergency_buffer,255,0 ; @ofw_real_map.emergency_buffer
	.comm	_of_bounce_mtx,4,2              ; @of_bounce_mtx
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_of_bounce_virt,8,3             ; @of_bounce_virt
	.comm	_pmap_bootstrapped,4,2          ; @pmap_bootstrapped
	.comm	_DMAP_BASE_ADDRESS,8,3          ; @DMAP_BASE_ADDRESS
	.comm	_of_bounce_phys,4,2             ; @of_bounce_phys
	.comm	_of_bounce_size,4,2             ; @of_bounce_size
	.comm	_of_bounce_offset,4,2           ; @of_bounce_offset
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Oversize Open Firmware call!"

	.no_dead_strip	_ofw_real_map
.subsections_via_symbols
