	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camif_s3c244x_hw_set_scaler
_camif_s3c244x_hw_set_scaler:           ## @camif_s3c244x_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	16(%rdi), %rax
	movq	56(%rdi), %r14
	movl	(%rax), %r12d
	callq	_camif_hw_set_prescaler
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	callq	_S3C_CAMIF_REG_CISCCTRL
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_camif_read
	movq	_CISCCTRL_SCALEUP_MASK@GOTPCREL(%rip), %rcx
	movq	_CISCCTRL_SCALERBYPASS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%rcx), %edx
	orl	%esi, %edx
	movq	_CISCCTRL_MAIN_RATIO_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_CIPRSCCTRL_RGB_FORMAT_24BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, %edx
	notl	%edx
	andl	%eax, %edx
	cmpq	$0, 48(%r15)
	je	LBB0_4
## %bb.1:
	cmpq	$0, 40(%r15)
	je	LBB0_7
## %bb.2:
	movq	(%r15), %rax
	movq	_VP_CODEC@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_5
## %bb.3:
	movq	_CISCCTRL_SCALEUP_H@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	(%r15), %rdi
	movq	_VP_CODEC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	(%rax), %rdi
	cmovel	%esi, %ebx
	orl	%ebx, %edx
	jmp	LBB0_12
LBB0_5:
	movq	_CIPRSCCTRL_SCALEUP_H@GOTPCREL(%rip), %rax
LBB0_6:
	orl	(%rax), %edx
LBB0_7:
	cmpq	$0, 32(%r15)
	movq	(%r15), %rdi
	je	LBB0_12
## %bb.8:
	movq	_VP_CODEC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_10
## %bb.9:
	movq	_CISCCTRL_SCALEUP_V@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_CIPRSCCTRL_SCALEUP_V@GOTPCREL(%rip), %rax
LBB0_11:
	orl	(%rax), %edx
LBB0_12:
	movl	24(%r15), %eax
	shll	$16, %eax
	andl	$33488896, %eax                 ## imm = 0x1FF0000
	movl	$511, %ebx                      ## imm = 0x1FF
	andl	28(%r15), %ebx
	orl	%edx, %ebx
	orl	%eax, %ebx
	movq	_VP_PREVIEW@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_14
## %bb.13:
	movq	_IMG_FMT_XRGB8888@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpl	(%rax), %r12d
	cmovel	%ecx, %edx
	movq	_CIPRSCCTRL_SAMPLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	orl	%edx, %ebx
