	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_resolution
_set_resolution:                        ## @set_resolution
	.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	%rdi, %rbx
	movq	_TP6800_R21_ENDP_1_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edx, %edx
	callq	_reg_w
	xorl	%r14d, %r14d
	cmpl	$320, (%rbx)                    ## imm = 0x140
	sete	%r14b
	movq	_TP6800_R3F_FRAME_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	9(,%r14,4), %r12d
	movl	$55, %eax
	movl	$207, %r15d
	cmovel	%eax, %r15d
	leal	5(%r14), %edx
	movq	%rbx, %rdi
	callq	_reg_w
	movl	$100, %edi
	callq	_msleep
	movq	_CX0342_AUTO_ADC_CALIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_i2c_w
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_reg_w
	movq	_TP6800_R78_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_reg_w
	movq	_TP6800_R5D_DEMOSAIC_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_reg_w
	movq	_CX0342_EXPO_LINE_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_i2c_w
	movq	_CX0342_EXPO_LINE_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_i2c_w
	movq	_CX0342_SYS_CTRL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_i2c_w
	movq	_color_gain@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SENSOR_CX0342@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r14d
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_bulk_w
	movl	12(%rbx), %edi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_setgamma
	movq	(%rbx), %rax
	movq	_SENSOR_SOI763A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setquality                     ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TP6800_R21_ENDP_1_CTL,4,2      ## @TP6800_R21_ENDP_1_CTL
	.comm	_TP6800_R3F_FRAME_RATE,4,2      ## @TP6800_R3F_FRAME_RATE
	.comm	_CX0342_AUTO_ADC_CALIB,4,2      ## @CX0342_AUTO_ADC_CALIB
	.comm	_TP6800_R78_FORMAT,4,2          ## @TP6800_R78_FORMAT
	.comm	_TP6800_R5D_DEMOSAIC_CFG,4,2    ## @TP6800_R5D_DEMOSAIC_CFG
	.comm	_CX0342_EXPO_LINE_L,4,2         ## @CX0342_EXPO_LINE_L
	.comm	_CX0342_EXPO_LINE_H,4,2         ## @CX0342_EXPO_LINE_H
	.comm	_CX0342_SYS_CTRL_0,4,2          ## @CX0342_SYS_CTRL_0
	.comm	_color_gain,8,3                 ## @color_gain
	.comm	_SENSOR_CX0342,8,3              ## @SENSOR_CX0342
	.comm	_SENSOR_SOI763A,8,3             ## @SENSOR_SOI763A
	.no_dead_strip	_set_resolution
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_resolution
_set_resolution:                        ; @set_resolution
	.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	x19, x0
Lloh0:
	adrp	x23, _TP6800_R21_ENDP_1_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TP6800_R21_ENDP_1_CTL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w2, #0
	bl	_reg_w
	ldr	w8, [x19]
	mov	w9, #9
	mov	w10, #13
	cmp	w8, #320
	csel	w21, w10, w9, eq
	cset	w20, eq
Lloh2:
	adrp	x8, _TP6800_R3F_FRAME_RATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TP6800_R3F_FRAME_RATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w8, #5
	cinc	w2, w8, eq
	mov	w8, #207
	mov	w9, #55
	csel	w22, w9, w8, eq
	mov	x0, x19
	bl	_reg_w
	mov	w0, #100
	bl	_msleep
Lloh5:
	adrp	x8, _CX0342_AUTO_ADC_CALIB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CX0342_AUTO_ADC_CALIB@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_w
	mov	w0, #100
	bl	_msleep
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #3
	bl	_reg_w
Lloh8:
	adrp	x8, _TP6800_R78_FORMAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TP6800_R78_FORMAT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_reg_w
Lloh11:
	adrp	x8, _TP6800_R5D_DEMOSAIC_CFG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TP6800_R5D_DEMOSAIC_CFG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_reg_w
Lloh14:
	adrp	x8, _CX0342_EXPO_LINE_L@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CX0342_EXPO_LINE_L@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_i2c_w
Lloh17:
	adrp	x8, _CX0342_EXPO_LINE_H@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CX0342_EXPO_LINE_H@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_i2c_w
Lloh20:
	adrp	x8, _CX0342_SYS_CTRL_0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CX0342_SYS_CTRL_0@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_w
Lloh23:
	adrp	x8, _color_gain@GOTPAGE
Lloh24:
	ldr	x8, [x8, _color_gain@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _SENSOR_CX0342@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SENSOR_CX0342@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	w20, [x8, x9, lsl #2]
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x3, x0
	mov	x0, x19
	mov	w1, #3
	mov	x2, x20
	bl	_bulk_w
	ldr	w0, [x19, #12]
	bl	_v4l2_ctrl_g_ctrl
	mov	x1, x0
	mov	x0, x19
	bl	_setgamma
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _SENSOR_SOI763A@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SENSOR_SOI763A@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_v4l2_ctrl_g_ctrl
	mov	x1, x0
	mov	x0, x19
	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	_setquality
LBB0_2:
	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
	ret
	.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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TP6800_R21_ENDP_1_CTL,4,2      ; @TP6800_R21_ENDP_1_CTL
	.comm	_TP6800_R3F_FRAME_RATE,4,2      ; @TP6800_R3F_FRAME_RATE
	.comm	_CX0342_AUTO_ADC_CALIB,4,2      ; @CX0342_AUTO_ADC_CALIB
	.comm	_TP6800_R78_FORMAT,4,2          ; @TP6800_R78_FORMAT
	.comm	_TP6800_R5D_DEMOSAIC_CFG,4,2    ; @TP6800_R5D_DEMOSAIC_CFG
	.comm	_CX0342_EXPO_LINE_L,4,2         ; @CX0342_EXPO_LINE_L
	.comm	_CX0342_EXPO_LINE_H,4,2         ; @CX0342_EXPO_LINE_H
	.comm	_CX0342_SYS_CTRL_0,4,2          ; @CX0342_SYS_CTRL_0
	.comm	_color_gain,8,3                 ; @color_gain
	.comm	_SENSOR_CX0342,8,3              ; @SENSOR_CX0342
	.comm	_SENSOR_SOI763A,8,3             ; @SENSOR_SOI763A
	.no_dead_strip	_set_resolution
.subsections_via_symbols
