	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tef6862_s_frequency
_tef6862_s_frequency:                   ## @tef6862_s_frequency
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_to_state
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_v4l2_get_subdevdata
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	%rax, %r15
	movl	(%r12), %edi
	movq	_TEF6862_LO_FREQ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_TEF6862_HI_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_clamp
	movl	%eax, %r12d
	subl	(%rbx), %eax
	shll	$2, %eax
	leal	(%rax,%rax,4), %eax
	movq	_FREQ_MUL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	divl	(%rcx)
	addl	$1964, %eax                     ## imm = 0x7AC
	movq	_MSA_MODE_PRESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MSA_MODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_WM_SUB_PLLM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, -52(%rbp)
	movzbl	%ah, %ecx
	movl	%ecx, -48(%rbp)
	movzbl	%al, %eax
	movl	%eax, -44(%rbp)
	leaq	-52(%rbp), %rsi
	movq	%r15, %rdi
	movl	$12, %edx
	callq	_i2c_master_send
	cmpl	$12, %eax
	jne	LBB0_3
## %bb.4:
	movl	%r12d, (%r14)
	jmp	LBB0_5
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TEF6862_LO_FREQ,4,2            ## @TEF6862_LO_FREQ
	.comm	_TEF6862_HI_FREQ,4,2            ## @TEF6862_HI_FREQ
	.comm	_FREQ_MUL,4,2                   ## @FREQ_MUL
	.comm	_MSA_MODE_PRESET,4,2            ## @MSA_MODE_PRESET
	.comm	_MSA_MODE_SHIFT,4,2             ## @MSA_MODE_SHIFT
	.comm	_WM_SUB_PLLM,4,2                ## @WM_SUB_PLLM
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_tef6862_s_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tef6862_s_frequency
_tef6862_s_frequency:                   ; @tef6862_s_frequency
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_to_state
	mov	x19, x0
	mov	x0, x20
	bl	_v4l2_get_subdevdata
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x20, x0
	ldr	w0, [x21]
Lloh6:
	adrp	x22, _TEF6862_LO_FREQ@GOTPAGE
Lloh7:
	ldr	x22, [x22, _TEF6862_LO_FREQ@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _TEF6862_HI_FREQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TEF6862_HI_FREQ@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_clamp
	mov	x21, x0
	ldr	w8, [x22]
	sub	w8, w0, w8
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #2
Lloh11:
	adrp	x9, _FREQ_MUL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FREQ_MUL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	udiv	w8, w8, w9
	add	w8, w8, #1964
Lloh14:
	adrp	x9, _MSA_MODE_PRESET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MSA_MODE_PRESET@GOTPAGEOFF]
Lloh16:
	adrp	x10, _MSA_MODE_SHIFT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MSA_MODE_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh20:
	adrp	x10, _WM_SUB_PLLM@GOTPAGE
Lloh21:
	ldr	x10, [x10, _WM_SUB_PLLM@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ubfx	w10, w8, #8, #8
	stp	w9, w10, [sp, #12]
	and	w8, w8, #0xff
	str	w8, [sp, #20]
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #12
	bl	_i2c_master_send
	cmp	w0, #12
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	str	w21, [x19]
	b	LBB0_5
LBB0_4:
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
LBB0_5:
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.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
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TEF6862_LO_FREQ,4,2            ; @TEF6862_LO_FREQ
	.comm	_TEF6862_HI_FREQ,4,2            ; @TEF6862_HI_FREQ
	.comm	_FREQ_MUL,4,2                   ; @FREQ_MUL
	.comm	_MSA_MODE_PRESET,4,2            ; @MSA_MODE_PRESET
	.comm	_MSA_MODE_SHIFT,4,2             ; @MSA_MODE_SHIFT
	.comm	_WM_SUB_PLLM,4,2                ; @WM_SUB_PLLM
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_tef6862_s_frequency
.subsections_via_symbols
