	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bus_dmamap_load_phys          ## -- Begin function _bus_dmamap_load_phys
	.p2align	4, 0x90
__bus_dmamap_load_phys:                 ## @_bus_dmamap_load_phys
	.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	%r8d, %r14d
	movq	%rcx, %r13
	movl	%edx, %ebx
	movq	%rsi, %rcx
	movq	%rdi, %r12
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	testq	%r9, %r9
	jne	LBB0_2
## %bb.1:
	movq	24(%rcx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_2:
	movq	_maploads_total@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_counter_u64_add
	movq	_maploads_physmem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	_BUS_DMA_COULD_BOUNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	movl	%ebx, %edx
	movq	%r13, %rcx
	movl	%r14d, %r8d
	callq	__bus_dmamap_count_phys
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.4:
	movq	_maploads_bounced@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	__bus_dmamap_reserve_pages
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_23
LBB0_5:
	testq	%r13, %r13
	jle	LBB0_20
## %bb.6:
	movq	16(%rsi), %rax
	movslq	8(%rsi), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %r15
	addq	$-24, %r15
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rsi
	movq	%r13, %rdi
	callq	_MIN
	movq	%rax, %r14
	movq	_BUS_DMA_COULD_BOUNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_run_filter
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	cltq
	subq	%rax, %rsi
	movq	%r14, %rdi
	callq	_MIN
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	%rax, %r8
	callq	_add_bounce_page
	movq	%r12, %rsi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %edx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%r15), %edi
	callq	_VM_PAGE_TO_PHYS
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addl	(%r15), %eax
	addl	4(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	8(%rsi), %eax
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	jne	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	addl	%r14d, 4(%r15)
	movl	%ebx, %edx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%eax
	movl	%eax, 8(%rsi)
	cltq
	cmpq	%rax, 8(%r12)
	jl	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	24(%r15), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	$0, 40(%r15)
	movl	%r14d, 28(%r15)
	movl	%ebx, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	%eax, 32(%r15)
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movl	%eax, 24(%r15)
	movl	%ebx, %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	16(%rbp), %r9
	callq	__bus_dmamap_addseg
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	addl	%eax, %ebx
	subq	%rax, %r13
	jg	LBB0_7
LBB0_20:
	testq	%r13, %r13
	je	LBB0_21
LBB0_22:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_bus_dmamap_unload
	movq	_EFBIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_21:
	xorl	%eax, %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_maploads_total,4,2             ## @maploads_total
	.comm	_maploads_physmem,4,2           ## @maploads_physmem
	.comm	_BUS_DMA_COULD_BOUNCE,4,2       ## @BUS_DMA_COULD_BOUNCE
	.comm	_maploads_bounced,4,2           ## @maploads_bounced
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_EFBIG,4,2                      ## @EFBIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bus_dmamap_load_phys          ; -- Begin function _bus_dmamap_load_phys
	.p2align	2
__bus_dmamap_load_phys:                 ; @_bus_dmamap_load_phys
	.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
	mov	x22, x6
	mov	x23, x5
	mov	x25, x4
	mov	x21, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	cbnz	x5, LBB0_2
; %bb.1:
	ldr	x23, [x19, #24]
LBB0_2:
Lloh0:
	adrp	x8, _maploads_total@GOTPAGE
Lloh1:
	ldr	x8, [x8, _maploads_total@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
Lloh3:
	adrp	x8, _maploads_physmem@GOTPAGE
Lloh4:
	ldr	x8, [x8, _maploads_physmem@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	ldr	w8, [x20]
Lloh6:
	adrp	x26, _BUS_DMA_COULD_BOUNCE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _BUS_DMA_COULD_BOUNCE@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	mov	x3, x21
	mov	x4, x25
	bl	__bus_dmamap_count_phys
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _maploads_bounced@GOTPAGE
Lloh9:
	ldr	x8, [x8, _maploads_bounced@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	bl	__bus_dmamap_reserve_pages
	cbnz	w0, LBB0_23
LBB0_5:
	cmp	x21, #1
	b.lt	LBB0_20
; %bb.6:
	mov	w28, #0
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19, #8]
	mov	w10, #24
	madd	x8, x9, x10, x8
	sub	x27, x8, #24
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x20, #16]
	mov	x0, x21
	bl	_MIN
	mov	x25, x0
	ldr	w8, [x20]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_run_filter
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w9, w9, w24
	sub	x1, x8, w9, sxtw
	mov	x0, x25
	bl	_MIN
	mov	x25, x0
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	x3, x24
	mov	x4, x25
	bl	_add_bounce_page
	mov	x2, x0
	b	LBB0_18
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x27, #8]
	bl	_VM_PAGE_TO_PHYS
	ldp	w8, w9, [x27]
	add	w8, w8, w0
	add	w28, w8, w9
	ldr	w8, [x19, #8]
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	w8, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w24, w28
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x27, #4]
	add	w8, w8, w25
	str	w8, [x27, #4]
	mov	x2, x24
	mov	x28, x24
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	x9, [x20, #8]
	cmp	x9, w8, sxtw
	b.lt	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	str	xzr, [x27, #40]
	str	w25, [x27, #28]
	mov	x0, x24
	bl	_PHYS_TO_VM_PAGE
Lloh17:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w24
	str	w8, [x27, #24]!
	str	w0, [x27, #8]
	mov	x2, x24
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x3, x25
	mov	x4, x23
	mov	x5, x22
	bl	__bus_dmamap_addseg
	cbz	x0, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w24, w0
	sub	x21, x21, x0
	cmp	x21, #0
	b.gt	LBB0_7
LBB0_20:
	cbz	x21, LBB0_22
LBB0_21:
	mov	x0, x20
	mov	x1, x19
	bl	_bus_dmamap_unload
Lloh20:
	adrp	x8, _EFBIG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_22:
	mov	w0, #0
LBB0_23:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_maploads_total,4,2             ; @maploads_total
	.comm	_maploads_physmem,4,2           ; @maploads_physmem
	.comm	_BUS_DMA_COULD_BOUNCE,4,2       ; @BUS_DMA_COULD_BOUNCE
	.comm	_maploads_bounced,4,2           ; @maploads_bounced
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_EFBIG,4,2                      ; @EFBIG
.subsections_via_symbols
