	.file	"extr_mbxfb.c_mbxfb_set_par.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mbxfb_set_par, @function
mbxfb_set_par:
.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
	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
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	edi, DWORD PTR GSCTRL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	readl@PLT
	mov	edi, DWORD PTR GSADR[rip]
	mov	ebp, eax
	call	readl@PLT
	mov	edx, DWORD PTR [rbx]
	mov	edi, DWORD PTR GSCTRL_GPIXFMT[rip]
	mov	r13d, eax
	mov	eax, DWORD PTR 4[rbx]
	imul	eax, edx
	test	eax, eax
	lea	edx, 7[rax]
	cmovns	edx, eax
	sar	edx, 3
	mov	DWORD PTR 48[rbx], edx
	call	FMsk@PLT
	cmp	DWORD PTR 4[rbx], 8
	je	.L11
	lea	rdi, 56[rbx]
	mov	r12d, eax
	call	fb_dealloc_cmap@PLT
	mov	eax, DWORD PTR GSCTRL_LUT_EN[rip]
	not	eax
	and	ebp, eax
	mov	eax, r12d
	not	eax
	and	ebp, eax
	mov	eax, DWORD PTR FB_VISUAL_TRUECOLOR[rip]
	mov	DWORD PTR 52[rbx], eax
	mov	eax, DWORD PTR 4[rbx]
	cmp	eax, 24
	je	.L4
	cmp	eax, 32
	je	.L5
	cmp	eax, 16
	je	.L12
