	.file	"extr_ltdc.c_ltdc_crtc_update_clut.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ltdc_crtc_update_clut, @function
ltdc_crtc_update_clut:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	crtc_to_ltdc@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR 8[rax]
	test	edx, edx
	je	.L1
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L1
	mov	rbp, QWORD PTR [rax]
	mov	eax, DWORD PTR CLUT_SIZE[rip]
	test	eax, eax
	jle	.L1
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR 4[rbp]
	mov	eax, DWORD PTR 8[rbp]
	add	rbp, 12
	mov	esi, DWORD PTR LTDC_L1CLUTWR[rip]
	mov	edi, DWORD PTR [rbx]
	sar	eax, 8
	and	edx, 65280
	or	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 8
	and	eax, 16711680
	or	edx, eax
	mov	eax, r12d
	add	r12d, 1
	sal	eax, 24
	or	edx, eax
	call	reg_write@PLT
	cmp	DWORD PTR CLUT_SIZE[rip], r12d
	jg	.L3
.L1:
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ltdc_crtc_update_clut, .-ltdc_crtc_update_clut
	.comm	LTDC_L1CLUTWR,4,4
	.comm	CLUT_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_ltdc.c_ltdc_crtc_update_clut.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ltdc_crtc_update_clut, %function
ltdc_crtc_update_clut:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	bl	crtc_to_ltdc
	ldr	r3, [r4]
	ldr	r2, [r3, #4]
	cmp	r2, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r3]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r8, .L13
	ldr	r4, [r3]
	ldr	r3, [r8]
	cmp	r3, #0
	pople	{r4, r5, r6, r7, r8, pc}
	mov	r6, r0
	mov	r5, #0
	ldr	r7, .L13+4
.L3:
	ldr	r1, [r4, #8]
	ldr	r2, [r4, #4]
	ldr	r3, [r4], #12
	and	r2, r2, #65280
	lsl	r3, r3, #8
	and	r3, r3, #16711680
	orr	r2, r2, r1, asr #8
	orr	r2, r2, r3
	orr	r2, r2, r5, lsl #24
	ldr	r1, [r7]
	ldr	r0, [r6]
	bl	reg_write
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L3
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	CLUT_SIZE
	.word	LTDC_L1CLUTWR
	.size	ltdc_crtc_update_clut, .-ltdc_crtc_update_clut
	.comm	LTDC_L1CLUTWR,4,4
	.comm	CLUT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
