	.file	"extr_pcm.c_line6_pcm_acquire.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	line6_pcm_acquire
	.type	line6_pcm_acquire, @function
line6_pcm_acquire:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	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
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	mutex_lock@PLT
.L4:
	mov	esi, r15d
	mov	rdi, rbp
	call	get_stream@PLT
	mov	ecx, r13d
	mov	edx, r15d
	mov	rdi, rbp
	mov	rsi, rax
	mov	r14, rax
	call	line6_buffer_acquire@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L2
	mov	eax, DWORD PTR [r14]
	test	eax, eax
	je	.L11
.L3:
	cmp	r15d, 1
	jne	.L8
	test	ebx, ebx
	je	.L5
	mov	edx, r13d
	xor	esi, esi
	mov	rdi, rbp
	call	line6_stream_start@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L2
	mov	rdi, rbp
	mov	edx, r13d
	mov	esi, 1
	call	line6_stream_start@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	mutex_unlock@PLT
	test	r12d, r12d
	js	.L7
.L1:
	add	rsp, 8
	.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
.L8:
	.cfi_restore_state
	mov	r15d, 1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, r14
	mov	rdi, rbp
	call	line6_wait_clear_audio_urbs@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, rbp
	call	mutex_unlock@PLT
.L7:
	mov	esi, r13d
	mov	rdi, rbp
	call	line6_pcm_release@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	line6_pcm_acquire, .-line6_pcm_acquire
	.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_line6_pcm_acquire.c"
	.text
	.align	2
	.global	line6_pcm_acquire
	.syntax unified
	.arm
	.fpu softvfp
	.type	line6_pcm_acquire, %function
line6_pcm_acquire:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r1
	mov	r9, r2
	mov	r6, r0
	mov	r8, #0
	bl	mutex_lock
.L4:
	mov	r1, r8
	mov	r0, r6
	bl	get_stream
	mov	r3, r7
	mov	r1, r0
	mov	r5, r0
	mov	r2, r8
	mov	r0, r6
	bl	line6_buffer_acquire
	subs	r4, r0, #0
	blt	.L2
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L11
.L3:
	cmp	r8, #1
	bne	.L8
	cmp	r9, #0
	beq	.L5
	mov	r2, r7
	mov	r1, #0
	mov	r0, r6
	bl	line6_stream_start
	subs	r4, r0, #0
	blt	.L2
	mov	r1, r8
	mov	r2, r7
	mov	r0, r6
	bl	line6_stream_start
	mov	r4, r0
	mov	r0, r6
	bl	mutex_unlock
	cmp	r4, #0
	blt	.L7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	mov	r8, #1
	b	.L4
.L11:
	mov	r1, r5
	mov	r0, r6
	bl	line6_wait_clear_audio_urbs
	b	.L3
.L5:
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r0, r6
	bl	mutex_unlock
.L7:
	mov	r1, r7
	mov	r0, r6
	bl	line6_pcm_release
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
	.size	line6_pcm_acquire, .-line6_pcm_acquire
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
