	.file	"extr_camif-regs.c_camif_s3c64xx_hw_set_scaler.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"main: h_ratio: %#x, v_ratio: %#x"
	.text
	.p2align 4
	.type	camif_s3c64xx_hw_set_scaler, @function
camif_s3c64xx_hw_set_scaler:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 8[rdi]
	mov	rbx, rdi
	mov	rbp, QWORD PTR 56[rdi]
	mov	r12d, DWORD PTR [rax]
	call	camif_hw_set_prescaler@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR [rbx]
	call	S3C_CAMIF_REG_CISCCTRL@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	camif_read@PLT
	mov	r8d, DWORD PTR CISCCTRL_SCALEUP_H[rip]
	mov	edi, DWORD PTR CISCCTRL_SCALEUP_V[rip]
	mov	r9d, eax
	mov	ecx, DWORD PTR CISCCTRL_SCALERBYPASS[rip]
	mov	esi, DWORD PTR CISCCTRL_ONE2ONE[rip]
	mov	eax, r8d
	mov	edx, DWORD PTR CISCCTRL_CSCR2Y_WIDE[rip]
	or	edx, DWORD PTR CISCCTRL_CSCY2R_WIDE[rip]
	or	eax, edi
	or	eax, ecx
	or	eax, esi
	or	eax, DWORD PTR CISCCTRL_INRGB_FMT_MASK[rip]
	or	eax, DWORD PTR CISCCTRL_OUTRGB_FMT_MASK[rip]
	or	eax, DWORD PTR CISCCTRL_INTERLACE[rip]
	or	eax, DWORD PTR CISCCTRL_EXTRGB_EXTENSION[rip]
	or	eax, DWORD PTR CISCCTRL_MAIN_RATIO_MASK[rip]
	or	eax, edx
	not	eax
	and	eax, r9d
	or	eax, edx
	mov	edx, DWORD PTR 48[rbx]
	test	edx, edx
	jne	.L2
	or	eax, ecx
.L3:
	cmp	r12d, 128
	je	.L6
.L10:
	cmp	r12d, 129
	jne	.L7
	or	eax, DWORD PTR CISCCTRL_OUTRGB_FMT_RGB666[rip]
