	.file	"extr_rsi_91x_sdio.c_rsi_disconnect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"##### RSI SDIO device disconnected #####\n"
	.text
	.p2align 4
	.type	rsi_disconnect, @function
rsi_disconnect:
.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, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	sdio_get_drvdata@PLT
	test	rax, rax
	je	.L1
	mov	rbx, QWORD PTR 8[rax]
	mov	r12, rax
	lea	rdi, 4[rbx]
	call	rsi_kill_thread@PLT
	mov	rdi, rbp
	call	sdio_claim_host@PLT
	mov	rdi, rbp
	call	sdio_release_irq@PLT
	mov	rdi, rbp
	call	sdio_release_host@PLT
	mov	edi, 10
	call	mdelay@PLT
	mov	rdi, r12
	call	rsi_mac80211_detach@PLT
	mov	edi, 10
	call	mdelay@PLT
	mov	edi, DWORD PTR CONFIG_RSI_COEX[rip]
	call	IS_ENABLED@PLT
	test	rax, rax
	je	.L3
	mov	rax, QWORD PTR [r12]
	cmp	DWORD PTR [rax], 1
	jle	.L3
	mov	rdi, QWORD PTR 8[rax]
	test	rdi, rdi
	je	.L3
	call	[QWORD PTR rsi_bt_ops[rip]]
	mov	rax, QWORD PTR [r12]
	mov	QWORD PTR 8[rax], 0
.L3:
	mov	rdi, r12
	call	rsi_reset_chip@PLT
	mov	rdi, rbp
	call	sdio_claim_host@PLT
	mov	rdi, rbp
	call	rsi_reset_card@PLT
	mov	rdi, rbp
	call	sdio_disable_func@PLT
	mov	rdi, rbp
	call	sdio_release_host@PLT
	mov	DWORD PTR [rbx], 2
	mov	rdi, r12
	call	rsi_91x_deinit@PLT
	mov	edi, DWORD PTR ERR_ZONE[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rsi, .LC0[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rsi_dbg@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	rsi_disconnect, .-rsi_disconnect
	.comm	rsi_bt_ops,8,8
	.comm	ERR_ZONE,4,4
	.comm	CONFIG_RSI_COEX,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_rsi_91x_sdio.c_rsi_disconnect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"##### RSI SDIO device disconnected #####\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rsi_disconnect, %function
rsi_disconnect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	sdio_get_drvdata
	subs	r5, r0, #0
	popeq	{r4, r5, r6, pc}
	ldr	r6, [r5, #4]
	add	r0, r6, #4
	bl	rsi_kill_thread
	mov	r0, r4
	bl	sdio_claim_host
	mov	r0, r4
	bl	sdio_release_irq
	mov	r0, r4
	bl	sdio_release_host
	mov	r0, #10
	bl	mdelay
	mov	r0, r5
	bl	rsi_mac80211_detach
	mov	r0, #10
	bl	mdelay
	ldr	r3, .L12
	ldr	r0, [r3]
	bl	IS_ENABLED
	cmp	r0, #0
	beq	.L3
	ldr	r3, [r5]
	ldr	r2, [r3]
	cmp	r2, #1
	ble	.L3
	ldr	r0, [r3, #4]
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L12+4
	ldr	r3, [r3]
	blx	r3
	mov	r2, #0
	ldr	r3, [r5]
	str	r2, [r3, #4]
.L3:
	mov	r0, r5
	bl	rsi_reset_chip
	mov	r0, r4
	bl	sdio_claim_host
	mov	r0, r4
	bl	rsi_reset_card
	mov	r0, r4
	bl	sdio_disable_func
	mov	r0, r4
	bl	sdio_release_host
	mov	r3, #2
	mov	r0, r5
	str	r3, [r6]
	bl	rsi_91x_deinit
	pop	{r4, r5, r6, lr}
	ldr	r3, .L12+8
	ldr	r1, .L12+12
	ldr	r0, [r3]
	b	rsi_dbg
.L13:
	.align	2
.L12:
	.word	CONFIG_RSI_COEX
	.word	rsi_bt_ops
	.word	ERR_ZONE
	.word	.LC0
	.size	rsi_disconnect, .-rsi_disconnect
	.comm	rsi_bt_ops,4,4
	.comm	ERR_ZONE,4,4
	.comm	CONFIG_RSI_COEX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
