	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setsensorgain
_setsensorgain:                         ## @setsensorgain
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	4(%rdi), %ecx
	leal	-128(%rcx), %edx
	cmpl	$7, %edx
	ja	LBB0_16
## %bb.1:
	movq	%rdi, %rbx
	movb	(%rdi), %al
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_2:
	movaps	l___const.setsensorgain.i2c.1+16(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movdqa	l___const.setsensorgain.i2c.1(%rip), %xmm0
	movdqa	%xmm0, -48(%rbp)
	notb	%al
	movzbl	%al, %eax
	movl	%eax, -32(%rbp)
	jmp	LBB0_13
LBB0_3:
	movzbl	%al, %eax
	movaps	l___const.setsensorgain.i2cpgain+16(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	l___const.setsensorgain.i2cpgain(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	l___const.setsensorgain.i2cpcolorgain+16(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	l___const.setsensorgain.i2cpcolorgain(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	l___const.setsensorgain.i2cpdoit+16(%rip), %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	l___const.setsensorgain.i2cpdoit(%rip), %xmm0
	movaps	%xmm0, -112(%rbp)
	cmpl	$132, %ecx
	jne	LBB0_5
## %bb.4:
	movl	$14, -40(%rbp)
	movl	$208, -80(%rbp)
	movl	$9, -72(%rbp)
	movl	$19, -104(%rbp)
LBB0_5:
	movd	%eax, %xmm0
	shrl	$3, %eax
	movl	%eax, -36(%rbp)
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	psrld	$4, %xmm0
	movdqu	%xmm0, -68(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_i2c_w
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_i2c_w
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	leaq	-112(%rbp), %rsi
	jmp	LBB0_14
LBB0_8:
	movaps	l___const.setsensorgain.i2c.2(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movdqa	l___const.setsensorgain.i2c.2+16(%rip), %xmm0
	movdqa	%xmm0, -32(%rbp)
	notb	%al
	rolb	$4, %al
	movl	%eax, %ecx
	andb	$51, %cl
	shlb	$2, %cl
	shrb	$2, %al
	andb	$51, %al
	orb	%cl, %al
	movl	%eax, %ecx
	andb	$85, %cl
	addb	%cl, %cl
	shrb	%al
	andb	$85, %al
	orb	%cl, %al
	jmp	LBB0_11
LBB0_9:
	shrb	%al
LBB0_10:
	movaps	l___const.setsensorgain.i2c.3+16(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movdqa	l___const.setsensorgain.i2c.3(%rip), %xmm0
	movdqa	%xmm0, -48(%rbp)
	movq	_sensor_data@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, -44(%rbp)
	shrb	$2, %al
LBB0_11:
	movzbl	%al, %eax
	movl	%eax, -36(%rbp)
	jmp	LBB0_13
LBB0_12:
	movaps	l___const.setsensorgain.i2c(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movdqa	l___const.setsensorgain.i2c+16(%rip), %xmm0
	movdqa	%xmm0, -32(%rbp)
	notb	%al
	shrb	$2, %al
	movzbl	%al, %eax
	movl	%eax, -36(%rbp)
	movl	%eax, -32(%rbp)
	movl	%eax, -28(%rbp)
LBB0_13:
	leaq	-48(%rbp), %rsi
LBB0_14:
	movq	%rbx, %rdi
	callq	_i2c_w
	testl	%eax, %eax
	jns	LBB0_16
LBB0_15:
	movq	_D_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$104, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_18:
	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_8, LBB0_8-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_8
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.setsensorgain.i2c
l___const.setsensorgain.i2c:
	.long	192                             ## 0xc0
	.long	17                              ## 0x11
	.long	49                              ## 0x31
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	23                              ## 0x17

	.p2align	4                               ## @__const.setsensorgain.i2c.1
l___const.setsensorgain.i2c.1:
	.long	48                              ## 0x30
	.long	17                              ## 0x11
	.long	2                               ## 0x2
	.long	32                              ## 0x20
	.long	112                             ## 0x70
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	16                              ## 0x10

	.p2align	4                               ## @__const.setsensorgain.i2c.2
l___const.setsensorgain.i2c.2:
	.long	176                             ## 0xb0
	.long	97                              ## 0x61
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	16                              ## 0x10
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	23                              ## 0x17

	.p2align	4                               ## @__const.setsensorgain.i2c.3
l___const.setsensorgain.i2c.3:
	.long	160                             ## 0xa0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	16                              ## 0x10

	.comm	_sensor_data,8,3                ## @sensor_data
	.p2align	4                               ## @__const.setsensorgain.i2cpgain
l___const.setsensorgain.i2cpgain:
	.long	160                             ## 0xa0
	.long	64                              ## 0x40
	.long	16                              ## 0x10
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	21                              ## 0x15

	.p2align	4                               ## @__const.setsensorgain.i2cpcolorgain
l___const.setsensorgain.i2cpcolorgain:
	.long	192                             ## 0xc0
	.long	64                              ## 0x40
	.long	7                               ## 0x7
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	21                              ## 0x15

	.p2align	4                               ## @__const.setsensorgain.i2cpdoit
l___const.setsensorgain.i2cpdoit:
	.long	160                             ## 0xa0
	.long	64                              ## 0x40
	.long	17                              ## 0x11
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	22                              ## 0x16

	.comm	_D_ERR,4,2                      ## @D_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c error gain"

	.no_dead_strip	_setsensorgain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setsensorgain
_setsensorgain:                         ; @setsensorgain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w9, [x0, #4]
	sub	w10, w9, #128
	cmp	w10, #7
	b.hi	LBB0_16
; %bb.1:
	mov	x19, x0
	ldrb	w8, [x0]
Lloh3:
	adrp	x11, lJTI0_0@PAGE
Lloh4:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
Lloh5:
	adrp	x9, l___const.setsensorgain.i2c.1@PAGE
Lloh6:
	add	x9, x9, l___const.setsensorgain.i2c.1@PAGEOFF
	ldp	q1, q0, [x9]
	stp	q1, q0, [sp, #64]
	eor	w8, w8, #0xff
	str	w8, [sp, #80]
	b	LBB0_13
LBB0_3:
Lloh7:
	adrp	x10, l___const.setsensorgain.i2cpgain@PAGE
Lloh8:
	add	x10, x10, l___const.setsensorgain.i2cpgain@PAGEOFF
	ldp	q0, q1, [x10]
Lloh9:
	adrp	x10, l___const.setsensorgain.i2cpcolorgain@PAGE
Lloh10:
	add	x10, x10, l___const.setsensorgain.i2cpcolorgain@PAGEOFF
	stp	q0, q1, [sp, #64]
	ldp	q0, q1, [x10]
Lloh11:
	adrp	x10, l___const.setsensorgain.i2cpdoit@PAGE
Lloh12:
	add	x10, x10, l___const.setsensorgain.i2cpdoit@PAGEOFF
	stp	q0, q1, [sp, #32]
	ldp	q0, q1, [x10]
	stp	q0, q1, [sp]
	cmp	w9, #132
	b.ne	LBB0_5
; %bb.4:
	mov	w9, #14
	str	w9, [sp, #72]
	mov	w9, #208
	mov	w10, #9
	str	w9, [sp, #32]
	str	w10, [sp, #40]
	mov	w9, #19
	str	w9, [sp, #8]
LBB0_5:
	lsr	w9, w8, #3
	str	w9, [sp, #76]
	lsr	w8, w8, #4
	dup.4s	v0, w8
	stur	q0, [sp, #44]
	add	x1, sp, #64
	mov	x0, x19
	bl	_i2c_w
	tbnz	w0, #31, LBB0_15
; %bb.6:
	add	x1, sp, #32
	mov	x0, x19
	bl	_i2c_w
	tbnz	w0, #31, LBB0_15
; %bb.7:
	mov	x1, sp
	b	LBB0_14
LBB0_8:
Lloh13:
	adrp	x9, l___const.setsensorgain.i2c.2@PAGE
Lloh14:
	add	x9, x9, l___const.setsensorgain.i2c.2@PAGEOFF
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp, #64]
	mvn	w8, w8
	rbit	w8, w8
	lsr	w8, w8, #24
	b	LBB0_11
LBB0_9:
	lsr	w8, w8, #1
LBB0_10:
Lloh15:
	adrp	x10, l___const.setsensorgain.i2c.3@PAGE
Lloh16:
	add	x10, x10, l___const.setsensorgain.i2c.3@PAGEOFF
	ldp	q0, q1, [x10]
	stp	q0, q1, [sp, #64]
Lloh17:
	adrp	x10, _sensor_data@GOTPAGE
Lloh18:
	ldr	x10, [x10, _sensor_data@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	ldr	w9, [x10, x9, lsl #2]
	lsr	w8, w8, #2
	str	w9, [sp, #68]
LBB0_11:
	str	w8, [sp, #76]
	b	LBB0_13
LBB0_12:
Lloh20:
	adrp	x9, l___const.setsensorgain.i2c@PAGE
Lloh21:
	add	x9, x9, l___const.setsensorgain.i2c@PAGEOFF
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp, #64]
	mvn	w8, w8
	ubfx	w8, w8, #2, #6
	stp	w8, w8, [sp, #76]
	str	w8, [sp, #84]
LBB0_13:
	add	x1, sp, #64
LBB0_14:
	mov	x0, x19
	bl	_i2c_w
	tbz	w0, #31, LBB0_16
LBB0_15:
Lloh22:
	adrp	x8, _D_ERR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _D_ERR@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
LBB0_16:
	ldur	x8, [x29, #-24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.p2align	2                               ; @__const.setsensorgain.i2c
l___const.setsensorgain.i2c:
	.long	192                             ; 0xc0
	.long	17                              ; 0x11
	.long	49                              ; 0x31
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	23                              ; 0x17

	.p2align	2                               ; @__const.setsensorgain.i2c.1
l___const.setsensorgain.i2c.1:
	.long	48                              ; 0x30
	.long	17                              ; 0x11
	.long	2                               ; 0x2
	.long	32                              ; 0x20
	.long	112                             ; 0x70
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	16                              ; 0x10

	.p2align	2                               ; @__const.setsensorgain.i2c.2
l___const.setsensorgain.i2c.2:
	.long	176                             ; 0xb0
	.long	97                              ; 0x61
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	23                              ; 0x17

	.p2align	2                               ; @__const.setsensorgain.i2c.3
l___const.setsensorgain.i2c.3:
	.long	160                             ; 0xa0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	16                              ; 0x10

	.comm	_sensor_data,8,3                ; @sensor_data
	.p2align	2                               ; @__const.setsensorgain.i2cpgain
l___const.setsensorgain.i2cpgain:
	.long	160                             ; 0xa0
	.long	64                              ; 0x40
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	21                              ; 0x15

	.p2align	2                               ; @__const.setsensorgain.i2cpcolorgain
l___const.setsensorgain.i2cpcolorgain:
	.long	192                             ; 0xc0
	.long	64                              ; 0x40
	.long	7                               ; 0x7
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	21                              ; 0x15

	.p2align	2                               ; @__const.setsensorgain.i2cpdoit
l___const.setsensorgain.i2cpdoit:
	.long	160                             ; 0xa0
	.long	64                              ; 0x40
	.long	17                              ; 0x11
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	22                              ; 0x16

	.comm	_D_ERR,4,2                      ; @D_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c error gain"

	.no_dead_strip	_setsensorgain
.subsections_via_symbols
