	.file	"39304.c"
	.intel_syntax noprefix
	.text
	.globl	spi_ops
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	spi_ops, @object
	.size	spi_ops, 40
spi_ops:
	.quad	vfs_spi_open
	.quad	vfs_spi_close
	.quad	vfs_spi_read
	.quad	vfs_spi_write
	.zero	8
	.text
	.globl	vfs_spi_open
	.type	vfs_spi_open, @function
vfs_spi_open:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], -1
	mov	QWORD PTR -8[rbp], 0
	cmp	QWORD PTR -32[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR 29[rax]
	cmp	al, 1
	jne	.L3
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	hal_spi_init@PLT
	mov	DWORD PTR -12[rbp], eax
	jmp	.L5
.L3:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L5
.L2:
	mov	DWORD PTR -12[rbp], -22
.L5:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	vfs_spi_open, .-vfs_spi_open
	.globl	vfs_spi_close
	.type	vfs_spi_close, @function
vfs_spi_close:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], -1
	mov	QWORD PTR -8[rbp], 0
	cmp	QWORD PTR -24[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L8
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR 29[rax]
	cmp	al, 1
	jne	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	esi, -1
	mov	rdi, rax
	call	aos_mutex_lock@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	hal_spi_finalize@PLT
	mov	DWORD PTR -12[rbp], eax
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	rdi, rax
	call	aos_mutex_unlock@PLT
	jmp	.L12
.L9:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L8:
	mov	DWORD PTR -12[rbp], -22
.L12:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	vfs_spi_close, .-vfs_spi_close
	.globl	vfs_spi_read
	.type	vfs_spi_read, @function
vfs_spi_read:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -12[rbp], -1
	mov	QWORD PTR -8[rbp], 0
	cmp	QWORD PTR -24[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	esi, -1
	mov	rdi, rax
	call	aos_mutex_lock@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L16
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 4294967295
	mov	rdi, rax
	call	hal_spi_recv@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L16
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -12[rbp], eax
.L16:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	rdi, rax
	call	aos_mutex_unlock@PLT
	jmp	.L17
.L15:
	mov	DWORD PTR -12[rbp], -22
.L17:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	vfs_spi_read, .-vfs_spi_read
	.globl	vfs_spi_write
	.type	vfs_spi_write, @function
vfs_spi_write:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -12[rbp], -1
	mov	QWORD PTR -8[rbp], 0
	cmp	QWORD PTR -24[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	esi, -1
	mov	rdi, rax
	call	aos_mutex_lock@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L21
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 4294967295
	mov	rdi, rax
	call	hal_spi_send@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L21
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -12[rbp], eax
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 32
	mov	rdi, rax
	call	aos_mutex_unlock@PLT
	jmp	.L22
.L20:
	mov	DWORD PTR -12[rbp], -22
.L22:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	vfs_spi_write, .-vfs_spi_write
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"39304.c"
	.text
	.global	spi_ops
	.section	.rodata
	.align	2
	.type	spi_ops, %object
	.size	spi_ops, 20
spi_ops:
	.word	vfs_spi_open
	.word	vfs_spi_close
	.word	vfs_spi_read
	.word	vfs_spi_write
	.space	4
	.text
	.align	2
	.global	vfs_spi_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfs_spi_open, %function
vfs_spi_open:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L3
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	hal_spi_init
	str	r0, [fp, #-12]
	b	.L5
.L3:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L2:
	mvn	r3, #21
	str	r3, [fp, #-12]
.L5:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	vfs_spi_open, .-vfs_spi_open
	.align	2
	.global	vfs_spi_close
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfs_spi_close, %function
vfs_spi_close:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L9
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mvn	r1, #0
	mov	r0, r3
	bl	aos_mutex_lock
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L10
	ldr	r0, [fp, #-8]
	bl	hal_spi_finalize
	str	r0, [fp, #-12]
.L10:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mov	r0, r3
	bl	aos_mutex_unlock
	b	.L12
.L9:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L12
.L8:
	mvn	r3, #21
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	vfs_spi_close, .-vfs_spi_close
	.align	2
	.global	vfs_spi_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfs_spi_read, %function
vfs_spi_read:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mvn	r1, #0
	mov	r0, r3
	bl	aos_mutex_lock
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	mvn	r3, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	hal_spi_recv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
.L16:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mov	r0, r3
	bl	aos_mutex_unlock
	b	.L17
.L15:
	mvn	r3, #21
	str	r3, [fp, #-12]
.L17:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	vfs_spi_read, .-vfs_spi_read
	.align	2
	.global	vfs_spi_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfs_spi_write, %function
vfs_spi_write:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mvn	r1, #0
	mov	r0, r3
	bl	aos_mutex_lock
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	mvn	r3, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	hal_spi_send
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #20
	mov	r0, r3
	bl	aos_mutex_unlock
	b	.L22
.L20:
	mvn	r3, #21
	str	r3, [fp, #-12]
.L22:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	vfs_spi_write, .-vfs_spi_write
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
