	.file	"extr_ttmlpes.h_ParsePESEncap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ParsePESEncap, @function
ParsePESEncap:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	eax, DWORD PTR VLCDEC_SUCCESS[rip]
	mov	QWORD PTR 24[rsp], rdi
	mov	QWORD PTR 16[rsp], rsi
	mov	QWORD PTR 32[rsp], rdx
	test	rcx, rcx
	je	.L1
	cmp	DWORD PTR [rcx], 6
	mov	rbp, rcx
	jle	.L24
	mov	rax, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR 8[rcx], rax
	je	.L22
	mov	rdi, QWORD PTR 16[rcx]
	call	GetDWBE@PLT
	sal	eax, 16
	mov	ebx, eax
	mov	rax, QWORD PTR 16[rbp]
	lea	rdi, 32[rax]
	call	GetWBE@PLT
	mov	rcx, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR 0[rbp]
	or	eax, ebx
	mov	rsi, QWORD PTR 8[rbp]
	imul	eax, eax, 100
	mov	rbx, QWORD PTR 48[rcx]
	lea	r8d, -7[rdx]
	lea	r14, 56[rcx]
	mov	rdx, rsi
	mov	rcx, QWORD PTR 16[rsp]
	movsx	r15, r8d
	sub	rdx, QWORD PTR VLC_TICK_0[rip]
	mov	QWORD PTR 8[rsp], rbx
	cdqe
	sub	rdx, rax
	mov	QWORD PTR 8[rcx], rdx
	cmp	r15, 2
	jbe	.L6
	test	rbx, rbx
	jle	.L6
	xor	ebx, ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L8:
	cmp	QWORD PTR TTML_GZIP_COMPRESSED_DOCUMENT[rip], r12
	je	.L25
.L10:
	mov	rax, -3
	lea	r14, 24[r14+r13*8]
	add	rbx, 1
	sub	rax, r13
	add	r15, rax
	cmp	QWORD PTR 8[rsp], rbx
	jle	.L15
	cmp	r15, 2
	jbe	.L15
.L13:
	lea	rdi, 8[r14]
	mov	r12, QWORD PTR [r14]
	call	GetWBE@PLT
	movsx	r13, eax
	lea	rax, -3[r15]
	cmp	rax, r13
	jb	.L15
	cmp	QWORD PTR TTML_UNCOMPRESSED_DOCUMENT[rip], r12
	jne	.L8
	mov	rdi, r13
	call	block_Alloc@PLT
	test	rax, rax
	je	.L10
	mov	rdi, QWORD PTR 16[rax]
	lea	rsi, 24[r14]
	mov	rdx, r13
	mov	QWORD PTR 40[rsp], rax
	call	memcpy@PLT
	mov	r9, QWORD PTR 40[rsp]
