	.file	"extr_pci-gart_64.c_gart_unmap_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gart_unmap_page, @function
gart_unmap_page:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, DWORD PTR PAGE_SIZE[rip]
	mov	eax, DWORD PTR EMERGENCY_PAGES[rip]
	mov	rdi, rsi
	mov	rsi, rdx
	mov	rdx, QWORD PTR iommu_bus_base[rip]
	imul	eax, r8d
	cdqe
	add	rax, rdx
	cmp	rax, rdi
	jg	.L1
	mov	rax, QWORD PTR iommu_size[rip]
	add	rax, rdx
	cmp	rax, rdi
	jg	.L10
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rbp, rdi
	sub	rbp, rdx
	mov	edx, r8d
	sar	rbp, cl
	call	iommu_num_pages@PLT
	mov	esi, eax
	test	eax, eax
	jle	.L3
	mov	rcx, QWORD PTR iommu_gatt_base[rip]
	lea	eax, -1[rax]
	add	rax, rbp
	lea	rdx, [rcx+rbp*4]
	lea	rdi, 4[rcx+rax*4]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, DWORD PTR gart_unmapped_entry[rip]
	add	rdx, 4
	mov	DWORD PTR -4[rdx], ecx
	cmp	rdx, rdi
	jne	.L4
.L3:
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	free_iommu@PLT
	.cfi_endproc
.LFE0:
	.size	gart_unmap_page, .-gart_unmap_page
	.comm	iommu_size,8,8
	.comm	iommu_gatt_base,8,8
	.comm	iommu_bus_base,8,8
	.comm	gart_unmapped_entry,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	EMERGENCY_PAGES,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_pci-gart_64.c_gart_unmap_page.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gart_unmap_page, %function
gart_unmap_page:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r0, r1
	ldr	ip, .L8
	ldr	r1, .L8+4
	ldr	r3, .L8+8
	push	{r4, lr}
	ldr	r3, [r3]
	ldr	lr, [ip]
	ldr	ip, [r1]
	mla	r3, lr, r3, ip
	cmp	r3, r0
	popgt	{r4, pc}
	ldr	r3, .L8+12
	ldr	r3, [r3]
	add	r3, ip, r3
	cmp	r3, r0
	pople	{r4, pc}
	ldr	r3, .L8+16
	mov	r1, r2
	ldr	r4, [r3]
	sub	ip, r0, ip
	mov	r2, lr
	asr	r4, ip, r4
	bl	iommu_num_pages
	subs	r1, r0, #0
	ble	.L3
	ldr	r3, .L8+20
	add	ip, r1, r4
	ldr	r2, [r3]
	ldr	lr, .L8+24
	add	r3, r2, r4, lsl #2
	add	ip, r2, ip, lsl #2
.L4:
	ldr	r2, [lr]
	str	r2, [r3], #4
	cmp	r3, ip
	bne	.L4
.L3:
	mov	r0, r4
	pop	{r4, lr}
	b	free_iommu
.L9:
	.align	2
.L8:
	.word	PAGE_SIZE
	.word	iommu_bus_base
	.word	EMERGENCY_PAGES
	.word	iommu_size
	.word	PAGE_SHIFT
	.word	iommu_gatt_base
	.word	gart_unmapped_entry
	.size	gart_unmap_page, .-gart_unmap_page
	.comm	iommu_size,4,4
	.comm	iommu_gatt_base,4,4
	.comm	iommu_bus_base,4,4
	.comm	gart_unmapped_entry,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	EMERGENCY_PAGES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
