	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vfe_set_scale_cfg
_vfe_set_scale_cfg:                     ## @vfe_set_scale_cfg
	.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	%rsi, %r12
	movq	%rdi, %r14
	movl	16(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_VFE_0_SCALE_ENC_Y_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rdi), %rsi
	movl	$3, %edi
	callq	_writel_relaxed
	movq	8(%r12), %rax
	movq	_MSM_VFE_PAD_SINK@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	(%rax,%rcx,8), %ebx
	decl	%ebx
	movl	(%r12), %r15d
	decl	%r15d
	movl	%r15d, %edi
	shll	$16, %edi
	orl	%ebx, %edi
	movq	_VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel_relaxed
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_vfe_calc_interp_reso
	movl	%eax, %edi
	leal	14(%rdi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	shll	$28, %edi
	orl	%eax, %edi
	movq	_VFE_0_SCALE_ENC_Y_H_PHASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel_relaxed
	movq	8(%r12), %rax
	movq	(%r13), %rcx
	movl	4(%rax,%rcx,8), %ebx
	decl	%ebx
	movl	4(%r12), %r15d
	decl	%r15d
	movl	%r15d, %edi
	shll	$16, %edi
	orl	%ebx, %edi
	movq	_VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel_relaxed
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_vfe_calc_interp_reso
	movl	%eax, %edi
	leal	14(%rdi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	shll	$28, %edi
	orl	%eax, %edi
	movq	_VFE_0_SCALE_ENC_Y_V_PHASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel_relaxed
	movq	_VFE_0_SCALE_ENC_CBCR_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	$3, %edi
	callq	_writel_relaxed
	movq	8(%r12), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,8), %r15d
	decl	%r15d
	movl	(%r12), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	decl	%ebx
	movl	%ebx, %edi
	shll	$16, %edi
	orl	%r15d, %edi
	movq	_VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel_relaxed
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_vfe_calc_interp_reso
	movl	%eax, %edi
	leal	14(%rdi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	movl	%r15d, %eax
	cltd
	idivl	%ebx
	shll	$28, %edi
	orl	%eax, %edi
	movq	_VFE_0_SCALE_ENC_CBCR_H_PHASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel_relaxed
	movq	8(%r12), %rax
	movq	(%r13), %rcx
	movl	4(%rax,%rcx,8), %r15d
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rax
	movl	4(%r12), %ebx
	movq	_V4L2_PIX_FMT_NV21@GOTPCREL(%rip), %rcx
	movl	%ebx, %edx
	shrl	$31, %edx
	addl	%ebx, %edx
	sarl	%edx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	(%rcx), %esi
	cmovel	%edx, %ebx
	cmpl	(%rax), %esi
	cmovel	%edx, %ebx
	decl	%ebx
	decl	%r15d
	movl	%ebx, %edi
	shll	$16, %edi
	orl	%r15d, %edi
	movq	_VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel_relaxed
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_vfe_calc_interp_reso
	movl	%eax, %edi
	leal	14(%rdi), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	movl	%r15d, %eax
	cltd
	idivl	%ebx
	shll	$28, %edi
	orl	%eax, %edi
	movq	_VFE_0_SCALE_ENC_CBCR_V_PHASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel_relaxed                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VFE_0_SCALE_ENC_Y_CFG,8,3      ## @VFE_0_SCALE_ENC_Y_CFG
	.comm	_MSM_VFE_PAD_SINK,8,3           ## @MSM_VFE_PAD_SINK
	.comm	_VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE,8,3 ## @VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_Y_H_PHASE,8,3  ## @VFE_0_SCALE_ENC_Y_H_PHASE
	.comm	_VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE,8,3 ## @VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_Y_V_PHASE,8,3  ## @VFE_0_SCALE_ENC_Y_V_PHASE
	.comm	_VFE_0_SCALE_ENC_CBCR_CFG,8,3   ## @VFE_0_SCALE_ENC_CBCR_CFG
	.comm	_VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE,8,3 ## @VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_CBCR_H_PHASE,8,3 ## @VFE_0_SCALE_ENC_CBCR_H_PHASE
	.comm	_V4L2_PIX_FMT_NV12,4,2          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_NV21,4,2          ## @V4L2_PIX_FMT_NV21
	.comm	_VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE,8,3 ## @VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_CBCR_V_PHASE,8,3 ## @VFE_0_SCALE_ENC_CBCR_V_PHASE
	.no_dead_strip	_vfe_set_scale_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vfe_set_scale_cfg
_vfe_set_scale_cfg:                     ; @vfe_set_scale_cfg
	.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	x20, x1
	mov	x19, x0
	ldr	w23, [x1, #16]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _VFE_0_SCALE_ENC_Y_CFG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_Y_CFG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #3
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x24, _MSM_VFE_PAD_SINK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MSM_VFE_PAD_SINK@GOTPAGEOFF]
	ldr	x9, [x24]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	sub	w21, w8, #1
	ldr	w8, [x20]
	sub	w22, w8, #1
	orr	w0, w21, w22, lsl #16
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x21
	mov	x1, x22
	bl	_vfe_calc_interp_reso
	add	w8, w0, #14
	lsl	w8, w21, w8
	sdiv	w8, w8, w22
	orr	w0, w8, w0, lsl #28
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _VFE_0_SCALE_ENC_Y_H_PHASE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_Y_H_PHASE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	sub	w21, w8, #1
	ldr	w8, [x20, #4]
	sub	w22, w8, #1
	orr	w0, w21, w22, lsl #16
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x21
	mov	x1, x22
	bl	_vfe_calc_interp_reso
	add	w8, w0, #14
	lsl	w8, w21, w8
	sdiv	w8, w8, w22
	orr	w0, w8, w0, lsl #28
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _VFE_0_SCALE_ENC_Y_V_PHASE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_Y_V_PHASE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _VFE_0_SCALE_ENC_CBCR_CFG@GOTPAGE
Lloh18:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_CBCR_CFG@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #3
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	sub	w21, w8, #1
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	w22, w8, #1
	orr	w0, w21, w22, lsl #16
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x21
	mov	x1, x22
	bl	_vfe_calc_interp_reso
	add	w8, w0, #14
	lsl	w8, w21, w8
	sdiv	w8, w8, w22
	orr	w0, w8, w0, lsl #28
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _VFE_0_SCALE_ENC_CBCR_H_PHASE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_CBCR_H_PHASE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
Lloh26:
	adrp	x9, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	ldr	w10, [x20, #4]
Lloh29:
	adrp	x11, _V4L2_PIX_FMT_NV21@GOTPAGE
Lloh30:
	ldr	x11, [x11, _V4L2_PIX_FMT_NV21@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	cmp	w10, #0
	cinc	w12, w10, lt
	cmp	w23, w11
	ccmp	w23, w9, #4, ne
	asr	w9, w12, #1
	csel	w9, w9, w10, eq
	sub	w20, w9, #1
	sub	w21, w8, #1
	orr	w0, w21, w20, lsl #16
	ldr	x8, [x19]
Lloh32:
	adrp	x9, _VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x21
	mov	x1, x20
	bl	_vfe_calc_interp_reso
	add	w8, w0, #14
	lsl	w8, w21, w8
	sdiv	w8, w8, w20
	orr	w0, w8, w0, lsl #28
	ldr	x8, [x19]
Lloh35:
	adrp	x9, _VFE_0_SCALE_ENC_CBCR_V_PHASE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _VFE_0_SCALE_ENC_CBCR_V_PHASE@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	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_relaxed
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VFE_0_SCALE_ENC_Y_CFG,8,3      ; @VFE_0_SCALE_ENC_Y_CFG
	.comm	_MSM_VFE_PAD_SINK,8,3           ; @MSM_VFE_PAD_SINK
	.comm	_VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE,8,3 ; @VFE_0_SCALE_ENC_Y_H_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_Y_H_PHASE,8,3  ; @VFE_0_SCALE_ENC_Y_H_PHASE
	.comm	_VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE,8,3 ; @VFE_0_SCALE_ENC_Y_V_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_Y_V_PHASE,8,3  ; @VFE_0_SCALE_ENC_Y_V_PHASE
	.comm	_VFE_0_SCALE_ENC_CBCR_CFG,8,3   ; @VFE_0_SCALE_ENC_CBCR_CFG
	.comm	_VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE,8,3 ; @VFE_0_SCALE_ENC_CBCR_H_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_CBCR_H_PHASE,8,3 ; @VFE_0_SCALE_ENC_CBCR_H_PHASE
	.comm	_V4L2_PIX_FMT_NV12,4,2          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_NV21,4,2          ; @V4L2_PIX_FMT_NV21
	.comm	_VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE,8,3 ; @VFE_0_SCALE_ENC_CBCR_V_IMAGE_SIZE
	.comm	_VFE_0_SCALE_ENC_CBCR_V_PHASE,8,3 ; @VFE_0_SCALE_ENC_CBCR_V_PHASE
	.no_dead_strip	_vfe_set_scale_cfg
.subsections_via_symbols
