	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bounce_bus_dmamap_load_phys
_bounce_bus_dmamap_load_phys:           ## @bounce_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	$24, %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, %r15
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	testq	%rsi, %rsi
	jne	LBB0_2
## %bb.1:
	movq	_nobounce_dmamap@GOTPCREL(%rip), %r13
LBB0_2:
	testq	%r9, %r9
	jne	LBB0_4
## %bb.3:
	movq	16(%r12), %r9
LBB0_4:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_BUS_DMA_COULD_BOUNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.5:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	movl	%r14d, %r8d
	callq	__bus_dmamap_count_phys
	cmpq	$0, (%r13)
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	__bus_dmamap_reserve_pages
	testl	%eax, %eax
	jne	LBB0_18
LBB0_7:
	testq	%r15, %r15
	jle	LBB0_16
## %bb.8:
	leaq	8(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	movq	%r15, %rdi
	callq	_MIN
	movq	%rax, %r14
	movq	_BUS_DMA_COULD_BOUNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_bus_dma_run_filter
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_9 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	%r13, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	movq	%rax, %r9
	callq	_add_bounce_page
	movl	%eax, %edx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, %edx
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rcx
	movq	16(%rbp), %r9
	callq	__bus_dmamap_addseg
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	%eax, %ebx
	subq	%rax, %r15
	jg	LBB0_9
LBB0_16:
	xorl	%eax, %eax
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:
	movq	_EFBIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nobounce_dmamap,8,3            ## @nobounce_dmamap
	.comm	_BUS_DMA_COULD_BOUNCE,4,2       ## @BUS_DMA_COULD_BOUNCE
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_EFBIG,4,2                      ## @EFBIG
	.no_dead_strip	_bounce_bus_dmamap_load_phys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bounce_bus_dmamap_load_phys
_bounce_bus_dmamap_load_phys:           ; @bounce_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	x20, x6
	mov	x21, x5
	mov	x25, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x0
Lloh0:
	adrp	x8, _nobounce_dmamap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nobounce_dmamap@GOTPAGEOFF]
	cmp	x1, #0
	csel	x24, x8, x1, eq
	cbnz	x5, LBB0_2
; %bb.1:
	ldr	x21, [x23, #16]
LBB0_2:
	ldr	w8, [x23]
Lloh2:
	adrp	x27, _BUS_DMA_COULD_BOUNCE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _BUS_DMA_COULD_BOUNCE@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	mov	x3, x19
	mov	x4, x25
	bl	__bus_dmamap_count_phys
	ldr	x8, [x24]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	__bus_dmamap_reserve_pages
	cbnz	w0, LBB0_15
LBB0_5:
	cmp	x19, #1
	b.lt	LBB0_14
; %bb.6:
	add	x25, x23, #8
Lloh4:
	adrp	x28, _PAGE_MASK@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PAGE_MASK@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x23, #8]
	mov	x0, x19
	bl	_MIN
	mov	x26, x0
	ldr	w8, [x23]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x24]
	cbz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x25
	mov	x1, x22
	bl	_bus_dma_run_filter
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh6:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w9, [x28]
	and	w9, w9, w22
	sub	x1, x8, w9, sxtw
	mov	x0, x26
	bl	_MIN
	mov	x26, x0
	mov	x0, x23
	mov	x1, x24
	mov	w2, #0
	mov	x3, x22
	mov	w4, #0
	mov	x5, x26
	bl	_add_bounce_page
	mov	x2, x0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x22
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	mov	x1, x24
	mov	x3, x26
	mov	x4, x21
	mov	x5, x20
	bl	__bus_dmamap_addseg
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, w0
	sub	x19, x19, x0
	cmp	x19, #0
	b.gt	LBB0_7
LBB0_14:
Lloh9:
	adrp	x8, _EFBIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x19, #0
	csel	w0, wzr, w8, eq
LBB0_15:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_nobounce_dmamap,8,3            ; @nobounce_dmamap
	.comm	_BUS_DMA_COULD_BOUNCE,4,2       ; @BUS_DMA_COULD_BOUNCE
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_EFBIG,4,2                      ; @EFBIG
	.no_dead_strip	_bounce_bus_dmamap_load_phys
.subsections_via_symbols
