	.file	"extr_sn9c102_mi0360.c_mi0360_set_ctrl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mi0360_set_ctrl, @function
mi0360_set_ctrl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	call	sn9c102_get_sensor@PLT
	mov	r9d, DWORD PTR [r12]
	mov	rsi, rax
	lea	eax, -128[r9]
	cmp	eax, 6
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR 4[r12]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	r9d, 3
	mov	r8d, 45
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L21:
	mov	ecx, DWORD PTR [rsi]
	mov	edx, 4
	mov	rdi, rbp
	call	sn9c102_i2c_try_raw_write@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 48
.L11:
	test	eax, eax
	je	.L1
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
.L1:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[r12]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, 4
	mov	r9d, 3
	push	0
	.cfi_def_cfa_offset 64
	mov	r8d, 43
	mov	rdi, rbp
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	mov	ecx, DWORD PTR [rsi]
	mov	QWORD PTR 40[rsp], rsi
	call	sn9c102_i2c_try_raw_write@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	r9d, 3
	mov	rdi, rbp
	mov	ebx, eax
	mov	eax, DWORD PTR 4[r12]
	push	0
	.cfi_def_cfa_offset 64
	mov	r8d, 46
	push	0
	.cfi_def_cfa_offset 72
	mov	edx, 4
	push	rax
	.cfi_def_cfa_offset 80
	mov	rsi, QWORD PTR 40[rsp]
	mov	ecx, DWORD PTR [rsi]
	call	sn9c102_i2c_try_raw_write@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 48
	add	eax, ebx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR 4[r12]
	test	eax, eax
	mov	eax, 0
	cmove	r9d, eax
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	r9
	.cfi_def_cfa_offset 80
.L20:
	mov	r8d, 32
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR 4[r12]
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	r9d, 3
	mov	r8d, 44
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	r9d, DWORD PTR 4[r12]
	xor	eax, eax
	test	r9d, r9d
	je	.L12
	mov	eax, 32
	mov	r9d, 64
.L12:
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[r12]
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	r9d, 3
	mov	r8d, 53
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	r9d, DWORD PTR 4[r12]
	mov	r8d, 9
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	0
	.cfi_def_cfa_offset 80
	jmp	.L21
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 16
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mi0360_set_ctrl, .-mi0360_set_ctrl
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sn9c102_mi0360.c_mi0360_set_ctrl.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mi0360_set_ctrl, %function
mi0360_set_ctrl:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	sub	sp, sp, #32
	mov	r6, r0
	bl	sn9c102_get_sensor
	ldr	r2, [r5]
	mov	r1, r0
	sub	r3, r2, #128
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	mov	r7, #0
	mov	r8, #3
	mov	r0, #43
	ldr	r2, [r5, #4]
	ldr	r3, [r1]
	stm	sp, {r0, r8}
	str	r2, [sp, #8]
	mov	r0, r6
	mov	r2, #4
	str	r7, [sp, #16]
	str	r7, [sp, #12]
	str	r1, [sp, #28]
	bl	sn9c102_i2c_try_raw_write
	mov	r2, #46
	ldr	ip, [r5, #4]
	ldr	r1, [sp, #28]
	mov	r4, r0
	ldr	r3, [r1]
	mov	r0, r6
	stm	sp, {r2, r8}
	str	ip, [sp, #8]
	mov	r2, #4
	str	r7, [sp, #16]
	str	r7, [sp, #12]
	bl	sn9c102_i2c_try_raw_write
	add	r0, r4, r0
.L11:
	cmp	r0, #0
	ldrne	r3, .L23
	ldrne	r0, [r3]
	rsbne	r0, r0, #0
.L1:
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	ip, #0
	ldr	r3, [r5, #4]
	mov	lr, #32
	cmp	r3, ip
	moveq	r2, ip
	ldr	r3, [r0]
	mov	r0, r6
	str	r2, [sp, #8]
	str	r2, [sp, #4]
.L20:
	mov	r2, #4
	str	ip, [sp, #16]
	str	ip, [sp, #12]
	str	lr, [sp]
	bl	sn9c102_i2c_try_raw_write
	b	.L11
.L9:
	mov	r2, #0
	mov	lr, #3
	mov	ip, #44
.L21:
	ldr	r4, [r5, #4]
	ldr	r3, [r1]
	mov	r0, r6
	str	r2, [sp, #16]
	str	r2, [sp, #12]
	stm	sp, {ip, lr}
	mov	r2, #4
	str	r4, [sp, #8]
	bl	sn9c102_i2c_try_raw_write
	b	.L11
.L8:
	ldr	r2, [r5, #4]
	ldr	r3, [r0]
	cmp	r2, #0
	moveq	r0, r2
	movne	r0, #64
	movne	r2, #32
	mov	ip, #0
	stmib	sp, {r0, r2}
	mov	lr, #32
	mov	r0, r6
	b	.L20
.L7:
	mov	r2, #0
	mov	lr, #3
	mov	ip, #53
	b	.L21
.L6:
	mov	r2, #0
	mov	ip, #9
	ldr	lr, [r5, #4]
	ldr	r3, [r0]
	str	r2, [sp, #16]
	str	r2, [sp, #12]
	str	r2, [sp, #8]
	mov	r0, r6
	mov	r2, #4
	str	lr, [sp, #4]
	str	ip, [sp]
	bl	sn9c102_i2c_try_raw_write
	b	.L11
.L5:
	mov	r2, #0
	mov	lr, #3
	mov	ip, #45
	b	.L21
.L2:
	ldr	r3, .L23+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L24:
	.align	2
.L23:
	.word	EIO
	.word	EINVAL
	.size	mi0360_set_ctrl, .-mi0360_set_ctrl
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
