	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_set_prescaler
_fimc_set_prescaler:                    ## @fimc_set_prescaler
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_EXYNOS_CITRGFMT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fimc_read
	movq	_EXYNOS_CITRGFMT_INROT90_CLOCKWISE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	sete	%sil
	movl	(%rbx,%rdx,4), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	(%rbx,%rsi,4), %ebx
	movq	_EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	andl	(%rcx), %eax
	setne	%dl
	sete	%sil
	movl	(%r12,%rdx,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%r12,%rsi,4), %r14d
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	callq	_fls
	movl	%eax, %r12d
	movq	_FIMC_SHFACTOR@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r12d
	jle	LBB0_3
## %bb.1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	-52(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	callq	_fls
	movl	(%r13), %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	cmpl	%ecx, %eax
	jle	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_6
LBB0_5:
	movl	%ebx, %edx
	movl	%r12d, %ecx
	sarl	%cl, %edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %ecx
	sarl	%cl, %esi
	movl	%esi, %ecx
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_DRM_DEV_DEBUG_KMS
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %r15d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEV_DEBUG_KMS
	movl	%r15d, %eax
	movl	%r14d, %esi
	movl	%r12d, %ecx
	shll	%cl, %esi
	shll	$14, %eax
	cltd
	idivl	%esi
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, (%rdi)
	movl	-48(%rbp), %r11d                ## 4-byte Reload
	movl	%r11d, %eax
	shll	$14, %eax
	movl	-52(%rbp), %r10d                ## 4-byte Reload
	movl	%r10d, %esi
	movl	%ebx, %ecx
	shll	%cl, %esi
	cltd
	idivl	%esi
	movl	%eax, 4(%rdi)
	xorl	%r8d, %r8d
	cmpl	%r15d, %r14d
	setge	%r8b
	movl	%r8d, 8(%rdi)
	xorl	%r9d, %r9d
	cmpl	%r11d, %r10d
	setge	%r9b
	movl	%r9d, 12(%rdi)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEV_DEBUG_KMS
	movq	_FIMC_SHFACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%r12d, %eax
	subl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_DEBUG_KMS
	movl	%ebx, %edi
	callq	_EXYNOS_CISCPRERATIO_SHFACTOR
	movl	%eax, %ebx
	movl	$1, %r14d
	movl	$1, %edi
	movl	%r12d, %ecx
	shll	%cl, %edi
	callq	_EXYNOS_CISCPRERATIO_PREHORRATIO
	orl	%eax, %ebx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movl	%r14d, %edi
	callq	_EXYNOS_CISCPRERATIO_PREVERRATIO
	orl	%eax, %ebx
	movq	_EXYNOS_CISCPRERATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fimc_write
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_EXYNOS_CISCPREDST_PREDSTWIDTH
	movl	%eax, %ebx
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_EXYNOS_CISCPREDST_PREDSTHEIGHT
	orl	%eax, %ebx
	movq	_EXYNOS_CISCPREDST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fimc_write
LBB0_6:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXYNOS_CITRGFMT,4,2            ## @EXYNOS_CITRGFMT
	.comm	_EXYNOS_CITRGFMT_INROT90_CLOCKWISE,4,2 ## @EXYNOS_CITRGFMT_INROT90_CLOCKWISE
	.comm	_EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE,4,2 ## @EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE
	.comm	_FIMC_SHFACTOR,4,2              ## @FIMC_SHFACTOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get ratio horizontal.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to get ratio vertical.\n"

L_.str.2:                               ## @.str.2
	.asciz	"pre_dst_width[%d]pre_dst_height[%d]\n"

L_.str.3:                               ## @.str.3
	.asciz	"hfactor[%d]vfactor[%d]\n"

L_.str.4:                               ## @.str.4
	.asciz	"hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n"

L_.str.5:                               ## @.str.5
	.asciz	"shfactor[%d]\n"

	.comm	_EXYNOS_CISCPRERATIO,4,2        ## @EXYNOS_CISCPRERATIO
	.comm	_EXYNOS_CISCPREDST,4,2          ## @EXYNOS_CISCPREDST
	.no_dead_strip	_fimc_set_prescaler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_set_prescaler
