	.file	"extr_pcm_oss.c_snd_pcm_oss_poll.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_pcm_oss_poll, @function
snd_pcm_oss_poll:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR [rdi]
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rbx]
	mov	r15, QWORD PTR [rax+rdx*8]
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_CAPTURE[rip]
	mov	r14, QWORD PTR [rax+rdx*8]
	test	r15, r15
	je	.L2
	mov	r12, QWORD PTR [r15]
	mov	rdx, r13
	lea	rsi, 16[r12]
	call	poll_wait@PLT
	mov	rdi, r15
	call	snd_pcm_stream_lock_irq@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR SNDRV_PCM_STATE_DRAINING[rip]
	je	.L7
	cmp	rax, QWORD PTR SNDRV_PCM_STATE_RUNNING[rip]
	je	.L5
.L6:
	mov	r12d, DWORD PTR EPOLLOUT[rip]
	or	r12d, DWORD PTR EPOLLWRNORM[rip]
.L4:
	mov	rdi, r15
	call	snd_pcm_stream_unlock_irq@PLT
.L2:
	test	r14, r14
	je	.L1
	mov	r15, QWORD PTR [r14]
	mov	rdi, rbp
	mov	rdx, r13
	lea	rsi, 16[r15]
	call	poll_wait@PLT
	mov	rdi, r14
	call	snd_pcm_stream_lock_irq@PLT
	mov	rax, QWORD PTR 8[r15]
	mov	rbp, QWORD PTR [rax]
	cmp	QWORD PTR SNDRV_PCM_STATE_RUNNING[rip], rbp
	je	.L9
.L11:
	mov	eax, DWORD PTR EPOLLIN[rip]
	or	eax, DWORD PTR EPOLLRDNORM[rip]
	or	r12d, eax
.L10:
	mov	rdi, r14
	call	snd_pcm_stream_unlock_irq@PLT
	cmp	QWORD PTR SNDRV_PCM_STATE_RUNNING[rip], rbp
	je	.L1
	cmp	QWORD PTR [r15], 0
	jne	.L21
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r15
	call	snd_pcm_oss_playback_ready@PLT
	test	rax, rax
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	xor	r12d, r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rbp, rsp
	xor	esi, esi
	mov	edx, 8
	mov	rdi, rbp
	call	memset@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR SNDRV_PCM_STREAM_CAPTURE[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR PCM_ENABLE_INPUT[rip]
	mov	rcx, QWORD PTR [rdx+rax*8]
	mov	rdx, QWORD PTR [rsp]
	mov	QWORD PTR [rdx+rax*8], rcx
	mov	QWORD PTR [r15], 0
	call	snd_pcm_oss_set_trigger@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r14
	call	snd_pcm_oss_capture_ready@PLT
	test	rax, rax
	jne	.L11
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_pcm_oss_poll, .-snd_pcm_oss_poll
	.comm	SNDRV_PCM_STREAM_PLAYBACK,8,8
	.comm	SNDRV_PCM_STREAM_CAPTURE,8,8
	.comm	SNDRV_PCM_STATE_RUNNING,8,8
	.comm	SNDRV_PCM_STATE_DRAINING,8,8
	.comm	PCM_ENABLE_INPUT,4,4
	.comm	EPOLLWRNORM,4,4
	.comm	EPOLLRDNORM,4,4
	.comm	EPOLLOUT,4,4
	.comm	EPOLLIN,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_oss.c_snd_pcm_oss_poll.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_pcm_oss_poll, %function
snd_pcm_oss_poll:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, .L24
	ldr	r7, [r0]
	ldr	r2, [r2]
	ldr	r3, [r7]
	ldr	r8, .L24+4
	ldr	r5, [r3, r2, lsl #2]
	ldr	ip, [r8]
	ldr	r2, .L24+8
	sub	sp, sp, #8
	cmp	r5, #0
	mov	r4, r0
	mov	r6, r1
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	moveq	r10, r5
	ldr	r9, [r3, ip, lsl #2]
	beq	.L2
	ldr	r10, [r5]
	mov	r2, r1
	add	r1, r10, #8
	bl	poll_wait
	mov	r0, r5
	bl	snd_pcm_stream_lock_irq
	ldr	r3, [r10, #4]
	ldr	r2, .L24+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L7
	ldr	r2, .L24+16
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
.L6:
	ldr	r2, .L24+20
	ldr	r3, .L24+24
	ldr	r10, [r2]
	ldr	r3, [r3]
	orr	r10, r10, r3
.L4:
	mov	r0, r5
	bl	snd_pcm_stream_unlock_irq
.L2:
	cmp	r9, #0
	beq	.L1
	ldr	r5, [r9]
	mov	r2, r6
	mov	r0, r4
	add	r1, r5, #8
	bl	poll_wait
	mov	r0, r9
	bl	snd_pcm_stream_lock_irq
	ldr	r6, .L24+16
	ldr	r2, [r5, #4]
	ldr	r3, [r6]
	ldr	r4, [r2]
	cmp	r3, r4
	beq	.L9
.L11:
	ldr	r3, .L24+28
	ldr	r2, .L24+32
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	orr	r10, r10, r3
.L10:
	mov	r0, r9
	bl	snd_pcm_stream_unlock_irq
	ldr	r3, [r6]
	cmp	r3, r4
	beq	.L1
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L22
.L1:
	ldr	r3, .L24+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r10
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r0, r5
	bl	snd_pcm_oss_playback_ready
	cmp	r0, #0
	bne	.L6
.L7:
	mov	r10, #0
	b	.L4
.L22:
	mov	r2, #0
	str	r2, [sp]
	ldr	r3, [r8]
	ldr	r0, [r7]
	ldr	r1, .L24+36
	ldr	r0, [r0, r3, lsl #2]
	lsl	r3, r3, #2
	str	r0, [r3]
	ldr	r1, [r1]
	mov	r0, sp
	str	r2, [r5]
	bl	snd_pcm_oss_set_trigger
	b	.L1
.L9:
	mov	r0, r9
	bl	snd_pcm_oss_capture_ready
	cmp	r0, #0
	bne	.L11
	b	.L10
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	SNDRV_PCM_STREAM_CAPTURE
	.word	.LC0
	.word	SNDRV_PCM_STATE_DRAINING
	.word	SNDRV_PCM_STATE_RUNNING
	.word	EPOLLOUT
	.word	EPOLLWRNORM
	.word	EPOLLIN
	.word	EPOLLRDNORM
	.word	PCM_ENABLE_INPUT
	.size	snd_pcm_oss_poll, .-snd_pcm_oss_poll
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.comm	SNDRV_PCM_STREAM_CAPTURE,4,4
	.comm	SNDRV_PCM_STATE_RUNNING,4,4
	.comm	SNDRV_PCM_STATE_DRAINING,4,4
	.comm	PCM_ENABLE_INPUT,4,4
	.comm	EPOLLWRNORM,4,4
	.comm	EPOLLRDNORM,4,4
	.comm	EPOLLOUT,4,4
	.comm	EPOLLIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
