	.file	"extr_bfin-t350mcqb-fb.c_bfin_t350mcqb_fb_setcolreg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bfin_t350mcqb_fb_setcolreg, @function
bfin_t350mcqb_fb_setcolreg:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR BFIN_LCD_NBR_PALETTE_ENTRIES[rip], edi
	jle	.L5
	cmp	QWORD PTR 32[r9], 0
	mov	r11d, ecx
	je	.L4
	imul	edx, edx, 151
	imul	esi, esi, 77
	imul	ecx, ecx, 28
	add	esi, edx
	add	esi, ecx
	sar	esi, 8
	mov	r11d, esi
	mov	edx, esi
.L4:
	mov	rax, QWORD PTR FB_VISUAL_TRUECOLOR[rip]
	xor	r10d, r10d
	cmp	QWORD PTR 40[r9], rax
	je	.L12
	mov	eax, r10d
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	edi, 16
	jg	.L5
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ebx, 16
	mov	eax, esi
	mov	esi, r11d
	mov	ecx, ebx
	sub	ecx, DWORD PTR 24[r9]
	movsx	rdi, edi
	sar	eax, cl
	mov	ecx, DWORD PTR 28[r9]
	sal	eax, cl
	mov	ecx, ebx
	sub	ecx, DWORD PTR 16[r9]
	sub	ebx, DWORD PTR 8[r9]
	sar	edx, cl
	mov	ecx, DWORD PTR 20[r9]
	mov	r8d, edx
	sal	r8d, cl
	mov	ecx, ebx
	sar	esi, cl
	mov	ecx, DWORD PTR 12[r9]
	or	eax, r8d
	mov	edx, eax
	mov	rax, QWORD PTR [r9]
	sal	esi, cl
	or	edx, esi
	and	edx, 16777215
	mov	DWORD PTR [rax+rdi*4], edx
	mov	eax, r10d
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore 3
	mov	r10d, DWORD PTR EINVAL[rip]
	neg	r10d
	mov	eax, r10d
	ret
	.cfi_endproc
.LFE0:
	.size	bfin_t350mcqb_fb_setcolreg, .-bfin_t350mcqb_fb_setcolreg
	.comm	FB_VISUAL_TRUECOLOR,8,8
	.comm	EINVAL,4,4
	.comm	BFIN_LCD_NBR_PALETTE_ENTRIES,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_bfin-t350mcqb-fb.c_bfin_t350mcqb_fb_setcolreg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfin_t350mcqb_fb_setcolreg, %function
bfin_t350mcqb_fb_setcolreg:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	lr, .L13
	ldr	lr, [lr]
	cmp	lr, r0
	ldr	lr, [sp, #16]
	ble	.L5
	ldr	ip, [lr, #28]
	cmp	ip, #0
	beq	.L4
	add	r4, r2, r2, lsl #2
	add	ip, r1, r1, lsl #2
	add	r1, r1, ip, lsl #1
	rsb	r4, r4, r4, lsl #4
	add	r2, r2, r4, lsl #1
	rsb	r1, r1, r1, lsl #3
	rsb	r3, r3, r3, lsl #3
	add	r1, r1, r2
	add	r1, r1, r3, lsl #2
	asr	r1, r1, #8
	mov	r3, r1
	mov	r2, r1
.L4:
	ldr	ip, .L13+4
	ldr	r4, [lr, #32]
	ldr	ip, [ip]
	cmp	r4, ip
	beq	.L12
	mov	r0, #0
	pop	{r4, r5, pc}
.L12:
	cmp	r0, #16
	bgt	.L5
	ldr	r4, [lr, #12]
	ldr	ip, [lr, #20]
	rsb	r4, r4, #16
	asr	r2, r2, r4
	ldr	r4, [lr, #16]
	ldr	r5, [lr, #24]
	lsl	r2, r2, r4
	rsb	ip, ip, #16
	ldr	r4, [lr, #4]
	asr	ip, r1, ip
	orr	r2, r2, ip, lsl r5
	rsb	r1, r4, #16
	ldr	ip, [lr, #8]
	asr	r3, r3, r1
	orr	r3, r2, r3, lsl ip
	ldr	r2, [lr]
	bic	r3, r3, #-16777216
	str	r3, [r2, r0, lsl #2]
	mov	r0, #0
	pop	{r4, r5, pc}
.L5:
	ldr	r3, .L13+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, pc}
.L14:
	.align	2
.L13:
	.word	BFIN_LCD_NBR_PALETTE_ENTRIES
	.word	FB_VISUAL_TRUECOLOR
	.word	EINVAL
	.size	bfin_t350mcqb_fb_setcolreg, .-bfin_t350mcqb_fb_setcolreg
	.comm	FB_VISUAL_TRUECOLOR,4,4
	.comm	EINVAL,4,4
	.comm	BFIN_LCD_NBR_PALETTE_ENTRIES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
