	.file	"extr_ali-agp.c_m1541_destroy_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	m1541_destroy_page, @function
m1541_destroy_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L1
	mov	rbp, rdi
	mov	r12d, esi
	test	DWORD PTR AGP_PAGE_DESTROY_UNMAP[rip], esi
	jne	.L11
.L4:
	mov	esi, r12d
	mov	rdi, rbp
	call	agp_generic_destroy_page@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	global_cache_flush@PLT
	mov	esi, DWORD PTR ALI_CACHE_FLUSH_CTRL[rip]
	lea	rdx, 4[rsp]
	mov	rax, QWORD PTR agp_bridge[rip]
	mov	edi, DWORD PTR [rax]
	call	pci_read_config_dword@PLT
	mov	rdi, rbp
	mov	ebx, DWORD PTR 4[rsp]
	and	ebx, DWORD PTR ALI_CACHE_FLUSH_ADDR_MASK[rip]
	call	page_to_phys@PLT
	or	ebx, DWORD PTR ALI_CACHE_FLUSH_EN[rip]
	mov	esi, DWORD PTR ALI_CACHE_FLUSH_CTRL[rip]
	mov	edx, ebx
	or	edx, eax
	mov	rax, QWORD PTR agp_bridge[rip]
	mov	edi, DWORD PTR [rax]
	call	pci_write_config_dword@PLT
	jmp	.L4
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	m1541_destroy_page, .-m1541_destroy_page
	.comm	agp_bridge,8,8
	.comm	ALI_CACHE_FLUSH_EN,4,4
	.comm	ALI_CACHE_FLUSH_CTRL,4,4
	.comm	ALI_CACHE_FLUSH_ADDR_MASK,4,4
	.comm	AGP_PAGE_DESTROY_UNMAP,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_ali-agp.c_m1541_destroy_page.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	m1541_destroy_page, %function
m1541_destroy_page:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L13
	sub	sp, sp, #8
	subs	r5, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	beq	.L1
	ldr	r3, .L13+4
	mov	r4, r1
	ldr	r3, [r3]
	tst	r1, r3
	bne	.L11
.L4:
	mov	r1, r4
	mov	r0, r5
	bl	agp_generic_destroy_page
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r6, .L13+8
	bl	global_cache_flush
	ldr	r7, .L13+12
	ldr	r3, [r6]
	ldr	r1, [r7]
	mov	r2, sp
	ldr	r0, [r3]
	bl	pci_read_config_dword
	ldr	r2, .L13+16
	ldr	r3, [r6]
	ldr	r2, [r2]
	ldr	r6, [sp]
	mov	r0, r5
	ldr	r8, [r3]
	ldr	r7, [r7]
	and	r6, r6, r2
	bl	page_to_phys
	mov	r2, r0
	ldr	r3, .L13+20
	mov	r1, r7
	ldr	r3, [r3]
	mov	r0, r8
	orr	r6, r6, r3
	orr	r2, r6, r2
	bl	pci_write_config_dword
	b	.L4
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	AGP_PAGE_DESTROY_UNMAP
	.word	agp_bridge
	.word	ALI_CACHE_FLUSH_CTRL
	.word	ALI_CACHE_FLUSH_ADDR_MASK
	.word	ALI_CACHE_FLUSH_EN
	.size	m1541_destroy_page, .-m1541_destroy_page
	.comm	agp_bridge,4,4
	.comm	ALI_CACHE_FLUSH_EN,4,4
	.comm	ALI_CACHE_FLUSH_CTRL,4,4
	.comm	ALI_CACHE_FLUSH_ADDR_MASK,4,4
	.comm	AGP_PAGE_DESTROY_UNMAP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
