	.file	"extr_mmc_spi.c_mmc_spi_set_ios.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"switch to SPI mode 0 failed\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"put spi signals to low failed\n"
	.align 8
.LC2:
	.string	"switch back to SPI mode 3 failed\n"
	.section	.rodata.str1.1
.LC3:
	.string	"mmc_spi:  clock to %d Hz, %d\n"
.LC4:
	.string	", can switch"
.LC5:
	.string	"mmc_spi: power %s (%d)%s\n"
.LC6:
	.string	""
	.text
	.p2align 4
	.type	mmc_spi_set_ios, @function
mmc_spi_set_ios:
.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	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	mmc_priv@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	rbx, rax
	cmp	DWORD PTR [rax], edi
	je	.L33
	mov	rax, QWORD PTR 16[rax]
	mov	r12d, DWORD PTR 16[rbp]
	test	rax, rax
	je	.L4
	cmp	QWORD PTR [rax], 0
	je	.L4
	call	mmc_powerstring@PLT
	lea	r8, .LC4[rip]
	mov	ecx, r12d
	lea	rsi, .LC5[rip]
	mov	edx, eax
	mov	rax, QWORD PTR 8[rbx]
	lea	rdi, 16[rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	eax, DWORD PTR 0[rbp]
	lea	edx, -128[rax]
	cmp	edx, 1
	jbe	.L34
.L6:
	cmp	DWORD PTR MMC_POWER_ON[rip], eax
	je	.L35
.L7:
	mov	rdi, QWORD PTR 8[rbx]
	cmp	eax, 129
	je	.L36
.L8:
	mov	DWORD PTR [rbx], eax
.L3:
	mov	rax, QWORD PTR 8[rbp]
	cmp	QWORD PTR 8[rdi], rax
	je	.L1
	test	rax, rax
	je	.L1
	mov	QWORD PTR 8[rdi], rax
	call	spi_setup@PLT
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC3[rip]
	mov	ecx, eax
	xor	eax, eax
	mov	rdx, QWORD PTR 8[rdi]
	add	rdi, 16
	call	dev_dbg@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L37
	add	rsp, 16
	.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
.L4:
	.cfi_restore_state
	call	mmc_powerstring@PLT
	lea	r8, .LC6[rip]
	mov	ecx, r12d
	lea	rsi, .LC5[rip]
	mov	edx, eax
	mov	rax, QWORD PTR 8[rbx]
	lea	rdi, 16[rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, DWORD PTR MMC_POWER_ON[rip]
	je	.L19
.L31:
	mov	rdi, QWORD PTR 8[rbx]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, QWORD PTR 8[rax]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR 16[rbp]
	lea	rdi, 16[rax]
	mov	rax, QWORD PTR 16[rbx]
	call	[QWORD PTR [rax]]
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 128
	jne	.L6
	mov	edi, DWORD PTR 4[rbx]
	call	msleep@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L36:
	mov	eax, DWORD PTR SPI_CPOL[rip]
	or	eax, DWORD PTR SPI_CPHA[rip]
	mov	DWORD PTR 4[rsp], 0
	not	eax
	and	DWORD PTR [rdi], eax
	call	spi_setup@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L38
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, 4[rsp]
	mov	edx, 1
	call	spi_write@PLT
	test	rax, rax
	js	.L12
.L11:
	mov	edi, 10
	call	msleep@PLT
	test	r12d, r12d
	je	.L39
.L14:
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdi, rbx
	call	mmc_spi_initsequence@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbx
	call	mmc_spi_initsequence@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 8[rbx]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L38:
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	lea	rdi, 16[rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, 4[rsp]
	mov	edx, 1
	call	spi_write@PLT
	test	rax, rax
	js	.L12
	mov	edi, 10
	call	msleep@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	mov	rdi, QWORD PTR 8[rbx]
	mov	eax, DWORD PTR SPI_CPOL[rip]
	or	eax, DWORD PTR SPI_CPHA[rip]
	or	DWORD PTR [rdi], eax
	call	spi_setup@PLT
	test	eax, eax
	jns	.L14
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	lea	rdi, 16[rax]
	xor	eax, eax
	call	dev_dbg@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	lea	rdi, 16[rax]
	xor	eax, eax
	call	dev_dbg@PLT
	jmp	.L11
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mmc_spi_set_ios, .-mmc_spi_set_ios
	.comm	SPI_CPOL,4,4
	.comm	SPI_CPHA,4,4
	.comm	MMC_POWER_ON,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_mmc_spi.c_mmc_spi_set_ios.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mmc_spi: power %s (%d)%s\012\000"
	.align	2
.LC1:
	.ascii	", can switch\000"
	.align	2
.LC2:
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"switch to SPI mode 0 failed\012\000"
	.align	2
.LC4:
	.ascii	"put spi signals to low failed\012\000"
	.align	2
.LC5:
	.ascii	"switch back to SPI mode 3 failed\012\000"
	.align	2
.LC6:
	.ascii	"mmc_spi:  clock to %d Hz, %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmc_spi_set_ios, %function
mmc_spi_set_ios:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L38
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r1
	bl	mmc_priv
	mov	r4, r0
	ldr	r0, [r5]
	ldr	r3, [r4]
	cmp	r3, r0
	ldreq	r0, [r4, #8]
	beq	.L3
	ldr	r3, [r4, #12]
	ldr	r6, [r4, #8]
	cmp	r3, #0
	add	r6, r6, #8
	beq	.L4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	bl	mmc_powerstring
	ldr	r3, .L38+4
	mov	r2, r0
	str	r3, [sp]
	ldr	r3, [r5, #8]
	mov	r0, r6
	ldr	r1, .L38+8
	bl	dev_dbg
	ldr	r3, [r5]
	sub	r2, r3, #128
	cmp	r2, #1
	bls	.L32
.L6:
	ldr	r2, .L38+12
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L33
.L18:
	cmp	r3, #129
	ldr	r0, [r4, #8]
	bne	.L8
	mov	r3, #0
	ldr	r7, .L38+16
	ldr	r6, .L38+20
	ldr	r2, [r7]
	ldr	r1, [r6]
	str	r3, [sp, #8]
	ldr	r3, [r0]
	orr	r2, r2, r1
	bic	r3, r3, r2
	str	r3, [r0]
	bl	spi_setup
	subs	r8, r0, #0
	blt	.L34
	mov	r2, #1
	ldr	r0, [r4, #8]
	add	r1, sp, #8
	bl	spi_write
	cmp	r0, #0
	blt	.L12
.L11:
	mov	r0, #10
	bl	msleep
	cmp	r8, #0
	beq	.L35
.L14:
	ldr	r3, [r5]
	b	.L30
.L4:
	bl	mmc_powerstring
	ldr	r3, .L38+24
	mov	r2, r0
	str	r3, [sp]
	ldr	r3, [r5, #8]
	mov	r0, r6
	ldr	r1, .L38+8
	bl	dev_dbg
	ldr	r2, .L38+12
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L7
.L30:
	ldr	r0, [r4, #8]
.L8:
	str	r3, [r4]
.L3:
	ldr	r3, [r5, #4]
	ldr	r2, [r0, #4]
	cmp	r2, r3
	cmpne	r3, #0
	bne	.L36
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L36:
	str	r3, [r0, #4]
	bl	spi_setup
	mov	r3, r0
	ldr	r0, [r4, #8]
	ldr	r1, .L38+28
	ldr	r2, [r0, #4]
	add	r0, r0, #8
	bl	dev_dbg
	b	.L1
.L32:
	ldr	r0, [r4, #8]
	ldr	r3, [r4, #12]
	ldr	r1, [r5, #8]
	ldr	r3, [r3]
	add	r0, r0, #8
	blx	r3
	ldr	r3, [r5]
	cmp	r3, #128
	bne	.L6
	ldr	r0, [r4, #4]
	bl	msleep
	ldr	r3, [r5]
	b	.L6
.L7:
	mov	r0, r4
	bl	mmc_spi_initsequence
	ldr	r3, [r5]
	ldr	r0, [r4, #8]
	b	.L8
.L33:
	mov	r0, r4
	bl	mmc_spi_initsequence
	ldr	r3, [r5]
	b	.L18
.L34:
	ldr	r0, [r4, #8]
	ldr	r1, .L38+32
	add	r0, r0, #8
	bl	dev_dbg
	mov	r2, #1
	ldr	r0, [r4, #8]
	add	r1, sp, #8
	bl	spi_write
	cmp	r0, #0
	blt	.L12
	mov	r0, #10
	bl	msleep
	b	.L14
.L35:
	ldr	r0, [r4, #8]
	ldr	r2, [r7]
	ldr	r1, [r6]
	ldr	r3, [r0]
	orr	r2, r2, r1
	orr	r3, r3, r2
	str	r3, [r0]
	bl	spi_setup
	cmp	r0, #0
	bge	.L14
	ldr	r0, [r4, #8]
	ldr	r1, .L38+36
	add	r0, r0, #8
	bl	dev_dbg
	b	.L14
.L12:
	ldr	r0, [r4, #8]
	ldr	r1, .L38+40
	add	r0, r0, #8
	bl	dev_dbg
	b	.L11
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC7
	.word	.LC1
	.word	.LC0
	.word	MMC_POWER_ON
	.word	SPI_CPOL
	.word	SPI_CPHA
	.word	.LC2
	.word	.LC6
	.word	.LC3
	.word	.LC5
	.word	.LC4
	.size	mmc_spi_set_ios, .-mmc_spi_set_ios
	.comm	SPI_CPOL,4,4
	.comm	SPI_CPHA,4,4
	.comm	MMC_POWER_ON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
