	.file	"extr_tilcdc_crtc.c_tilcdc_crtc_update_fb.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"already pending page flip!\n"
	.text
	.p2align 4
	.globl	tilcdc_crtc_update_fb
	.type	tilcdc_crtc_update_fb, @function
tilcdc_crtc_update_fb:
.LFB0:
	.cfi_startproc
	endbr64
	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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	to_tilcdc_crtc@PLT
	cmp	QWORD PTR 32[rax], 0
	je	.L2
	mov	rax, QWORD PTR [r12]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	call	dev_err@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L2:
	.cfi_restore_state
	mov	QWORD PTR 32[rax], rbx
	mov	rbp, rax
	mov	rdi, rax
	call	mutex_lock@PLT
	cmp	QWORD PTR 24[rbp], 0
	jne	.L9
.L4:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	lea	r15, 4[rbp]
	xor	esi, esi
	mov	rdi, r15
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, DWORD PTR 20[rbp]
	call	ktime_add_us@PLT
	mov	r14d, eax
	xor	eax, eax
	call	ktime_get@PLT
	mov	edi, r14d
	mov	esi, eax
	call	ktime_sub@PLT
	mov	edi, eax
	call	ktime_to_us@PLT
	cmp	QWORD PTR TILCDC_VBLANK_SAFETY_THRESHOLD_US[rip], rax
	jle	.L5
	mov	QWORD PTR 8[rbp], r13
.L6:
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, r13
	mov	rdi, r12
	call	set_scanout@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	tilcdc_crtc_update_fb, .-tilcdc_crtc_update_fb
	.comm	TILCDC_VBLANK_SAFETY_THRESHOLD_US,8,8
	.comm	EBUSY,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_tilcdc_crtc.c_tilcdc_crtc_update_fb.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"already pending page flip!\012\000"
	.text
	.align	2
	.global	tilcdc_crtc_update_fb
	.syntax unified
	.arm
	.fpu softvfp
	.type	tilcdc_crtc_update_fb, %function
tilcdc_crtc_update_fb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r5, r2
	mov	r6, r0
	bl	to_tilcdc_crtc
	ldr	r3, [r0, #24]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r6]
	ldr	r1, .L14
	ldr	r0, [r3]
	bl	dev_err
	ldr	r3, .L14+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r4, r0
	str	r5, [r0, #24]
	bl	mutex_lock
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L12
.L4:
	mov	r0, r4
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	add	r8, r4, #4
	mov	r1, #0
	mov	r0, r8
	bl	spin_lock_irqsave
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #16]
	bl	ktime_add_us
	mov	r5, r0
	bl	ktime_get
	mov	r1, r0
	mov	r0, r5
	bl	ktime_sub
	bl	ktime_to_us
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, r0
	strgt	r7, [r4, #8]
	ble	.L13
.L6:
	mov	r0, r8
	mov	r1, #0
	bl	spin_unlock_irqrestore
	b	.L4
.L13:
	mov	r1, r7
	mov	r0, r6
	bl	set_scanout
	b	.L6
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	EBUSY
	.word	TILCDC_VBLANK_SAFETY_THRESHOLD_US
	.size	tilcdc_crtc_update_fb, .-tilcdc_crtc_update_fb
	.comm	TILCDC_VBLANK_SAFETY_THRESHOLD_US,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
