	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setgain
_setgain:                               ## @setgain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_GAIN_IDX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_2
## %bb.1:
	movq	_SAKAR_CS_GAIN_IDX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_2
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %rax
	movq	_CAM_TYPE_CIF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	cmpl	$1, 8(%rbx)
	jne	LBB0_6
## %bb.4:
	movl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$14, %esi
	jmp	LBB0_5
LBB0_6:
	movq	_CAM_TYPE_VGA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	cmpl	$2, 8(%rbx)
	jne	LBB0_9
## %bb.8:
	movl	12(%rbx), %edx
	sarl	$8, %edx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_sensor_write1
	movzbl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$11, %esi
	callq	_sensor_write1
	movl	12(%rbx), %edx
	sarl	$8, %edx
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_sensor_write1
	movzbl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$13, %esi
	callq	_sensor_write1
	movl	12(%rbx), %edx
	sarl	$8, %edx
	movq	%rbx, %rdi
	movl	$14, %esi
	callq	_sensor_write1
	movzbl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$15, %esi
	callq	_sensor_write1
	movl	12(%rbx), %edx
	sarl	$8, %edx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_sensor_write1
	movzbl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$17, %esi
	jmp	LBB0_5
LBB0_9:
	movl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	$16, %esi
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_sensor_write1                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GAIN_IDX,4,2                   ## @GAIN_IDX
	.comm	_SAKAR_CS_GAIN_IDX,4,2          ## @SAKAR_CS_GAIN_IDX
	.comm	_CAM_TYPE_CIF,8,3               ## @CAM_TYPE_CIF
	.comm	_CAM_TYPE_VGA,8,3               ## @CAM_TYPE_VGA
	.no_dead_strip	_setgain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setgain
_setgain:                               ; @setgain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _GAIN_IDX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GAIN_IDX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsr	w9, w8, w9
	tbz	w9, #0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _SAKAR_CS_GAIN_IDX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SAKAR_CS_GAIN_IDX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	tbz	w8, #0, LBB0_3
; %bb.2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CAM_TYPE_CIF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CAM_TYPE_CIF@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.ne	LBB0_6
; %bb.5:
	ldr	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #14
	b	LBB0_10
LBB0_6:
Lloh9:
	adrp	x9, _CAM_TYPE_VGA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CAM_TYPE_VGA@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x19, #12]
	asr	w2, w8, #8
	mov	x0, x19
	mov	w1, #10
	bl	_sensor_write1
	ldrb	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #11
	bl	_sensor_write1
	ldr	w8, [x19, #12]
	asr	w2, w8, #8
	mov	x0, x19
	mov	w1, #12
	bl	_sensor_write1
	ldrb	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #13
	bl	_sensor_write1
	ldr	w8, [x19, #12]
	asr	w2, w8, #8
	mov	x0, x19
	mov	w1, #14
	bl	_sensor_write1
	ldrb	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #15
	bl	_sensor_write1
	ldr	w8, [x19, #12]
	asr	w2, w8, #8
	mov	x0, x19
	mov	w1, #16
	bl	_sensor_write1
	ldrb	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #17
	b	LBB0_10
LBB0_9:
	ldr	w2, [x19, #12]
	mov	x0, x19
	mov	w1, #16
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sensor_write1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GAIN_IDX,4,2                   ; @GAIN_IDX
	.comm	_SAKAR_CS_GAIN_IDX,4,2          ; @SAKAR_CS_GAIN_IDX
	.comm	_CAM_TYPE_CIF,8,3               ; @CAM_TYPE_CIF
	.comm	_CAM_TYPE_VGA,8,3               ; @CAM_TYPE_VGA
	.no_dead_strip	_setgain
.subsections_via_symbols
