	.file	"extr_test_fatfs_common.c_read_write_task.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"wb"
.LC1:
	.string	"rb"
.LC2:
	.string	"E(w): i=%d, cnt=%d val=%d\n\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"E(r): i=%d, cnt=%d rval=%d val=%d\n\n"
	.text
	.p2align 4
	.type	read_write_task, @function
read_write_task:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 24[rdi], 0
	lea	rax, .LC1[rip]
	mov	edi, DWORD PTR 36[rdi]
	cmove	rsi, rax
	call	fopen@PLT
	test	rax, rax
	je	.L22
	mov	edi, DWORD PTR 32[rbx]
	mov	r12, rax
	call	srand@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L5
	xor	ebp, ebp
	lea	r13, 16[rsp]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, 8[rsp]
	mov	rcx, r12
	mov	edx, 1
	mov	esi, 8
	call	fwrite@PLT
	cmp	eax, 1
	jne	.L23
.L7:
	add	rbp, 1
	cmp	QWORD PTR [rbx], rbp
	jbe	.L5
.L12:
	xor	eax, eax
	call	rand@PLT
	cmp	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 8[rsp], rax
	jne	.L24
	mov	rcx, r12
	mov	edx, 1
	mov	esi, 8
	mov	rdi, r13
	call	fread@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR 8[rsp]
	cmp	eax, 1
	jne	.L10
	cmp	rcx, r8
	je	.L7
.L10:
	mov	edx, eax
	mov	rsi, rbp
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	ets_printf@PLT
	mov	rax, QWORD PTR ESP_FAIL[rip]
	mov	QWORD PTR 16[rbx], rax
.L13:
	mov	rdi, r12
	call	fclose@PLT
.L4:
	mov	edi, DWORD PTR 8[rbx]
	call	xSemaphoreGive@PLT
	mov	edi, 1
	call	vTaskDelay@PLT
	xor	edi, edi
	call	vTaskDelete@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rax, QWORD PTR ESP_ERR_NOT_FOUND[rip]
	mov	QWORD PTR 16[rbx], rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR ESP_OK[rip]
	mov	QWORD PTR 16[rbx], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rcx, QWORD PTR 8[rsp]
	mov	edx, eax
	xor	eax, eax
	mov	rsi, rbp
	lea	rdi, .LC2[rip]
	call	ets_printf@PLT
	mov	rax, QWORD PTR ESP_FAIL[rip]
	mov	QWORD PTR 16[rbx], rax
	jmp	.L13
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_write_task, .-read_write_task
	.comm	ESP_OK,8,8
	.comm	ESP_FAIL,8,8
	.comm	ESP_ERR_NOT_FOUND,8,8
	.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_test_fatfs_common.c_read_write_task.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wb\000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"E(w): i=%d, cnt=%d val=%d\012\012\000"
	.align	2
.LC3:
	.ascii	"E(r): i=%d, cnt=%d rval=%d val=%d\012\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_write_task, %function
read_write_task:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r1, [r0, #12]
	ldr	r3, .L29
	cmp	r1, #0
	ldr	r2, .L29+4
	moveq	r1, r3
	ldr	r3, .L29+8
	movne	r1, r2
	sub	sp, sp, #24
	mov	r5, r0
	ldr	r0, [r0, #20]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	fopen
	subs	r6, r0, #0
	beq	.L25
	ldr	r0, [r5, #16]
	bl	srand
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L5
	mov	r4, #0
	b	.L12
.L27:
	add	r0, sp, #12
	bl	fwrite
	cmp	r0, #1
	bne	.L26
.L7:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bls	.L5
.L12:
	bl	rand
	ldr	r3, [r5, #12]
	mov	r2, #1
	cmp	r3, #0
	mov	r1, #4
	mov	r3, r6
	str	r0, [sp, #12]
	bne	.L27
	add	r0, sp, #16
	bl	fread
	cmp	r0, #1
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #12]
	bne	.L10
	cmp	r3, r2
	beq	.L7
.L10:
	str	r2, [sp]
	mov	r1, r4
	mov	r2, r0
	ldr	r0, .L29+12
	bl	ets_printf
	ldr	r3, .L29+16
	ldr	r3, [r3]
	str	r3, [r5, #8]
.L13:
	mov	r0, r6
	bl	fclose
.L4:
	ldr	r0, [r5, #4]
	bl	xSemaphoreGive
	mov	r0, #1
	bl	vTaskDelay
	mov	r0, #0
	bl	vTaskDelete
	ldr	r3, .L29+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L25:
	ldr	r3, .L29+20
	ldr	r3, [r3]
	str	r3, [r5, #8]
	b	.L4
.L5:
	ldr	r3, .L29+24
	ldr	r3, [r3]
	str	r3, [r5, #8]
	b	.L13
.L26:
	mov	r2, r0
	ldr	r3, [sp, #12]
	mov	r1, r4
	ldr	r0, .L29+28
	bl	ets_printf
	ldr	r3, .L29+16
	ldr	r3, [r3]
	str	r3, [r5, #8]
	b	.L13
.L28:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	.LC1
	.word	.LC0
	.word	.LC4
	.word	.LC3
	.word	ESP_FAIL
	.word	ESP_ERR_NOT_FOUND
	.word	ESP_OK
	.word	.LC2
	.size	read_write_task, .-read_write_task
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	ESP_ERR_NOT_FOUND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
