	.file	"extr_dvdread.c_Demux.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"read failed for block %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"DVDRead could not read block %d."
	.section	.rodata.str1.1
.LC2:
	.string	"Playback failure"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"Failed next title, trying another: %i"
	.align 8
.LC4:
	.string	"i_pack_len >= 1024 (%i). This shouldn't happen!"
	.align 8
.LC5:
	.string	"read failed for %d/%d blocks at 0x%02x"
	.align 8
.LC6:
	.string	"DVDRead could not read %d/%d blocks at 0x%02x."
	.text
	.p2align 4
	.type	Demux, @function
Demux:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -56
	mov	r15, QWORD PTR [rdi]
	xor	edi, edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 64[r15]
	test	eax, eax
	sete	dil
	call	unlikely@PLT
	mov	r14d, DWORD PTR VLC_DEMUXER_EOF[rip]
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR DVD_VIDEO_LB_LEN[rip]
	imul	eax, DWORD PTR DVD_BLOCK_READ_ONCE[rip]
	mov	rcx, rsp
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L5
.L36:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L36
.L5:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L6
	or	QWORD PTR -8[rsp+rdx], 0
.L6:
	mov	r14d, DWORD PTR [r15]
	mov	r13, rsp
	test	r14d, r14d
	je	.L37
