	.file	"extr_card.c_CARD_ReadAsync.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	CARD_ReadAsync
	.type	CARD_ReadAsync, @function
CARD_ReadAsync:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	test	edx, edx
	jle	.L2
	mov	r12d, edx
	and	r12d, 511
	jne	.L2
	mov	r13, rdi
	mov	r14, rsi
	mov	edx, ecx
	mov	rbp, r8
	test	ecx, ecx
	jle	.L3
	test	ecx, 511
	jne	.L2
.L3:
	mov	rcx, rsp
	mov	esi, ebx
	mov	rdi, r13
	call	__card_seek@PLT
	test	eax, eax
	js	.L7
	mov	esi, ebx
	mov	rdi, r14
	call	DCInvalidateRange@PLT
	mov	rax, QWORD PTR [rsp]
	test	rbp, rbp
	mov	edi, DWORD PTR 8[r13]
	cmove	rbp, QWORD PTR __card_defaultapicallback[rip]
	mov	r8d, DWORD PTR __read_callback[rip]
	mov	rcx, r14
	mov	esi, DWORD PTR [rax]
	mov	QWORD PTR 8[rax], rbp
	mov	edx, esi
	lea	eax, -1[rsi]
	and	eax, DWORD PTR 0[r13]
	sub	edx, eax
	cmp	edx, ebx
	cmovg	edx, ebx
	imul	esi, DWORD PTR 4[r13]
	call	__card_read@PLT
	mov	ebx, eax
	test	eax, eax
	jns	.L1
	mov	rdi, QWORD PTR [rsp]
	mov	esi, eax
	mov	r12d, ebx
	call	__card_putcntrlblock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r12d, DWORD PTR CARD_ERROR_FATAL_ERROR[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	r12d, eax
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	CARD_ReadAsync, .-CARD_ReadAsync
	.comm	__read_callback,4,4
	.comm	__card_defaultapicallback,8,8
	.comm	CARD_ERROR_FATAL_ERROR,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_card.c_CARD_ReadAsync.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	CARD_ReadAsync
	.syntax unified
	.arm
	.fpu softvfp
	.type	CARD_ReadAsync, %function
CARD_ReadAsync:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r2, #0
	mov	r2, r3
	ldr	r3, .L14
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r8, [sp, #40]
	str	ip, [sp, #8]
	ble	.L2
	ldr	r3, .L14+4
	ands	r6, r4, r3
	bne	.L2
	cmp	r2, ip
	mov	r5, r0
	mov	r7, r1
	ble	.L3
	tst	r2, r3
	bne	.L2
.L3:
	mov	r1, r4
	mov	r0, r5
	add	r3, sp, #8
	bl	__card_seek
	cmp	r0, #0
	movlt	r6, r0
	blt	.L1
	mov	r1, r4
	mov	r0, r7
	bl	DCInvalidateRange
	ldr	r0, [sp, #8]
	cmp	r8, #0
	ldr	r1, [r0]
	ldreq	r3, .L14+8
	ldr	r2, .L14+12
	ldr	lr, [r5]
	ldreq	r8, [r3]
	ldr	ip, [r2]
	sub	r2, r1, #1
	and	r2, r2, lr
	sub	r2, r1, r2
	str	r8, [r0, #4]
	ldr	r0, [r5, #4]
	cmp	r2, r4
	mul	r1, r0, r1
	movge	r2, r4
	ldr	r0, [r5, #8]
	mov	r3, r7
	str	ip, [sp]
	bl	__card_read
	subs	r1, r0, #0
	bge	.L1
	ldr	r0, [sp, #8]
	mov	r6, r1
	bl	__card_putcntrlblock
	b	.L1
.L2:
	ldr	r3, .L14+16
	ldr	r6, [r3]
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	511
	.word	__card_defaultapicallback
	.word	__read_callback
	.word	CARD_ERROR_FATAL_ERROR
	.size	CARD_ReadAsync, .-CARD_ReadAsync
	.comm	__read_callback,4,4
	.comm	__card_defaultapicallback,4,4
	.comm	CARD_ERROR_FATAL_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
