	.file	"extr_alsa-input.c__alsa_listen.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Capture thread started."
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Capture thread is about to exit."
	.text
	.p2align 4
	.globl	_alsa_listen
	.type	_alsa_listen, @function
_alsa_listen:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	lea	rbx, 24[r13]
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR LOG_DEBUG[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	call	blog@PLT
	mov	edx, DWORD PTR 32[r13]
	mov	rax, QWORD PTR 24[rsp]
	mov	DWORD PTR [rax], edx
	mov	edi, DWORD PTR 40[r13]
	call	_alsa_to_obs_audio_format@PLT
	mov	edi, DWORD PTR 36[r13]
	mov	DWORD PTR 20[rsp], eax
	call	_alsa_channels_to_obs_speakers@PLT
	mov	esi, 1
	mov	rdi, rbx
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR [rsp], eax
	call	os_atomic_set_bool@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	xor	eax, eax
	mov	DWORD PTR 4[rsp], ebp
	call	os_gettime_ns@PLT
	mov	r8, rax
	mov	eax, DWORD PTR NSEC_PER_SEC[rip]
	imul	eax, ebp
	cdq
	idiv	DWORD PTR 0[r13]
	mov	rdx, QWORD PTR 8[r13]
	cdqe
	sub	r8, rax
	mov	QWORD PTR 8[rsp], r8
	mov	rax, r8
	test	rdx, rdx
	jne	.L5
	mov	rdx, QWORD PTR STARTUP_TIMEOUT_NS[rip]
	add	rdx, r8
	mov	QWORD PTR 8[r13], rdx
.L5:
	cmp	rax, rdx
	jg	.L13
.L4:
	mov	rdi, rbx
	call	os_atomic_load_bool@PLT
	test	rax, rax
	je	.L7
.L6:
	mov	edi, DWORD PTR 20[r13]
	mov	edx, DWORD PTR 28[r13]
	mov	esi, DWORD PTR 32[r13]
	call	snd_pcm_readi@PLT
	mov	rdi, rbx
	mov	ebp, eax
	call	os_atomic_load_bool@PLT
	test	rax, rax
	je	.L7
	test	ebp, ebp
	jg	.L3
	mov	edi, DWORD PTR 20[r13]
	mov	esi, ebp
	xor	edx, edx
	call	snd_pcm_recover@PLT
	mov	ebp, eax
	test	eax, eax
	jg	.L3
	mov	edi, DWORD PTR 20[r13]
	mov	esi, 100
	call	snd_pcm_wait@PLT
	mov	rdi, rbx
	call	os_atomic_load_bool@PLT
	test	rax, rax
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR LOG_DEBUG[rip]
	lea	rsi, .LC1[rip]
	call	blog@PLT
	xor	edi, edi
	call	pthread_exit@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[r13]
	mov	rsi, r12
	call	obs_source_output_audio@PLT
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_alsa_listen, .-_alsa_listen
	.comm	STARTUP_TIMEOUT_NS,8,8
	.comm	NSEC_PER_SEC,4,4
	.comm	LOG_DEBUG,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_alsa-input.c__alsa_listen.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Capture thread started.\000"
	.align	2
.LC1:
	.ascii	"Capture thread is about to exit.\000"
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	_alsa_listen
	.syntax unified
	.arm
	.fpu softvfp
	.type	_alsa_listen, %function
_alsa_listen:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r0
	ldr	r9, .L15
	ldr	r3, .L15+4
	sub	sp, sp, #36
	ldr	r1, .L15+8
	ldr	r0, [r9]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	blog
	ldr	r2, [r5, #24]
	ldr	r3, [sp, #24]
	mov	r6, r5
	str	r2, [r3]
	ldr	r0, [r5, #32]
	bl	_alsa_to_obs_audio_format
	mov	r3, r0
	ldr	r0, [r5, #28]
	str	r3, [sp, #20]
	bl	_alsa_channels_to_obs_speakers
	mov	r2, r0
	ldr	r3, [r6], #16
	mov	r1, #1
	mov	r0, r6
	str	r2, [sp, #16]
	str	r3, [sp, #4]
	ldr	r7, .L15+12
	bl	os_atomic_set_bool
	ldr	r8, .L15+16
	b	.L6
.L3:
	str	r4, [sp, #8]
	bl	os_gettime_ns
	mov	r3, r0
	ldr	r0, [r7]
	ldr	r1, [r5]
	mul	r0, r4, r0
	mov	r4, r3
	bl	__aeabi_idiv
	ldr	r3, [r5, #4]
	sub	r0, r4, r0
	cmp	r3, #0
	ldreq	r3, [r8]
	str	r0, [sp, #12]
	addeq	r3, r0, r3
	streq	r3, [r5, #4]
	cmp	r0, r3
	bgt	.L13
.L4:
	mov	r0, r6
	bl	os_atomic_load_bool
	cmp	r0, #0
	beq	.L7
.L6:
	ldr	r2, [r5, #20]
	ldr	r1, [r5, #24]
	ldr	r0, [r5, #12]
	bl	snd_pcm_readi
	mov	r4, r0
	mov	r0, r6
	bl	os_atomic_load_bool
	cmp	r0, #0
	beq	.L7
	cmp	r4, #0
	bgt	.L3
	mov	r1, r4
	mov	r2, #0
	ldr	r0, [r5, #12]
	bl	snd_pcm_recover
	subs	r4, r0, #0
	bgt	.L3
	mov	r1, #100
	ldr	r0, [r5, #12]
	bl	snd_pcm_wait
	mov	r0, r6
	bl	os_atomic_load_bool
	cmp	r0, #0
	bne	.L6
.L7:
	ldr	r1, .L15+20
	ldr	r0, [r9]
	bl	blog
	mov	r0, #0
	bl	pthread_exit
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, #0
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r0, [r5, #8]
	add	r1, sp, #4
	bl	obs_source_output_audio
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	LOG_DEBUG
	.word	.LC2
	.word	.LC0
	.word	NSEC_PER_SEC
	.word	STARTUP_TIMEOUT_NS
	.word	.LC1
	.size	_alsa_listen, .-_alsa_listen
	.comm	STARTUP_TIMEOUT_NS,4,4
	.comm	NSEC_PER_SEC,4,4
	.comm	LOG_DEBUG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
