	.file	"extr_sd.c_sd_update_bus_speed_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sd_update_bus_speed_mode, @function
sd_update_bus_speed_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	mov	rdi, QWORD PTR 16[rdi]
	call	mmc_host_uhs@PLT
	test	eax, eax
	je	.L40
	mov	rax, QWORD PTR 16[rbx]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR MMC_CAP_UHS_SDR104[rip]
	test	edx, eax
	jne	.L41
.L4:
	test	DWORD PTR MMC_CAP_UHS_DDR50[rip], edx
	je	.L5
	mov	ecx, DWORD PTR 8[rbx]
	test	DWORD PTR SD_MODE_UHS_DDR50[rip], ecx
	je	.L5
	mov	rax, QWORD PTR UHS_DDR50_BUS_SPEED[rip]
	mov	QWORD PTR [rbx], rax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore_state
	mov	ecx, DWORD PTR 8[rbx]
	test	DWORD PTR SD_MODE_UHS_SDR104[rip], ecx
	je	.L4
	mov	rax, QWORD PTR UHS_SDR104_BUS_SPEED[rip]
	mov	QWORD PTR [rbx], rax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	or	eax, DWORD PTR MMC_CAP_UHS_SDR50[rip]
	test	edx, eax
	je	.L6
	mov	ecx, DWORD PTR 8[rbx]
	test	DWORD PTR SD_MODE_UHS_SDR50[rip], ecx
	je	.L6
	mov	rax, QWORD PTR UHS_SDR50_BUS_SPEED[rip]
	mov	QWORD PTR [rbx], rax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	or	eax, DWORD PTR MMC_CAP_UHS_SDR25[rip]
	test	edx, eax
	je	.L7
	mov	ecx, DWORD PTR 8[rbx]
	test	DWORD PTR SD_MODE_UHS_SDR25[rip], ecx
	je	.L7
	mov	rax, QWORD PTR UHS_SDR25_BUS_SPEED[rip]
	mov	QWORD PTR [rbx], rax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	or	eax, DWORD PTR MMC_CAP_UHS_SDR12[rip]
	test	eax, edx
	je	.L1
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR SD_MODE_UHS_SDR12[rip], eax
	je	.L1
	mov	rax, QWORD PTR UHS_SDR12_BUS_SPEED[rip]
	mov	QWORD PTR [rbx], rax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	mov	QWORD PTR [rbx], 0
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sd_update_bus_speed_mode, .-sd_update_bus_speed_mode
	.comm	UHS_SDR50_BUS_SPEED,8,8
	.comm	UHS_SDR25_BUS_SPEED,8,8
	.comm	UHS_SDR12_BUS_SPEED,8,8
	.comm	UHS_SDR104_BUS_SPEED,8,8
	.comm	UHS_DDR50_BUS_SPEED,8,8
	.comm	SD_MODE_UHS_SDR50,4,4
	.comm	SD_MODE_UHS_SDR25,4,4
	.comm	SD_MODE_UHS_SDR12,4,4
	.comm	SD_MODE_UHS_SDR104,4,4
	.comm	SD_MODE_UHS_DDR50,4,4
	.comm	MMC_CAP_UHS_SDR50,4,4
	.comm	MMC_CAP_UHS_SDR25,4,4
	.comm	MMC_CAP_UHS_SDR12,4,4
	.comm	MMC_CAP_UHS_SDR104,4,4
	.comm	MMC_CAP_UHS_DDR50,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_update_bus_speed_mode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_update_bus_speed_mode, %function
sd_update_bus_speed_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	ldr	r0, [r0, #8]
	bl	mmc_host_uhs
	cmp	r0, #0
	beq	.L40
	ldr	r2, [r4, #8]
	ldr	r3, .L42
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L41
.L4:
	ldr	r1, .L42+4
	ldr	r1, [r1]
	tst	r2, r1
	beq	.L5
	ldr	r1, .L42+8
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L5
	ldr	r3, .L42+12
	ldr	r3, [r3]
	str	r3, [r4]
	pop	{r4, pc}
.L41:
	ldr	r1, .L42+16
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L4
	ldr	r3, .L42+20
	ldr	r3, [r3]
	str	r3, [r4]
	pop	{r4, pc}
.L5:
	ldr	r1, .L42+24
	ldr	r1, [r1]
	orr	r3, r3, r1
	tst	r2, r3
	beq	.L6
	ldr	r1, .L42+28
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L6
	ldr	r3, .L42+32
	ldr	r3, [r3]
	str	r3, [r4]
	pop	{r4, pc}
.L6:
	ldr	r1, .L42+36
	ldr	r1, [r1]
	orr	r3, r3, r1
	tst	r2, r3
	beq	.L7
	ldr	r1, .L42+40
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L7
	ldr	r3, .L42+44
	ldr	r3, [r3]
	str	r3, [r4]
	pop	{r4, pc}
.L7:
	ldr	r1, .L42+48
	ldr	r1, [r1]
	orr	r3, r3, r1
	tst	r3, r2
	popeq	{r4, pc}
	ldr	r3, .L42+52
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	ldrne	r3, .L42+56
	ldrne	r3, [r3]
	strne	r3, [r4]
	pop	{r4, pc}
.L40:
	str	r0, [r4]
	pop	{r4, pc}
.L43:
	.align	2
.L42:
	.word	MMC_CAP_UHS_SDR104
	.word	MMC_CAP_UHS_DDR50
	.word	SD_MODE_UHS_DDR50
	.word	UHS_DDR50_BUS_SPEED
	.word	SD_MODE_UHS_SDR104
	.word	UHS_SDR104_BUS_SPEED
	.word	MMC_CAP_UHS_SDR50
	.word	SD_MODE_UHS_SDR50
	.word	UHS_SDR50_BUS_SPEED
	.word	MMC_CAP_UHS_SDR25
	.word	SD_MODE_UHS_SDR25
	.word	UHS_SDR25_BUS_SPEED
	.word	MMC_CAP_UHS_SDR12
	.word	SD_MODE_UHS_SDR12
	.word	UHS_SDR12_BUS_SPEED
	.size	sd_update_bus_speed_mode, .-sd_update_bus_speed_mode
	.comm	UHS_SDR50_BUS_SPEED,4,4
	.comm	UHS_SDR25_BUS_SPEED,4,4
	.comm	UHS_SDR12_BUS_SPEED,4,4
	.comm	UHS_SDR104_BUS_SPEED,4,4
	.comm	UHS_DDR50_BUS_SPEED,4,4
	.comm	SD_MODE_UHS_SDR50,4,4
	.comm	SD_MODE_UHS_SDR25,4,4
	.comm	SD_MODE_UHS_SDR12,4,4
	.comm	SD_MODE_UHS_SDR104,4,4
	.comm	SD_MODE_UHS_DDR50,4,4
	.comm	MMC_CAP_UHS_SDR50,4,4
	.comm	MMC_CAP_UHS_SDR25,4,4
	.comm	MMC_CAP_UHS_SDR12,4,4
	.comm	MMC_CAP_UHS_SDR104,4,4
	.comm	MMC_CAP_UHS_DDR50,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
