	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_csi_set_testgen_mclk
_ipu_csi_set_testgen_mclk:              ## @ipu_csi_set_testgen_mclk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %eax
	movq	%rdi, %r14
	cltd
	idivl	%esi
	movl	%eax, %ebx
	leal	-257(%rbx), %eax
	cmpl	$-257, %eax                     ## imm = 0xFEFF
	ja	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	decl	%ebx
	movq	_CSI_SENS_CONF@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ipu_csi_read
	movq	_CSI_SENS_CONF_DIVRATIO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_CSI_SENS_CONF_DIVRATIO_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ipu_csi_write
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"value of pixel_clk extends normal range\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CSI_SENS_CONF,4,2              ## @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_DIVRATIO_MASK,4,2 ## @CSI_SENS_CONF_DIVRATIO_MASK
	.comm	_CSI_SENS_CONF_DIVRATIO_SHIFT,4,2 ## @CSI_SENS_CONF_DIVRATIO_SHIFT
	.no_dead_strip	_ipu_csi_set_testgen_mclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_csi_set_testgen_mclk
_ipu_csi_set_testgen_mclk:              ; @ipu_csi_set_testgen_mclk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sdiv	w8, w2, w1
	sub	w9, w8, #257
	cmn	w9, #257
	b.hi	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	sub	w20, w8, #1
Lloh5:
	adrp	x21, _CSI_SENS_CONF@GOTPAGE
Lloh6:
	ldr	x21, [x21, _CSI_SENS_CONF@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ipu_csi_read
Lloh7:
	adrp	x8, _CSI_SENS_CONF_DIVRATIO_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CSI_SENS_CONF_DIVRATIO_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh10:
	adrp	x9, _CSI_SENS_CONF_DIVRATIO_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CSI_SENS_CONF_DIVRATIO_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w1, w9, w8
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ipu_csi_write
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"value of pixel_clk extends normal range\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CSI_SENS_CONF,4,2              ; @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_DIVRATIO_MASK,4,2 ; @CSI_SENS_CONF_DIVRATIO_MASK
	.comm	_CSI_SENS_CONF_DIVRATIO_SHIFT,4,2 ; @CSI_SENS_CONF_DIVRATIO_SHIFT
	.no_dead_strip	_ipu_csi_set_testgen_mclk
.subsections_via_symbols
