	.file	"extr_busdma_bounce.c__bus_dmamap_count_pages.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"lowaddr= %d Maxmem= %d, boundary= %d, alignment= %d"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"map= %p, pagesneeded= %d"
.LC2:
	.string	"pagesneeded= %d\n"
	.text
	.p2align 4
	.type	_bus_dmamap_count_pages, @function
_bus_dmamap_count_pages:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rsi]
	test	DWORD PTR DMAMAP_COULD_BOUNCE[rip], eax
	jne	.L22
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	QWORD PTR 8[rsi], 0
	je	.L23
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	r9d, DWORD PTR [rdi]
	mov	ebp, DWORD PTR 4[rdi]
	mov	r13, rdi
	mov	rbx, rcx
	mov	edi, DWORD PTR Maxmem[rip]
	mov	r15, r8
	mov	r14, rdx
	mov	DWORD PTR 12[rsp], r9d
	add	r15, rbx
	call	ptoa@PLT
	mov	edx, DWORD PTR 8[r13]
	mov	r9d, DWORD PTR 12[rsp]
	mov	r8d, ebp
	mov	edi, DWORD PTR KTR_BUSDMA[rip]
	mov	ecx, eax
	lea	rsi, .LC0[rip]
	call	CTR4@PLT
	mov	rcx, QWORD PTR 8[r12]
	mov	rdx, r12
	mov	edi, DWORD PTR KTR_BUSDMA[rip]
	lea	rsi, .LC1[rip]
	call	CTR2@PLT
	cmp	rbx, r15
	jl	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, rbx
	mov	rdi, r14
	call	pmap_extract@PLT
	mov	rdi, r13
	mov	esi, eax
	call	bus_dma_run_filter@PLT
	test	rax, rax
	jne	.L24
.L6:
	add	rbx, rbp
	cmp	r15, rbx
	jle	.L8
.L7:
	mov	rax, QWORD PTR PAGE_MASK[rip]
	mov	rbp, QWORD PTR PAGE_SIZE[rip]
	and	rax, rbx
	sub	rbp, rax
	cmp	QWORD PTR kernel_pmap[rip], r14
	jne	.L4
	mov	rdi, rbx
	call	pmap_kextract@PLT
	mov	rdi, r13
	mov	esi, eax
	call	bus_dma_run_filter@PLT
	test	rax, rax
	je	.L6
.L24:
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, rbp
	call	roundup2@PLT
	add	QWORD PTR 8[r12], 1
	mov	rbp, rax
	add	rbx, rbp
	cmp	r15, rbx
	jg	.L7
.L8:
	mov	rdx, QWORD PTR 8[r12]
	mov	edi, DWORD PTR KTR_BUSDMA[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	lea	rsi, .LC2[rip]
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	CTR1@PLT
	.cfi_endproc
.LFE0:
	.size	_bus_dmamap_count_pages, .-_bus_dmamap_count_pages
	.comm	kernel_pmap,8,8
	.comm	PAGE_SIZE,8,8
	.comm	PAGE_MASK,8,8
	.comm	Maxmem,8,8
	.comm	KTR_BUSDMA,4,4
	.comm	DMAMAP_COULD_BOUNCE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_busdma_bounce.c__bus_dmamap_count_pages.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"lowaddr= %d Maxmem= %d, boundary= %d, alignment= %d"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"map= %p, pagesneeded= %d\000"
	.align	2
.LC2:
	.ascii	"pagesneeded= %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_bus_dmamap_count_pages, %function
_bus_dmamap_count_pages:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r1, .L20
	ldr	ip, [r6]
	ldr	r1, [r1]
	sub	sp, sp, #20
	tst	ip, r1
	ldr	r5, [sp, #56]
	beq	.L1
	mov	r4, r3
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L18
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r7, r0
	ldr	r3, .L20+4
	ldr	fp, .L20+8
	ldr	r0, [r3]
	mov	r8, r2
	ldr	r9, [fp]
	ldr	r10, [r7, #8]
	bl	ptoa
	ldr	ip, [r7]
	ldr	r1, [r7, #4]
	mov	r3, r0
	stm	sp, {r1, ip}
	mov	r2, r10
	ldr	r1, .L20+12
	add	r5, r4, r5
	mov	r0, r9
	str	r5, [sp, #12]
	bl	CTR4
	mov	r2, r6
	ldr	r0, [fp]
	ldr	r3, [r6, #4]
	ldr	r1, .L20+16
	bl	CTR2
	cmp	r4, r5
	bge	.L8
	ldr	fp, .L20+20
	ldr	r10, .L20+24
	ldr	r9, .L20+28
	b	.L7
.L4:
	mov	r1, r4
	mov	r0, r8
	bl	pmap_extract
	mov	r1, r0
	mov	r0, r7
	bl	bus_dma_run_filter
	cmp	r0, #0
	bne	.L19
.L6:
	ldr	r3, [sp, #12]
	add	r4, r4, r5
	cmp	r3, r4
	ble	.L8
.L7:
	ldr	r0, [r10]
	ldr	r3, [r9]
	ldr	r5, [fp]
	and	r0, r0, r4
	cmp	r3, r8
	sub	r5, r5, r0
	bne	.L4
	mov	r0, r4
	bl	pmap_kextract
	mov	r1, r0
	mov	r0, r7
	bl	bus_dma_run_filter
	cmp	r0, #0
	beq	.L6
.L19:
	mov	r0, r5
	ldr	r1, [r7]
	bl	roundup2
	mov	r5, r0
	ldr	r3, [r6, #4]
	add	r4, r4, r5
	add	r3, r3, #1
	str	r3, [r6, #4]
	ldr	r3, [sp, #12]
	cmp	r3, r4
	bgt	.L7
.L8:
	ldr	r3, .L20+8
	ldr	r2, [r6, #4]
	ldr	r0, [r3]
	ldr	r1, .L20+32
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	CTR1
.L21:
	.align	2
.L20:
	.word	DMAMAP_COULD_BOUNCE
	.word	Maxmem
	.word	KTR_BUSDMA
	.word	.LC0
	.word	.LC1
	.word	PAGE_SIZE
	.word	PAGE_MASK
	.word	kernel_pmap
	.word	.LC2
	.size	_bus_dmamap_count_pages, .-_bus_dmamap_count_pages
	.comm	kernel_pmap,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_MASK,4,4
	.comm	Maxmem,4,4
	.comm	KTR_BUSDMA,4,4
	.comm	DMAMAP_COULD_BOUNCE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
