	.file	"extr_sd_ops.c_mmc_app_set_bus_width.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mmc_app_set_bus_width
	.type	mmc_app_set_bus_width, @function
mmc_app_set_bus_width:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	lea	r12, 12[rsp]
	sete	dil
	movzx	edi, dil
	call	BUG_ON@PLT
	mov	eax, DWORD PTR [rbx]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	BUG_ON@PLT
	mov	edx, 12
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	eax, DWORD PTR SD_APP_SET_BUS_WIDTH[rip]
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR MMC_RSP_R1[rip]
	or	eax, DWORD PTR MMC_CMD_AC[rip]
	mov	DWORD PTR 12[rsp], eax
	cmp	ebp, 128
	je	.L2
	cmp	ebp, 129
	jne	.L3
	mov	eax, DWORD PTR SD_BUS_WIDTH_1[rip]
	mov	DWORD PTR 16[rsp], eax
.L4:
	mov	ecx, DWORD PTR MMC_CMD_RETRIES[rip]
	mov	edi, DWORD PTR [rbx]
	mov	rdx, r12
	mov	rsi, rbx
	call	mmc_wait_for_app_cmd@PLT
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L9
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR SD_BUS_WIDTH_4[rip]
	mov	DWORD PTR 16[rsp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mmc_app_set_bus_width, .-mmc_app_set_bus_width
	.comm	SD_BUS_WIDTH_4,4,4
	.comm	SD_BUS_WIDTH_1,4,4
	.comm	SD_APP_SET_BUS_WIDTH,4,4
	.comm	MMC_RSP_R1,4,4
	.comm	MMC_CMD_RETRIES,4,4
	.comm	MMC_CMD_AC,4,4
	.comm	EINVAL,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_ops.c_mmc_app_set_bus_width.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mmc_app_set_bus_width
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmc_app_set_bus_width, %function
mmc_app_set_bus_width:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r5, r0
	clz	r0, r0
	ldr	r3, .L10
	sub	sp, sp, #20
	lsr	r0, r0, #5
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	BUG_ON
	ldr	r0, [r5]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	ldr	r3, .L10+4
	ldr	r1, .L10+8
	ldr	r2, .L10+12
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	cmp	r4, #128
	str	r3, [sp]
	str	r2, [sp, #8]
	beq	.L2
	cmp	r4, #129
	bne	.L3
	ldr	r3, .L10+16
	ldr	r3, [r3]
	str	r3, [sp, #4]
.L4:
	ldr	r3, .L10+20
	mov	r2, sp
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r0, [r5]
	bl	mmc_wait_for_app_cmd
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	ldr	r3, .L10+24
	ldr	r3, [r3]
	str	r3, [sp, #4]
	b	.L4
.L3:
	ldr	r3, .L10+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	MMC_RSP_R1
	.word	MMC_CMD_AC
	.word	SD_APP_SET_BUS_WIDTH
	.word	SD_BUS_WIDTH_1
	.word	MMC_CMD_RETRIES
	.word	SD_BUS_WIDTH_4
	.word	EINVAL
	.size	mmc_app_set_bus_width, .-mmc_app_set_bus_width
	.comm	SD_BUS_WIDTH_4,4,4
	.comm	SD_BUS_WIDTH_1,4,4
	.comm	SD_APP_SET_BUS_WIDTH,4,4
	.comm	MMC_RSP_R1,4,4
	.comm	MMC_CMD_RETRIES,4,4
	.comm	MMC_CMD_AC,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
