	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_hw_set_mainscaler         ## -- Begin function fimc_hw_set_mainscaler
	.p2align	4, 0x90
_fimc_hw_set_mainscaler:                ## @fimc_hw_set_mainscaler
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	8(%r12), %r15
	movl	(%rdi), %edx
	movl	4(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	movq	%r14, %rdi
	callq	_fimc_hw_set_scaler
	movq	_FIMC_REG_CISCCTRL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movq	_FIMC_REG_CISCCTRL_MHRATIO_MASK@GOTPCREL(%rip), %rcx
	movq	_FIMC_REG_CISCCTRL_MVRATIO_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	cmpq	$0, (%r15)
	movl	4(%r14), %edi
	je	LBB0_2
## %bb.1:
	callq	_FIMC_REG_CISCCTRL_MHRATIO_EXT
	orl	%eax, %ebx
	movl	(%r14), %edi
	callq	_FIMC_REG_CISCCTRL_MVRATIO_EXT
	orl	%eax, %ebx
	movq	(%r13), %rsi
	addq	(%r12), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_FIMC_REG_CIEXTEN@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movq	_FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK@GOTPCREL(%rip), %rcx
	movq	_FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_FIMC_REG_CIEXTEN_MHRATIO_EXT
	movl	%eax, %r15d
	movl	(%r14), %edi
	callq	_FIMC_REG_CIEXTEN_MVRATIO_EXT
	orl	%r15d, %eax
	orl	%ebx, %eax
	jmp	LBB0_3
LBB0_2:
	callq	_FIMC_REG_CISCCTRL_MHRATIO
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movl	(%r14), %edi
	callq	_FIMC_REG_CISCCTRL_MVRATIO
	orl	%r15d, %eax
LBB0_3:
	movq	(%r13), %rsi
	addq	(%r12), %rsi
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main_hratio= 0x%X  main_vratio= 0x%X"

	.comm	_FIMC_REG_CISCCTRL,8,3          ## @FIMC_REG_CISCCTRL
	.comm	_FIMC_REG_CISCCTRL_MHRATIO_MASK,4,2 ## @FIMC_REG_CISCCTRL_MHRATIO_MASK
	.comm	_FIMC_REG_CISCCTRL_MVRATIO_MASK,4,2 ## @FIMC_REG_CISCCTRL_MVRATIO_MASK
	.comm	_FIMC_REG_CIEXTEN,8,3           ## @FIMC_REG_CIEXTEN
	.comm	_FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK,4,2 ## @FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK
	.comm	_FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK,4,2 ## @FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_hw_set_mainscaler         ; -- Begin function fimc_hw_set_mainscaler
	.p2align	2
_fimc_hw_set_mainscaler:                ; @fimc_hw_set_mainscaler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x23, [x20, #8]
	ldp	w2, w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	mov	x0, x19
	bl	_fimc_hw_set_scaler
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _FIMC_REG_CISCCTRL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FIMC_REG_CISCCTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh4:
	adrp	x8, _FIMC_REG_CISCCTRL_MHRATIO_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FIMC_REG_CISCCTRL_MHRATIO_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x9, _FIMC_REG_CISCCTRL_MVRATIO_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FIMC_REG_CISCCTRL_MVRATIO_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w22, w0, w8
	ldr	x8, [x23]
	ldr	w0, [x19, #4]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_FIMC_REG_CISCCTRL_MHRATIO_EXT
	orr	w22, w0, w22
	ldr	w0, [x19]
	bl	_FIMC_REG_CISCCTRL_MVRATIO_EXT
	orr	w0, w22, w0
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20]
Lloh10:
	adrp	x21, _FIMC_REG_CIEXTEN@GOTPAGE
Lloh11:
	ldr	x21, [x21, _FIMC_REG_CIEXTEN@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh12:
	adrp	x8, _FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w22, w0, w8
	ldr	w0, [x19, #4]
	bl	_FIMC_REG_CIEXTEN_MHRATIO_EXT
	orr	w22, w22, w0
	ldr	w0, [x19]
	bl	_FIMC_REG_CIEXTEN_MVRATIO_EXT
	orr	w0, w22, w0
	b	LBB0_3
LBB0_2:
	bl	_FIMC_REG_CISCCTRL_MHRATIO
	orr	w21, w0, w22
	ldr	w0, [x19]
	bl	_FIMC_REG_CISCCTRL_MVRATIO
	orr	w0, w21, w0
Lloh18:
	adrp	x21, _FIMC_REG_CISCCTRL@GOTPAGE
Lloh19:
	ldr	x21, [x21, _FIMC_REG_CISCCTRL@GOTPAGEOFF]
LBB0_3:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main_hratio= 0x%X  main_vratio= 0x%X"

	.comm	_FIMC_REG_CISCCTRL,8,3          ; @FIMC_REG_CISCCTRL
	.comm	_FIMC_REG_CISCCTRL_MHRATIO_MASK,4,2 ; @FIMC_REG_CISCCTRL_MHRATIO_MASK
	.comm	_FIMC_REG_CISCCTRL_MVRATIO_MASK,4,2 ; @FIMC_REG_CISCCTRL_MVRATIO_MASK
	.comm	_FIMC_REG_CIEXTEN,8,3           ; @FIMC_REG_CIEXTEN
	.comm	_FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK,4,2 ; @FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK
	.comm	_FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK,4,2 ; @FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK
.subsections_via_symbols
