	.file	"extr_mtip32xx.c_mtip_hw_exit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtip_hw_exit, @function
mtip_hw_exit:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR 24[rdi]
	test	eax, eax
	je	.L5
.L2:
	mov	rax, QWORD PTR 8[rbx]
	xor	esi, esi
	mov	edi, DWORD PTR [rax]
	call	irq_set_affinity_hint@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	rsi, rbx
	mov	edi, DWORD PTR [rax]
	call	free_irq@PLT
	mov	edi, 1000
	call	msleep@PLT
	mov	rdi, rbx
	call	mtip_dma_free@PLT
	mov	rdi, QWORD PTR [rbx]
	call	kfree@PLT
	mov	QWORD PTR [rbx], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rdi]
	call	mtip_deinit_port@PLT
	mov	rbp, QWORD PTR HOST_CTL[rip]
	add	rbp, QWORD PTR 16[rbx]
	mov	rdi, rbp
	call	readl@PLT
	mov	edi, DWORD PTR HOST_IRQ_EN[rip]
	mov	rsi, rbp
	not	edi
	and	edi, eax
	call	writel@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	mtip_hw_exit, .-mtip_hw_exit
	.comm	HOST_IRQ_EN,4,4
	.comm	HOST_CTL,8,8
	.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_mtip32xx.c_mtip_hw_exit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtip_hw_exit, %function
mtip_hw_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #12]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r4, r0
	beq	.L5
.L2:
	ldr	r3, [r4, #4]
	mov	r1, #0
	ldr	r0, [r3]
	bl	irq_set_affinity_hint
	ldr	r3, [r4, #4]
	mov	r1, r4
	ldr	r0, [r3]
	bl	free_irq
	mov	r0, #1000
	bl	msleep
	mov	r0, r4
	bl	mtip_dma_free
	ldr	r0, [r4]
	bl	kfree
	mov	r0, #0
	str	r0, [r4]
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r5, .L6
	ldr	r0, [r0]
	bl	mtip_deinit_port
	ldr	r3, [r5]
	ldr	r0, [r4, #8]
	add	r0, r0, r3
	bl	readl
	ldr	r3, .L6+4
	ldr	r2, [r5]
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	add	r1, r1, r2
	bic	r0, r0, r3
	bl	writel
	b	.L2
.L7:
	.align	2
.L6:
	.word	HOST_CTL
	.word	HOST_IRQ_EN
	.size	mtip_hw_exit, .-mtip_hw_exit
	.comm	HOST_IRQ_EN,4,4
	.comm	HOST_CTL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
