	.file	"extr_if_spi.c_spu_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	spu_read, @function
spu_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	edi, DWORD PTR IF_SPI_READ_OPERATION_MASK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	lea	r12, 28[rsp]
	lea	r15, 96[rsp]
	or	edi, esi
	call	cpu_to_le16@PLT
	mov	edi, ebx
	and	edi, 1
	mov	DWORD PTR 24[rsp], eax
	call	BUG_ON@PLT
	mov	rdi, rbp
	call	spu_transaction_init@PLT
	mov	rdi, r12
	call	spi_message_init@PLT
	lea	r8, 32[rsp]
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	call	memset@PLT
	lea	r9, 64[rsp]
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r9
	mov	QWORD PTR 8[rsp], r9
	call	memset@PLT
	mov	edx, 32
	xor	esi, esi
	mov	rdi, r15
	call	memset@PLT
	mov	r8, QWORD PTR [rsp]
	mov	rsi, r12
	lea	rax, 24[rsp]
	mov	QWORD PTR 56[rsp], rax
	mov	rdi, r8
	mov	DWORD PTR 32[rsp], 4
	call	spi_message_add_tail@PLT
	mov	edi, r14d
	call	spu_reg_is_port_reg@PLT
	mov	edx, DWORD PTR 4[rbp]
	test	rax, rax
	mov	eax, edx
	cmovne	eax, DWORD PTR 0[rbp]
	cmp	QWORD PTR 16[rbp], 0
	je	.L3
	mov	r9, QWORD PTR 8[rsp]
	shr	eax, 3
	mov	rsi, r12
	mov	DWORD PTR 64[rsp], eax
	mov	rdi, r9
	call	spi_message_add_tail@PLT
.L4:
	mov	rsi, r12
	mov	rdi, r15
	mov	QWORD PTR 104[rsp], r13
	mov	DWORD PTR 96[rsp], ebx
	call	spi_message_add_tail@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	spi_sync@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	spu_transaction_finish@PLT
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	lea	eax, [rax+rax*4]
	mov	esi, 1000
	lea	edi, 100[rax+rax]
	call	DIV_ROUND_UP@PLT
	mov	DWORD PTR 48[rsp], eax
	jmp	.L4
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	spu_read, .-spu_read
	.comm	IF_SPI_READ_OPERATION_MASK,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_if_spi.c_spu_read.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	spu_read, %function
spu_read:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r7, r1
	ldr	r1, .L9
	mov	r5, r3
	ldr	r3, [r1]
	mov	r4, r0
	orr	r0, r7, r3
	ldr	r3, .L9+4
	sub	sp, sp, #68
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	bl	cpu_to_le16
	mov	r3, r0
	and	r0, r5, #1
	str	r3, [sp, #4]
	bl	BUG_ON
	mov	r0, r4
	bl	spu_transaction_init
	add	r0, sp, #8
	bl	spi_message_init
	mov	r2, #4
	mov	ip, #0
	add	r3, sp, r2
	add	r1, sp, #8
	add	r0, sp, #12
	str	r2, [sp, #12]
	str	r3, [sp, #24]
	str	ip, [sp, #16]
	str	ip, [sp, #28]
	str	ip, [sp, #44]
	str	ip, [sp, #20]
	str	ip, [sp, #32]
	str	ip, [sp, #36]
	str	ip, [sp, #40]
	str	ip, [sp, #48]
	str	ip, [sp, #52]
	str	ip, [sp, #56]
	bl	spi_message_add_tail
	mov	r0, r7
	bl	spu_reg_is_port_reg
	ldm	r4, {r1, r2}
	ldr	r3, [r4, #12]
	cmp	r0, #0
	moveq	r1, r2
	cmp	r3, #0
	beq	.L3
	lsr	ip, r1, #3
	add	r0, sp, #28
	add	r1, sp, #8
	str	ip, [sp, #28]
	bl	spi_message_add_tail
.L4:
	add	r1, sp, #8
	add	r0, sp, #44
	str	r6, [sp, #48]
	str	r5, [sp, #44]
	bl	spi_message_add_tail
	ldr	r0, [r4, #8]
	add	r1, sp, #8
	bl	spi_sync
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	spu_transaction_finish
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r4
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	add	r1, r1, r1, lsl #2
	lsl	r0, r1, #1
	add	r0, r0, #100
	mov	r1, #1000
	bl	DIV_ROUND_UP
	str	r0, [sp, #20]
	b	.L4
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	IF_SPI_READ_OPERATION_MASK
	.word	.LC0
	.size	spu_read, .-spu_read
	.comm	IF_SPI_READ_OPERATION_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
