	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camif_s3c64xx_hw_set_scaler
_camif_s3c64xx_hw_set_scaler:           ## @camif_s3c64xx_hw_set_scaler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	56(%rdi), %r14
	movl	(%rax), %r12d
	callq	_camif_hw_set_prescaler
	movl	(%r15), %esi
	movl	4(%r15), %edi
	callq	_S3C_CAMIF_REG_CISCCTRL
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_camif_read
	movq	_CISCCTRL_CSCR2Y_WIDE@GOTPCREL(%rip), %rcx
	movq	_CISCCTRL_CSCY2R_WIDE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	movq	_CISCCTRL_SCALEUP_H@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CISCCTRL_SCALEUP_V@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%esi, %edx
	orl	%r9d, %edx
	orl	%ebx, %edx
	movq	_CISCCTRL_SCALERBYPASS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_CISCCTRL_ONE2ONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%r8d, %ecx
	orl	%edi, %ecx
	orl	%edx, %ecx
	movq	_CISCCTRL_INRGB_FMT_MASK@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_CISCCTRL_OUTRGB_FMT_MASK@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_CISCCTRL_INTERLACE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_CISCCTRL_EXTRGB_EXTENSION@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_CISCCTRL_MAIN_RATIO_MASK@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%ebx, %ecx
	cmpl	$0, 48(%r15)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	cmpq	$0, 40(%r15)
	cmovel	%eax, %esi
	orl	%ecx, %esi
	cmpq	$0, 32(%r15)
	cmovel	%eax, %r9d
	cmpq	$0, 24(%r15)
	cmovel	%eax, %edi
	orl	%r9d, %edi
	orl	%esi, %edi
	movl	%edi, %ecx
	cmpl	$128, %r12d
	je	LBB0_6
LBB0_4:
	cmpl	$129, %r12d
	jne	LBB0_8
## %bb.5:
	movq	_CISCCTRL_OUTRGB_FMT_RGB666@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	orl	%r8d, %ecx
	cmpl	$128, %r12d
	jne	LBB0_4
LBB0_6:
	movq	_CISCCTRL_OUTRGB_FMT_RGB888@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %ecx
LBB0_8:
	movl	16(%r15), %eax
	shll	$16, %eax
	andl	$33488896, %eax                 ## imm = 0x1FF0000
	movl	$511, %ebx                      ## imm = 0x1FF
	andl	20(%r15), %ebx
	orl	%ecx, %ebx
	orl	%eax, %ebx
	movl	(%r15), %esi
	movl	4(%r15), %edi
	callq	_S3C_CAMIF_REG_CISCCTRL
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_camif_write
	movl	16(%r15), %esi
	movl	20(%r15), %edx
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CISCCTRL_CSCR2Y_WIDE,4,2       ## @CISCCTRL_CSCR2Y_WIDE
	.comm	_CISCCTRL_CSCY2R_WIDE,4,2       ## @CISCCTRL_CSCY2R_WIDE
	.comm	_CISCCTRL_SCALEUP_H,4,2         ## @CISCCTRL_SCALEUP_H
	.comm	_CISCCTRL_SCALEUP_V,4,2         ## @CISCCTRL_SCALEUP_V
	.comm	_CISCCTRL_SCALERBYPASS,4,2      ## @CISCCTRL_SCALERBYPASS
	.comm	_CISCCTRL_ONE2ONE,4,2           ## @CISCCTRL_ONE2ONE
	.comm	_CISCCTRL_INRGB_FMT_MASK,4,2    ## @CISCCTRL_INRGB_FMT_MASK
	.comm	_CISCCTRL_OUTRGB_FMT_MASK,4,2   ## @CISCCTRL_OUTRGB_FMT_MASK
	.comm	_CISCCTRL_INTERLACE,4,2         ## @CISCCTRL_INTERLACE
	.comm	_CISCCTRL_EXTRGB_EXTENSION,4,2  ## @CISCCTRL_EXTRGB_EXTENSION
	.comm	_CISCCTRL_MAIN_RATIO_MASK,4,2   ## @CISCCTRL_MAIN_RATIO_MASK
	.comm	_CISCCTRL_OUTRGB_FMT_RGB666,4,2 ## @CISCCTRL_OUTRGB_FMT_RGB666
	.comm	_CISCCTRL_OUTRGB_FMT_RGB888,4,2 ## @CISCCTRL_OUTRGB_FMT_RGB888
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main: h_ratio: %#x, v_ratio: %#x"

	.no_dead_strip	_camif_s3c64xx_hw_set_scaler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camif_s3c64xx_hw_set_scaler
_camif_s3c64xx_hw_set_scaler:           ; @camif_s3c64xx_hw_set_scaler
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #56]
	ldr	x8, [x0, #8]
	ldr	w21, [x8]
	bl	_camif_hw_set_prescaler
	ldp	w1, w0, [x19]
	bl	_S3C_CAMIF_REG_CISCCTRL
	mov	x1, x0
	mov	x0, x20
	bl	_camif_read
Lloh0:
	adrp	x8, _CISCCTRL_CSCR2Y_WIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CISCCTRL_CSCR2Y_WIDE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CISCCTRL_CSCY2R_WIDE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CISCCTRL_CSCY2R_WIDE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w12, w9, w8
Lloh6:
	adrp	x8, _CISCCTRL_SCALEUP_H@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CISCCTRL_SCALEUP_H@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
	orr	w10, w12, w9
Lloh9:
	adrp	x8, _CISCCTRL_SCALEUP_V@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CISCCTRL_SCALEUP_V@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x11, _CISCCTRL_SCALERBYPASS@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CISCCTRL_SCALERBYPASS@GOTPAGEOFF]
	orr	w10, w10, w8