_fimc_set_prescaler:                    ; @fimc_set_prescaler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EXYNOS_CITRGFMT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXYNOS_CITRGFMT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fimc_read
Lloh3:
	adrp	x8, _EXYNOS_CITRGFMT_INROT90_CLOCKWISE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXYNOS_CITRGFMT_INROT90_CLOCKWISE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, eq
	cset	w9, ne
	ldr	w25, [x21, w9, uxtw #2]
	ldr	w27, [x21, w8, uxtw #2]
Lloh6:
	adrp	x8, _EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, eq
	cset	w9, ne
	ldr	w28, [x20, w9, uxtw #2]
	ldr	w20, [x20, w8, uxtw #2]
	sdiv	w8, w27, w20
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	bl	_fls
Lloh9:
	adrp	x26, _FIMC_SHFACTOR@GOTPAGE
Lloh10:
	ldr	x26, [x26, _FIMC_SHFACTOR@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w0, w8, asr #1
	b.le	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x21, x0
	sdiv	w8, w25, w28
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	bl	_fls
	ldr	w8, [x26]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w0, w8, asr #1
	b.le	LBB0_5
; %bb.3:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	x24, x0
	asr	w23, w27, w21
	asr	w8, w25, w0
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldr	w0, [x19]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_DRM_DEV_DEBUG_KMS
	ldr	w0, [x19]
	str	x24, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_DEBUG_KMS
	lsl	w8, w27, #14
	lsl	w9, w20, w21
	sdiv	w2, w8, w9
	lsl	w8, w25, #14
	lsl	w9, w28, w24
	sdiv	w8, w8, w9
	stp	w2, w8, [x22]
	cmp	w20, w27
	cset	w9, ge
	cmp	w28, w25
	cset	w10, ge
	stp	w9, w10, [x22, #8]
	ldr	w0, [x19]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_DRM_DEV_DEBUG_KMS
	ldr	w8, [x26]
	add	w9, w24, w21
	sub	w22, w8, w9
	ldr	w0, [x19]
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x22
	bl	_DRM_DEV_DEBUG_KMS
	mov	x0, x22
	bl	_EXYNOS_CISCPRERATIO_SHFACTOR
	mov	x22, x0
	mov	w20, #1
	lsl	w0, w20, w21
	bl	_EXYNOS_CISCPRERATIO_PREHORRATIO
	orr	w21, w0, w22
	lsl	w0, w20, w24
	bl	_EXYNOS_CISCPRERATIO_PREVERRATIO
	orr	w1, w21, w0
Lloh26:
	adrp	x8, _EXYNOS_CISCPRERATIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EXYNOS_CISCPRERATIO@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_fimc_write
	mov	x0, x23
	bl	_EXYNOS_CISCPREDST_PREDSTWIDTH
	mov	x21, x0
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_EXYNOS_CISCPREDST_PREDSTHEIGHT
	orr	w1, w0, w21
Lloh29:
	adrp	x8, _EXYNOS_CISCPREDST@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EXYNOS_CISCPREDST@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_fimc_write
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EXYNOS_CITRGFMT,4,2            ; @EXYNOS_CITRGFMT
	.comm	_EXYNOS_CITRGFMT_INROT90_CLOCKWISE,4,2 ; @EXYNOS_CITRGFMT_INROT90_CLOCKWISE
	.comm	_EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE,4,2 ; @EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE
	.comm	_FIMC_SHFACTOR,4,2              ; @FIMC_SHFACTOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get ratio horizontal.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to get ratio vertical.\n"

l_.str.2:                               ; @.str.2
	.asciz	"pre_dst_width[%d]pre_dst_height[%d]\n"

l_.str.3:                               ; @.str.3
	.asciz	"hfactor[%d]vfactor[%d]\n"

l_.str.4:                               ; @.str.4
	.asciz	"hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n"

l_.str.5:                               ; @.str.5
	.asciz	"shfactor[%d]\n"

	.comm	_EXYNOS_CISCPRERATIO,4,2        ; @EXYNOS_CISCPRERATIO
	.comm	_EXYNOS_CISCPREDST,4,2          ; @EXYNOS_CISCPREDST
	.no_dead_strip	_fimc_set_prescaler
.subsections_via_symbols
