	.file	"extr_spi.c_spi_mast_set_mosi.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spi_mast_set_mosi
	.type	spi_mast_set_mosi, @function
spi_mast_set_mosi:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	edi, 1
	jg	.L10
	cmp	edx, 32
	jg	.L10
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sar	ebx, 5
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	cmp	esi, 511
	jg	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebp
	call	SPI_CMD@PLT
	mov	rdi, rax
	call	READ_PERI_REG@PLT
	test	DWORD PTR SPI_USR[rip], eax
	jne	.L3
	mov	edi, ebp
	lea	r12d, 0[0+rbx*4]
	call	SPI_W0@PLT
	movsx	r13, r12d
	lea	rdi, [rax+r13]
	call	READ_PERI_REG@PLT
	mov	edi, eax
	call	swap_endianess@PLT
	mov	DWORD PTR ds:4, eax
	mov	r14, rax
	cmp	ebx, 15
	jne	.L14
.L4:
	mov	edi, r14d
	call	swap_endianess@PLT
	mov	edi, ebp
	mov	r12, rax
	call	SPI_W0@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rsi, r12
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	lea	rdi, 0[r13+rax]
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	WRITE_PERI_REG@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	ret
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L14:
	.cfi_restore_state
	mov	edi, ebp
	add	r12d, 4
	call	SPI_W0@PLT
	movsx	r12, r12d
	lea	rdi, [rax+r12]
	call	READ_PERI_REG@PLT
	mov	edi, eax
	call	swap_endianess@PLT
	mov	rdi, rax
	call	swap_endianess@PLT
	mov	edi, ebp
	mov	r15, rax
	call	SPI_W0@PLT
	mov	rsi, r15
	lea	rdi, [r12+rax]
	call	WRITE_PERI_REG@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	spi_mast_set_mosi, .-spi_mast_set_mosi
	.comm	SPI_USR,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_spi.c_spi_mast_set_mosi.c"
	.text
	.align	2
	.global	spi_mast_set_mosi
	.syntax unified
	.arm
	.fpu softvfp
	.type	spi_mast_set_mosi, %function
spi_mast_set_mosi:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #32
	cmple	r0, #1
	bxgt	lr
	cmp	r1, #512
	push	{r4, r5, r6, r7, r8, lr}
	asr	r5, r1, #5
	popge	{r4, r5, r6, r7, r8, pc}
	mov	r4, r0
	ldr	r6, .L15
.L3:
	mov	r0, r4
	bl	SPI_CMD
	bl	READ_PERI_REG
	ldr	r3, [r6]
	tst	r0, r3
	bne	.L3
	mov	r0, r4
	bl	SPI_W0
	add	r0, r0, r5, lsl #2
	bl	READ_PERI_REG
	bl	swap_endianess
	mov	r3, #0
	cmp	r5, #15
	mov	r6, r0
	lsl	r5, r5, #2
	str	r0, [r3, #4]
	bne	.L14
.L4:
	mov	r0, r4
	bl	SPI_W0
	mov	r1, r0
	mov	r0, r6
	add	r5, r5, r1
	bl	swap_endianess
	mov	r1, r0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	WRITE_PERI_REG
.L14:
	mov	r0, r4
	bl	SPI_W0
	add	r7, r5, #4
	add	r0, r0, r7
	bl	READ_PERI_REG
	bl	swap_endianess
	mov	r8, r0
	mov	r0, r4
	bl	SPI_W0
	mov	r3, r0
	mov	r0, r8
	add	r7, r7, r3
	bl	swap_endianess
	mov	r1, r0
	mov	r0, r7
	bl	WRITE_PERI_REG
	b	.L4
.L16:
	.align	2
.L15:
	.word	SPI_USR
	.size	spi_mast_set_mosi, .-spi_mast_set_mosi
	.comm	SPI_USR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
