	.file	"extr_demux_mkv.c_read_mkv_segment_header.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"segment not found\n"
.LC1:
	.string	"+ a segment...\n"
.LC2:
	.string	"  (skipping)\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"End of file, no further segments.\n"
	.section	.rodata.str1.1
.LC4:
	.string	"Failed to seek in file\n"
	.text
	.p2align 4
	.type	read_mkv_segment_header, @function
read_mkv_segment_header:
.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
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [rdi]
	mov	rbx, QWORD PTR 8[rdi]
	test	rax, rax
	je	.L3
	mov	r14d, DWORD PTR [rax]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, rbx
	call	ebml_read_id@PLT
	cmp	rax, QWORD PTR MATROSKA_ID_SEGMENT[rip]
	jne	.L22
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	MP_DBG@PLT
	mov	rdi, rbx
	call	ebml_read_length@PLT
	mov	rbp, rax
	xor	eax, eax
	cmp	QWORD PTR EBML_UINT_INVALID[rip], rbp
	je	.L6
	mov	rdi, rbx
	call	stream_tell@PLT
	add	rax, rbp
.L6:
	mov	QWORD PTR 0[r13], rax
	test	r14d, r14d
	jle	.L15
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	sub	r14d, 1
	call	MP_DBG@PLT
	mov	rbp, QWORD PTR 0[r13]
	test	rbp, rbp
	jle	.L12
	mov	rdi, rbx
	call	stream_get_size@PLT
	cmp	rbp, rax
	jge	.L1
	mov	rsi, QWORD PTR 0[r13]
	mov	rdi, rbx
	call	stream_seek@PLT
	test	eax, eax
	je	.L23
	mov	rdi, r12
	call	read_ebml_header@PLT
	test	eax, eax
	je	.L1
.L3:
	mov	r15d, DWORD PTR [rbx]
	test	r15d, r15d
	je	.L11
.L12:
	lea	rsi, .LC3[rip]
	mov	rdi, r12
	xor	r15d, r15d
	call	MP_VERBOSE@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L22:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	MP_VERBOSE@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	r15d, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, .LC4[rip]
	mov	rdi, r12
	xor	r15d, r15d
	call	MP_WARN@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	read_mkv_segment_header, .-read_mkv_segment_header
	.comm	MATROSKA_ID_SEGMENT,8,8
	.comm	EBML_UINT_INVALID,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_demux_mkv.c_read_mkv_segment_header.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"segment not found\012\000"
	.align	2
.LC1:
	.ascii	"+ a segment...\012\000"
	.align	2
.LC2:
	.ascii	"  (skipping)\012\000"
	.align	2
.LC3:
	.ascii	"End of file, no further segments.\012\000"
	.align	2
.LC4:
	.ascii	"Failed to seek in file\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_mkv_segment_header, %function
read_mkv_segment_header:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r0]
	mov	r5, r0
	cmp	r6, #0
	mov	r7, r1
	ldr	r4, [r0, #4]
	ldrne	r6, [r6]
	ldr	r9, .L23
	ldr	fp, .L23+4
	ldr	r10, .L23+8
	sub	sp, sp, #12
	b	.L3
.L11:
	mov	r0, r4
	bl	ebml_read_id
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L21
	mov	r1, fp
	mov	r0, r5
	bl	MP_DBG
	mov	r0, r4
	bl	ebml_read_length
	ldr	r2, [r10]
	mov	r3, r0
	cmp	r2, r0
	moveq	r3, r8
	str	r0, [sp, #4]
	beq	.L6
	mov	r0, r4
	bl	stream_tell
	ldr	r3, [sp, #4]
	add	r3, r0, r3
.L6:
	cmp	r6, #0
	str	r3, [r7]
	ble	.L15
	mov	r0, r5
	ldr	r1, .L23+12
	bl	MP_DBG
	ldr	r3, [r7]
	sub	r6, r6, #1
	cmp	r3, #0
	ble	.L12
	mov	r0, r4
	str	r3, [sp, #4]
	bl	stream_get_size
	ldr	r3, [sp, #4]
	cmp	r3, r0
	bge	.L1
	mov	r0, r4
	ldr	r1, [r7]
	bl	stream_seek
	subs	r3, r0, #0
	mov	r0, r5
	beq	.L22
	bl	read_ebml_header
	cmp	r0, #0
	beq	.L1
.L3:
	ldr	r8, [r4]
	cmp	r8, #0
	beq	.L11
.L12:
	mov	r0, r5
	ldr	r1, .L23+16
	bl	MP_VERBOSE
	mov	r8, #0
.L1:
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	mov	r0, r5
	ldr	r1, .L23+20
	bl	MP_VERBOSE
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r8, #1
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r8, r3
	ldr	r1, .L23+24
	bl	MP_WARN
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	.align	2
.L23:
	.word	MATROSKA_ID_SEGMENT
	.word	.LC1
	.word	EBML_UINT_INVALID
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC4
	.size	read_mkv_segment_header, .-read_mkv_segment_header
	.comm	MATROSKA_ID_SEGMENT,4,4
	.comm	EBML_UINT_INVALID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
