	.file	"extr_t613.c_sd_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sd_start, @function
sd_start:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	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, 32
	.cfi_def_cfa_offset 64
	mov	rdx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 7
	movabs	rax, 412316860429
	mov	QWORD PTR 8[rsp], rax
	movabs	rax, 549755813902
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	eax, 2
	je	.L2
	jg	.L3
	test	eax, eax
	je	.L4
	cmp	eax, 1
	jne	.L6
	mov	DWORD PTR 4[rsp], 64
.L4:
	movsx	rax, DWORD PTR 0[rbp]
	cmp	eax, 128
	je	.L13
.L21:
	cmp	eax, 129
	jne	.L9
	mov	rdi, rbp
	call	om6802_sensor_init@PLT
	movsx	rax, DWORD PTR 0[rbp]
.L9:
	mov	rdx, QWORD PTR sensor_data[rip]
	mov	rdi, rbp
	lea	rbx, [rdx+rax*8]
	call	setfreq@PLT
	mov	esi, 18
	mov	rdi, rbp
	call	reg_r@PLT
	mov	rsi, rsp
	mov	edx, 24
	mov	rdi, rbp
	call	reg_w_buf@PLT
	mov	ecx, 32
	mov	esi, 179
	mov	rdi, rbp
	lea	rdx, t3.1964[rip]
	call	reg_w_ixbuf@PLT
	mov	esi, 19
	mov	rdi, rbp
	call	reg_w@PLT
	mov	edi, 15
	call	msleep@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	edx, 8
	mov	rdi, rbp
	call	reg_w_buf@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	edx, 8
	mov	rdi, rbp
	call	reg_w_buf@PLT
	cmp	DWORD PTR 0[rbp], 129
	je	.L19
.L11:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xor	eax, eax
	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
	cmp	eax, 3
	jne	.L6
	movsx	rax, DWORD PTR 0[rbp]
	mov	DWORD PTR 4[rsp], 80
	cmp	eax, 128
	jne	.L21
.L13:
	xor	ebx, ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	add	rbx, 1
.L8:
	mov	rax, QWORD PTR tas5130a_sensor_init[rip]
	mov	edx, 8
	mov	rdi, rbp
	lea	r12, 0[0+rbx*8]
	mov	rsi, QWORD PTR [rax+rbx*8]
	call	reg_w_buf@PLT
	mov	rdi, QWORD PTR tas5130a_sensor_init[rip]
	call	ARRAY_SIZE@PLT
	sub	eax, 1
	cmp	eax, ebx
	jg	.L22
	mov	esi, 15488
	mov	rdi, rbp
	call	reg_w@PLT
	mov	rax, QWORD PTR tas5130a_sensor_init[rip]
	mov	edx, 8
	mov	rdi, rbp
	mov	rsi, QWORD PTR [rax+r12]
	call	reg_w_buf@PLT
	mov	esi, 15488
	mov	rdi, rbp
	call	reg_w@PLT
	movsx	rax, DWORD PTR 0[rbp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbp
	call	poll_sensor@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	mov	DWORD PTR 4[rsp], 32
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR 4[rsp], 16
	jmp	.L4
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sd_start, .-sd_start
	.section	.rodata
	.align 32
	.type	t3.1964, @object
	.size	t3.1964, 32
t3.1964:
	.long	7
	.long	0
	.long	136
	.long	2
	.long	6
	.long	0
	.long	231
	.long	1
	.comm	tas5130a_sensor_init,8,8
	.comm	sensor_data,8,8
	.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_t613.c_sd_start.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_start, %function
sd_start:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	ldr	r3, .L20
	sub	sp, sp, #36
	ldr	lr, .L20+4
	add	ip, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	ldr	r2, [r2, r3, lsl #2]
	cmp	r2, #3
	ldrls	pc, [pc, r2, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L2:
	mov	r2, #32
	str	r2, [sp, #8]
.L7:
	cmp	r3, #128
	beq	.L13
.L18:
	cmp	r3, #129
	bne	.L9
	mov	r0, r4
	bl	om6802_sensor_init
.L9:
	ldr	r3, .L20+8
	mov	r0, r4
	ldr	r5, [r3]
	ldr	r6, [r4]
	bl	setfreq
	mov	r1, #18
	mov	r0, r4
	bl	reg_r
	mov	r2, #24
	add	r1, sp, #4
	mov	r0, r4
	bl	reg_w_buf
	mov	r3, #32
	ldr	r2, .L20+12
	mov	r1, #179
	mov	r0, r4
	bl	reg_w_ixbuf
	mov	r1, #19
	mov	r0, r4
	bl	reg_w
	mov	r0, #15
	bl	msleep
	mov	r2, #4
	ldr	r1, [r5, r6, lsl #2]
	mov	r0, r4
	bl	reg_w_buf
	mov	r2, #4
	mov	r0, r4
	ldr	r1, [r5, r6, lsl #2]
	bl	reg_w_buf
	ldr	r3, [r4]
	cmp	r3, #129
	beq	.L16
.L11:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, #0
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	mov	r2, #80
	cmp	r3, #128
	str	r2, [sp, #8]
	bne	.L18
.L13:
	mov	r5, #0
	ldr	r6, .L20+16
	b	.L8
.L19:
	add	r5, r5, #1
.L8:
	ldr	r3, [r6]
	mov	r2, #4
	ldr	r1, [r3, r5, lsl #2]
	mov	r0, r4
	bl	reg_w_buf
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	sub	r0, r0, #1
	cmp	r0, r5
	lsl	r7, r5, #2
	bgt	.L19
	mov	r1, #15488
	mov	r0, r4
	bl	reg_w
	ldr	r3, [r6]
	mov	r2, #4
	ldr	r1, [r3, r7]
	mov	r0, r4
	bl	reg_w_buf
	mov	r1, #15488
	mov	r0, r4
	bl	reg_w
	b	.L9
.L5:
	mov	r2, #16
	str	r2, [sp, #8]
	b	.L7
.L6:
	mov	r2, #64
	str	r2, [sp, #8]
	b	.L7
.L16:
	mov	r0, r4
	bl	poll_sensor
	b	.L11
.L17:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC1
	.word	.LANCHOR0
	.word	sensor_data
	.word	.LANCHOR0+24
	.word	tas5130a_sensor_init
	.size	sd_start, .-sd_start
	.comm	tas5130a_sensor_init,4,4
	.comm	sensor_data,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.word	7
	.word	0
	.word	13
	.word	96
	.word	14
	.word	128
	.type	t3.4248, %object
	.size	t3.4248, 32
t3.4248:
	.word	7
	.word	0
	.word	136
	.word	2
	.word	6
	.word	0
	.word	231
	.word	1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
