	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_gain
_set_gain:                              ## @set_gain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	movl	%ecx, -44(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -40(%rbp)
	movl	$0, -24(%rbp)
	xorl	%ecx, %ecx
	cmpq	$0, (%rdi)
	setne	%cl
	leal	(%rcx,%rcx,4), %ecx
	orl	$16, %ecx
	movl	%ecx, -20(%rbp)
	movl	8(%rdi), %ecx
	addl	$-128, %ecx
	cmpl	$8, %ecx
	ja	LBB0_11
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_2:
	orl	$32, %eax
	movl	%eax, -48(%rbp)
	movq	_ov_gain@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movl	(%rax,%rsi,4), %eax
	movl	%eax, -36(%rbp)
	jmp	LBB0_10
LBB0_6:
	orl	$48, %eax
	movl	%eax, -48(%rbp)
	movl	$47, -40(%rbp)
	jmp	LBB0_4
LBB0_3:
	orl	$48, %eax
	movl	%eax, -48(%rbp)
	movl	$53, -40(%rbp)
LBB0_4:
	movq	_micron1_gain@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	orl	$48, %eax
	movl	%eax, -48(%rbp)
	movl	$47, -40(%rbp)
	movq	_micron2_gain@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movl	(%rax,%rsi,4), %ecx
	sarl	$8, %ecx
	movl	%ecx, -36(%rbp)
	movl	(%rax,%rsi,4), %eax
	movl	%eax, -32(%rbp)
LBB0_10:
	leaq	-48(%rbp), %rsi
	callq	_i2c_w
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-8(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$48, %rsp
	popq	%rbp
	retq
LBB0_8:
	orl	$32, %eax
	movl	%eax, -48(%rbp)
	movl	$48, -40(%rbp)
	movq	_hv7131r_gain@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_ov_gain,8,3                    ## @ov_gain
	.comm	_micron1_gain,8,3               ## @micron1_gain
	.comm	_micron2_gain,8,3               ## @micron2_gain
	.comm	_hv7131r_gain,8,3               ## @hv7131r_gain
	.no_dead_strip	_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_gain
_set_gain:                              ; @set_gain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	ldp	w8, w9, [x0, #4]
	str	w8, [sp, #12]
	ldr	x8, [x0]
	cmp	x8, #0
	mov	w8, #21
	mov	w10, #16
	csel	w8, w10, w8, eq
	ldr	w10, [x0]
	stp	xzr, xzr, [sp, #16]
	stp	wzr, w8, [sp, #32]
	sub	w11, w9, #128
	cmp	w11, #8
	b.hi	LBB0_10
; %bb.1:
	add	x8, sp, #8
	add	x9, x8, #12
	add	x8, x8, #16
Lloh3:
	adrp	x12, lJTI0_0@PAGE
Lloh4:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_2
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_2:
	orr	w8, w10, #0x20
	str	w8, [sp, #8]
Lloh5:
	adrp	x8, _ov_gain@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ov_gain@GOTPAGEOFF]
LBB0_3:
	ldr	x8, [x8]
	add	x10, x8, x1, lsl #2
	b	LBB0_9
LBB0_4:
	orr	w9, w10, #0x30
	mov	w10, #47
	b	LBB0_6
LBB0_5:
	orr	w9, w10, #0x30
	mov	w10, #53
LBB0_6:
	str	w9, [sp, #8]
	str	w10, [sp, #16]
Lloh7:
	adrp	x9, _micron1_gain@GOTPAGE
Lloh8:
	ldr	x9, [x9, _micron1_gain@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	orr	w9, w10, #0x30
	mov	w10, #47
	str	w9, [sp, #8]
	str	w10, [sp, #16]
Lloh9:
	adrp	x9, _micron2_gain@GOTPAGE
Lloh10:
	ldr	x9, [x9, _micron2_gain@GOTPAGEOFF]
LBB0_8:
	ldr	x9, [x9]
	add	x10, x9, x1, lsl #2
	ldr	w9, [x10]
	asr	w9, w9, #8
	str	w9, [sp, #20]
	mov	x9, x8
LBB0_9:
	ldr	w8, [x10]
	str	w8, [x9]
	add	x1, sp, #8
	bl	_i2c_w
LBB0_10:
	ldur	x8, [x29, #-8]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
	orr	w8, w10, #0x20
	mov	w10, #48
	str	w8, [sp, #8]
	str	w10, [sp, #16]
Lloh14:
	adrp	x8, _hv7131r_gain@GOTPAGE
Lloh15:
	ldr	x8, [x8, _hv7131r_gain@GOTPAGEOFF]
	b	LBB0_3
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.comm	_ov_gain,8,3                    ; @ov_gain
	.comm	_micron1_gain,8,3               ; @micron1_gain
	.comm	_micron2_gain,8,3               ; @micron2_gain
	.comm	_hv7131r_gain,8,3               ; @hv7131r_gain
	.no_dead_strip	_set_gain
.subsections_via_symbols
