	.file	"extr_sossi.c_sossi_read_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sossi_read_data, @function
sossi_read_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, DWORD PTR sossi[rip]
	call	clk_enable@PLT
	mov	edi, DWORD PTR RD_ACCESS[rip]
	call	set_timing@PLT
	mov	esi, DWORD PTR sossi[rip+4]
	mov	edi, DWORD PTR sossi[rip+8]
	call	_set_bits_per_cycle@PLT
	mov	edi, DWORD PTR SOSSI_INIT1_REG[rip]
	mov	esi, 262144
	call	sossi_set_bits@PLT
	mov	edi, r12d
	call	set_cycles@PLT
	xor	eax, eax
	call	sossi_start_transfer@PLT
	cmp	r12d, 3
	jbe	.L6
	lea	eax, -4[r12]
	shr	eax, 2
	lea	rbp, 4[rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR SOSSI_FIFO_REG[rip]
	add	rbx, 4
	call	sossi_read_reg@PLT
	mov	DWORD PTR -4[rbx], eax
	cmp	rbp, rbx
	jne	.L3
	and	r12d, 3
.L2:
	cmp	r12d, 1
	jbe	.L4
	mov	edi, DWORD PTR SOSSI_FIFO_REG[rip]
	sub	r12d, 2
	add	rbp, 2
	call	sossi_read_reg16@PLT
	mov	DWORD PTR -2[rbp], eax
.L4:
	test	r12d, r12d
	je	.L5
	mov	edi, DWORD PTR SOSSI_FIFO_REG[rip]
	call	sossi_read_reg8@PLT
	mov	DWORD PTR 0[rbp], eax
.L5:
	xor	eax, eax
	call	sossi_stop_transfer@PLT
	mov	edi, DWORD PTR sossi[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	clk_disable@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rbp, rbx
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	sossi_read_data, .-sossi_read_data
	.comm	sossi,12,8
	.comm	SOSSI_INIT1_REG,4,4
	.comm	SOSSI_FIFO_REG,4,4
	.comm	RD_ACCESS,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_sossi.c_sossi_read_data.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sossi_read_data, %function
sossi_read_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	ldr	r8, .L13
	mov	r4, r0
	ldr	r0, [r8]
	bl	clk_enable
	ldr	r3, .L13+4
	ldr	r0, [r3]
	bl	set_timing
	ldr	r1, [r8, #4]
	ldr	r0, [r8, #8]
	bl	_set_bits_per_cycle
	ldr	r3, .L13+8
	mov	r1, #262144
	ldr	r0, [r3]
	bl	sossi_set_bits
	mov	r0, r7
	bl	set_cycles
	bl	sossi_start_transfer
	cmp	r7, #3
	bls	.L6
	sub	r5, r7, #4
	bic	r5, r5, #3
	add	r5, r5, #4
	ldr	r6, .L13+12
	add	r5, r4, r5
.L3:
	ldr	r0, [r6]
	bl	sossi_read_reg
	str	r0, [r4], #4
	cmp	r4, r5
	bne	.L3
	and	r7, r7, #3
.L2:
	cmp	r7, #1
	bls	.L4
	ldr	r3, .L13+12
	sub	r7, r7, #2
	ldr	r0, [r3]
	bl	sossi_read_reg16
	str	r0, [r5], #2
.L4:
	cmp	r7, #0
	beq	.L5
	ldr	r3, .L13+12
	ldr	r0, [r3]
	bl	sossi_read_reg8
	str	r0, [r5]
.L5:
	bl	sossi_stop_transfer
	ldr	r0, [r8]
	pop	{r4, r5, r6, r7, r8, lr}
	b	clk_disable
.L6:
	mov	r5, r4
	b	.L2
.L14:
	.align	2
.L13:
	.word	sossi
	.word	RD_ACCESS
	.word	SOSSI_INIT1_REG
	.word	SOSSI_FIFO_REG
	.size	sossi_read_data, .-sossi_read_data
	.comm	sossi,12,4
	.comm	SOSSI_INIT1_REG,4,4
	.comm	SOSSI_FIFO_REG,4,4
	.comm	RD_ACCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