.L11:
	mov	rsi, rbp
	mov	rdi, r9
	mov	QWORD PTR 40[rsp], r9
	call	block_CopyProperties@PLT
	mov	r9, QWORD PTR 40[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	rax, QWORD PTR 32[rsp]
	mov	rsi, r9
	call	rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, QWORD PTR 8[rbp]
.L6:
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR [rax], rsi
.L22:
	mov	rdi, rbp
	call	block_Release@PLT
	mov	eax, DWORD PTR VLC_SUCCESS[rip]
.L1:
	add	rsp, 56
	.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
.L25:
	.cfi_restore_state
	mov	rdi, QWORD PTR 24[rsp]
	lea	rsi, 24[r14]
	mov	rdx, r13
	call	DecompressTTML@PLT
	mov	r9, rax
	test	rax, rax
	jne	.L11
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, rcx
	call	block_Release@PLT
	mov	eax, DWORD PTR VLC_EGENERIC[rip]
	add	rsp, 56
	.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
	.cfi_endproc
.LFE0:
	.size	ParsePESEncap, .-ParsePESEncap
	.comm	VLC_TICK_0,8,8
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	VLCDEC_SUCCESS,4,4
	.comm	TTML_UNCOMPRESSED_DOCUMENT,8,8
	.comm	TTML_GZIP_COMPRESSED_DOCUMENT,8,8
	.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_ttmlpes.h_ParsePESEncap.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ParsePESEncap, %function
ParsePESEncap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r7, r3, #0
	sub	sp, sp, #20
	str	r0, [sp, #4]
	str	r1, [sp]
	str	r2, [sp, #8]
	beq	.L23
	ldr	r3, [r7]
	cmp	r3, #6
	ble	.L24
	ldr	r3, [sp]
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L21
	ldr	r0, [r7, #8]
	bl	GetDWBE
	ldr	r3, [r7, #8]
	lsl	r9, r0, #16
	add	r0, r3, #16
	bl	GetWBE
	ldr	r5, [r7, #8]
	ldr	r4, [r7]
	ldr	r8, [r5, #24]
	sub	r4, r4, #7
	cmp	r8, #0
	movgt	r6, #0
	movle	r6, #1
	cmp	r4, #2
	orrls	r6, r6, #1
	ldr	r3, .L26
	orr	r0, r9, r0
	ldr	r2, [r3]
	ldr	r3, [r7, #4]
	add	r0, r0, r0, lsl #2
	sub	r2, r3, r2
	add	r0, r0, r0, lsl #2
	sub	r0, r2, r0, lsl #2
	ldr	r2, [sp]
	cmp	r6, #0
	add	r5, r5, #28
	str	r0, [r2, #4]
	bne	.L6
	ldr	r9, .L26+4
	ldr	fp, .L26+8
	str	r7, [sp, #12]
	b	.L13
.L8:
	ldr	r1, [fp]
	cmp	r1, r7
	beq	.L25
.L10:
	mvn	r3, #2
	sub	r3, r3, r10
	add	r4, r4, r3
	cmp	r4, #2
	movhi	r3, #0
	movls	r3, #1
	add	r6, r6, #1
	cmp	r8, r6
	orrle	r3, r3, #1
	add	r2, r10, #3
	cmp	r3, #0
	add	r5, r5, r2, lsl #2
	bne	.L20
.L13:
	mov	r0, r5
	ldr	r7, [r0], #4
	bl	GetWBE
	sub	r1, r4, #3
	cmp	r1, r0
	mov	r10, r0
	bcc	.L20
	ldr	r1, [r9]
	cmp	r1, r7
	bne	.L8
	bl	block_Alloc
	subs	r7, r0, #0
	add	r1, r5, #12
	beq	.L10
	mov	r2, r10
	ldr	r0, [r7, #8]
	bl	memcpy
.L11:
	ldr	r1, [sp, #12]
	mov	r0, r7
	bl	block_CopyProperties
	ldmib	sp, {r0, r3}
	mov	r1, r7
	blx	r3
	b	.L10
.L20:
	ldr	r7, [sp, #12]
	ldr	r3, [r7, #4]
.L6:
	ldr	r2, [sp]
	str	r3, [r2]
.L21:
	mov	r0, r7
	bl	block_Release
	ldr	r3, .L26+12
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	mov	r2, r0
	add	r1, r5, #12
	ldr	r0, [sp, #4]
	bl	DecompressTTML
	subs	r7, r0, #0
	bne	.L11
	b	.L10
.L23:
	ldr	r3, .L26+16
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	mov	r0, r7
	bl	block_Release
	ldr	r3, .L26+20
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	.align	2
.L26:
	.word	VLC_TICK_0
	.word	TTML_UNCOMPRESSED_DOCUMENT
	.word	TTML_GZIP_COMPRESSED_DOCUMENT
	.word	VLC_SUCCESS
	.word	VLCDEC_SUCCESS
	.word	VLC_EGENERIC
	.size	ParsePESEncap, .-ParsePESEncap
	.comm	VLC_TICK_0,4,4
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	VLCDEC_SUCCESS,4,4
	.comm	TTML_UNCOMPRESSED_DOCUMENT,4,4
	.comm	TTML_GZIP_COMPRESSED_DOCUMENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
