	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mi0360_get_ctrl
_mi0360_get_ctrl:                       ## @mi0360_get_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_sn9c102_get_sensor
	movl	(%r14), %ecx
	addl	$-128, %ecx
	cmpl	$6, %ecx
	ja	LBB0_17
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_15:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$32, %ecx
	movl	$2, %r8d
	callq	_sn9c102_i2c_try_raw_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.16:
	movl	-28(%rbp), %eax
	shrl	$7, %eax
	jmp	LBB0_13
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_11:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$32, %ecx
	movl	$2, %r8d
	callq	_sn9c102_i2c_try_raw_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.12:
	movl	-28(%rbp), %eax
	shrl	$5, %eax
LBB0_13:
	andl	$1, %eax
	jmp	LBB0_14
LBB0_5:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$53, %ecx
	jmp	LBB0_6
LBB0_2:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$9, %ecx
	movl	$2, %r8d
	callq	_sn9c102_i2c_try_raw_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	-32(%rbp), %eax
	jmp	LBB0_14
LBB0_8:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$44, %ecx
	jmp	LBB0_6
LBB0_9:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$45, %ecx
	jmp	LBB0_6
LBB0_10:
	movl	(%rax), %edx
	leaq	-32(%rbp), %r9
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$46, %ecx
LBB0_6:
	movl	$2, %r8d
	callq	_sn9c102_i2c_try_raw_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	movl	-28(%rbp), %eax
LBB0_14:
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_18:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_8
	.long	L0_0_set_11
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mi0360_get_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mi0360_get_ctrl
_mi0360_get_ctrl:                       ; @mi0360_get_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_sn9c102_get_sensor
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_4
; %bb.1:
	mov	x1, x0
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	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	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #32
	mov	w4, #2
	bl	_sn9c102_i2c_try_raw_read
	tbnz	w0, #31, LBB0_15
; %bb.3:
	mov	w0, #0
	ldr	w8, [sp, #4]
	ubfx	w8, w8, #7, #1
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_5:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #32
	mov	w4, #2
	bl	_sn9c102_i2c_try_raw_read
	tbnz	w0, #31, LBB0_15
; %bb.6:
	mov	w0, #0
	ldr	w8, [sp, #4]
	ubfx	w8, w8, #5, #1
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_7:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #53
	b	LBB0_13
LBB0_8:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #9
	mov	w4, #2
	bl	_sn9c102_i2c_try_raw_read
	tbnz	w0, #31, LBB0_15
; %bb.9:
	mov	w0, #0
	ldr	w8, [sp]
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_10:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #44
	b	LBB0_13
LBB0_11:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #45
	b	LBB0_13
LBB0_12:
	ldr	w2, [x1]
	mov	x5, sp
	mov	x0, x20
	mov	w3, #46
LBB0_13:
	mov	w4, #2
	bl	_sn9c102_i2c_try_raw_read
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w0, #0
	ldr	w8, [sp, #4]
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_15:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldr	x8, [sp, #8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mi0360_get_ctrl
.subsections_via_symbols
