	.file	"extr_lcd_mipid.c_read_first_pixel.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	read_first_pixel, @function
read_first_pixel:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rbp, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	mov	rdi, rbp
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	mutex_lock@PLT
	mov	esi, DWORD PTR MIPID_CMD_READ_RED[rip]
	lea	rdx, 12[rsp]
	mov	rdi, rbx
	mov	ecx, 1
	call	mipid_read@PLT
	mov	esi, DWORD PTR MIPID_CMD_READ_GREEN[rip]
	lea	rdx, 16[rsp]
	mov	rdi, rbx
	mov	ecx, 1
	call	mipid_read@PLT
	mov	esi, DWORD PTR MIPID_CMD_READ_BLUE[rip]
	lea	rdx, 20[rsp]
	mov	rdi, rbx
	mov	ecx, 1
	call	mipid_read@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR [rbx]
	cmp	eax, 16
	je	.L2
	cmp	eax, 24
	je	.L3
	xor	eax, eax
	call	BUG@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 16[rsp]
	mov	edx, DWORD PTR 20[rsp]
	sal	eax, 5
	sar	edx
	or	eax, edx
	mov	edx, DWORD PTR 12[rsp]
	sar	edx
	sal	edx, 11
	or	eax, edx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR 16[rsp]
	sar	eax, 3
	sar	edx, 2
	sal	edx, 5
	sal	eax, 11
	or	eax, edx
	mov	edx, DWORD PTR 20[rsp]
	sar	edx, 3
	or	eax, edx
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_first_pixel, .-read_first_pixel
	.comm	MIPID_CMD_READ_RED,4,4
	.comm	MIPID_CMD_READ_GREEN,4,4
	.comm	MIPID_CMD_READ_BLUE,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_lcd_mipid.c_read_first_pixel.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_first_pixel, %function
read_first_pixel:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	ldr	r3, .L11
	add	r5, r0, #4
	sub	sp, sp, #20
	mov	r0, r5
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	mutex_lock
	ldr	r3, .L11+4
	mov	r2, sp
	ldr	r1, [r3]
	mov	r0, r4
	mov	r3, #1
	bl	mipid_read
	ldr	r3, .L11+8
	add	r2, sp, #4
	ldr	r1, [r3]
	mov	r0, r4
	mov	r3, #1
	bl	mipid_read
	ldr	r3, .L11+12
	add	r2, sp, #8
	ldr	r1, [r3]
	mov	r0, r4
	mov	r3, #1
	bl	mipid_read
	mov	r0, r5
	bl	mutex_unlock
	ldr	r3, [r4]
	cmp	r3, #16
	beq	.L2
	cmp	r3, #24
	beq	.L3
	bl	BUG
	mov	r0, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	ldr	r0, [sp, #8]
	ldr	r2, [sp, #4]
	ldr	r3, [sp]
	asr	r0, r0, #1
	orr	r0, r0, r2, lsl #5
	asr	r3, r3, #1
	orr	r0, r0, r3, lsl #11
	b	.L1
.L3:
	ldr	r0, [sp, #4]
	ldr	r3, [sp]
	asr	r0, r0, #2
	ldr	r2, [sp, #8]
	lsl	r0, r0, #5
	asr	r3, r3, #3
	orr	r0, r0, r3, lsl #11
	orr	r0, r0, r2, asr #3
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	MIPID_CMD_READ_RED
	.word	MIPID_CMD_READ_GREEN
	.word	MIPID_CMD_READ_BLUE
	.size	read_first_pixel, .-read_first_pixel
	.comm	MIPID_CMD_READ_RED,4,4
	.comm	MIPID_CMD_READ_GREEN,4,4
	.comm	MIPID_CMD_READ_BLUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
