	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s3c_camif_get_scaler_config    ## -- Begin function s3c_camif_get_scaler_config
	.p2align	4, 0x90
_s3c_camif_get_scaler_config:           ## @s3c_camif_get_scaler_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %r13d
	movl	4(%rax), %r12d
	movl	(%rdi), %eax
	movl	4(%rdi), %edx
	movl	8(%rdi), %r15d
	cmpl	$270, %eax                      ## imm = 0x10E
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	cmpl	$90, %eax
	jne	LBB0_3
LBB0_2:
	movl	%edx, %edi
	movl	%r15d, %esi
	callq	_swap
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_3:
	leaq	4(%rbx), %rcx
	movl	%r13d, %edi
	movl	%edx, %esi
	movq	%rbx, %rdx
	callq	_camif_get_scaler_factor
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	leaq	8(%rbx), %rdx
	leaq	12(%rbx), %rcx
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_camif_get_scaler_factor
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movl	(%rbx), %esi
	movl	4(%rbx), %r8d
	movl	%r15d, %r11d
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r13d, %r15d
	movl	%r13d, %eax
	cltd
	idivl	%esi
	movl	%eax, 16(%rbx)
	movl	8(%rbx), %r9d
	movl	%r12d, %eax
	cltd
	idivl	%r9d
	movl	%eax, 20(%rbx)
	movl	%r13d, %eax
	shll	$8, %eax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	movl	%r8d, %ecx
	shll	%cl, %edi
	cltd
	idivl	%edi
	movl	%eax, 24(%rbx)
	movl	%r12d, %eax
	shll	$8, %eax
	movl	12(%rbx), %r10d
	movl	%r11d, %edi
	movl	%r10d, %ecx
	shll	%cl, %edi
	cltd
	idivl	%edi
	movl	%eax, 28(%rbx)
	xorl	%eax, %eax
	cmpl	%r15d, %r13d
	setge	%al
	movl	%eax, 32(%rbx)
	xorl	%eax, %eax
	cmpl	%r12d, %r11d
	setge	%al
	movl	%eax, 36(%rbx)
	movq	$0, 40(%rbx)
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r8d, %edx
	movl	%r9d, %ecx
	movl	%r10d, %r8d
	xorl	%eax, %eax
	callq	_pr_debug
	movl	32(%rbx), %r9d
	movl	36(%rbx), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"H: ratio: %u, shift: %u. V: ratio: %u, shift: %u.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Source: %dx%d, Target: %dx%d, scaleup_h/v: %d/%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s3c_camif_get_scaler_config    ; -- Begin function s3c_camif_get_scaler_config
	.p2align	2
_s3c_camif_get_scaler_config:           ; @s3c_camif_get_scaler_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x1
	ldr	x8, [x0, #16]
	ldp	w19, w20, [x8]
	ldp	w22, w21, [x0, #4]
	ldr	w8, [x0]
	cmp	w8, #270
	b.eq	LBB0_2
; %bb.1:
	cmp	w8, #90
	b.ne	LBB0_3
LBB0_2:
	mov	x0, x22
	mov	x1, x21
	bl	_swap
LBB0_3:
	add	x3, x23, #4
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_camif_get_scaler_factor
	tbnz	w0, #31, LBB0_6
; %bb.4:
	add	x2, x23, #8
	add	x3, x23, #12
	mov	x0, x20
	mov	x1, x21
	bl	_camif_get_scaler_factor
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldp	w1, w2, [x23]
	sdiv	w8, w19, w1
	ldp	w3, w4, [x23, #8]
	sdiv	w9, w20, w3
	stp	w8, w9, [x23, #16]
	lsl	w8, w19, #8
	lsl	w9, w22, w2
	sdiv	w8, w8, w9
	lsl	w9, w20, #8
	lsl	w10, w21, w4
	sdiv	w9, w9, w10
	stp	w8, w9, [x23, #24]
	cmp	w22, w19
	cset	w8, ge
	cmp	w21, w20
	cset	w9, ge
	stp	w8, w9, [x23, #32]
	str	xzr, [x23, #40]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_pr_debug
	ldp	w8, w9, [x23, #32]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	stp	x8, x9, [sp]
	mov	x1, x19
	mov	x2, x20
	mov	x3, x22
	mov	x4, x21
	bl	_pr_debug
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"H: ratio: %u, shift: %u. V: ratio: %u, shift: %u.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Source: %dx%d, Target: %dx%d, scaleup_h/v: %d/%d\n"

.subsections_via_symbols
