	.file	"extr_t4_hw.c_sf1_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sf1_read, @function
sf1_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	ebp, -1[rsi]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmp	ebp, 3
	jbe	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR A_SF_OP[rip]
	mov	r13, rdi
	mov	r12d, edx
	mov	r14d, ecx
	mov	rbx, r8
	call	t4_read_reg@PLT
	test	DWORD PTR F_BUSY[rip], eax
	je	.L4
	mov	r12d, DWORD PTR EBUSY[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	edi, r14d
	call	V_SF_LOCK@PLT
	mov	edi, r12d
	mov	r14d, eax
	call	V_CONT@PLT
	mov	edi, ebp
	or	r14d, eax
	call	V_BYTECNT@PLT
	mov	esi, DWORD PTR A_SF_OP[rip]
	mov	edx, r14d
	mov	rdi, r13
	or	edx, eax
	call	t4_write_reg@PLT
	mov	edx, DWORD PTR F_BUSY[rip]
	xor	ecx, ecx
	mov	rdi, r13
	mov	r8d, DWORD PTR SF_ATTEMPTS[rip]
	mov	esi, DWORD PTR A_SF_OP[rip]
	mov	r9d, 5
	call	t4_wait_op_done@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	esi, DWORD PTR A_SF_DATA[rip]
	mov	rdi, r13
	call	t4_read_reg@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sf1_read, .-sf1_read
	.comm	SF_ATTEMPTS,4,4
	.comm	F_BUSY,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	A_SF_OP,4,4
	.comm	A_SF_DATA,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_t4_hw.c_sf1_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sf1_read, %function
sf1_read:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	r4, r1, #1
	cmp	r4, #3
	sub	sp, sp, #12
	bls	.L2
	ldr	r3, .L7
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r8, .L7+4
	mov	r5, r3
	ldr	r1, [r8]
	mov	r7, r2
	mov	r6, r0
	bl	t4_read_reg
	ldr	r9, .L7+8
	ldr	r3, [r9]
	ands	r10, r0, r3
	beq	.L4
	ldr	r3, .L7+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r0, r5
	ldr	fp, [r8]
	bl	V_SF_LOCK
	mov	r5, r0
	mov	r0, r7
	bl	V_CONT
	mov	r2, r0
	mov	r0, r4
	orr	r5, r5, r2
	bl	V_BYTECNT
	mov	r1, fp
	orr	r2, r5, r0
	mov	r0, r6
	bl	t4_write_reg
	mov	r0, #5
	ldr	r2, .L7+16
	mov	r3, r10
	ldr	ip, [r2]
	ldr	r1, [r8]
	str	r0, [sp, #4]
	ldr	r2, [r9]
	mov	r0, r6
	str	ip, [sp]
	bl	t4_wait_op_done
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L7+20
	mov	r0, r6
	ldr	r1, [r3]
	bl	t4_read_reg
	ldr	r3, [sp, #48]
	str	r0, [r3]
	b	.L1
.L8:
	.align	2
.L7:
	.word	EINVAL
	.word	A_SF_OP
	.word	F_BUSY
	.word	EBUSY
	.word	SF_ATTEMPTS
	.word	A_SF_DATA
	.size	sf1_read, .-sf1_read
	.comm	SF_ATTEMPTS,4,4
	.comm	F_BUSY,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	A_SF_OP,4,4
	.comm	A_SF_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
