	.file	"extr_meson-gx-mmc.c_meson_mmc_set_ios.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to enable vqmmc regulator\n"
	.align 8
.LC1:
	.string	"Invalid ios->bus_width: %u.  Setting to 4.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Failed to set clock: %d\n,"
.LC3:
	.string	"SD_EMMC_CFG:  0x%08x\n"
	.text
	.p2align 4
	.type	meson_mmc_set_ios, @function
meson_mmc_set_ios:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mmc_priv@PLT
	mov	rbx, rax
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 129
	je	.L2
	cmp	eax, 130
	je	.L3
	cmp	eax, 128
	je	.L25
.L5:
	mov	edx, DWORD PTR 4[rbp]
	cmp	edx, 132
	je	.L23
	mov	r13d, DWORD PTR CFG_BUS_WIDTH_1[rip]
	cmp	edx, 133
	je	.L14
	mov	r13d, DWORD PTR CFG_BUS_WIDTH_8[rip]
	cmp	edx, 131
	je	.L14
	mov	edi, DWORD PTR 4[rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
.L23:
	mov	r13d, DWORD PTR CFG_BUS_WIDTH_4[rip]
.L14:
	mov	rdi, QWORD PTR SD_EMMC_CFG[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	edi, DWORD PTR CFG_BUS_WIDTH_MASK[rip]
	mov	esi, r13d
	mov	r12d, edi
	not	r12d
	and	r12d, eax
	call	FIELD_PREP@PLT
	mov	rsi, QWORD PTR SD_EMMC_CFG[rip]
	add	rsi, QWORD PTR 8[rbx]
	or	r12d, eax
	mov	edi, r12d
	call	writel@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	meson_mmc_check_resampling@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	meson_mmc_prepare_ios_clock@PLT
	test	eax, eax
	jne	.L26
.L15:
	mov	edi, DWORD PTR 4[rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edx, r12d
	lea	rsi, .LC3[rip]
	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
	jmp	dev_dbg@PLT
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, eax
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR 4[r12]
	call	IS_ERR@PLT
	test	eax, eax
	jne	.L5
	mov	edx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR 4[r12]
	mov	rdi, r12
	call	mmc_regulator_set_ocr@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR 4[r12]
	call	IS_ERR@PLT
	test	eax, eax
	je	.L27
.L6:
	mov	edi, DWORD PTR [r12]
	call	IS_ERR@PLT
	test	eax, eax
	jne	.L5
	mov	edx, DWORD PTR [rbx]
	test	edx, edx
	je	.L5
	mov	edi, DWORD PTR [r12]
	call	regulator_disable@PLT
	mov	DWORD PTR [rbx], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR [r12]
	call	IS_ERR@PLT
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jne	.L5
	mov	edi, DWORD PTR [r12]
	call	regulator_enable@PLT
	test	eax, eax
	js	.L28
	mov	DWORD PTR [rbx], 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	mov	esi, DWORD PTR 4[r12]
	xor	edx, edx
	mov	rdi, r12
	call	mmc_regulator_set_ocr@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR 4[rbx]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	meson_mmc_set_ios, .-meson_mmc_set_ios
	.comm	SD_EMMC_CFG,8,8
	.comm	CFG_BUS_WIDTH_MASK,4,4
	.comm	CFG_BUS_WIDTH_8,4,4
	.comm	CFG_BUS_WIDTH_4,4,4
	.comm	CFG_BUS_WIDTH_1,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_meson-gx-mmc.c_meson_mmc_set_ios.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to enable vqmmc regulator\012\000"
	.align	2
.LC1:
	.ascii	"Invalid ios->bus_width: %u.  Setting to 4.\012\000"
	.align	2
.LC2:
	.ascii	"Failed to set clock: %d\012,\000"
	.align	2
.LC3:
	.ascii	"SD_EMMC_CFG:  0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	meson_mmc_set_ios, %function
meson_mmc_set_ios:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r6, r0
	bl	mmc_priv
	ldr	r3, [r5]
	mov	r4, r0
	cmp	r3, #129
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L26
.L5:
	ldr	r2, [r5, #4]
	cmp	r2, #132
	beq	.L24
	cmp	r2, #133
	beq	.L11
	cmp	r2, #131
	beq	.L27
	ldr	r1, .L30
	ldr	r0, [r4, #4]
	bl	dev_err
.L24:
	ldr	r3, .L30+4
	ldr	r8, [r3]
.L14:
	ldr	r7, .L30+8
	ldr	r0, [r4, #8]
	ldr	r3, [r7]
	add	r0, r0, r3
	bl	readl
	mov	r6, r0
	ldr	r3, .L30+12
	mov	r1, r8
	ldr	r0, [r3]
	bic	r6, r6, r0
	bl	FIELD_PREP
	ldr	r3, [r7]
	ldr	r1, [r4, #8]
	orr	r6, r6, r0
	add	r1, r1, r3
	mov	r0, r6
	bl	writel
	mov	r1, r5
	mov	r0, r4
	bl	meson_mmc_check_resampling
	mov	r1, r5
	mov	r0, r4
	bl	meson_mmc_prepare_ios_clock
	subs	r2, r0, #0
	bne	.L28
.L15:
	mov	r2, r6
	ldr	r0, [r4, #4]
	ldr	r1, .L30+16
	pop	{r4, r5, r6, r7, r8, lr}
	b	dev_dbg
.L28:
	ldr	r1, .L30+20
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L15
.L27:
	ldr	r3, .L30+24
	ldr	r8, [r3]
	b	.L14
.L11:
	ldr	r3, .L30+28
	ldr	r8, [r3]
	b	.L14
.L26:
	ldr	r0, [r6, #4]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L5
	mov	r0, r6
	ldr	r2, [r5, #8]
	ldr	r1, [r6, #4]
	bl	mmc_regulator_set_ocr
	b	.L5
.L3:
	ldr	r0, [r6, #4]
	bl	IS_ERR
	subs	r2, r0, #0
	beq	.L29
.L6:
	ldr	r0, [r6]
	bl	IS_ERR
	subs	r7, r0, #0
	bne	.L5
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L5
	ldr	r0, [r6]
	bl	regulator_disable
	str	r7, [r4]
	b	.L5
.L2:
	ldr	r0, [r6]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L5
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [r6]
	bl	regulator_enable
	cmp	r0, #0
	movge	r3, #1
	strge	r3, [r4]
	bge	.L5
	ldr	r1, .L30+32
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L5
.L29:
	mov	r0, r6
	ldr	r1, [r6, #4]
	bl	mmc_regulator_set_ocr
	b	.L6
.L31:
	.align	2
.L30:
	.word	.LC1
	.word	CFG_BUS_WIDTH_4
	.word	SD_EMMC_CFG
	.word	CFG_BUS_WIDTH_MASK
	.word	.LC3
	.word	.LC2
	.word	CFG_BUS_WIDTH_8
	.word	CFG_BUS_WIDTH_1
	.word	.LC0
	.size	meson_mmc_set_ios, .-meson_mmc_set_ios
	.comm	SD_EMMC_CFG,4,4
	.comm	CFG_BUS_WIDTH_MASK,4,4
	.comm	CFG_BUS_WIDTH_8,4,4
	.comm	CFG_BUS_WIDTH_4,4,4
	.comm	CFG_BUS_WIDTH_1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
