	.file	"extr_r100.c_r100_page_flip.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Update pending now high. Unlocking vupdate_lock.\n"
	.text
	.p2align 4
	.globl	r100_page_flip
	.type	r100_page_flip, @function
r100_page_flip:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movsx	rax, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rcx, QWORD PTR 8[rdi]
	mov	r13d, DWORD PTR RADEON_CRTC_OFFSET__OFFSET_LOCK[rip]
	mov	rdi, QWORD PTR RADEON_CRTC_OFFSET[rip]
	mov	r12, QWORD PTR [rcx+rax*8]
	or	r13d, edx
	mov	esi, r13d
	add	rdi, QWORD PTR [r12]
	call	WREG32@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, 1
	add	ebx, 1
	call	udelay@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L2
.L3:
	mov	rdi, QWORD PTR RADEON_CRTC_OFFSET[rip]
	add	rdi, QWORD PTR [r12]
	call	RREG32@PLT
	test	DWORD PTR RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET[rip], eax
	je	.L7
.L2:
	lea	rdi, .LC0[rip]
	call	DRM_DEBUG@PLT
	mov	esi, DWORD PTR RADEON_CRTC_OFFSET__OFFSET_LOCK[rip]
	mov	rdi, QWORD PTR RADEON_CRTC_OFFSET[rip]
	add	rdi, QWORD PTR [r12]
	not	esi
	and	esi, r13d
	call	WREG32@PLT
	mov	rdi, QWORD PTR RADEON_CRTC_OFFSET[rip]
	add	rdi, QWORD PTR [r12]
	call	RREG32@PLT
	and	eax, DWORD PTR RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	r100_page_flip, .-r100_page_flip
	.comm	RADEON_CRTC_OFFSET__OFFSET_LOCK,4,4
	.comm	RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET,4,4
	.comm	RADEON_CRTC_OFFSET,8,8
	.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_r100.c_r100_page_flip.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Update pending now high. Unlocking vupdate_lock.\012"
	.ascii	"\000"
	.text
	.align	2
	.global	r100_page_flip
	.syntax unified
	.arm
	.fpu softvfp
	.type	r100_page_flip, %function
r100_page_flip:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r3, [r0, #4]
	ldr	r10, .L10
	ldr	r7, [r3, r1, lsl #2]
	ldr	r6, .L10+4
	ldr	r1, [r10]
	ldr	r3, [r6]
	ldr	r0, [r7]
	orr	r9, r2, r1
	add	r0, r0, r3
	mov	r1, r9
	bl	WREG32
	ldr	r3, [r5]
	cmp	r3, #0
	ldrle	r8, .L10+8
	ble	.L2
	mov	r4, #0
	ldr	r8, .L10+8
	b	.L3
.L9:
	mov	r0, #1
	bl	udelay
	ldr	r3, [r5]
	cmp	r3, r4
	ble	.L2
.L3:
	ldr	r3, [r6]
	ldr	r0, [r7]
	add	r4, r4, #1
	add	r0, r0, r3
	bl	RREG32
	ldr	r3, [r8]
	tst	r0, r3
	beq	.L9
.L2:
	ldr	r0, .L10+12
	bl	DRM_DEBUG
	ldr	r3, [r6]
	ldr	r1, [r10]
	ldr	r0, [r7]
	bic	r1, r9, r1
	add	r0, r0, r3
	bl	WREG32
	ldr	r3, [r6]
	ldr	r0, [r7]
	add	r0, r0, r3
	bl	RREG32
	ldr	r3, [r8]
	and	r0, r0, r3
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	RADEON_CRTC_OFFSET__OFFSET_LOCK
	.word	RADEON_CRTC_OFFSET
	.word	RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET
	.word	.LC0
	.size	r100_page_flip, .-r100_page_flip
	.comm	RADEON_CRTC_OFFSET__OFFSET_LOCK,4,4
	.comm	RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET,4,4
	.comm	RADEON_CRTC_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
