	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvin_crop_scale_comp_gen2
_rvin_crop_scale_comp_gen2:             ## @rvin_crop_scale_comp_gen2
	.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, %rbx
	movl	12(%rdi), %eax
	movl	28(%rdi), %ecx
	xorl	%r12d, %r12d
	movl	$0, %r14d
	cmpl	%ecx, %eax
	je	LBB0_2
## %bb.1:
	shll	$12, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r14d
LBB0_2:
	movq	_VNYS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_rvin_write
	movl	16(%rbx), %eax
	movl	32(%rbx), %ecx
	cmpl	%ecx, %eax
	je	LBB0_4
## %bb.3:
	shll	$12, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
LBB0_4:
	leal	-1(%r12), %eax
	cmpl	$2047, %eax                     ## imm = 0x7FF
	movl	$2048, %r15d                    ## imm = 0x800
	cmovael	%r12d, %r15d
	movq	_VNXS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rvin_write
	cmpl	$4096, %r15d                    ## imm = 0x1000
	setl	%cl
	shll	%cl, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rvin_set_coeff
	movq	_VNSPPOC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rvin_write
	movq	_VNSLPOC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rvin_write
	movl	8(%rbx), %esi
	decl	%esi
	movq	_VNEPPOC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rvin_write
	movl	(%rbx), %eax
	movl	4(%rbx), %esi
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.5:
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	movl	%eax, %esi
LBB0_6:
	decl	%esi
	movq	_VNELPOC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rvin_write
	movl	16(%rbx), %edx
	movl	12(%rbx), %ecx
	movl	24(%rbx), %r8d
	movl	20(%rbx), %r9d
	movl	4(%rbx), %eax
	movl	8(%rbx), %r10d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%r10
	pushq	%r15
	pushq	%r14
	callq	_vin_dbg
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VNYS_REG,4,2                   ## @VNYS_REG
	.comm	_VNXS_REG,4,2                   ## @VNXS_REG
	.comm	_VNSPPOC_REG,4,2                ## @VNSPPOC_REG
	.comm	_VNSLPOC_REG,4,2                ## @VNSLPOC_REG
	.comm	_VNEPPOC_REG,4,2                ## @VNEPPOC_REG
	.comm	_VNELPOC_REG,4,2                ## @VNELPOC_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pre-Clip: %ux%u@%u:%u YS: %d XS: %d Post-Clip: %ux%u@%u:%u\n"

	.no_dead_strip	_rvin_crop_scale_comp_gen2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvin_crop_scale_comp_gen2
_rvin_crop_scale_comp_gen2:             ; @rvin_crop_scale_comp_gen2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w8, [x0, #12]
	ldr	w9, [x0, #28]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	lsl	w8, w8, #12
	sdiv	w20, w8, w9
LBB0_3:
Lloh0:
	adrp	x8, _VNYS_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VNYS_REG@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_rvin_write
	ldr	w8, [x19, #16]
	ldr	w9, [x19, #32]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #0
	b	LBB0_6
LBB0_5:
	lsl	w8, w8, #12
	sdiv	w8, w8, w9
LBB0_6:
	sub	w9, w8, #1
	mov	w10, #2048
	cmp	w9, #2047
	csel	w21, w10, w8, lo
Lloh3:
	adrp	x8, _VNXS_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VNXS_REG@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_rvin_write
	cmp	w21, #1, lsl #12                ; =4096
	cset	w8, lt
	lsl	w21, w21, w8
	mov	x0, x19
	mov	x1, x21
	bl	_rvin_set_coeff
Lloh6:
	adrp	x8, _VNSPPOC_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VNSPPOC_REG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_rvin_write
Lloh9:
	adrp	x8, _VNSLPOC_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VNSLPOC_REG@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_rvin_write
	ldr	w8, [x19, #8]
	sub	w1, w8, #1
Lloh12:
	adrp	x8, _VNEPPOC_REG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VNEPPOC_REG@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rvin_write
	ldp	w8, w9, [x19]
	sub	w8, w8, #128
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w10, w10, #1
	cmp	w8, #3
	csel	w8, w10, w9, lo
	sub	w1, w8, #1
Lloh15:
	adrp	x8, _VNELPOC_REG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VNELPOC_REG@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rvin_write
	ldp	w3, w2, [x19, #12]
	ldp	w5, w4, [x19, #20]
	ldp	w9, w8, [x19, #4]
	str	xzr, [sp, #8]
	stp	w8, w9, [sp]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x6, x20
	mov	x7, x21
	bl	_vin_dbg
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VNYS_REG,4,2                   ; @VNYS_REG
	.comm	_VNXS_REG,4,2                   ; @VNXS_REG
	.comm	_VNSPPOC_REG,4,2                ; @VNSPPOC_REG
	.comm	_VNSLPOC_REG,4,2                ; @VNSLPOC_REG
	.comm	_VNEPPOC_REG,4,2                ; @VNEPPOC_REG
	.comm	_VNELPOC_REG,4,2                ; @VNELPOC_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pre-Clip: %ux%u@%u:%u YS: %d XS: %d Post-Clip: %ux%u@%u:%u\n"

	.no_dead_strip	_rvin_crop_scale_comp_gen2
.subsections_via_symbols
