	.file	"extr_..demuxmpegps.h_ps_psm_fill.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ps_psm_fill, @function
ps_psm_fill:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	xor	edi, edi
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	QWORD PTR 8[rsp], rcx
	mov	QWORD PTR [rsp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	cmp	rdx, 3
	seta	dil
	call	assert@PLT
	test	rbx, rbx
	je	.L34
	cmp	r12, 9
	jbe	.L34
	mov	eax, DWORD PTR PS_STREAM_ID_MAP[rip]
	cmp	DWORD PTR 12[rbp], eax
	je	.L3
.L34:
	mov	eax, DWORD PTR VLC_EGENERIC[rip]
.L1:
	mov	rcx, QWORD PTR 88[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L36
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L3:
	.cfi_restore_state
	lea	rdi, 16[rbp]
	call	GetWBE@PLT
	lea	r14d, 6[rax]
	movsx	r14, r14d
	cmp	r12, r14
	jb	.L34
	mov	edx, DWORD PTR 24[rbp]
	test	dl, -128
	je	.L34
	mov	eax, edx
	mov	DWORD PTR 16[rsp], edx
	and	eax, 248
	mov	DWORD PTR 44[rsp], eax
	cmp	DWORD PTR [rbx], eax
	je	.L34
	mov	rdi, rbx
	call	ps_psm_destroy@PLT
	lea	rdi, 32[rbp]
	call	GetWBE@PLT
	mov	edx, DWORD PTR 16[rsp]
	movsx	r15, eax
	lea	rax, 10[r15]
	cmp	rax, r14
	ja	.L34
	lea	r13, 12[r15]
	add	r15, 16
	cmp	r14, r15
	jbe	.L8
	and	edx, 64
	lea	rax, 8[rbx]
	mov	DWORD PTR 40[rsp], edx
	mov	QWORD PTR 32[rsp], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	add	rdx, 8
	lea	rdi, 0[rbp+r15*4]
	call	ps_parse_descriptors@PLT
.L10:
	lea	r15, 4[r13]
	cmp	r15, r14
	jnb	.L8
.L11:
	mov	eax, DWORD PTR 4[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	lea	esi, 3[rax+rax*2]
	sal	esi, 2
	call	realloc@PLT
	test	rax, rax
	je	.L8
	movsx	rdx, DWORD PTR 4[rbx]
	mov	QWORD PTR 16[rbx], rax
	lea	r8, 0[0+r13*4]
	lea	rdi, 8[rbp+r8]
	mov	QWORD PTR 24[rsp], r8
	lea	esi, 1[rdx]
	lea	rdx, [rdx+rdx*2]
	mov	DWORD PTR 4[rbx], esi
	lea	rdx, [rax+rdx*4]
	mov	eax, DWORD PTR 0[rbp+r13*4]
	mov	QWORD PTR 16[rsp], rdx
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR 4[rbp+r8]
	mov	DWORD PTR 4[rdx], eax
	call	GetWBE@PLT
	movsx	rsi, eax
	lea	r13, 4[r13+rsi]
	cmp	r13, r14
	ja	.L8
	mov	rdx, QWORD PTR 16[rsp]
	mov	eax, DWORD PTR 4[rdx]
	cmp	DWORD PTR PS_STREAM_ID_EXTENDED[rip], eax
	jne	.L9
	mov	ecx, DWORD PTR 40[rsp]
	test	ecx, ecx
	jne	.L9
	cmp	rsi, 2
	jbe	.L8
	mov	r8, QWORD PTR 24[rsp]
	sal	eax, 8
	sub	rsi, 3
	mov	edi, DWORD PTR 24[rbp+r8]
	and	edi, 127
	or	eax, edi
	lea	rdi, 28[rbp+r8]
	mov	DWORD PTR 4[rdx], eax
	mov	rdx, QWORD PTR 32[rsp]
	call	ps_parse_descriptors@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR 44[rsp]
	mov	edx, DWORD PTR PS_TK_COUNT[rip]
	mov	DWORD PTR [rbx], eax
	test	edx, edx
	jle	.L12
	lea	rax, 48[rsp]
	mov	r14, QWORD PTR 8[rsp]
	xor	r15d, r15d
	mov	QWORD PTR 8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR [r14]
	test	eax, eax
	je	.L16
	cmp	QWORD PTR 16[r14], 0
	je	.L16
	mov	esi, DWORD PTR UNKNOWN_ES[rip]
	lea	r13, 56[rsp]
	xor	edx, edx
	mov	rdi, r13
	call	es_format_Init@PLT
	mov	edx, DWORD PTR 24[r14]
	xor	r9d, r9d
	mov	r8, r12
	mov	rdi, QWORD PTR 8[rsp]
	mov	rcx, rbp
	mov	rsi, rbx
	call	ps_track_fill@PLT
	cmp	rax, QWORD PTR VLC_SUCCESS[rip]
	jne	.L16
	mov	rax, QWORD PTR 8[r14]
	cmp	QWORD PTR 56[rsp], rax
	je	.L37
	mov	rsi, QWORD PTR 16[r14]
	mov	rdi, QWORD PTR [rsp]
	lea	r13, 8[r14]
	call	es_out_Del@PLT
	mov	rdi, r13
	call	es_format_Clean@PLT
	mov	DWORD PTR 48[rsp], 1
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r13
	movdqa	xmm0, XMMWORD PTR 48[rsp]
	movdqa	xmm1, XMMWORD PTR 64[rsp]
	movups	XMMWORD PTR [r14], xmm0
	movups	XMMWORD PTR 16[r14], xmm1
	call	es_out_Add@PLT
	mov	QWORD PTR 16[r14], rax
	.p2align 4,,10
	.p2align 3
.L16:
	add	r15d, 1
	add	r14, 32
	cmp	DWORD PTR PS_TK_COUNT[rip], r15d
	jg	.L17
.L12:
	mov	eax, DWORD PTR VLC_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdi, r13
	call	es_format_Clean@PLT
	jmp	.L16
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ps_psm_fill, .-ps_psm_fill
	.comm	VLC_SUCCESS,8,8
	.comm	VLC_EGENERIC,4,4
	.comm	UNKNOWN_ES,4,4
	.comm	PS_TK_COUNT,4,4
	.comm	PS_STREAM_ID_MAP,4,4
	.comm	PS_STREAM_ID_EXTENDED,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_..demuxmpegps.h_ps_psm_fill.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ps_psm_fill, %function
ps_psm_fill:
	@ args = 4, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r6, r2
	sub	sp, sp, #68
	str	r3, [sp, #20]
	ldr	r3, .L43
	cmp	r2, #3
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	ldr	r3, [sp, #104]
	movls	r0, #0
	movhi	r0, #1
	mov	r5, r1
	str	r3, [sp, #16]
	bl	assert
	cmp	r4, #0
	cmpne	r6, #9
	bls	.L39
	ldr	r3, .L43+4
	ldr	r2, [r5, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
.L39:
	ldr	r3, .L43+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L41
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	add	r0, r5, #16
	bl	GetWBE
	add	r8, r0, #6
	cmp	r6, r8
	bcc	.L39
	ldr	r7, [r5, #24]
	tst	r7, #128
	beq	.L39
	ldr	r3, [r4]
	and	r2, r7, #248
	cmp	r3, r2
	str	r2, [sp, #32]
	beq	.L39
	mov	r0, r4
	bl	ps_psm_destroy
	add	r0, r5, #32
	bl	GetWBE
	add	r3, r0, #10
	cmp	r3, r8
	bhi	.L39
	add	r9, r0, #16
	cmp	r8, r9
	add	fp, r0, #12
	bls	.L8
	and	r3, r7, #64
	str	r3, [sp, #24]
	add	r3, r4, #8
	ldr	r10, .L43+12
	str	r3, [sp, #28]
	str	r6, [sp, #36]
	b	.L11
.L9:
	mov	r1, ip
	add	r2, r6, #8
	add	r0, r5, r9, lsl #2
	bl	ps_parse_descriptors
.L10:
	add	r9, fp, #4
	cmp	r9, r8
	bcs	.L37
.L11:
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #12]
	add	r1, r1, #1
	add	r1, r1, r1, lsl #1
	lsl	r1, r1, #2
	bl	realloc
	cmp	r0, #0
	beq	.L37
	ldr	r6, [r4, #4]
	str	r0, [r4, #12]
	add	r2, r6, #1
	str	r2, [r4, #4]
	ldr	r2, [r5, fp, lsl #2]
	add	r6, r6, r6, lsl #1
	str	r2, [r0, r6, lsl #2]
	add	r1, r5, fp, lsl #2
	ldr	ip, [r1, #4]
	lsl	r7, fp, #2
	add	r6, r0, r6, lsl #2
	add	r0, r7, #8
	str	ip, [r6, #4]
	add	r0, r5, r0
	str	r1, [sp, #12]
	bl	GetWBE
	mov	ip, r0
	add	r0, r0, #4
	add	fp, fp, r0
	cmp	fp, r8
	bhi	.L37
	ldr	lr, [r6, #4]
	ldr	r0, [r10]
	ldr	r3, [sp, #24]
	ldr	r1, [sp, #12]
	cmp	r0, lr
	cmpeq	r3, #0
	bne	.L9
	cmp	ip, #2
	bls	.L37
	ldr	r1, [r1, #24]
	add	r0, r7, #28
	and	r1, r1, #127
	orr	lr, r1, lr, lsl #8
	ldr	r2, [sp, #28]
	str	lr, [r6, #4]
	add	r0, r5, r0
	sub	r1, ip, #3
	bl	ps_parse_descriptors
	b	.L10
.L37:
	ldr	r6, [sp, #36]
.L8:
	ldr	r3, [sp, #32]
	ldr	r9, .L43+16
	str	r3, [r4]
	ldr	r3, [r9]
	cmp	r3, #0
	ldrle	fp, .L43+20
	ble	.L12
	mov	r8, #0
	ldr	r3, [sp, #20]
	ldr	fp, .L43+20
	add	r7, r3, #4
	add	r10, sp, #44
.L17:
	ldr	r3, [r7, #-4]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [r7, #4]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L43+24
	mov	r2, #0
	ldr	r1, [r3]
	add	r0, sp, #48
	bl	es_format_Init
	mov	r1, #0
	ldr	r2, [r7, #8]
	mov	r3, r5
	str	r1, [sp, #4]
	mov	r0, r10
	mov	r1, r4
	str	r6, [sp]
	bl	ps_track_fill
	ldr	r3, [fp]
	cmp	r0, r3
	bne	.L16
	ldr	r2, [sp, #48]
	ldr	r3, [r7]
	cmp	r2, r3
	beq	.L42
	ldr	r1, [r7, #4]
	ldr	r0, [sp, #16]
	bl	es_out_Del
	mov	r0, r7
	bl	es_format_Clean
	mov	r3, #1
	sub	ip, r7, #4
	str	r3, [sp, #44]
	ldm	r10, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r1, r7
	ldr	r0, [sp, #16]
	bl	es_out_Add
	str	r0, [r7, #4]
.L16:
	ldr	r3, [r9]
	add	r8, r8, #1
	cmp	r3, r8
	add	r7, r7, #16
	bgt	.L17
.L12:
	ldr	r0, [fp]
	b	.L1
.L42:
	add	r0, sp, #48
	bl	es_format_Clean
	b	.L16
.L41:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC0
	.word	PS_STREAM_ID_MAP
	.word	VLC_EGENERIC
	.word	PS_STREAM_ID_EXTENDED
	.word	PS_TK_COUNT
	.word	VLC_SUCCESS
	.word	UNKNOWN_ES
	.size	ps_psm_fill, .-ps_psm_fill
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	UNKNOWN_ES,4,4
	.comm	PS_TK_COUNT,4,4
	.comm	PS_STREAM_ID_MAP,4,4
	.comm	PS_STREAM_ID_EXTENDED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
