	.file	"extr_es1968.c_snd_es1968_free.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_es1968_free, @function
snd_es1968_free:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	add	rdi, 40
	call	cancel_work_sync@PLT
	mov	rsi, QWORD PTR 24[rbp]
	test	rsi, rsi
	je	.L2
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	jns	.L10
.L3:
	add	rsi, 4
	mov	edi, 1
	call	outw@PLT
	mov	rsi, QWORD PTR ESM_PORT_HOST_IRQ[rip]
	xor	edi, edi
	add	rsi, QWORD PTR 24[rbp]
	call	outw@PLT
.L2:
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	js	.L4
	mov	rsi, rbp
	call	free_irq@PLT
.L4:
	mov	rdi, rbp
	call	snd_es1968_free_gameport@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	pci_release_regions@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	pci_disable_device@PLT
	mov	rdi, rbp
	call	kfree@PLT
	xor	eax, eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	synchronize_irq@PLT
	mov	rsi, QWORD PTR 24[rbp]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	snd_es1968_free, .-snd_es1968_free
	.comm	ESM_PORT_HOST_IRQ,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_es1968.c_snd_es1968_free.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_es1968_free, %function
snd_es1968_free:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	add	r0, r0, #24
	bl	cancel_work_sync
	ldr	r1, [r4, #16]
	cmp	r1, #0
	beq	.L2
	ldr	r0, [r4]
	cmp	r0, #0
	bge	.L10
.L3:
	add	r1, r1, #4
	mov	r0, #1
	bl	outw
	ldr	r3, .L11
	ldr	r1, [r4, #16]
	ldr	r3, [r3]
	mov	r0, #0
	add	r1, r1, r3
	bl	outw
.L2:
	ldr	r0, [r4]
	cmp	r0, #0
	blt	.L4
	mov	r1, r4
	bl	free_irq
.L4:
	mov	r0, r4
	bl	snd_es1968_free_gameport
	ldr	r0, [r4, #4]
	bl	pci_release_regions
	ldr	r0, [r4, #4]
	bl	pci_disable_device
	mov	r0, r4
	bl	kfree
	mov	r0, #0
	pop	{r4, pc}
.L10:
	bl	synchronize_irq
	ldr	r1, [r4, #16]
	b	.L3
.L12:
	.align	2
.L11:
	.word	ESM_PORT_HOST_IRQ
	.size	snd_es1968_free, .-snd_es1968_free
	.comm	ESM_PORT_HOST_IRQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
