	.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
	cmpq	$0, (%rsi)
	je	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_KTR_BUSDMA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	16(%r12), %edx
	movl	8(%r12), %r8d
	movl	12(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_CTR3
	movl	(%rbx), %edi
	movq	(%r14), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_CTR2
	testq	%r15, %r15
	jne	LBB0_2
LBB0_5:
	movq	_KTR_BUSDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CTR1                           ## TAILCALL
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%ebx, %r13d
	subq	%rbx, %r15
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_MIN
	movq	%rax, %rbx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_run_filter
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r13d, %eax
	cltq
	subq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_MIN
	movq	%rax, %rbx
	incq	(%r14)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_KTR_BUSDMA,4,2                 ## @KTR_BUSDMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lowaddr= %d, boundary= %d, alignment= %d"

L_.str.1:                               ## @.str.1
	.asciz	"map= %p, pagesneeded= %d"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
L_.str.2:                               ## @.str.2
	.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	x8, [x1]
	cbz	x8, LBB0_2
; %bb.1:
	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_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _KTR_BUSDMA@GOTPAGE
Lloh1:
	ldr	x24, [x24, _KTR_BUSDMA@GOTPAGEOFF]
	ldr	w0, [x24]
	ldp	w3, w2, [x22, #12]
	ldr	w4, [x22, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_CTR3
	ldr	w0, [x24]
	ldr	x3, [x19]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_CTR2
	cbz	x20, LBB0_7
; %bb.3:
Lloh6:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	adrp	x26, _PAGE_MASK@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PAGE_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, w23
	subs	x20, x20, x23
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x22]
	mov	x0, x20
	bl	_MIN
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	bl	_run_filter
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x25]
	ldr	w9, [x26]
	and	w9, w9, w21
	sub	x1, x8, w9, sxtw
	mov	x0, x23
	bl	_MIN
	mov	x23, x0
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_4
LBB0_7:
	ldr	w0, [x24]
	ldr	x2, [x19]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_KTR_BUSDMA,4,2                 ; @KTR_BUSDMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lowaddr= %d, boundary= %d, alignment= %d"

l_.str.1:                               ; @.str.1
	.asciz	"map= %p, pagesneeded= %d"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
l_.str.2:                               ; @.str.2
	.asciz	"pagesneeded= %d\n"

	.no_dead_strip	__bus_dmamap_count_phys
.subsections_via_symbols
