	.file	"extr_mtk-sd.c_msdc_set_buswidth.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Bus Width = %d"
	.text
	.p2align 4
	.type	msdc_set_buswidth, @function
msdc_set_buswidth:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdi, QWORD PTR SDC_CFG[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR SDC_CFG_BUSWIDTH[rip]
	not	eax
	and	eax, r8d
	cmp	r12d, 128
	je	.L2
	cmp	r12d, 129
	je	.L3
	mov	edi, DWORD PTR MSDC_BUS_1BITS[rip]
	sal	edi, 16
	or	edi, eax
.L4:
	mov	rsi, QWORD PTR SDC_CFG[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR [rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edx, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	lea	rsi, .LC0[rip]
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	dev_dbg@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR MSDC_BUS_8BITS[rip]
	sal	edi, 16
	or	edi, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR MSDC_BUS_4BITS[rip]
	sal	edi, 16
	or	edi, eax
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	msdc_set_buswidth, .-msdc_set_buswidth
	.comm	SDC_CFG_BUSWIDTH,4,4
	.comm	SDC_CFG,8,8
	.comm	MSDC_BUS_8BITS,4,4
	.comm	MSDC_BUS_4BITS,4,4
	.comm	MSDC_BUS_1BITS,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_mtk-sd.c_msdc_set_buswidth.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Bus Width = %d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msdc_set_buswidth, %function
msdc_set_buswidth:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L7
	mov	r5, r0
	ldr	r3, [r6]
	ldr	r0, [r0, #4]
	mov	r4, r1
	add	r0, r0, r3
	bl	readl
	ldr	r3, .L7+4
	cmp	r4, #128
	ldr	r3, [r3]
	bic	r0, r0, r3
	beq	.L2
	cmp	r4, #129
	ldrne	r3, .L7+8
	ldreq	r3, .L7+12
	ldr	r3, [r3]
	orr	r0, r0, r3, lsl #16
.L4:
	ldr	r3, [r6]
	ldr	r1, [r5, #4]
	add	r1, r1, r3
	bl	writel
	mov	r2, r4
	ldr	r0, [r5]
	ldr	r1, .L7+16
	pop	{r4, r5, r6, lr}
	b	dev_dbg
.L2:
	ldr	r3, .L7+20
	ldr	r3, [r3]
	orr	r0, r0, r3, lsl #16
	b	.L4
.L8:
	.align	2
.L7:
	.word	SDC_CFG
	.word	SDC_CFG_BUSWIDTH
	.word	MSDC_BUS_1BITS
	.word	MSDC_BUS_4BITS
	.word	.LC0
	.word	MSDC_BUS_8BITS
	.size	msdc_set_buswidth, .-msdc_set_buswidth
	.comm	SDC_CFG_BUSWIDTH,4,4
	.comm	SDC_CFG,4,4
	.comm	MSDC_BUS_8BITS,4,4
	.comm	MSDC_BUS_4BITS,4,4
	.comm	MSDC_BUS_1BITS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
