	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_vi_scaler_set_coeff
_sun8i_vi_scaler_set_coeff:             ## @sun8i_vi_scaler_set_coeff
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	cmpl	$1, (%r8)
	jne	LBB0_3
## %bb.1:
	cmpl	$1, 4(%r8)
	jne	LBB0_3
## %bb.2:
	movq	_lan2coefftab32@GOTPCREL(%rip), %rax
	movq	_lan3coefftab32_right@GOTPCREL(%rip), %rcx
	movq	_lan3coefftab32_left@GOTPCREL(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	movq	_bicubic4coefftab32@GOTPCREL(%rip), %rax
	movq	_bicubic8coefftab32_right@GOTPCREL(%rip), %rcx
	movq	_bicubic8coefftab32_left@GOTPCREL(%rip), %rsi
LBB0_4:
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r15
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %edi
	callq	_sun8i_vi_scaler_coef_index
	movq	_SUN8I_VI_SCALER_COEFF_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.5:
	imull	%eax, %ecx
	movslq	%ecx, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_YHCOEFF0
	movq	_lan3coefftab32_left@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r13,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_YHCOEFF1
	movq	_lan3coefftab32_right@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r13,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_CHCOEFF0
	movl	(%r15,%r13,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_CHCOEFF1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%r13,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	incq	%rbx
	movq	_SUN8I_VI_SCALER_COEFF_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%r13
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_sun8i_vi_scaler_coef_index
	movq	_SUN8I_VI_SCALER_COEFF_COUNT@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.8:
	imull	%eax, %ecx
	movslq	%ecx, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_YVCOEFF
	movq	_lan2coefftab32@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r15,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SUN8I_SCALER_VSU_CVCOEFF
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%r15,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_regmap_write
	incq	%rbx
	movslq	(%r13), %rax
	incq	%r15
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lan3coefftab32_left,8,3        ## @lan3coefftab32_left
	.comm	_lan3coefftab32_right,8,3       ## @lan3coefftab32_right
	.comm	_lan2coefftab32,8,3             ## @lan2coefftab32
	.comm	_bicubic8coefftab32_left,8,3    ## @bicubic8coefftab32_left
	.comm	_bicubic8coefftab32_right,8,3   ## @bicubic8coefftab32_right
	.comm	_bicubic4coefftab32,8,3         ## @bicubic4coefftab32
	.comm	_SUN8I_VI_SCALER_COEFF_COUNT,4,2 ## @SUN8I_VI_SCALER_COEFF_COUNT
	.no_dead_strip	_sun8i_vi_scaler_set_coeff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_vi_scaler_set_coeff
_sun8i_vi_scaler_set_coeff:             ; @sun8i_vi_scaler_set_coeff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x1
	mov	x20, x0
	ldr	w8, [x4]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x4, #4]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _lan2coefftab32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lan2coefftab32@GOTPAGEOFF]
Lloh2:
	adrp	x9, _lan3coefftab32_right@GOTPAGE
Lloh3:
	ldr	x9, [x9, _lan3coefftab32_right@GOTPAGEOFF]
Lloh4:
	adrp	x10, _lan3coefftab32_left@GOTPAGE
Lloh5:
	ldr	x10, [x10, _lan3coefftab32_left@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _bicubic4coefftab32@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bicubic4coefftab32@GOTPAGEOFF]
Lloh8:
	adrp	x9, _bicubic8coefftab32_right@GOTPAGE
Lloh9:
	ldr	x9, [x9, _bicubic8coefftab32_right@GOTPAGEOFF]
Lloh10:
	adrp	x10, _bicubic8coefftab32_left@GOTPAGE
Lloh11:
	ldr	x10, [x10, _bicubic8coefftab32_left@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	str	x8, [sp]                        ; 8-byte Folded Spill
	ldr	x24, [x9]
	ldr	x26, [x10]
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	x0, x2
	bl	_sun8i_vi_scaler_coef_index
Lloh12:
	adrp	x23, _SUN8I_VI_SCALER_COEFF_COUNT@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SUN8I_VI_SCALER_COEFF_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x22, #0
	mul	w8, w8, w0
	sbfiz	x25, x8, #2, #32
	add	x26, x26, x25
	add	x27, x24, x25
Lloh14:
	adrp	x28, _lan3coefftab32_left@GOTPAGE
Lloh15:
	ldr	x28, [x28, _lan3coefftab32_left@GOTPAGEOFF]
Lloh16:
	adrp	x24, _lan3coefftab32_right@GOTPAGE
Lloh17:
	ldr	x24, [x24, _lan3coefftab32_right@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_SUN8I_SCALER_VSU_YHCOEFF0
	mov	x1, x0
	ldr	x8, [x28]
	add	x8, x8, x25
	lsl	x21, x22, #2
	ldr	w2, [x8, x21]
	mov	x0, x20
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x22
	bl	_SUN8I_SCALER_VSU_YHCOEFF1
	mov	x1, x0
	ldr	x8, [x24]
	add	x8, x8, x25
	ldr	w2, [x8, x21]
	mov	x0, x20
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x22
	bl	_SUN8I_SCALER_VSU_CHCOEFF0
	mov	x1, x0
	ldr	w2, [x26, x21]
	mov	x0, x20
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x22
	bl	_SUN8I_SCALER_VSU_CHCOEFF1
	mov	x1, x0
	ldr	w2, [x27, x21]
	mov	x0, x20
	bl	_regmap_write
	add	x22, x22, #1
	ldrsw	x8, [x23]
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_7:
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_sun8i_vi_scaler_coef_index
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x21, #0
	mul	w8, w8, w0
	sbfiz	x22, x8, #2, #32
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x24, x8, x22
Lloh18:
	adrp	x25, _lan2coefftab32@GOTPAGE
Lloh19:
	ldr	x25, [x25, _lan2coefftab32@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_SUN8I_SCALER_VSU_YVCOEFF
	mov	x1, x0
	ldr	x8, [x25]
	add	x8, x8, x22
	lsl	x26, x21, #2
	ldr	w2, [x8, x26]
	mov	x0, x20
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x21
	bl	_SUN8I_SCALER_VSU_CVCOEFF
	mov	x1, x0
	ldr	w2, [x24, x26]
	mov	x0, x20
	bl	_regmap_write
	add	x21, x21, #1
	ldrsw	x8, [x23]
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_lan3coefftab32_left,8,3        ; @lan3coefftab32_left
	.comm	_lan3coefftab32_right,8,3       ; @lan3coefftab32_right
	.comm	_lan2coefftab32,8,3             ; @lan2coefftab32
	.comm	_bicubic8coefftab32_left,8,3    ; @bicubic8coefftab32_left
	.comm	_bicubic8coefftab32_right,8,3   ; @bicubic8coefftab32_right
	.comm	_bicubic4coefftab32,8,3         ; @bicubic4coefftab32
	.comm	_SUN8I_VI_SCALER_COEFF_COUNT,4,2 ; @SUN8I_VI_SCALER_COEFF_COUNT
	.no_dead_strip	_sun8i_vi_scaler_set_coeff
.subsections_via_symbols
