	.file	"extr_sd.c_sd_select_driver_type.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: Problem setting drive strength!\n"
	.text
	.p2align 4
	.type	sd_select_driver_type, @function
sd_select_driver_type:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	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, 24
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR 12[rdi]
	mov	edx, DWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR [rdi], 0
	or	edx, DWORD PTR SD_DRIVER_TYPE_B[rip]
	lea	rcx, 4[rsp]
	call	mmc_select_drive_strength@PLT
	test	eax, eax
	jne	.L14
	mov	r12d, DWORD PTR 4[rsp]
	test	r12d, r12d
	jne	.L15
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L14:
	.cfi_restore_state
	mov	r8, r13
	mov	ecx, eax
	mov	edx, 2
	mov	esi, 1
	mov	rdi, rbx
	mov	ebp, eax
	call	mmc_sd_switch@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 60[r13]
	and	eax, 15
	cmp	eax, ebp
	jne	.L17
	mov	r12d, DWORD PTR 4[rsp]
	mov	DWORD PTR [rbx], eax
	test	r12d, r12d
	je	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, r12d
	xor	r12d, r12d
	call	mmc_set_driver_type@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 4[rbx]
	call	mmc_hostname@PLT
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	pr_warn@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sd_select_driver_type, .-sd_select_driver_type
	.comm	SD_DRIVER_TYPE_B,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_sd.c_sd_select_driver_type.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: Problem setting drive strength!\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_select_driver_type, %function
sd_select_driver_type:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, lr}
	ldr	r2, .L17
	ldr	ip, .L17+4
	ldr	r2, [r2]
	mov	r7, r1
	ldr	r1, [r0, #8]
	sub	sp, sp, #20
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	orr	r2, r1, r2
	str	r3, [r0]
	ldr	r1, [r0, #12]
	add	r3, sp, #8
	mov	r4, r0
	bl	mmc_select_drive_strength
	subs	r5, r0, #0
	bne	.L14
.L2:
	ldr	r6, [sp, #8]
	cmp	r6, #0
	bne	.L15
.L1:
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L14:
	mov	r3, r5
	mov	r2, #2
	mov	r1, #1
	mov	r0, r4
	str	r7, [sp]
	bl	mmc_sd_switch
	subs	r6, r0, #0
	bne	.L1
	ldr	r3, [r7, #60]
	and	r3, r3, #15
	cmp	r3, r5
	streq	r3, [r4]
	beq	.L2
	ldr	r0, [r4, #4]
	bl	mmc_hostname
	mov	r1, r0
	ldr	r0, .L17+8
	bl	pr_warn
	b	.L1
.L15:
	mov	r1, r6
	ldr	r0, [r4, #4]
	bl	mmc_set_driver_type
	mov	r6, #0
	b	.L1
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	SD_DRIVER_TYPE_B
	.word	.LC1
	.word	.LC0
	.size	sd_select_driver_type, .-sd_select_driver_type
	.comm	SD_DRIVER_TYPE_B,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