Lloh14:
	ldr	w11, [x11]
	orr	w13, w10, w11
Lloh15:
	adrp	x10, _CISCCTRL_ONE2ONE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CISCCTRL_ONE2ONE@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w13, w13, w10
Lloh18:
	adrp	x14, _CISCCTRL_INRGB_FMT_MASK@GOTPAGE
Lloh19:
	ldr	x14, [x14, _CISCCTRL_INRGB_FMT_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w14, [x14]
Lloh21:
	adrp	x15, _CISCCTRL_OUTRGB_FMT_MASK@GOTPAGE
Lloh22:
	ldr	x15, [x15, _CISCCTRL_OUTRGB_FMT_MASK@GOTPAGEOFF]
	orr	w13, w13, w14
Lloh23:
	ldr	w14, [x15]
	orr	w13, w13, w14
Lloh24:
	adrp	x14, _CISCCTRL_INTERLACE@GOTPAGE
Lloh25:
	ldr	x14, [x14, _CISCCTRL_INTERLACE@GOTPAGEOFF]
Lloh26:
	ldr	w14, [x14]
	orr	w13, w13, w14
Lloh27:
	adrp	x14, _CISCCTRL_EXTRGB_EXTENSION@GOTPAGE
Lloh28:
	ldr	x14, [x14, _CISCCTRL_EXTRGB_EXTENSION@GOTPAGEOFF]
Lloh29:
	ldr	w14, [x14]
Lloh30:
	adrp	x15, _CISCCTRL_MAIN_RATIO_MASK@GOTPAGE
Lloh31:
	ldr	x15, [x15, _CISCCTRL_MAIN_RATIO_MASK@GOTPAGEOFF]
	orr	w13, w13, w14
Lloh32:
	ldr	w14, [x15]
	orr	w13, w13, w14
	bic	w13, w0, w13
	orr	w12, w13, w12
	ldr	w13, [x19, #48]
	cbz	w13, LBB0_4
; %bb.1:
	ldr	x11, [x19, #40]
	cmp	x11, #0
	csel	w9, wzr, w9, eq
	orr	w9, w9, w12
	ldp	x12, x11, [x19, #24]
	cmp	x11, #0
	csel	w8, wzr, w8, eq
	orr	w8, w9, w8
	cmp	x12, #0
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
	cmp	w21, #128
	b.eq	LBB0_5
LBB0_2:
	cmp	w21, #129
	b.ne	LBB0_7
; %bb.3:
Lloh33:
	adrp	x9, _CISCCTRL_OUTRGB_FMT_RGB666@GOTPAGE
Lloh34:
	ldr	x9, [x9, _CISCCTRL_OUTRGB_FMT_RGB666@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	orr	w8, w12, w11
	cmp	w21, #128
	b.ne	LBB0_2
LBB0_5:
Lloh35:
	adrp	x9, _CISCCTRL_OUTRGB_FMT_RGB888@GOTPAGE
Lloh36:
	ldr	x9, [x9, _CISCCTRL_OUTRGB_FMT_RGB888@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_7:
	ldp	w9, w10, [x19, #16]
	ubfiz	w9, w9, #16, #9
	orr	w8, w9, w8
	and	w9, w10, #0x1ff
	orr	w21, w8, w9
	ldp	w1, w0, [x19]
	bl	_S3C_CAMIF_REG_CISCCTRL
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_camif_write
	ldp	w1, w2, [x19, #16]
Lloh37:
	adrp	x0, l_.str@PAGE
Lloh38:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pr_debug
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_CISCCTRL_CSCR2Y_WIDE,4,2       ; @CISCCTRL_CSCR2Y_WIDE
	.comm	_CISCCTRL_CSCY2R_WIDE,4,2       ; @CISCCTRL_CSCY2R_WIDE
	.comm	_CISCCTRL_SCALEUP_H,4,2         ; @CISCCTRL_SCALEUP_H
	.comm	_CISCCTRL_SCALEUP_V,4,2         ; @CISCCTRL_SCALEUP_V
	.comm	_CISCCTRL_SCALERBYPASS,4,2      ; @CISCCTRL_SCALERBYPASS
	.comm	_CISCCTRL_ONE2ONE,4,2           ; @CISCCTRL_ONE2ONE
	.comm	_CISCCTRL_INRGB_FMT_MASK,4,2    ; @CISCCTRL_INRGB_FMT_MASK
	.comm	_CISCCTRL_OUTRGB_FMT_MASK,4,2   ; @CISCCTRL_OUTRGB_FMT_MASK
	.comm	_CISCCTRL_INTERLACE,4,2         ; @CISCCTRL_INTERLACE
	.comm	_CISCCTRL_EXTRGB_EXTENSION,4,2  ; @CISCCTRL_EXTRGB_EXTENSION
	.comm	_CISCCTRL_MAIN_RATIO_MASK,4,2   ; @CISCCTRL_MAIN_RATIO_MASK
	.comm	_CISCCTRL_OUTRGB_FMT_RGB666,4,2 ; @CISCCTRL_OUTRGB_FMT_RGB666
	.comm	_CISCCTRL_OUTRGB_FMT_RGB888,4,2 ; @CISCCTRL_OUTRGB_FMT_RGB888
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main: h_ratio: %#x, v_ratio: %#x"

	.no_dead_strip	_camif_s3c64xx_hw_set_scaler
.subsections_via_symbols
