	.file	"extr_hid-picolcd_fb.c_picolcd_fb_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	picolcd_fb_update, @function
picolcd_fb_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	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
	mov	rbx, QWORD PTR 8[rdi]
	call	mutex_lock@PLT
	xor	esi, esi
	lea	r13, 4[rbx]
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	edx, DWORD PTR 28[rbx]
	test	edx, edx
	jne	.L2
	mov	rdi, QWORD PTR 8[rbx]
	test	rdi, rdi
	je	.L2
	xor	esi, esi
	call	picolcd_fb_reset@PLT
.L2:
	xor	esi, esi
	mov	rdi, r13
	xor	r12d, r12d
	xor	r14d, r14d
	call	spin_unlock_irqrestore@PLT
.L3:
	xor	ebp, ebp
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, DWORD PTR HID_OUTPUT_FIFO_SIZE[rip]
	add	r12d, 2
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	cmp	eax, r12d
	jg	.L6
	xor	esi, esi
	mov	rdi, r13
	mov	QWORD PTR [rsp], rsi
	call	spin_lock_irqsave@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	r12, QWORD PTR 8[rbx]
	mov	rdi, r13
	call	spin_unlock_irqrestore@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	test	r12, r12
	je	.L1
	mov	edi, DWORD PTR [r12]
	xor	r12d, r12d
	call	hid_hw_wait@PLT
	mov	rdi, r15
	call	mutex_lock@PLT
.L6:
	xor	esi, esi
	mov	rdi, r13
	mov	QWORD PTR 8[rsp], rsi
	call	spin_lock_irqsave@PLT
	mov	r8, QWORD PTR 8[rbx]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r13
	mov	QWORD PTR [rsp], r8
	call	spin_unlock_irqrestore@PLT
	mov	r8, QWORD PTR [rsp]
	test	r8, r8
	je	.L11
	mov	esi, DWORD PTR 16[rbx]
	mov	ecx, ebp
	mov	edx, r14d
	mov	rdi, r8
	call	picolcd_fb_send_tile@PLT
	test	rax, rax
	jne	.L11
	add	ebp, 1
	cmp	ebp, 8
	je	.L33
.L12:
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jne	.L8
	mov	edx, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR 24[rbx]
	mov	r8d, ebp
	mov	ecx, r14d
	mov	edi, DWORD PTR 16[rbx]
	call	picolcd_fb_update_tile@PLT
	test	eax, eax
	jne	.L8
	add	ebp, 1
	cmp	ebp, 8
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L33:
	add	r14d, 1
	cmp	r14d, 4
	jne	.L3
	mov	DWORD PTR [rbx], 0
	test	r12d, r12d
	jne	.L34
.L11:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r15
	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
	jmp	mutex_unlock@PLT
.L34:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r13
	mov	QWORD PTR [rsp], rsi
	call	spin_lock_irqsave@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rbx, QWORD PTR 8[rbx]
	mov	rdi, r13
	call	spin_unlock_irqrestore@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	test	rbx, rbx
	je	.L1
	mov	edi, DWORD PTR [rbx]
	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
	jmp	hid_hw_wait@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 24
	.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
	.cfi_endproc
.LFE0:
	.size	picolcd_fb_update, .-picolcd_fb_update
	.comm	HID_OUTPUT_FIFO_SIZE,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_hid-picolcd_fb.c_picolcd_fb_update.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	picolcd_fb_update, %function
picolcd_fb_update:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, [r0, #4]
	sub	sp, sp, #20
	add	r7, r4, #4
	mov	r9, r0
	bl	mutex_lock
	mov	r1, #0
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r1, [r4, #24]
	cmp	r1, #0
	bne	.L2
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L2
	bl	picolcd_fb_reset
.L2:
	mov	r6, #0
	mov	r0, r7
	mov	r1, r6
	mov	r8, r6
	bl	spin_unlock_irqrestore
	ldr	r10, .L35
.L3:
	mov	r5, #0
	b	.L12
.L8:
	ldr	r3, [r10]
	add	r6, r6, #2
	add	r3, r3, r3, lsr #31
	cmp	r6, r3, asr #1
	blt	.L6
	mov	fp, #0
	mov	r0, r7
	mov	r1, fp
	bl	spin_lock_irqsave
	mov	r1, fp
	ldr	r6, [r4, #8]
	mov	r0, r7
	bl	spin_unlock_irqrestore
	mov	r0, r9
	bl	mutex_unlock
	cmp	r6, fp
	beq	.L1
	ldr	r0, [r6]
	bl	hid_hw_wait
	mov	r0, r9
	bl	mutex_lock
	mov	r6, fp
.L6:
	mov	fp, #0
	mov	r0, r7
	mov	r1, fp
	bl	spin_lock_irqsave
	ldr	r3, [r4, #8]
	mov	r1, fp
	mov	r0, r7
	str	r3, [sp, #12]
	bl	spin_unlock_irqrestore
	ldr	r3, [sp, #12]
	cmp	r3, fp
	beq	.L11
	mov	r0, r3
	mov	r2, r8
	mov	r3, r5
	ldr	r1, [r4, #12]
	bl	picolcd_fb_send_tile
	cmp	r0, fp
	bne	.L11
	add	r5, r5, #1
	cmp	r5, #8
	beq	.L33
.L12:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L8
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #12]
	mov	r3, r8
	str	r5, [sp]
	bl	picolcd_fb_update_tile
	cmp	r0, #0
	bne	.L8
	add	r5, r5, #1
	cmp	r5, #8
	bne	.L12
.L33:
	add	r8, r8, #1
	cmp	r8, #4
	bne	.L3
	mov	r3, #0
	cmp	r6, r3
	str	r3, [r4]
	bne	.L34
.L11:
	mov	r0, r9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	mutex_unlock
.L34:
	mov	fp, r3
	mov	r1, r3
	mov	r0, r7
	bl	spin_lock_irqsave
	mov	r1, fp
	ldr	r4, [r4, #8]
	mov	r0, r7
	bl	spin_unlock_irqrestore
	mov	r0, r9
	bl	mutex_unlock
	cmp	r4, fp
	beq	.L1
	ldr	r0, [r4]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	hid_hw_wait
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L36:
	.align	2
.L35:
	.word	HID_OUTPUT_FIFO_SIZE
	.size	picolcd_fb_update, .-picolcd_fb_update
	.comm	HID_OUTPUT_FIFO_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
