	.file	"extr_spi_slave_hal_iram.c_spi_slave_hal_prepare_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spi_slave_hal_prepare_data
	.type	spi_slave_hal_prepare_data, @function
spi_slave_hal_prepare_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	mov	edi, DWORD PTR 16[rdi]
	call	spi_ll_slave_reset@PLT
	cmp	QWORD PTR 48[rbx], 0
	jne	.L15
	mov	r8, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR [rbx]
	mov	edi, DWORD PTR 16[rbx]
	test	r8, r8
	je	.L5
	mov	edx, esi
	mov	rsi, r8
	call	spi_ll_write_buffer@PLT
	mov	esi, DWORD PTR [rbx]
.L13:
	mov	edi, DWORD PTR 16[rbx]
.L5:
	call	spi_ll_slave_set_rx_bitlen@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR [rbx]
	call	spi_ll_slave_set_tx_bitlen@PLT
	mov	edi, DWORD PTR 16[rbx]
	xor	esi, esi
	cmp	QWORD PTR 24[rbx], 0
	setne	sil
	call	spi_ll_enable_mosi@PLT
	xor	esi, esi
	mov	edi, DWORD PTR 16[rbx]
	cmp	QWORD PTR 8[rbx], 0
	setne	sil
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	spi_ll_enable_miso@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbx]
	call	spi_ll_reset_dma@PLT
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	je	.L3
	mov	eax, DWORD PTR [rbx]
	mov	rdi, QWORD PTR 40[rbx]
	mov	ecx, 1
	lea	edx, 14[rax]
	add	eax, 7
	cmovns	edx, eax
	sar	edx, 3
	call	lldesc_setup_link@PLT
	mov	rsi, QWORD PTR 40[rbx]
	mov	edi, DWORD PTR 16[rbx]
	call	spi_ll_rxdma_start@PLT
.L3:
	mov	r8, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR [rbx]
	test	r8, r8
	je	.L13
	lea	edx, 14[rsi]
	add	esi, 7
	mov	rdi, QWORD PTR 32[rbx]
	cmovns	edx, esi
	mov	rsi, r8
	xor	ecx, ecx
	sar	edx, 3
	call	lldesc_setup_link@PLT
	mov	rsi, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR 16[rbx]
	call	spi_ll_txdma_start@PLT
	mov	esi, DWORD PTR [rbx]
	mov	edi, DWORD PTR 16[rbx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	spi_slave_hal_prepare_data, .-spi_slave_hal_prepare_data
	.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_spi_slave_hal_iram.c_spi_slave_hal_prepare_data.c"
	.text
	.align	2
	.global	spi_slave_hal_prepare_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	spi_slave_hal_prepare_data, %function
spi_slave_hal_prepare_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	ldr	r0, [r0, #8]
	bl	spi_ll_slave_reset
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L14
	ldr	r3, [r4, #12]
	ldr	r0, [r4, #8]
	cmp	r3, #0
	ldr	r1, [r4]
	beq	.L5
	mov	r2, r1
	mov	r1, r3
	bl	spi_ll_write_buffer
	ldr	r0, [r4, #8]
	ldr	r1, [r4]
.L5:
	bl	spi_ll_slave_set_rx_bitlen
	ldr	r1, [r4]
	ldr	r0, [r4, #8]
	bl	spi_ll_slave_set_tx_bitlen
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #8]
	subs	r1, r1, #0
	movne	r1, #1
	bl	spi_ll_enable_mosi
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	subs	r1, r1, #0
	movne	r1, #1
	pop	{r4, lr}
	b	spi_ll_enable_miso
.L14:
	ldr	r0, [r4, #8]
	bl	spi_ll_reset_dma
	ldr	r1, [r4, #4]
	cmp	r1, #0
	beq	.L3
	ldr	r3, [r4]
	ldr	r0, [r4, #20]
	adds	r2, r3, #7
	addmi	r2, r3, #14
	asr	r2, r2, #3
	mov	r3, #1
	bl	lldesc_setup_link
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #8]
	bl	spi_ll_rxdma_start
.L3:
	ldr	r3, [r4, #12]
	ldr	r1, [r4]
	cmp	r3, #0
	beq	.L15
	adds	r2, r1, #7
	addmi	r2, r1, #14
	asr	r2, r2, #3
	mov	r1, r3
	ldr	r0, [r4, #16]
	mov	r3, #0
	bl	lldesc_setup_link
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #8]
	bl	spi_ll_txdma_start
	ldr	r0, [r4, #8]
	ldr	r1, [r4]
	b	.L5
.L15:
	ldr	r0, [r4, #8]
	b	.L5
	.size	spi_slave_hal_prepare_data, .-spi_slave_hal_prepare_data
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
