	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function demux_mpeg
_demux_mpeg:                            ## @demux_mpeg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_VIDEO_BUF@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rbx
	movq	$0, (%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hb_buffer_list_append
	movq	%rbx, %r14
	testq	%rbx, %rbx
	je	LBB0_25
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_save_chap
	testq	%r12, %r12
	je	LBB0_24
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	js	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_check_mpeg_scr
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%r14)
	movq	16(%r14), %rcx
	testq	%rcx, %rcx
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, %rdx
	subq	8(%r12), %rdx
	jmp	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, (%r12)
	testl	%eax, %eax
	jne	LBB0_11
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 48(%r14)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	24(%r12)
	movq	16(%r14), %rcx
	movq	%rcx, 8(%r12)
	movq	$0, (%r12)
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rcx
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rax
	testq	%rcx, %rcx
	js	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AUDIO_BUF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	(%r13), %rax
	jne	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rdx
	testq	%rdx, %rdx
	js	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %esi
	subl	%edx, %esi
	shlq	$32, %rsi
	movabsq	$-1932735283200001, %rdx        ## imm = 0xFFF9222FFFFFFFFF
	addq	%rdx, %rsi
	movabsq	$-3865470566400002, %rdx        ## imm = 0xFFF2445FFFFFFFFE
	cmpq	%rdx, %rsi
	ja	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	24(%r12)
	movq	%rcx, 8(%r12)
	movq	$0, (%r12)
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, 16(%r12)
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rsi
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rsi
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	subq	%rsi, %rcx
	movl	(%r12), %esi
	movl	%ecx, %edi
	subl	%esi, %edi
	shlq	$32, %rdi
	movabsq	$-115964116992000001, %rsi      ## imm = 0xFE64033FFFFFFFFF
	addq	%rsi, %rdi
	movabsq	$-231928233984000002, %rsi      ## imm = 0xFCC8067FFFFFFFFE
	cmpq	%rsi, %rdi
	ja	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, 40(%r14)
	movq	%rdx, 16(%r14)
	movq	%rdx, 32(%r14)
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	(%r13), %rax
	jne	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_restore_chap
	jmp	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, (%r12)
	cmpq	(%r13), %rax
	jne	LBB0_24
	jmp	LBB0_23
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AUDIO_BUF,8,3                  ## @AUDIO_BUF
	.comm	_VIDEO_BUF,8,3                  ## @VIDEO_BUF
	.no_dead_strip	_demux_mpeg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function demux_mpeg
_demux_mpeg:                            ; @demux_mpeg
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_23
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x26, x0
Lloh0:
	adrp	x23, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _AUDIO_BUF@GOTPAGE
Lloh3:
	ldr	x24, [x24, _AUDIO_BUF@GOTPAGEOFF]
Lloh4:
	adrp	x27, _VIDEO_BUF@GOTPAGE
Lloh5:
	ldr	x27, [x27, _VIDEO_BUF@GOTPAGEOFF]
	mov	x28, #-277901563920385
	movk	x28, #65124, lsl #48
	mov	x25, #-2
	movk	x25, #1663, lsl #32
	movk	x25, #64712, lsl #48
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x22, [x26]
	str	xzr, [x26]
	mov	x0, x21
	mov	x1, x26
	bl	_hb_buffer_list_append
	mov	x26, x22
	cbz	x22, LBB0_23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x26
	bl	_save_chap
	cbz	x20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x26, #8]
	tbnz	x1, #63, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x2, x19
	bl	_check_mpeg_scr
	ldr	x8, [x23]
	str	x8, [x26, #8]
	ldr	x8, [x26, #16]
	tbnz	x8, #63, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x20, #8]
	sub	x9, x8, x9
	str	x9, [x20]
	cbnz	w0, LBB0_10
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
	str	x9, [x20]
	cbnz	w0, LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #48]
	cbz	x8, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #24]
	add	w8, w8, #1
	str	w8, [x20, #24]
	ldr	x8, [x26, #16]
	stp	xzr, x8, [x20]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x26, #24]
	tbnz	x8, #63, LBB0_21
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x24]
	ldr	x11, [x27]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x20, #16]
	tbnz	x10, #63, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w10, w8, w10
	mov	x11, #-243885422936065
	movk	x11, #65529, lsl #48
	add	x10, x11, x10, lsl #32
	mov	x11, #-2
	movk	x11, #17503, lsl #32
	movk	x11, #65522, lsl #48
	cmp	x10, x11
	b.hi	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x20, #24]
	add	w10, w10, #1
	str	w10, [x20, #24]
	stp	xzr, x8, [x20]
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [x20, #16]
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x20, #8]
	ldr	x10, [x23]
	cmp	x11, x10
	b.eq	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [x20]
	sub	x8, x8, x11
	sub	w11, w8, w12
	add	x11, x28, x11, lsl #32
	cmp	x11, x25
	b.hi	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	str	x10, [x26, #16]
	stp	x10, x10, [x26, #32]
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #16]
	ldr	x9, [x26, #24]
	tbz	x8, #63, LBB0_11
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [x20]
LBB0_21:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x27]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.22:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x26
	bl	_restore_chap
	b	LBB0_2
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AUDIO_BUF,8,3                  ; @AUDIO_BUF
	.comm	_VIDEO_BUF,8,3                  ; @VIDEO_BUF
	.no_dead_strip	_demux_mpeg
.subsections_via_symbols