.L7:
	mov	rax, QWORD PTR 48[r15]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR 8[r15], rax
	jl	.L20
	mov	ebx, DWORD PTR 16[r15]
	mov	eax, DWORD PTR 20[r15]
	lea	r14, .LC3[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L38:
	add	ebx, 1
	xor	edx, edx
	mov	ecx, -1
	mov	rdi, r12
	mov	esi, ebx
	call	DvdReadSetArea@PLT
	cmp	rax, QWORD PTR VLC_SUCCESS[rip]
	je	.L20
	mov	edx, ebx
	mov	rsi, r14
	mov	rdi, r12
	xor	eax, eax
	call	msg_Err@PLT
	mov	eax, DWORD PTR 20[r15]
	cmp	eax, ebx
	jle	.L19
.L18:
	cmp	ebx, eax
	jl	.L38
.L20:
	mov	esi, DWORD PTR DVD_BLOCK_READ_ONCE[rip]
	mov	edi, DWORD PTR [r15]
	call	__MIN@PLT
	sub	DWORD PTR [r15], eax
	mov	rsi, QWORD PTR 24[r15]
	mov	rcx, r13
	mov	edi, DWORD PTR 40[r15]
	mov	edx, eax
	mov	ebx, eax
	call	DVDReadBlocks@PLT
	mov	r14d, eax
	cmp	ebx, eax
	jne	.L39
	cdqe
	xor	ebx, ebx
	add	QWORD PTR 24[r15], rax
	add	QWORD PTR 32[r15], rax
	test	r14d, r14d
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR DVD_VIDEO_LB_LEN[rip]
	mov	rdi, r12
	mov	eax, edx
	imul	eax, ebx
	add	ebx, 1
	cdqe
	lea	rsi, 0[r13+rax*4]
	call	DemuxBlock@PLT
	cmp	r14d, ebx
	jne	.L22
.L23:
	mov	r14d, 1
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L40
	lea	rsp, -40[rbp]
	mov	eax, r14d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	mov	rsi, QWORD PTR 56[r15]
	mov	edi, DWORD PTR 40[r15]
	mov	rcx, r13
	mov	edx, 1
	call	DVDReadBlocks@PLT
	cmp	eax, 1
	jne	.L41
	mov	edx, DWORD PTR DVD_VIDEO_LB_LEN[rip]
	mov	rsi, r13
	mov	rdi, r12
	call	DemuxBlock@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	DvdReadHandleDSI@PLT
	mov	rax, QWORD PTR 48[r15]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR 8[r15], rax
	jl	.L13
	mov	ebx, DWORD PTR 16[r15]
	mov	eax, DWORD PTR 20[r15]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	add	ebx, 1
	xor	edx, edx
	mov	ecx, -1
	mov	rdi, r12
	mov	esi, ebx
	call	DvdReadSetArea@PLT
	cmp	rax, QWORD PTR VLC_SUCCESS[rip]
	je	.L13
	mov	edx, ebx
	lea	rsi, .LC3[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Err@PLT
	mov	eax, DWORD PTR 20[r15]
	cmp	eax, ebx
	jle	.L19
.L12:
	cmp	ebx, eax
	jl	.L42
.L13:
	mov	edx, DWORD PTR [r15]
	cmp	edx, 1023
	jg	.L43
	add	QWORD PTR 24[r15], 1
	add	QWORD PTR 32[r15], 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	xor	r14d, r14d
	jmp	.L1
.L43:
	lea	rsi, .LC4[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Err@PLT
	jmp	.L1
.L41:
	mov	edx, DWORD PTR 56[r15]
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	xor	eax, eax
	mov	r14d, -1
	call	msg_Err@PLT
	lea	rdi, .LC1[rip]
	mov	rbx, QWORD PTR 56[r15]
	call	_@PLT
	lea	rdi, .LC2[rip]
	mov	r13d, eax
	call	_@PLT
	mov	ecx, ebx
	mov	edx, r13d
	mov	rdi, r12
	mov	esi, eax
	xor	eax, eax
	call	vlc_dialog_display_error@PLT
	jmp	.L1
.L39:
	mov	r8, QWORD PTR 24[r15]
	mov	edx, eax
	mov	ecx, ebx
	lea	rsi, .LC5[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Err@PLT
	lea	rdi, .LC6[rip]
	mov	r15, QWORD PTR 24[r15]
	call	_@PLT
	lea	rdi, .LC2[rip]
	mov	r13d, eax
	call	_@PLT
	mov	ecx, r14d
	mov	r9, r15
	mov	r8d, ebx
	mov	esi, eax
	mov	edx, r13d
	mov	rdi, r12
	xor	eax, eax
	call	vlc_dialog_display_error@PLT
	mov	r14d, -1
	jmp	.L1
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Demux, .-Demux
	.comm	VLC_SUCCESS,8,8
	.comm	VLC_DEMUXER_EOF,4,4
	.comm	DVD_VIDEO_LB_LEN,4,4
	.comm	DVD_BLOCK_READ_ONCE,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_dvdread.c_Demux.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"read failed for block %d\000"
	.align	2
.LC1:
	.ascii	"Playback failure\000"
	.align	2
.LC2:
	.ascii	"DVDRead could not read block %d.\000"
	.align	2
.LC3:
	.ascii	"Failed next title, trying another: %i\000"
	.align	2
.LC4:
	.ascii	"i_pack_len >= 1024 (%i). This shouldn't happen!\000"
	.align	2
.LC5:
	.ascii	"read failed for %d/%d blocks at 0x%02x\000"
	.align	2
.LC6:
	.ascii	"DVDRead could not read %d/%d blocks at 0x%02x.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Demux, %function
Demux:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r7, [r0]
	mov	r6, r0
	ldr	r0, [r7, #36]
	ldr	r3, .L43
	clz	r0, r0
	lsr	r0, r0, #5
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	unlikely
	subs	r5, r0, #0
	bne	.L36
	ldr	r8, .L43+4
	ldr	r2, .L43+8
	ldr	r3, [r8]
	ldr	r2, [r2]
	ldr	r0, [r7]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r3, sp, #8
	cmp	r0, #0
	str	r3, [fp, #-48]
	beq	.L37
.L4:
	ldr	r3, [r7, #28]
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L17
	ldr	r4, [r7, #8]
	ldr	r3, [r7, #12]
	ldr	r9, .L43+12
	ldr	r10, .L43+16
	b	.L15
.L28:
	add	r4, r4, #1
	mvn	r3, #0
	mov	r1, r4
	mov	r2, #0
	mov	r0, r6
	bl	DvdReadSetArea
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L34
	mov	r2, r4
	mov	r1, r10
	mov	r0, r6
	bl	msg_Err
	ldr	r3, [r7, #12]
	cmp	r3, r4
	ble	.L1
.L15:
	cmp	r4, r3
	blt	.L28
.L34:
	ldr	r0, [r7]
.L17:
	ldr	r3, .L43+8
	ldr	r1, [r3]
	bl	__MIN
	ldr	r3, [r7]
	mov	r9, r0
	sub	r3, r3, r0
	mov	r2, r0
	str	r3, [r7]
	ldr	r1, [r7, #16]
	ldr	r3, [fp, #-48]
	ldr	r0, [r7, #24]
	bl	DVDReadBlocks
	cmp	r9, r0
	mov	r4, r0
	bne	.L38
	ldr	r2, [r7, #16]
	ldr	r3, [r7, #20]
	cmp	r0, #0
	add	r2, r2, r0
	add	r3, r3, r0
	str	r2, [r7, #16]
	str	r3, [r7, #20]
	ldrgt	r7, [fp, #-48]
	ble	.L20
.L19:
	ldr	r2, [r8]
	mov	r0, r6
	mul	r1, r5, r2
	add	r5, r5, #1
	add	r1, r7, r1, lsl #2
	bl	DemuxBlock
	cmp	r4, r5
	bne	.L19
.L20:
	mov	r5, #1
.L1:
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L37:
	mov	r2, #1
	ldr	r1, [r7, #32]
	ldr	r0, [r7, #24]
	bl	DVDReadBlocks
	cmp	r0, #1
	bne	.L40
	ldr	r4, [fp, #-48]
	ldr	r2, [r8]
	mov	r1, r4
	mov	r0, r6
	bl	DemuxBlock
	mov	r1, r4
	mov	r0, r6
	bl	DvdReadHandleDSI
	ldr	r3, [r7, #28]
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L10
	ldr	r4, [r7, #8]
	ldr	r3, [r7, #12]
	ldr	r9, .L43+12
	ldr	r10, .L43+16
	b	.L9
.L41:
	add	r4, r4, #1
	mvn	r3, #0
	mov	r1, r4
	mov	r2, #0
	mov	r0, r6
	bl	DvdReadSetArea
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L10
	mov	r2, r4
	mov	r1, r10
	mov	r0, r6
	bl	msg_Err
	ldr	r3, [r7, #12]
	cmp	r3, r4
	ble	.L1
.L9:
	cmp	r4, r3
	blt	.L41
.L10:
	ldr	r0, [r7]
	cmp	r0, #1024
	bge	.L42
	ldr	r2, [r7, #16]
	ldr	r3, [r7, #20]
	add	r2, r2, #1
	add	r3, r3, #1
	str	r2, [r7, #16]
	str	r3, [r7, #20]
	b	.L4
.L36:
	ldr	r3, .L43+20
	ldr	r5, [r3]
	b	.L1
.L42:
	mov	r2, r0
	ldr	r1, .L43+24
	mov	r0, r6
	bl	msg_Err
	mov	r5, #0
	b	.L1
.L38:
	ldr	r2, [r7, #16]
	mov	r3, r9
	ldr	r1, .L43+28
	str	r2, [sp]
	mov	r2, r0
	mov	r0, r6
	bl	msg_Err
	ldr	r0, .L43+32
	bl	_
	mov	r5, r0
	ldr	r0, .L43+36
	bl	_
	ldr	r3, [r7, #16]
	mov	r2, r0
	mov	r1, r5
	str	r3, [sp, #4]
	mov	r0, r6
	mov	r3, r4
	str	r9, [sp]
	bl	vlc_dialog_display_error
	mvn	r5, #0
	b	.L1
.L40:
	ldr	r2, [r7, #32]
	ldr	r1, .L43+40
	mov	r0, r6
	bl	msg_Err
	ldr	r0, .L43+32
	bl	_
	mov	r4, r0
	ldr	r0, .L43+44
	bl	_
	mov	r1, r4
	mov	r2, r0
	ldr	r3, [r7, #32]
	mov	r0, r6
	bl	vlc_dialog_display_error
	mvn	r5, #0
	b	.L1
.L39:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC7
	.word	DVD_VIDEO_LB_LEN
	.word	DVD_BLOCK_READ_ONCE
	.word	VLC_SUCCESS
	.word	.LC3
	.word	VLC_DEMUXER_EOF
	.word	.LC4
	.word	.LC5
	.word	.LC1
	.word	.LC6
	.word	.LC0
	.word	.LC2
	.size	Demux, .-Demux
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_DEMUXER_EOF,4,4
	.comm	DVD_VIDEO_LB_LEN,4,4
	.comm	DVD_BLOCK_READ_ONCE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
