	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mi0360_set_ctrl
_mi0360_set_ctrl:                       ## @mi0360_set_ctrl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_sn9c102_get_sensor
	movq	%rax, %r14
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_11
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movl	(%r14), %ecx
	xorl	%r9d, %r9d
	cmpl	$0, 4(%rbx)
	setne	%r9b
	shll	$7, %r9d
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$32, %r8d
	pushq	$0
	pushq	$0
	pushq	%r9
	jmp	LBB0_6
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_14
LBB0_7:
	movl	(%r14), %ecx
	movl	4(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$44, %r8d
	jmp	LBB0_4
LBB0_9:
	xorl	%eax, %eax
	cmpl	$0, 4(%rbx)
	movl	(%r14), %ecx
	setne	%al
	movl	%eax, %r9d
	shll	$6, %r9d
	shll	$5, %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$32, %r8d
	jmp	LBB0_5
LBB0_3:
	movl	(%r14), %ecx
	movl	4(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$53, %r8d
	jmp	LBB0_4
LBB0_2:
	movl	(%r14), %ecx
	movl	4(%rbx), %r9d
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$9, %r8d
	pushq	$0
	pushq	$0
	pushq	$0
	jmp	LBB0_6
LBB0_8:
	movl	(%r14), %ecx
	movl	4(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$45, %r8d
LBB0_4:
	movl	$3, %r9d
LBB0_5:
	pushq	$0
	pushq	$0
	pushq	%rax
LBB0_6:
	callq	_sn9c102_i2c_try_raw_write
	addq	$32, %rsp
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovel	%eax, %ecx
LBB0_14:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	(%r14), %ecx
	movl	4(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$43, %r8d
	movl	$3, %r9d
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_sn9c102_i2c_try_raw_write
	addq	$32, %rsp
	movl	%eax, %r12d
	movl	(%r14), %ecx
	movl	4(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$46, %r8d
	movl	$3, %r9d
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_sn9c102_i2c_try_raw_write
	addq	$32, %rsp
	addl	%r12d, %eax
	jmp	LBB0_13
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_8
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mi0360_set_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mi0360_set_ctrl
_mi0360_set_ctrl:                       ; @mi0360_set_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_sn9c102_get_sensor
	ldr	w8, [x21]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w3, [x19]
	ldr	w8, [x21, #4]
	cmp	w8, #0
	cset	w8, ne
	lsl	w5, w8, #7
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #32
	mov	x6, x5
	b	LBB0_10
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
	ldr	w3, [x19]
	ldr	w6, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #44
	b	LBB0_9
LBB0_5:
	ldr	w3, [x19]
	ldr	w8, [x21, #4]
	cmp	w8, #0
	cset	w8, ne
	lsl	w5, w8, #6
	lsl	w6, w8, #5
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #32
	b	LBB0_10
LBB0_6:
	ldr	w3, [x19]
	ldr	w6, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #53
	b	LBB0_9
LBB0_7:
	ldr	w3, [x19]
	ldr	w5, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #9
	mov	w6, #0
	b	LBB0_10
LBB0_8:
	ldr	w3, [x19]
	ldr	w6, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #45
LBB0_9:
	mov	w5, #3
LBB0_10:
	mov	w7, #0
	bl	_sn9c102_i2c_try_raw_write
LBB0_11:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, eq
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	w3, [x19]
	ldr	w6, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #43
	mov	w5, #3
	mov	w7, #0
	bl	_sn9c102_i2c_try_raw_write
	mov	x22, x0
	ldr	w3, [x19]
	ldr	w6, [x21, #4]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	w4, #46
	mov	w5, #3
	mov	w7, #0
	bl	_sn9c102_i2c_try_raw_write
	add	w0, w0, w22
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mi0360_set_ctrl
.subsections_via_symbols
