	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bus_dmamap_count_phys
__bus_dmamap_count_phys:                ## @_bus_dmamap_count_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_DMAMAP_COULD_BOUNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_10
## %bb.1:
	movq	%rsi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_2
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rcx, %r15
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	movl	%edx, %ebx
	movq	%rdi, %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addl	%r13d, %ebx
	subq	%r13, %r15
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_MIN
	movq	%rax, %r13
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bus_dma_run_filter
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 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	%r13, %rdi
	callq	_MIN
	movq	%rax, %r13
	incq	8(%r14)
	jmp	LBB0_7
LBB0_8:
	movq	8(%r14), %rdx
	jmp	LBB0_9
LBB0_3:
	xorl	%edx, %edx
LBB0_9:
	movq	_KTR_BUSDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CTR1                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAMAP_COULD_BOUNCE,4,2        ## @DMAMAP_COULD_BOUNCE
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_KTR_BUSDMA,4,2                 ## @KTR_BUSDMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pagesneeded= %d\n"

	.no_dead_strip	__bus_dmamap_count_phys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bus_dmamap_count_phys
__bus_dmamap_count_phys:                ; @_bus_dmamap_count_phys
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _DMAMAP_COULD_BOUNCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMAMAP_COULD_BOUNCE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x3
	cbz	x3, LBB0_9
; %bb.4:
	mov	x21, x2
	mov	x22, x0
Lloh3:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x25, _PAGE_MASK@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PAGE_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, w23
	subs	x19, x19, x23
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x22]
	mov	x0, x19
	bl	_MIN
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	bl	_bus_dma_run_filter
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	ldr	w9, [x25]
	and	w9, w9, w21
	sub	x1, x8, w9, sxtw
	mov	x0, x23
	bl	_MIN
	mov	x23, x0
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
	b	LBB0_5
LBB0_8:
	ldr	x2, [x20, #8]
	b	LBB0_10
LBB0_9:
	mov	x2, #0
LBB0_10:
Lloh7:
	adrp	x8, _KTR_BUSDMA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KTR_BUSDMA@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_CTR1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAMAP_COULD_BOUNCE,4,2        ; @DMAMAP_COULD_BOUNCE
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_KTR_BUSDMA,4,2                 ; @KTR_BUSDMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pagesneeded= %d\n"

	.no_dead_strip	__bus_dmamap_count_phys
.subsections_via_symbols
