	.file	"extr_sdgecko_io.c___card_readcsd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__card_readcsd, @function
__card_readcsd:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 4[rsp], 0
	mov	QWORD PTR 12[rsp], 0
	test	rdi, rdi
	js	.L2
	cmp	QWORD PTR MAX_DRIVE[rip], rdi
	mov	rbp, rdi
	jg	.L3
.L2:
	mov	rax, QWORD PTR CARDIO_ERROR_NOCARD[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rsi, rsp
	mov	edx, 5
	mov	DWORD PTR [rsp], 9
	call	__card_writecmd@PLT
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR _ioResponse[rip]
	mov	edx, 1
	mov	rdi, rbp
	mov	rsi, QWORD PTR [rax+rbp*8]
	call	__card_readresponse@PLT
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR _ioResponse[rip]
	mov	rdi, rbp
	mov	rax, QWORD PTR [rax+rbp*8]
	mov	esi, DWORD PTR [rax]
	call	__check_response@PLT
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR g_CSD[rip]
	mov	edx, 16
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax+rbp*4]
	call	__card_dataread@PLT
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__card_readcsd, .-__card_readcsd
	.comm	g_CSD,8,8
	.comm	_ioResponse,8,8
	.comm	MAX_DRIVE,8,8
	.comm	CARDIO_ERROR_NOCARD,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_sdgecko_io.c___card_readcsd.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__card_readcsd, %function
__card_readcsd:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, lr}
	ldr	r2, .L9
	sub	sp, sp, #28
	subs	r4, r0, #0
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	str	r3, [sp]
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	blt	.L2
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r3, r4
	bgt	.L3
.L2:
	ldr	r3, .L9+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, pc}
.L3:
	mov	r3, #9
	mov	r1, sp
	mov	r2, #5
	str	r3, [sp]
	bl	__card_writecmd
	cmp	r0, #0
	bne	.L1
	ldr	r5, .L9+12
	mov	r2, #1
	ldr	r3, [r5]
	mov	r0, r4
	ldr	r1, [r3, r4, lsl #2]
	bl	__card_readresponse
	cmp	r0, #0
	bne	.L1
	ldr	r3, [r5]
	mov	r0, r4
	ldr	r3, [r3, r4, lsl #2]
	ldr	r1, [r3]
	bl	__check_response
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L9+16
	mov	r0, r4
	ldr	r3, [r3]
	mov	r2, #16
	ldr	r1, [r3, r4, lsl #2]
	bl	__card_dataread
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	MAX_DRIVE
	.word	CARDIO_ERROR_NOCARD
	.word	_ioResponse
	.word	g_CSD
	.size	__card_readcsd, .-__card_readcsd
	.comm	g_CSD,4,4
	.comm	_ioResponse,4,4
	.comm	MAX_DRIVE,4,4
	.comm	CARDIO_ERROR_NOCARD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