LBB0_14:
	movl	8(%r15), %esi
	callq	_S3C_CAMIF_REG_CISCCTRL
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_camif_write
	movl	24(%r15), %esi
	movl	28(%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_SCALEUP_MASK,4,2      ## @CISCCTRL_SCALEUP_MASK
	.comm	_CISCCTRL_SCALERBYPASS,4,2      ## @CISCCTRL_SCALERBYPASS
	.comm	_CISCCTRL_MAIN_RATIO_MASK,4,2   ## @CISCCTRL_MAIN_RATIO_MASK
	.comm	_CIPRSCCTRL_RGB_FORMAT_24BIT,4,2 ## @CIPRSCCTRL_RGB_FORMAT_24BIT
	.comm	_VP_CODEC,8,3                   ## @VP_CODEC
	.comm	_CISCCTRL_SCALEUP_H,4,2         ## @CISCCTRL_SCALEUP_H
	.comm	_CIPRSCCTRL_SCALEUP_H,4,2       ## @CIPRSCCTRL_SCALEUP_H
	.comm	_CISCCTRL_SCALEUP_V,4,2         ## @CISCCTRL_SCALEUP_V
	.comm	_CIPRSCCTRL_SCALEUP_V,4,2       ## @CIPRSCCTRL_SCALEUP_V
	.comm	_VP_PREVIEW,8,3                 ## @VP_PREVIEW
	.comm	_IMG_FMT_XRGB8888,4,2           ## @IMG_FMT_XRGB8888
	.comm	_CIPRSCCTRL_SAMPLE,4,2          ## @CIPRSCCTRL_SAMPLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main: h_ratio: %#x, v_ratio: %#x"

	.no_dead_strip	_camif_s3c244x_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_s3c244x_hw_set_scaler
_camif_s3c244x_hw_set_scaler:           ; @camif_s3c244x_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, #16]
	ldr	w22, [x8]
	bl	_camif_hw_set_prescaler
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	bl	_S3C_CAMIF_REG_CISCCTRL
	mov	x1, x0
	mov	x0, x20
	bl	_camif_read
Lloh0:
	adrp	x8, _CISCCTRL_SCALEUP_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CISCCTRL_SCALEUP_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CISCCTRL_SCALERBYPASS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CISCCTRL_SCALERBYPASS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
	orr	w8, w10, w8
Lloh6:
	adrp	x9, _CISCCTRL_MAIN_RATIO_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CISCCTRL_MAIN_RATIO_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w9, w8, w9
Lloh9:
	adrp	x8, _CIPRSCCTRL_RGB_FORMAT_24BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CIPRSCCTRL_RGB_FORMAT_24BIT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w9, w9, w8
	bic	w9, w0, w9
	ldr	x11, [x19, #48]
	cbz	x11, LBB0_4
; %bb.1:
	ldr	x11, [x19, #40]
Lloh12:
	adrp	x10, _VP_CODEC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _VP_CODEC@GOTPAGEOFF]
	cbz	x11, LBB0_7
; %bb.2:
	ldr	x11, [x19]
	ldr	x12, [x10]
	cmp	x11, x12
	b.ne	LBB0_5
; %bb.3:
Lloh14:
	adrp	x11, _CISCCTRL_SCALEUP_H@GOTPAGE
Lloh15:
	ldr	x11, [x11, _CISCCTRL_SCALEUP_H@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19]
Lloh16:
	adrp	x11, _VP_CODEC@GOTPAGE
Lloh17:
	ldr	x11, [x11, _VP_CODEC@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	cmp	x0, x11
	csel	w10, w10, wzr, eq
	b	LBB0_12
LBB0_5:
Lloh19:
	adrp	x11, _CIPRSCCTRL_SCALEUP_H@GOTPAGE
Lloh20:
	ldr	x11, [x11, _CIPRSCCTRL_SCALEUP_H@GOTPAGEOFF]
LBB0_6:
	ldr	w11, [x11]
	orr	w9, w11, w9
LBB0_7:
	ldr	x11, [x19, #32]
	ldr	x0, [x19]
	cbz	x11, LBB0_13
; %bb.8:
	ldr	x10, [x10]
	cmp	x0, x10
	b.ne	LBB0_10
; %bb.9:
Lloh21:
	adrp	x10, _CISCCTRL_SCALEUP_V@GOTPAGE
Lloh22:
	ldr	x10, [x10, _CISCCTRL_SCALEUP_V@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x10, _CIPRSCCTRL_SCALEUP_V@GOTPAGE
Lloh24:
	ldr	x10, [x10, _CIPRSCCTRL_SCALEUP_V@GOTPAGEOFF]
LBB0_11:
	ldr	w10, [x10]
LBB0_12:
	orr	w9, w10, w9
LBB0_13:
	ldp	w10, w11, [x19, #24]
	ubfiz	w10, w10, #16, #9
	orr	w9, w10, w9
	and	w10, w11, #0x1ff
	orr	w21, w9, w10
Lloh25:
	adrp	x9, _VP_PREVIEW@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VP_PREVIEW@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x0, x9
	b.ne	LBB0_15
; %bb.14:
Lloh28:
	adrp	x9, _IMG_FMT_XRGB8888@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IMG_FMT_XRGB8888@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w22, w9
	csel	w8, w8, wzr, eq
Lloh31:
	adrp	x9, _CIPRSCCTRL_SAMPLE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CIPRSCCTRL_SAMPLE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w9, w9, w21
	orr	w21, w9, w8
LBB0_15:
	ldr	w1, [x19, #8]
	bl	_S3C_CAMIF_REG_CISCCTRL
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_camif_write
	ldp	w1, w2, [x19, #24]
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_CISCCTRL_SCALEUP_MASK,4,2      ; @CISCCTRL_SCALEUP_MASK
	.comm	_CISCCTRL_SCALERBYPASS,4,2      ; @CISCCTRL_SCALERBYPASS
	.comm	_CISCCTRL_MAIN_RATIO_MASK,4,2   ; @CISCCTRL_MAIN_RATIO_MASK
	.comm	_CIPRSCCTRL_RGB_FORMAT_24BIT,4,2 ; @CIPRSCCTRL_RGB_FORMAT_24BIT
	.comm	_VP_CODEC,8,3                   ; @VP_CODEC
	.comm	_CISCCTRL_SCALEUP_H,4,2         ; @CISCCTRL_SCALEUP_H
	.comm	_CIPRSCCTRL_SCALEUP_H,4,2       ; @CIPRSCCTRL_SCALEUP_H
	.comm	_CISCCTRL_SCALEUP_V,4,2         ; @CISCCTRL_SCALEUP_V
	.comm	_CIPRSCCTRL_SCALEUP_V,4,2       ; @CIPRSCCTRL_SCALEUP_V
	.comm	_VP_PREVIEW,8,3                 ; @VP_PREVIEW
	.comm	_IMG_FMT_XRGB8888,4,2           ; @IMG_FMT_XRGB8888
	.comm	_CIPRSCCTRL_SAMPLE,4,2          ; @CIPRSCCTRL_SAMPLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main: h_ratio: %#x, v_ratio: %#x"

	.no_dead_strip	_camif_s3c244x_hw_set_scaler
.subsections_via_symbols