.L7:
	mov	r12d, DWORD PTR 16[rbx]
	mov	edx, DWORD PTR 20[rbx]
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR [rbx]
	sal	r12d, 16
	and	edx, 511
	and	r12d, 33488896
	or	r12d, edx
	or	r12d, eax
	call	S3C_CAMIF_REG_CISCCTRL@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	camif_write@PLT
	mov	edx, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR 16[rbx]
	lea	rdi, .LC0[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	pr_debug@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	QWORD PTR 40[rbx], 0
	je	.L4
	or	eax, r8d
.L4:
	cmp	QWORD PTR 32[rbx], 0
	je	.L5
	or	eax, edi
.L5:
	cmp	QWORD PTR 24[rbx], 0
	je	.L3
	or	eax, esi
	cmp	r12d, 128
	jne	.L10
.L6:
	or	eax, DWORD PTR CISCCTRL_OUTRGB_FMT_RGB888[rip]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	camif_s3c64xx_hw_set_scaler, .-camif_s3c64xx_hw_set_scaler
	.comm	CISCCTRL_SCALEUP_V,4,4
	.comm	CISCCTRL_SCALEUP_H,4,4
	.comm	CISCCTRL_SCALERBYPASS,4,4
	.comm	CISCCTRL_OUTRGB_FMT_RGB888,4,4
	.comm	CISCCTRL_OUTRGB_FMT_RGB666,4,4
	.comm	CISCCTRL_OUTRGB_FMT_MASK,4,4
	.comm	CISCCTRL_ONE2ONE,4,4
	.comm	CISCCTRL_MAIN_RATIO_MASK,4,4
	.comm	CISCCTRL_INTERLACE,4,4
	.comm	CISCCTRL_INRGB_FMT_MASK,4,4
	.comm	CISCCTRL_EXTRGB_EXTENSION,4,4
	.comm	CISCCTRL_CSCY2R_WIDE,4,4
	.comm	CISCCTRL_CSCR2Y_WIDE,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_camif-regs.c_camif_s3c64xx_hw_set_scaler.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"main: h_ratio: %#x, v_ratio: %#x\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	camif_s3c64xx_hw_set_scaler, %function
camif_s3c64xx_hw_set_scaler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r3, [r0, #8]
	ldr	r4, [r0, #36]
	ldr	r6, [r3]
	bl	camif_hw_set_prescaler
	ldr	r1, [r5]
	ldr	r0, [r5, #4]
	bl	S3C_CAMIF_REG_CISCCTRL
	mov	r1, r0
	mov	r0, r4
	bl	camif_read
	ldr	r1, .L19
	ldr	r2, .L19+4
	ldr	r3, .L19+8
	ldr	r7, [r1]
	ldr	lr, [r2]
	ldr	ip, .L19+12
	ldr	r1, [r3]
	ldr	r2, .L19+16
	ldr	ip, [ip]
	ldr	r9, .L19+20
	orr	r3, r7, lr
	ldr	r8, [r2]
	orr	r3, r3, r1
	ldr	r2, .L19+24
	ldr	r9, [r9]
	orr	r3, r3, ip
	ldr	r2, [r2]
	orr	r3, r3, r8
	ldr	r8, .L19+28
	orr	r3, r3, r9
	ldr	r10, [r8]
	orr	r3, r3, r2
	ldr	r9, .L19+32
	ldr	r2, .L19+36
	ldr	r8, .L19+40
	ldr	r9, [r9]
	ldr	r8, [r8]
	ldr	r2, [r2]
	orr	r3, r3, r10
	orr	r2, r2, r8
	orr	r3, r3, r9
	orr	r3, r3, r2
	ldr	r8, [r5, #32]
	bic	r0, r0, r3
	cmp	r8, #0
	orr	r2, r2, r0
	orreq	r2, r2, r1
	beq	.L3
	ldr	r3, [r5, #28]
	cmp	r3, #0
	ldr	r3, [r5, #24]
	orrne	r2, r2, r7
	cmp	r3, #0
	ldr	r3, [r5, #20]
	orrne	r2, r2, lr
	cmp	r3, #0
	orrne	r2, r2, ip
.L3:
	cmp	r6, #128
	beq	.L6
	cmp	r6, #129
	ldreq	r3, .L19+44
	ldreq	r3, [r3]
	orreq	r2, r2, r3
.L7:
	ldr	r3, [r5, #16]
	ldr	r1, [r5, #12]
	ldr	r6, .L19+48
	lsl	r3, r3, #23
	lsr	r3, r3, #23
	and	r6, r6, r1, lsl #16
	orr	r6, r6, r3
	ldr	r1, [r5]
	ldr	r0, [r5, #4]
	orr	r6, r6, r2
	bl	S3C_CAMIF_REG_CISCCTRL
	mov	r2, r6
	mov	r1, r0
	mov	r0, r4
	bl	camif_write
	ldr	r2, [r5, #16]
	ldr	r1, [r5, #12]
	ldr	r0, .L19+52
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	pr_debug
.L6:
	ldr	r3, .L19+56
	ldr	r3, [r3]
	orr	r2, r2, r3
	b	.L7
.L20:
	.align	2
.L19:
	.word	CISCCTRL_SCALEUP_H
	.word	CISCCTRL_SCALEUP_V
	.word	CISCCTRL_SCALERBYPASS
	.word	CISCCTRL_ONE2ONE
	.word	CISCCTRL_INRGB_FMT_MASK
	.word	CISCCTRL_OUTRGB_FMT_MASK
	.word	CISCCTRL_INTERLACE
	.word	CISCCTRL_EXTRGB_EXTENSION
	.word	CISCCTRL_MAIN_RATIO_MASK
	.word	CISCCTRL_CSCR2Y_WIDE
	.word	CISCCTRL_CSCY2R_WIDE
	.word	CISCCTRL_OUTRGB_FMT_RGB666
	.word	33488896
	.word	.LC0
	.word	CISCCTRL_OUTRGB_FMT_RGB888
	.size	camif_s3c64xx_hw_set_scaler, .-camif_s3c64xx_hw_set_scaler
	.comm	CISCCTRL_SCALEUP_V,4,4
	.comm	CISCCTRL_SCALEUP_H,4,4
	.comm	CISCCTRL_SCALERBYPASS,4,4
	.comm	CISCCTRL_OUTRGB_FMT_RGB888,4,4
	.comm	CISCCTRL_OUTRGB_FMT_RGB666,4,4
	.comm	CISCCTRL_OUTRGB_FMT_MASK,4,4
	.comm	CISCCTRL_ONE2ONE,4,4
	.comm	CISCCTRL_MAIN_RATIO_MASK,4,4
	.comm	CISCCTRL_INTERLACE,4,4
	.comm	CISCCTRL_INRGB_FMT_MASK,4,4
	.comm	CISCCTRL_EXTRGB_EXTENSION,4,4
	.comm	CISCCTRL_CSCY2R_WIDE,4,4
	.comm	CISCCTRL_CSCR2Y_WIDE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
