	.file	"extr_pcm.c_snd_pcm_dev_disconnect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_pcm_dev_disconnect, @function
snd_pcm_dev_disconnect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbp, QWORD PTR [rdi]
	lea	rdi, register_mutex[rip]
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	mutex_lock@PLT
	lea	rdi, 20[rbp]
	call	wake_up@PLT
	lea	rdi, 16[rbp]
	call	list_del_init@PLT
.L6:
	mov	rax, QWORD PTR 8[rbp]
	mov	rbx, QWORD PTR 8[rax+r12]
	test	rbx, rbx
	jne	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR [rbx]
	mov	edx, DWORD PTR SNDRV_PCM_STATE_DISCONNECTED[rip]
	mov	rax, QWORD PTR 8[rdi]
	add	rdi, 4
	mov	DWORD PTR [rax], edx
	call	wake_up@PLT
	mov	rdi, QWORD PTR [rbx]
	call	wake_up@PLT
.L3:
	mov	rdi, rbx
	call	snd_pcm_stream_unlock_irq@PLT
	mov	rbx, QWORD PTR 8[rbx]
	test	rbx, rbx
	je	.L2
.L5:
	mov	rdi, rbx
	call	snd_pcm_stream_lock_irq@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L3
	mov	rdi, rbx
	call	snd_pcm_running@PLT
	test	rax, rax
	je	.L4
	mov	esi, DWORD PTR SNDRV_PCM_STATE_DISCONNECTED[rip]
	mov	rdi, rbx
	call	snd_pcm_stop@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	add	r12, 16
	cmp	r12, 32
	jne	.L6
	mov	esi, DWORD PTR n_disconnect[rip]
	mov	rdi, rbp
	call	pcm_call_notify@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	snd_unregister_device@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	free_chmap@PLT
	mov	rax, QWORD PTR 8[rbp]
	lea	rdi, 16[rax]
	call	snd_unregister_device@PLT
	mov	rax, QWORD PTR 8[rbp]
	lea	rdi, 16[rax]
	call	free_chmap@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	lea	rdi, register_mutex[rip]
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	snd_pcm_dev_disconnect, .-snd_pcm_dev_disconnect
	.comm	register_mutex,4,4
	.comm	n_disconnect,4,4
	.comm	SNDRV_PCM_STATE_DISCONNECTED,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_pcm.c_snd_pcm_dev_disconnect.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_pcm_dev_disconnect, %function
snd_pcm_dev_disconnect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, [r3]
	ldr	r0, .L19
	bl	mutex_lock
	mov	r0, r6
	bl	mutex_lock
	add	r0, r6, #12
	bl	wake_up
	add	r0, r6, #8
	bl	list_del_init
	mov	r7, #0
	ldr	r5, .L19+4
.L6:
	ldr	r3, [r6, #4]
	add	r3, r3, r7
	ldr	r4, [r3, #4]
	cmp	r4, #0
	bne	.L5
	b	.L2
.L4:
	ldr	r0, [r4]
	ldr	r2, [r5]
	ldr	r3, [r0, #8]
	add	r0, r0, #4
	str	r2, [r3]
	bl	wake_up
	ldr	r0, [r4]
	bl	wake_up
.L3:
	mov	r0, r4
	bl	snd_pcm_stream_unlock_irq
	ldr	r4, [r4, #4]
	cmp	r4, #0
	beq	.L2
.L5:
	mov	r0, r4
	bl	snd_pcm_stream_lock_irq
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L3
	mov	r0, r4
	bl	snd_pcm_running
	cmp	r0, #0
	beq	.L4
	mov	r0, r4
	ldr	r1, [r5]
	bl	snd_pcm_stop
	b	.L4
.L2:
	add	r7, r7, #8
	cmp	r7, #16
	bne	.L6
	ldr	r3, .L19+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	pcm_call_notify
	ldr	r0, [r6, #4]
	bl	snd_unregister_device
	ldr	r0, [r6, #4]
	bl	free_chmap
	ldr	r0, [r6, #4]
	add	r0, r0, #8
	bl	snd_unregister_device
	ldr	r0, [r6, #4]
	add	r0, r0, #8
	bl	free_chmap
	mov	r0, r6
	bl	mutex_unlock
	ldr	r0, .L19
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	.align	2
.L19:
	.word	register_mutex
	.word	SNDRV_PCM_STATE_DISCONNECTED
	.word	n_disconnect
	.size	snd_pcm_dev_disconnect, .-snd_pcm_dev_disconnect
	.comm	register_mutex,4,4
	.comm	n_disconnect,4,4
	.comm	SNDRV_PCM_STATE_DISCONNECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
