	.file	"extr_vout_subpictures.c_spu_RegisterChannelInternal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spu_RegisterChannelInternal
	.type	spu_RegisterChannelInternal, @function
spu_RegisterChannelInternal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdi, rbp
	call	vlc_mutex_lock@PLT
	mov	rsi, rbx
	mov	rdi, r12
	call	spu_GetFreeChannelId@PLT
	cmp	QWORD PTR VOUT_SPU_CHANNEL_INVALID[rip], rax
	je	.L2
	mov	edx, DWORD PTR VLC_VOUT_ORDER_PRIMARY[rip]
	mov	r12, rax
	test	rbx, rbx
	je	.L4
	mov	edx, DWORD PTR [rbx]
.L4:
	lea	rdi, 4[rsp]
	mov	rsi, r12
	mov	rcx, r13
	call	spu_channel_Init@PLT
	mov	esi, DWORD PTR 4[rsp]
	lea	rdi, 4[rbp]
	call	vlc_vector_push@PLT
	test	rax, rax
	jne	.L14
.L2:
	mov	rdi, rbp
	call	vlc_mutex_unlock@PLT
	mov	r12, QWORD PTR VOUT_SPU_CHANNEL_INVALID[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L14:
	.cfi_restore_state
	mov	rdi, rbp
	call	vlc_mutex_unlock@PLT
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	spu_RegisterChannelInternal, .-spu_RegisterChannelInternal
	.comm	VOUT_SPU_CHANNEL_INVALID,8,8
	.comm	VLC_VOUT_ORDER_PRIMARY,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_vout_subpictures.c_spu_RegisterChannelInternal.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	spu_RegisterChannelInternal
	.syntax unified
	.arm
	.fpu softvfp
	.type	spu_RegisterChannelInternal, %function
spu_RegisterChannelInternal:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	mov	r4, r0
	ldr	r7, [r0]
	ldr	r3, .L15
	sub	sp, sp, #8
	mov	r0, r7
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r6, r1
	bl	vlc_mutex_lock
	mov	r1, r5
	mov	r0, r4
	bl	spu_GetFreeChannelId
	ldr	r8, .L15+4
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L2
	cmp	r5, #0
	ldreq	r3, .L15+8
	mov	r1, r0
	ldreq	r2, [r3]
	ldrne	r2, [r5]
	mov	r3, r6
	mov	r4, r0
	mov	r0, sp
	bl	spu_channel_Init
	ldr	r1, [sp]
	add	r0, r7, #4
	bl	vlc_vector_push
	cmp	r0, #0
	bne	.L13
.L2:
	mov	r0, r7
	bl	vlc_mutex_unlock
	ldr	r4, [r8]
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, r7
	bl	vlc_mutex_unlock
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	VOUT_SPU_CHANNEL_INVALID
	.word	VLC_VOUT_ORDER_PRIMARY
	.size	spu_RegisterChannelInternal, .-spu_RegisterChannelInternal
	.comm	VOUT_SPU_CHANNEL_INVALID,4,4
	.comm	VLC_VOUT_ORDER_PRIMARY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
