	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setframerate
_setframerate:                          ## @setframerate
	.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	%esi, %r15d
	movq	%rdi, %rbx
	callq	_get_fr_idx
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movq	_BRIDGE_TP6810@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$123, %esi
	callq	_reg_r
	movq	8(%rbx), %rax
	movq	_SENSOR_CX0342@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setne	%dl
	shll	$7, %edx
	orl	$16, %edx
	movq	%rbx, %rdi
	movl	$123, %esi
	callq	_reg_w
	cmpl	$127, %r15d
	movl	$240, %eax
	cmovgl	%eax, %r14d
LBB0_2:
	movq	_TP6800_R3F_FRAME_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_reg_w
	movq	8(%rbx), %rax
	movq	_SENSOR_CX0342@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_CX0342_AUTO_ADC_CALIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_w                          ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_TP6810,8,3              ## @BRIDGE_TP6810
	.comm	_SENSOR_CX0342,8,3              ## @SENSOR_CX0342
	.comm	_TP6800_R3F_FRAME_RATE,4,2      ## @TP6800_R3F_FRAME_RATE
	.comm	_CX0342_AUTO_ADC_CALIB,4,2      ## @CX0342_AUTO_ADC_CALIB
	.no_dead_strip	_setframerate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setframerate
_setframerate:                          ; @setframerate
	.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	x21, x1
	mov	x19, x0
	bl	_get_fr_idx
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _BRIDGE_TP6810@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRIDGE_TP6810@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x22, _SENSOR_CX0342@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SENSOR_CX0342@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #123
	bl	_reg_r
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	mov	w8, #144
	mov	w9, #16
	csel	w2, w9, w8, eq
	mov	x0, x19
	mov	w1, #123
	bl	_reg_w
	mov	w8, #240
	cmp	w21, #127
	csel	w20, w8, w20, gt
LBB0_2:
Lloh5:
	adrp	x8, _TP6800_R3F_FRAME_RATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TP6800_R3F_FRAME_RATE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_reg_w
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _CX0342_AUTO_ADC_CALIB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CX0342_AUTO_ADC_CALIB@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	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
	b	_i2c_w
LBB0_4:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_TP6810,8,3              ; @BRIDGE_TP6810
	.comm	_SENSOR_CX0342,8,3              ; @SENSOR_CX0342
	.comm	_TP6800_R3F_FRAME_RATE,4,2      ; @TP6800_R3F_FRAME_RATE
	.comm	_CX0342_AUTO_ADC_CALIB,4,2      ; @CX0342_AUTO_ADC_CALIB
	.no_dead_strip	_setframerate
.subsections_via_symbols
