	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %edx
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CAM_TYPE_CIF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	cmpl	$1, 8(%rbx)
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	movl	$14, %esi
	jmp	LBB0_3
LBB0_4:
	movq	_CAM_TYPE_VGA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	cmpl	$2, 8(%rbx)
	jne	LBB0_7
## %bb.6:
	movl	%edx, %r15d
	sarl	$8, %r15d
	movzbl	%dl, %r14d
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	%r15d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$11, %esi
	movl	%r14d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	%r15d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$13, %esi
	movl	%r14d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$14, %esi
	movl	%r15d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$15, %esi
	movl	%r14d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	%r15d, %edx
	callq	_sensor_write1
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	%r14d, %edx
	jmp	LBB0_3
LBB0_7:
	movq	%rbx, %rdi
	movl	$16, %esi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sensor_write1                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.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	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	x2, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CAM_TYPE_CIF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CAM_TYPE_CIF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #14
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x9, _CAM_TYPE_VGA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CAM_TYPE_VGA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.5:
	asr	w20, w2, #8
	and	w21, w2, #0xff
	mov	x0, x19
	mov	w1, #10
	mov	x2, x20
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #11
	mov	x2, x21
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #12
	mov	x2, x20
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #13
	mov	x2, x21
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #14
	mov	x2, x20
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #15
	mov	x2, x21
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #16
	mov	x2, x20
	bl	_sensor_write1
	mov	x0, x19
	mov	w1, #17
	mov	x2, x21
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #16
LBB0_7:
	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	_sensor_write1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.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
