	.file	"extr_ms_block.c_msb_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to reset the host controller"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Failed to reset the card"
	.text
	.p2align 4
	.type	msb_reset, @function
msb_reset:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 8[rdi]
	mov	ebx, DWORD PTR 4[rdi]
	mov	r13d, DWORD PTR MEMSTICK_SYS_PAM[rip]
	mov	r12, QWORD PTR [rax]
	mov	eax, DWORD PTR MEMSTICK_SYS_BAMD[rip]
	mov	DWORD PTR 4[rdi], eax
	test	esi, esi
	je	.L2
	mov	edx, DWORD PTR MEMSTICK_POWER_OFF[rip]
	mov	esi, DWORD PTR MEMSTICK_POWER[rip]
	mov	rdi, r12
	call	[QWORD PTR [r12]]
	test	eax, eax
	jne	.L5
	mov	rdi, rbp
	call	msb_invalidate_reg_window@PLT
	mov	edx, DWORD PTR MEMSTICK_POWER_ON[rip]
	mov	esi, DWORD PTR MEMSTICK_POWER[rip]
	mov	rdi, r12
	call	[QWORD PTR [r12]]
	test	eax, eax
	jne	.L5
	mov	edx, DWORD PTR MEMSTICK_SERIAL[rip]
	mov	esi, DWORD PTR MEMSTICK_INTERFACE[rip]
	mov	rdi, r12
	call	[QWORD PTR [r12]]
	test	eax, eax
	jne	.L5
.L2:
	mov	esi, DWORD PTR h_msb_reset[rip]
	mov	rdi, rbp
	call	msb_run_state_machine@PLT
	test	eax, eax
	jne	.L15
	mov	eax, ebx
	and	eax, r13d
	jne	.L16
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	dbg@PLT
	mov	eax, DWORD PTR EFAULT[rip]
	mov	DWORD PTR 0[rbp], 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	dbg@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	mov	DWORD PTR 0[rbp], 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, rbp
	call	msb_switch_to_parallel@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	ret
	.cfi_endproc
.LFE0:
	.size	msb_reset, .-msb_reset
	.comm	h_msb_reset,4,4
	.comm	MEMSTICK_SYS_PAM,4,4
	.comm	MEMSTICK_SYS_BAMD,4,4
	.comm	MEMSTICK_SERIAL,4,4
	.comm	MEMSTICK_POWER_ON,4,4
	.comm	MEMSTICK_POWER_OFF,4,4
	.comm	MEMSTICK_POWER,4,4
	.comm	MEMSTICK_INTERFACE,4,4
	.comm	ENODEV,4,4
	.comm	EFAULT,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_ms_block.c_msb_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to reset the host controller\000"
	.align	2
.LC1:
	.ascii	"Failed to reset the card\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msb_reset, %function
msb_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, .L16
	ldr	r0, [r0, #8]
	ldr	r3, [r3]
	ldr	r2, .L16+4
	cmp	r1, #0
	ldr	r6, [r0]
	ldr	r5, [r4, #4]
	ldr	r7, [r2]
	str	r3, [r4, #4]
	beq	.L2
	ldr	r3, .L16+8
	ldr	r8, .L16+12
	ldr	r2, [r3]
	mov	r0, r6
	ldr	r1, [r8]
	ldr	r3, [r6]
	blx	r3
	cmp	r0, #0
	bne	.L5
	mov	r0, r4
	bl	msb_invalidate_reg_window
	ldr	r3, .L16+16
	mov	r0, r6
	ldr	r2, [r3]
	ldr	r1, [r8]
	ldr	r3, [r6]
	blx	r3
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L16+20
	ldr	r2, .L16+24
	ldr	r1, [r3]
	mov	r0, r6
	ldr	r2, [r2]
	ldr	r3, [r6]
	blx	r3
	cmp	r0, #0
	bne	.L5
.L2:
	ldr	r3, .L16+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	msb_run_state_machine
	subs	r6, r0, #0
	bne	.L15
	ands	r0, r5, r7
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r0, r4
	bl	msb_switch_to_parallel
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r0, .L16+32
	bl	dbg
	mov	r2, #1
	ldr	r3, .L16+36
	str	r2, [r4]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r0, .L16+40
	bl	dbg
	mov	r2, #1
	ldr	r3, .L16+44
	str	r2, [r4]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	MEMSTICK_SYS_BAMD
	.word	MEMSTICK_SYS_PAM
	.word	MEMSTICK_POWER_OFF
	.word	MEMSTICK_POWER
	.word	MEMSTICK_POWER_ON
	.word	MEMSTICK_INTERFACE
	.word	MEMSTICK_SERIAL
	.word	h_msb_reset
	.word	.LC0
	.word	EFAULT
	.word	.LC1
	.word	ENODEV
	.size	msb_reset, .-msb_reset
	.comm	h_msb_reset,4,4
	.comm	MEMSTICK_SYS_PAM,4,4
	.comm	MEMSTICK_SYS_BAMD,4,4
	.comm	MEMSTICK_SERIAL,4,4
	.comm	MEMSTICK_POWER_ON,4,4
	.comm	MEMSTICK_POWER_OFF,4,4
	.comm	MEMSTICK_POWER,4,4
	.comm	MEMSTICK_INTERFACE,4,4
	.comm	ENODEV,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