.L6:
	mov	edi, DWORD PTR GSCTRL_GSWIDTH[rip]
	call	FMsk@PLT
	mov	edi, DWORD PTR GSCTRL_GSHEIGHT[rip]
	mov	r12d, eax
	call	FMsk@PLT
	mov	edi, DWORD PTR 8[rbx]
	or	r12d, eax
	call	Gsctrl_Width@PLT
	mov	edi, DWORD PTR 12[rbx]
	not	r12d
	and	ebp, r12d
	mov	r12d, eax
	call	Gsctrl_Height@PLT
	mov	esi, DWORD PTR GSCTRL[rip]
	or	r12d, eax
	mov	edi, r12d
	or	edi, ebp
	call	write_reg_dly@PLT
	mov	edi, DWORD PTR GSADR_SRCSTRIDE[rip]
	call	FMsk@PLT
	mov	edi, DWORD PTR 8[rbx]
	not	eax
	and	r13d, eax
	mov	eax, DWORD PTR 4[rbx]
	imul	eax, edi
	test	eax, eax
	lea	edi, 127[rax]
	cmovns	edi, eax
	sar	edi, 7
	sub	edi, 1
	call	Gsadr_Srcstride@PLT
	mov	esi, DWORD PTR GSADR[rip]
	mov	edi, r13d
	or	edi, eax
	call	write_reg_dly@PLT
	mov	edi, DWORD PTR 40[rbx]
	lea	rsi, 28[rsp]
	call	mbxfb_get_pixclock@PLT
	mov	edi, DWORD PTR 36[rsp]
	mov	r12d, DWORD PTR DISPPLL[rip]
	mov	DWORD PTR 40[rbx], eax
	call	Disp_Pll_M@PLT
	mov	edi, DWORD PTR 32[rsp]
	mov	ebp, eax
	call	Disp_Pll_N@PLT
	mov	edi, DWORD PTR 28[rsp]
	or	ebp, eax
	call	Disp_Pll_P@PLT
	or	ebp, DWORD PTR DISP_PLL_EN[rip]
	mov	esi, r12d
	mov	edi, ebp
	or	edi, eax
	call	write_reg_dly@PLT
	mov	r12d, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 16[rbx]
	mov	r15d, DWORD PTR 20[rbx]
	mov	r13d, DWORD PTR 32[rbx]
	mov	r14d, DWORD PTR 8[rbx]
	mov	ebp, DWORD PTR 12[rbx]
	add	r15d, edi
	add	r13d, r12d
	mov	r9d, DWORD PTR 24[rbx]
	mov	r8d, DWORD PTR 36[rbx]
	add	ebp, r13d
	add	r14d, r15d
	mov	esi, DWORD PTR DHT01[rip]
	add	r8d, ebp
	add	r9d, r14d
	mov	DWORD PTR 8[rsp], r8d
	mov	DWORD PTR 4[rsp], esi
	mov	DWORD PTR 12[rsp], r9d
	call	Dht01_Hbps@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	ebx, eax
	mov	edi, r9d
	call	Dht01_Ht@PLT
	mov	esi, DWORD PTR 4[rsp]
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	esi, DWORD PTR DHT02[rip]
	mov	edi, r15d
	mov	DWORD PTR 4[rsp], esi
	call	Dht02_Hlbs@PLT
	mov	edi, r15d
	mov	ebx, eax
	call	Dht02_Has@PLT
	mov	esi, DWORD PTR 4[rsp]
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	esi, DWORD PTR DHT03[rip]
	mov	edi, r14d
	mov	DWORD PTR 4[rsp], esi
	call	Dht03_Hfps@PLT
	mov	edi, r14d
	mov	ebx, eax
	call	Dht03_Hrbs@PLT
	mov	esi, DWORD PTR 4[rsp]
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	esi, DWORD PTR DHDET[rip]
	mov	edi, r15d
	mov	DWORD PTR 4[rsp], esi
	call	Dhdet_Hdes@PLT
	mov	edi, r14d
	mov	ebx, eax
	call	Dhdet_Hdef@PLT
	mov	esi, DWORD PTR 4[rsp]
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	edi, r12d
	mov	r14d, DWORD PTR DVT01[rip]
	call	Dvt01_Vbps@PLT
	mov	r8d, DWORD PTR 8[rsp]
	mov	ebx, eax
	mov	edi, r8d
	call	Dvt01_Vt@PLT
	mov	esi, r14d
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	edi, r13d
	mov	r14d, DWORD PTR DVT02[rip]
	call	Dvt02_Vtbs@PLT
	mov	edi, r13d
	mov	ebx, eax
	call	Dvt02_Vas@PLT
	mov	esi, r14d
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	edi, ebp
	mov	r14d, DWORD PTR DVT03[rip]
	call	Dvt03_Vfps@PLT
	mov	edi, ebp
	mov	ebx, eax
	call	Dvt03_Vbbs@PLT
	mov	esi, r14d
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	edi, r13d
	mov	r14d, DWORD PTR DVDET[rip]
	call	Dvdet_Vdes@PLT
	mov	edi, ebp
	mov	ebx, eax
	call	Dvdet_Vdef@PLT
	mov	esi, r14d
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	edi, ebp
	mov	r13d, DWORD PTR DVECTRL[rip]
	call	Dvectrl_Vevent@PLT
	mov	edi, r12d
	mov	ebx, eax
	call	Dvectrl_Vfetch@PLT
	mov	esi, r13d
	or	ebx, eax
	mov	edi, ebx
	call	write_reg_dly@PLT
	mov	ebp, DWORD PTR DSCTRL[rip]
	mov	edi, ebp
	call	readl@PLT
	or	eax, DWORD PTR DSCTRL_SYNCGEN_EN[rip]
	mov	esi, ebp
	mov	edi, eax
	call	write_reg_dly@PLT
	mov	esi, DWORD PTR DINTRE[rip]
	mov	edi, DWORD PTR DINTRE_VEVENT0_EN[rip]
	call	write_reg_dly@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 56
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	DWORD PTR 44[rbx], 5
	je	.L14
	or	ebp, DWORD PTR GSCTRL_GPIXFMT_RGB565[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	or	ebp, DWORD PTR GSCTRL_GPIXFMT_ARGB8888[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	or	ebp, DWORD PTR GSCTRL_GPIXFMT_RGB888[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	or	ebp, DWORD PTR GSCTRL_GPIXFMT_ARGB1555[rip]
	jmp	.L6
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mbxfb_set_par, .-mbxfb_set_par
	.comm	GSCTRL_LUT_EN,4,4
	.comm	GSCTRL_GSWIDTH,4,4
	.comm	GSCTRL_GSHEIGHT,4,4
	.comm	GSCTRL_GPIXFMT_RGB888,4,4
	.comm	GSCTRL_GPIXFMT_RGB565,4,4
	.comm	GSCTRL_GPIXFMT_ARGB8888,4,4
	.comm	GSCTRL_GPIXFMT_ARGB1555,4,4
	.comm	GSCTRL_GPIXFMT,4,4
	.comm	GSCTRL,4,4
	.comm	GSADR_SRCSTRIDE,4,4
	.comm	GSADR,4,4
	.comm	FB_VISUAL_TRUECOLOR,4,4
	.comm	EINVAL,4,4
	.comm	DVT03,4,4
	.comm	DVT02,4,4
	.comm	DVT01,4,4
	.comm	DVECTRL,4,4
	.comm	DVDET,4,4
	.comm	DSCTRL_SYNCGEN_EN,4,4
	.comm	DSCTRL,4,4
	.comm	DISP_PLL_EN,4,4
	.comm	DISPPLL,4,4
	.comm	DINTRE_VEVENT0_EN,4,4
	.comm	DINTRE,4,4
	.comm	DHT03,4,4
	.comm	DHT02,4,4
	.comm	DHT01,4,4
	.comm	DHDET,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_mbxfb.c_mbxfb_set_par.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mbxfb_set_par, %function
mbxfb_set_par:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L14
	ldr	r3, .L14+4
	mov	r4, r0
	sub	sp, sp, #28
	ldr	r0, [r8]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	readl
	ldr	r7, .L14+8
	mov	r5, r0
	ldr	r0, [r7]
	bl	readl
	ldr	r2, [r4, #4]
	ldr	r3, [r4]
	mov	r6, r0
	mul	r3, r2, r3
	cmp	r3, #0
	add	r2, r3, #7
	movlt	r3, r2
	ldr	r2, .L14+12
	asr	r3, r3, #3
	str	r3, [r4, #48]
	ldr	r0, [r2]
	bl	FMsk
	ldr	r3, [r4, #4]
	cmp	r3, #8
	beq	.L11
	mov	r9, r0
	add	r0, r4, #56
	bl	fb_dealloc_cmap
	ldr	r2, .L14+16
	ldr	r3, .L14+20
	ldr	r0, [r2]
	ldr	r2, [r3]
	ldr	r3, [r4, #4]
	bic	r5, r5, r0
	cmp	r3, #24
	bic	r5, r5, r9
	str	r2, [r4, #52]
	beq	.L4
	cmp	r3, #32
	beq	.L5
	cmp	r3, #16
	beq	.L12
.L6:
	ldr	r3, .L14+24
	ldr	r9, .L14+28
	ldr	r0, [r3]
	bl	FMsk
	ldr	r3, .L14+32
	mov	r10, r0
	ldr	r0, [r3]
	bl	FMsk
	mov	r3, r0
	ldr	r0, [r4, #8]
	orr	r10, r10, r3
	bl	Gsctrl_Width
	bic	r5, r5, r10
	mov	r10, r0
	ldr	r0, [r4, #12]
	bl	Gsctrl_Height
	orr	r0, r10, r0
	ldr	r1, [r8]
	orr	r0, r0, r5
	bl	write_reg_dly
	ldr	r3, .L14+36
	ldr	r0, [r3]
	bl	FMsk
	ldmib	r4, {r2, r3}
	mul	r3, r2, r3
	bic	r6, r6, r0
	cmp	r3, #0
	add	r0, r3, #127
	movlt	r3, r0
	asr	r0, r3, #7
	sub	r0, r0, #1
	bl	Gsadr_Srcstride
	ldr	r1, [r7]
	orr	r0, r6, r0
	bl	write_reg_dly
	add	r1, sp, #8
	ldr	r0, [r4, #40]
	bl	mbxfb_get_pixclock
	mov	r3, r0
	ldr	r0, [sp, #16]
	str	r3, [r4, #40]
	bl	Disp_Pll_M
	mov	r5, r0
	ldr	r0, [sp, #12]
	bl	Disp_Pll_N
	mov	r3, r0
	ldr	r0, [sp, #8]
	orr	r5, r5, r3
	bl	Disp_Pll_P
	ldr	r3, .L14+40
	ldr	r2, .L14+44
	ldr	r3, [r3]
	ldr	r1, [r2]
	orr	r5, r5, r3
	orr	r0, r5, r0
	bl	write_reg_dly
	ldr	r0, [r4, #16]
	ldr	r7, [r4, #20]
	ldr	r6, [r4, #8]
	ldr	r8, [r4, #28]
	add	r7, r0, r7
	ldr	r5, [r4, #32]
	ldr	r3, [r4, #24]
	ldr	r2, [r4, #12]
	add	r6, r7, r6
	add	r5, r8, r5
	add	r3, r6, r3
	ldr	r10, [r4, #36]
	str	r3, [sp, #4]
	add	r4, r5, r2
	bl	Dht01_Hbps
	ldr	r3, [sp, #4]
	mov	fp, r0
	mov	r0, r3
	bl	Dht01_Ht
	ldr	r3, .L14+48
	orr	r0, fp, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r7
	bl	Dht02_Hlbs
	mov	fp, r0
	mov	r0, r7
	bl	Dht02_Has
	ldr	r3, .L14+52
	orr	r0, fp, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r6
	bl	Dht03_Hfps
	mov	fp, r0
	mov	r0, r6
	bl	Dht03_Hrbs
	ldr	r3, .L14+56
	orr	r0, fp, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r7
	bl	Dhdet_Hdes
	mov	r3, r0
	mov	r0, r6
	mov	r6, r3
	bl	Dhdet_Hdef
	ldr	r3, .L14+60
	orr	r0, r6, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r8
	bl	Dvt01_Vbps
	add	r10, r4, r10
	mov	r6, r0
	mov	r0, r10
	bl	Dvt01_Vt
	ldr	r3, .L14+64
	orr	r0, r6, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r5
	bl	Dvt02_Vtbs
	mov	r6, r0
	mov	r0, r5
	bl	Dvt02_Vas
	ldr	r3, .L14+68
	orr	r0, r6, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r4
	bl	Dvt03_Vfps
	mov	r6, r0
	mov	r0, r4
	bl	Dvt03_Vbbs
	ldr	r3, .L14+72
	orr	r0, r6, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r5
	bl	Dvdet_Vdes
	mov	r5, r0
	mov	r0, r4
	bl	Dvdet_Vdef
	ldr	r3, .L14+76
	orr	r0, r5, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	mov	r0, r4
	bl	Dvectrl_Vevent
	mov	r4, r0
	mov	r0, r8
	bl	Dvectrl_Vfetch
	ldr	r3, .L14+80
	orr	r0, r4, r0
	ldr	r1, [r3]
	bl	write_reg_dly
	ldr	r0, [r9]
	bl	readl
	ldr	r3, .L14+84
	ldr	r1, [r9]
	ldr	r3, [r3]
	orr	r0, r0, r3
	bl	write_reg_dly
	ldr	r2, .L14+88
	ldr	r3, .L14+92
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	write_reg_dly
	mov	r0, #0
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, .L14+96
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L12:
	ldr	r3, [r4, #44]
	cmp	r3, #5
	ldreq	r3, .L14+100
	ldrne	r3, .L14+104
	ldr	r3, [r3]
	orr	r5, r5, r3
	b	.L6
.L5:
	ldr	r3, .L14+108
	ldr	r3, [r3]
	orr	r5, r5, r3
	b	.L6
.L4:
	ldr	r3, .L14+112
	ldr	r3, [r3]
	orr	r5, r5, r3
	b	.L6
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	GSCTRL
	.word	.LC0
	.word	GSADR
	.word	GSCTRL_GPIXFMT
	.word	GSCTRL_LUT_EN
	.word	FB_VISUAL_TRUECOLOR
	.word	GSCTRL_GSWIDTH
	.word	DSCTRL
	.word	GSCTRL_GSHEIGHT
	.word	GSADR_SRCSTRIDE
	.word	DISP_PLL_EN
	.word	DISPPLL
	.word	DHT01
	.word	DHT02
	.word	DHT03
	.word	DHDET
	.word	DVT01
	.word	DVT02
	.word	DVT03
	.word	DVDET
	.word	DVECTRL
	.word	DSCTRL_SYNCGEN_EN
	.word	DINTRE
	.word	DINTRE_VEVENT0_EN
	.word	EINVAL
	.word	GSCTRL_GPIXFMT_ARGB1555
	.word	GSCTRL_GPIXFMT_RGB565
	.word	GSCTRL_GPIXFMT_ARGB8888
	.word	GSCTRL_GPIXFMT_RGB888
	.size	mbxfb_set_par, .-mbxfb_set_par
	.comm	GSCTRL_LUT_EN,4,4
	.comm	GSCTRL_GSWIDTH,4,4
	.comm	GSCTRL_GSHEIGHT,4,4
	.comm	GSCTRL_GPIXFMT_RGB888,4,4
	.comm	GSCTRL_GPIXFMT_RGB565,4,4
	.comm	GSCTRL_GPIXFMT_ARGB8888,4,4
	.comm	GSCTRL_GPIXFMT_ARGB1555,4,4
	.comm	GSCTRL_GPIXFMT,4,4
	.comm	GSCTRL,4,4
	.comm	GSADR_SRCSTRIDE,4,4
	.comm	GSADR,4,4
	.comm	FB_VISUAL_TRUECOLOR,4,4
	.comm	EINVAL,4,4
	.comm	DVT03,4,4
	.comm	DVT02,4,4
	.comm	DVT01,4,4
	.comm	DVECTRL,4,4
	.comm	DVDET,4,4
	.comm	DSCTRL_SYNCGEN_EN,4,4
	.comm	DSCTRL,4,4
	.comm	DISP_PLL_EN,4,4
	.comm	DISPPLL,4,4
	.comm	DINTRE_VEVENT0_EN,4,4
	.comm	DINTRE,4,4
	.comm	DHT03,4,4
	.comm	DHT02,4,4
	.comm	DHT01,4,4
	.comm	DHDET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
