	.file	"extr_ch7006_mode.c_ch7006_setup_properties.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hpos: %d, vpos: %d\n"
	.text
	.p2align 4
	.globl	ch7006_setup_properties
	.type	ch7006_setup_properties, @function
ch7006_setup_properties:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	drm_i2c_encoder_get_client@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rax
	call	to_ch7006_priv@PLT
	mov	edx, 3
	xor	edi, edi
	mov	esi, 2
	mov	ecx, DWORD PTR 20[rax]
	mov	r12, QWORD PTR [rax]
	lea	r14, 32[rax]
	mov	rbp, rax
	mov	r13, QWORD PTR 24[rax]
	mov	r15, QWORD PTR 32[rax]
	sal	r12, 4
	add	r12, QWORD PTR ch7006_tv_norms[rip]
	call	interpolate@PLT
	mov	edi, DWORD PTR CH7006_FFILTER_TEXT[rip]
	mov	esi, eax
	mov	DWORD PTR 4[rsp], eax
	call	bitf@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR CH7006_FFILTER_LUMA[rip]
	mov	ebx, eax
	call	bitf@PLT
	mov	edi, DWORD PTR CH7006_FFILTER_CHROMA[rip]
	mov	esi, 1
	or	ebx, eax
	call	bitf@PLT
	mov	edx, 7
	xor	edi, edi
	mov	esi, 5
	or	ebx, eax
	mov	rax, QWORD PTR CH7006_FFILTER[rip]
	mov	DWORD PTR [r15+rax*4], ebx
	mov	ecx, DWORD PTR 16[rbp]
	call	interpolate@PLT
	mov	edi, DWORD PTR CH7006_CONTRAST_0[rip]
	mov	esi, eax
	mov	rax, QWORD PTR CH7006_CONTRAST[rip]
	lea	rbx, [r15+rax*4]
	call	bitf@PLT
	mov	DWORD PTR [rbx], eax
	mov	r15d, DWORD PTR [r12]
	imul	r15d, DWORD PTR fixed1[rip]
	mov	esi, DWORD PTR 8[r13]
	mov	edi, r15d
	call	do_div@PLT
	mov	ebx, DWORD PTR 0[r13]
	imul	ebx, DWORD PTR fixed1[rip]
	mov	esi, DWORD PTR 4[r13]
	mov	edi, ebx
	call	do_div@PLT
	mov	eax, DWORD PTR 12[r13]
	imul	ebx, DWORD PTR 4[r12]
	imul	eax, r15d
	mov	edi, ebx
	sub	edi, eax
	imul	edi, DWORD PTR 8[rbp]
	imul	edi, DWORD PTR 8[r13]
	call	round_fixed@PLT
	mov	esi, DWORD PTR CH7006_POV[rip]
	mov	rdi, r14
	cdq
	idiv	DWORD PTR [r12]
	mov	edx, DWORD PTR HPOS_8[rip]
	movsx	r9, eax
	sar	eax, 31
	imul	r9, r9, 1374389535
	sar	r9, 39
	sub	r9d, eax
	mov	ecx, r9d
	mov	DWORD PTR 4[rsp], r9d
	call	setbitf@PLT
	mov	r9d, DWORD PTR 4[rsp]
	xor	edx, edx
	mov	rdi, r14
	mov	esi, DWORD PTR CH7006_HPOS[rip]
	mov	ecx, r9d
	call	setbitf@PLT
	mov	edi, DWORD PTR 16[r13]
	mov	ebx, DWORD PTR 8[r12]
	imul	edi, r15d
	call	round_fixed@PLT
	xor	edi, edi
	sub	ebx, eax
	add	ebx, DWORD PTR 12[r12]
	mov	esi, ebx
	call	max@PLT
	imul	eax, DWORD PTR 12[rbp]
	mov	edx, DWORD PTR VPOS_8[rip]
	mov	rdi, r14
	mov	esi, DWORD PTR CH7006_POV[rip]
	movsx	r12, eax
	sar	eax, 31
	imul	r12, r12, 1374389535
	sar	r12, 38
	sub	r12d, eax
	mov	ecx, r12d
	call	setbitf@PLT
	mov	esi, DWORD PTR CH7006_VPOS[rip]
	mov	ecx, r12d
	xor	edx, edx
	mov	rdi, r14
	call	setbitf@PLT
	mov	r9d, DWORD PTR 4[rsp]
	mov	ecx, r12d
	mov	r8, QWORD PTR 8[rsp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	lea	rsi, .LC0[rip]
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	edx, r9d
	pop	rbp
	.cfi_def_cfa_offset 40
	mov	rdi, r8
	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	ch7006_dbg@PLT
	.cfi_endproc
.LFE0:
	.size	ch7006_setup_properties, .-ch7006_setup_properties
	.comm	fixed1,4,4
	.comm	ch7006_tv_norms,8,8
	.comm	VPOS_8,4,4
	.comm	HPOS_8,4,4
	.comm	CH7006_VPOS,4,4
	.comm	CH7006_POV,4,4
	.comm	CH7006_HPOS,4,4
	.comm	CH7006_FFILTER_TEXT,4,4
	.comm	CH7006_FFILTER_LUMA,4,4
	.comm	CH7006_FFILTER_CHROMA,4,4
	.comm	CH7006_FFILTER,8,8
	.comm	CH7006_CONTRAST_0,4,4
	.comm	CH7006_CONTRAST,8,8
	.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_ch7006_mode.c_ch7006_setup_properties.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hpos: %d, vpos: %d\012\000"
	.text
	.align	2
	.global	ch7006_setup_properties
	.syntax unified
	.arm
	.fpu softvfp
	.type	ch7006_setup_properties, %function
ch7006_setup_properties:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r4, r0
	bl	drm_i2c_encoder_get_client
	mov	r8, r0
	mov	r0, r4
	bl	to_ch7006_priv
	mov	r5, r0
	mov	r4, r0
	ldr	ip, .L4
	mov	r2, #3
	ldr	r3, [r0, #16]
	mov	r1, #2
	mov	r0, #0
	ldr	r10, [ip]
	ldr	fp, [r5], #24
	ldr	r6, [r4, #20]
	ldr	r9, [r4, #24]
	bl	interpolate
	ldr	r3, .L4+4
	mov	r1, r0
	str	r0, [sp, #4]
	ldr	r0, [r3]
	bl	bitf
	ldr	r3, .L4+8
	ldr	r1, [sp, #4]
	mov	r7, r0
	ldr	r0, [r3]
	bl	bitf
	mov	r3, r0
	ldr	r2, .L4+12
	mov	r1, #1
	ldr	r0, [r2]
	orr	r7, r7, r3
	bl	bitf
	ldr	r3, .L4+16
	orr	r7, r7, r0
	ldr	r3, [r3]
	mov	r2, #7
	str	r7, [r9, r3, lsl #2]
	ldr	r3, [r4, #12]
	mov	r1, #5
	mov	r0, #0
	bl	interpolate
	ldr	r2, .L4+20
	ldr	r3, .L4+24
	mov	r1, r0
	ldr	r0, [r2]
	ldr	r7, [r3]
	bl	bitf
	ldr	r3, .L4+28
	str	r0, [r9, r7, lsl #2]
	ldr	r2, [r3]
	ldr	r7, [r10, fp, lsl #4]
	ldr	r1, [r6, #8]
	mul	r7, r2, r7
	mov	r0, r7
	bl	do_div
	ldr	r3, .L4+28
	add	r9, r10, fp, lsl #4
	ldr	r0, [r3]
	ldr	r3, [r6]
	ldr	r1, [r6, #4]
	mul	r3, r0, r3
	mov	r0, r3
	str	r3, [sp, #4]
	bl	do_div
	ldr	r2, [r9, #4]
	ldr	r0, [r6, #12]
	ldr	r3, [sp, #4]
	mul	r0, r7, r0
	mul	r3, r2, r3
	ldr	r2, [r4, #4]
	sub	r3, r3, r0
	mul	r3, r2, r3
	ldr	r0, [r6, #8]
	mul	r0, r3, r0
	bl	round_fixed
	ldr	r1, [r10, fp, lsl #4]
	bl	__aeabi_idiv
	ldr	r10, .L4+32
	ldr	fp, .L4+36
	smull	r3, r10, r0, r10
	ldr	r2, .L4+40
	asr	r0, r0, #31
	rsb	r10, r0, r10, asr #7
	mov	r3, r10
	ldr	r1, [fp]
	mov	r0, r5
	ldr	r2, [r2]
	bl	setbitf
	ldr	r2, .L4+44
	mov	r3, r10
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, #0
	bl	setbitf
	ldr	r0, [r6, #16]
	ldr	r6, [r9, #8]
	mul	r0, r7, r0
	bl	round_fixed
	ldr	r1, [r9, #12]
	sub	r6, r6, r0
	add	r1, r6, r1
	mov	r0, #0
	bl	max
	ldr	r4, [r4, #8]
	ldr	r2, .L4+48
	mul	r0, r4, r0
	ldr	r4, .L4+32
	ldr	r1, [fp]
	smull	r3, r4, r0, r4
	asr	r0, r0, #31
	rsb	r4, r0, r4, asr #6
	mov	r3, r4
	mov	r0, r5
	ldr	r2, [r2]
	bl	setbitf
	ldr	r2, .L4+52
	mov	r3, r4
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, #0
	bl	setbitf
	mov	r3, r4
	mov	r2, r10
	mov	r0, r8
	ldr	r1, .L4+56
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ch7006_dbg
.L5:
	.align	2
.L4:
	.word	ch7006_tv_norms
	.word	CH7006_FFILTER_TEXT
	.word	CH7006_FFILTER_LUMA
	.word	CH7006_FFILTER_CHROMA
	.word	CH7006_FFILTER
	.word	CH7006_CONTRAST_0
	.word	CH7006_CONTRAST
	.word	fixed1
	.word	1374389535
	.word	CH7006_POV
	.word	HPOS_8
	.word	CH7006_HPOS
	.word	VPOS_8
	.word	CH7006_VPOS
	.word	.LC0
	.size	ch7006_setup_properties, .-ch7006_setup_properties
	.comm	fixed1,4,4
	.comm	ch7006_tv_norms,4,4
	.comm	VPOS_8,4,4
	.comm	HPOS_8,4,4
	.comm	CH7006_VPOS,4,4
	.comm	CH7006_POV,4,4
	.comm	CH7006_HPOS,4,4
	.comm	CH7006_FFILTER_TEXT,4,4
	.comm	CH7006_FFILTER_LUMA,4,4
	.comm	CH7006_FFILTER_CHROMA,4,4
	.comm	CH7006_FFILTER,4,4
	.comm	CH7006_CONTRAST_0,4,4
	.comm	CH7006_CONTRAST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
