	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_packet
_handle_packet:                         ## @handle_packet
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	4(%rsi), %r14
	movq	%r14, %rdi
	callq	_AV_RB16
	movl	%eax, %r15d
	andl	$8191, %r15d                    ## imm = 0x1FFF
	movl	4(%r12), %r13d
	andl	$64, %r13d
	movq	40(%rbx), %rax
	movq	(%rax,%r15,8), %r10
	cmpq	$0, 48(%rbx)
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	testq	%r10, %r10
	jne	LBB0_4
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$-1, %edx
	callq	_add_pes_stream
	movq	40(%rbx), %rax
	movq	(%rax,%r15,8), %r10
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	testq	%r10, %r10
	je	LBB0_68
## %bb.5:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%r10, %rbx
	callq	_discard_pid
	movq	%rbx, %r10
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	jne	LBB0_68
	jmp	LBB0_9
LBB0_6:
	movq	40(%r10), %rax
	testq	%rax, %rax
	jne	LBB0_68
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movl	12(%r12), %edx
	testb	$48, %dl
	je	LBB0_68
## %bb.10:
	testb	$32, %dl
	jne	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_12:
	cmpl	$0, 16(%r12)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
## %bb.14:
	movb	20(%r12), %al
	shrb	$7, %al
	jmp	LBB0_15
LBB0_13:
	xorl	%eax, %eax
LBB0_15:
	movl	%edx, %r9d
	andl	$15, %r9d
	movl	(%r10), %ecx
	leal	1(%rcx), %r8d
	andl	$15, %r8d
	testb	$16, %dl
	cmovel	%ecx, %r8d
	cmpl	$8191, %r15d                    ## imm = 0x1FFF
	je	LBB0_17
## %bb.16:
	testb	%al, %al
	jne	LBB0_17
## %bb.18:
	movl	%r9d, (%r10)
	movb	$1, %al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	js	LBB0_22
## %bb.19:
	cmpl	%r9d, %r8d
	je	LBB0_22
## %bb.20:
	movq	24(%r14), %rdi
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	%r15d, %ecx
	xorl	%eax, %eax
	movq	%r10, %rbx
	callq	_av_log
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %r10
	movq	8(%rbx), %rax
	movq	_MPEGTS_PES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	movq	32(%r10), %rax
	movq	_AV_PKT_FLAG_CORRUPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_22
LBB0_17:
	movl	%r9d, (%r10)
	movb	$1, %al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
LBB0_22:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testb	$-128, (%rax)
	je	LBB0_25
## %bb.23:
	movq	24(%r14), %rdi
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, %r14d
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	movq	%r10, %rbx
	callq	_av_log
	movl	%r14d, %edx
	movq	%rbx, %r10
	movq	8(%rbx), %rax
	movq	_MPEGTS_PES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.24:
	movq	32(%r10), %rax
	movq	_AV_PKT_FLAG_CORRUPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
LBB0_25:
	leaq	16(%r12), %r14
	testb	$32, %dl
	je	LBB0_29
## %bb.26:
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	leaq	-80(%rbp), %rdi
	leaq	-76(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r10, %rbx
	callq	_parse_pcr
	movq	%rbx, %r10
	testq	%rax, %rax
	jne	LBB0_28
## %bb.27:
	imull	$300, -80(%rbp), %eax           ## imm = 0x12C
	addl	-76(%rbp), %eax
	movl	%eax, 16(%r10)
LBB0_28:
	movslq	(%r14), %rax
	leaq	(%r14,%rax,4), %r14
	addq	$4, %r14
	movl	-64(%rbp), %edx                 ## 4-byte Reload
LBB0_29:
	movq	_TS_PACKET_SIZE@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rax
	leaq	(%r12,%rax,4), %rbx
	cmpq	%rbx, %r14
	jae	LBB0_67
## %bb.30:
	andl	$16, %edx
	je	LBB0_67
## %bb.31:
	movq	%rsi, %r12
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r10, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	24(%r14), %rax
	movl	16(%rax), %edi
	callq	_avio_tell
	movl	%eax, %r11d
	testl	%eax, %eax
	js	LBB0_33
## %bb.32:
	xorl	%edi, %edi
	cmpl	(%r12), %r11d
	setge	%dil
	movl	%r11d, %r12d
	callq	_av_assert0
	movl	%r12d, %r11d
	movl	%r12d, %eax
	movq	_TS_PACKET_SIZE@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, 4(%r14)
LBB0_33:
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	movq	8(%r9), %rax
	movq	_MPEGTS_SECTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_64
## %bb.34:
	testl	%r13d, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_40
## %bb.35:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %r13
	addq	$4, %rcx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	subq	%rcx, %rbx
	sarq	$2, %rbx
	cmpq	%r13, %rbx
	jl	LBB0_67
## %bb.36:
	movq	%rcx, %r12
	testl	%r13d, %r13d
	sete	%al
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	xorb	$1, %cl
	orb	%al, %cl
	jne	LBB0_38
## %bb.37:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r9, %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	xorl	%r8d, %r8d
	movl	%r11d, %ebx
	callq	_write_section_data
	movl	%ebx, %r11d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	40(%rax), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_68
LBB0_38:
	leaq	(%r12,%r13,4), %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_43
## %bb.39:
	subq	%rdx, %rcx
	shrq	$2, %rcx
	movq	%r14, %rdi
	movq	%r9, %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	$1, %r8d
	jmp	LBB0_42
LBB0_64:
	movq	_MPEGTS_PES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_67
## %bb.65:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	subq	%rsi, %rbx
	shrq	$2, %rbx
	movl	20(%rax), %eax
	subl	%eax, %r11d
	movq	%r9, %rdi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%r11d, %r8d
	callq	*24(%r9)
	testl	%eax, %eax
	jns	LBB0_67
## %bb.66:
	movl	%eax, %r14d
	jmp	LBB0_68
LBB0_40:
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_43
## %bb.41:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	subq	%rdx, %rbx
	shrq	$2, %rbx
	movq	%r14, %rdi
	movq	%r9, %rsi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
LBB0_42:
	movl	%r11d, %ebx
	callq	_write_section_data
	movl	%ebx, %r11d
LBB0_43:
	movq	24(%r14), %rdi
	movq	_AVFMTCTX_NOHEADER@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rdi)
	je	LBB0_67
## %bb.44:
	cmpq	$0, 8(%r14)
	jle	LBB0_45
LBB0_67:
	xorl	%r14d, %r14d
LBB0_68:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_45:
	movl	16(%r14), %eax
	movl	$0, %r14d
	testl	%eax, %eax
	jle	LBB0_68
## %bb.46:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx), %rdx
	xorl	%ecx, %ecx
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rcx,4)
	je	LBB0_50
## %bb.48:                              ##   in Loop: Header=BB0_47 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_47
## %bb.49:
	movl	%eax, %ecx
LBB0_50:
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	jne	LBB0_68
## %bb.51:
	movl	4(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_52
## %bb.53:
	movq	8(%rdi), %rsi
	cmpl	$1, %r8d
	jne	LBB0_55
## %bb.54:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	LBB0_57
LBB0_52:
	xorl	%eax, %eax
	jmp	LBB0_59
LBB0_55:
	movl	%r8d, %r10d
	andl	$-2, %r10d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	xorl	%eax, %eax
LBB0_56:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdx,8), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	$1, %ebx
	shll	%cl, %ebx
	testl	%ecx, %ecx
	cmovsl	%r9d, %ebx
	movq	8(%rsi,%rdx,8), %rcx
	orl	%eax, %ebx
	movq	(%rcx), %rax
	movl	(%rax), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	testl	%ecx, %ecx
	cmovsl	%r9d, %eax
	orl	%ebx, %eax
	addq	$2, %rdx
	cmpq	%rdx, %r10
	jne	LBB0_56
LBB0_57:
	testb	$1, %r8b
	je	LBB0_59
## %bb.58:
	movq	(%rsi,%rdx,8), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	$1, %edx
	shll	%cl, %edx
	xorl	%esi, %esi
	testl	%ecx, %ecx
	cmovnsl	%edx, %esi
	orl	%esi, %eax
LBB0_59:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_62
## %bb.60:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jb	LBB0_63
## %bb.61:
	xorl	%r14d, %r14d
	cmpl	$100000, %r11d                  ## imm = 0x186A0
	jle	LBB0_68
	jmp	LBB0_63
LBB0_62:
	xorl	%r14d, %r14d
	cmpl	$100001, %r11d                  ## imm = 0x186A1
	jl	LBB0_68
LBB0_63:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_av_log
	movl	(%r15), %eax
	notl	%eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rcx
	andl	%eax, (%rcx)
	jmp	LBB0_68
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Continuity check failed for pid %d expected %d got %d\n"

	.comm	_MPEGTS_PES,8,3                 ## @MPEGTS_PES
	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ## @AV_PKT_FLAG_CORRUPT
L_.str.1:                               ## @.str.1
	.asciz	"Packet had TEI flag set; marking as corrupt\n"

	.comm	_TS_PACKET_SIZE,4,2             ## @TS_PACKET_SIZE
	.comm	_MPEGTS_SECTION,8,3             ## @MPEGTS_SECTION
	.comm	_AVFMTCTX_NOHEADER,4,2          ## @AVFMTCTX_NOHEADER
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
L_.str.2:                               ## @.str.2
	.asciz	"All programs have pmt, headers found\n"

	.no_dead_strip	_handle_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_packet
_handle_packet:                         ; @handle_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x1
	mov	x19, x0
	add	x24, x1, #4
	mov	x0, x24
	bl	_AV_RB16
	and	w22, w0, #0x1fff
	ldr	w8, [x20, #4]
	and	w23, w8, #0x40
	ldp	x8, x9, [x19, #40]
	ldr	x21, [x8, w22, uxtw #3]
	cmp	x9, #0
	ccmp	x21, #0, #0, ne
	ccmp	w23, #0, #4, eq
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #-1
	bl	_add_pes_stream
	ldr	x8, [x19, #40]
	ldr	x21, [x8, x22, lsl #3]
LBB0_2:
	cbz	x21, LBB0_44
; %bb.3:
	cbz	w23, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x22
	bl	_discard_pid
	str	x0, [x21, #40]
	cbnz	x0, LBB0_44
	b	LBB0_6
LBB0_5:
	ldr	x0, [x21, #40]
	cbnz	x0, LBB0_44
LBB0_6:
	str	w22, [x19]
	ldr	w25, [x20, #12]
	tst	w25, #0x30
	b.eq	LBB0_44
; %bb.7:
	tbz	w25, #5, LBB0_10
; %bb.8:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_10
; %bb.9:
	ldrb	w8, [x20, #20]
	lsr	w10, w8, #7
	b	LBB0_11
LBB0_10:
	mov	w10, #0
LBB0_11:
	and	w8, w25, #0xf
	ldr	w11, [x21]
	add	w9, w11, #1
	and	w9, w9, #0xf
	tst	w25, #0x10
	csel	w9, w9, w11, ne
	mov	w12, #8191
	cmp	w22, w12
	b.eq	LBB0_17
; %bb.12:
	cbnz	w10, LBB0_17
; %bb.13:
	str	w8, [x21]
	mov	w26, #1
	tbnz	w11, #31, LBB0_18
; %bb.14:
	cmp	w9, w8
	b.eq	LBB0_18
; %bb.15:
	ldr	x0, [x19, #24]
Lloh0:
	adrp	x10, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x10]
	stp	x9, x8, [sp, #8]
	mov	x8, x22
	str	x8, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _MPEGTS_PES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MPEGTS_PES@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.16:
	mov	w26, #0
	ldr	x8, [x21, #32]
Lloh8:
	adrp	x9, _AV_PKT_FLAG_CORRUPT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_PKT_FLAG_CORRUPT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
	ldrb	w8, [x24]
	tbnz	w8, #7, LBB0_19
	b	LBB0_22
LBB0_17:
	str	w8, [x21]
	mov	w26, #1
LBB0_18:
	ldrb	w8, [x24]
	tbz	w8, #7, LBB0_22
LBB0_19:
	ldr	x0, [x19, #24]
Lloh11:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	ldr	x8, [x21, #8]
Lloh16:
	adrp	x9, _MPEGTS_PES@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MPEGTS_PES@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.20:
	ldr	x8, [x21, #32]
Lloh19:
	adrp	x9, _AV_PKT_FLAG_CORRUPT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AV_PKT_FLAG_CORRUPT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
	b	LBB0_22
LBB0_21:
	mov	w26, #0
	ldrb	w8, [x24]
	tbnz	w8, #7, LBB0_19
LBB0_22:
	add	x24, x20, #16
	tbz	w25, #5, LBB0_26
; %bb.23:
	add	x0, sp, #28
	add	x1, sp, #24
	mov	x2, x20
	bl	_parse_pcr
	cbnz	x0, LBB0_25
; %bb.24:
	ldp	w10, w8, [sp, #24]
	mov	w9, #300
	madd	w8, w8, w9, w10
	str	w8, [x21, #16]
LBB0_25:
	ldrsw	x8, [x24]
	add	x8, x24, x8, lsl #2
	add	x24, x8, #4
LBB0_26:
	mov	w0, #0
Lloh22:
	adrp	x28, _TS_PACKET_SIZE@GOTPAGE
Lloh23:
	ldr	x28, [x28, _TS_PACKET_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x28]
	add	x27, x20, x8, lsl #2
	cmp	x24, x27
	b.hs	LBB0_45
; %bb.27:
	tbz	w25, #4, LBB0_45
; %bb.28:
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #16]
	bl	_avio_tell
	mov	x20, x0
	tbnz	w0, #31, LBB0_30
; %bb.29:
	ldr	w8, [x28]
	cmp	w20, w8
	cset	w0, ge
	bl	_av_assert0
	ldr	w8, [x28]
	sub	w8, w20, w8
	str	w8, [x19, #4]
LBB0_30:
	ldr	x8, [x21, #8]
Lloh24:
	adrp	x9, _MPEGTS_SECTION@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MPEGTS_SECTION@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_37
; %bb.31:
	cbz	w23, LBB0_39
; %bb.32:
	ldrsw	x23, [x24], #4
	sub	x8, x27, x24
	cmp	x23, x8, asr #2
	b.gt	LBB0_44
; %bb.33:
	cmp	w23, #0
	cset	w8, eq
	eor	w9, w26, #0x1
	orr	w8, w9, w8
	tbnz	w8, #0, LBB0_35
; %bb.34:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x24
	mov	x3, x23
	mov	w4, #0
	bl	_write_section_data
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x22, lsl #3]
	cbz	x8, LBB0_44
LBB0_35:
	add	x2, x24, x23, lsl #2
	cmp	x2, x27
	b.hs	LBB0_42
; %bb.36:
	sub	x8, x27, x2
	lsr	x3, x8, #2
	mov	x0, x19
	mov	x1, x21
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #1
	b	LBB0_41
LBB0_37:
Lloh27:
	adrp	x9, _MPEGTS_PES@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MPEGTS_PES@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_44
; %bb.38:
	ldr	x8, [x21, #24]
	sub	x9, x27, x24
	lsr	x2, x9, #2
	ldr	w9, [x19, #20]
	sub	w4, w20, w9
	mov	x0, x21
	mov	x1, x24
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x23
	blr	x8
	tbz	w0, #31, LBB0_44
	b	LBB0_45
LBB0_39:
	cbz	w26, LBB0_42
; %bb.40:
	sub	x8, x27, x24
	lsr	x3, x8, #2
	mov	x0, x19
	mov	x1, x21
	mov	x2, x24
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #0
LBB0_41:
	bl	_write_section_data
LBB0_42:
	ldr	x0, [x19, #24]
	ldr	w8, [x0]
Lloh30:
	adrp	x21, _AVFMTCTX_NOHEADER@GOTPAGE
Lloh31:
	ldr	x21, [x21, _AVFMTCTX_NOHEADER@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_44
; %bb.43:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	b.le	LBB0_46
LBB0_44:
	mov	w0, #0
LBB0_45:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_46:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_44
; %bb.47:
	mov	x9, #0
	ldr	x10, [x19, #32]
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cbz	w11, LBB0_51
; %bb.49:                               ;   in Loop: Header=BB0_48 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_48
; %bb.50:
	mov	x9, x8
LBB0_51:
	cmp	w9, w8
	b.ne	LBB0_44
; %bb.52:
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_55
; %bb.53:
	ldr	x9, [x0, #8]
	cmp	w8, #4
	b.hs	LBB0_56
; %bb.54:
	mov	x10, #0
	mov	w11, #0
	b	LBB0_59
LBB0_55:
	mov	w11, #0
	b	LBB0_61
LBB0_56:
	mov	w13, #0
	mov	w14, #0
	mov	w12, #0
	mov	w11, #0
	and	x10, x8, #0xfffffffc
	add	x15, x9, #16
	mov	w16, #1
	mov	x17, x10
LBB0_57:                                ; =>This Inner Loop Header: Depth=1
	ldp	x1, x2, [x15, #-16]
	ldp	x3, x4, [x15], #32
	ldr	x1, [x1]
	ldr	x2, [x2]
	ldr	x3, [x3]
	ldr	x4, [x4]
	ldr	w1, [x1]
	ldr	w2, [x2]
	ldr	w3, [x3]
	lsl	w5, w16, w1
	lsl	w6, w16, w2
	lsl	w7, w16, w3
	ldr	w4, [x4]
	lsl	w22, w16, w4
	cmp	w1, #0
	csel	w1, wzr, w5, lt
	cmp	w2, #0
	csel	w2, wzr, w6, lt
	cmp	w3, #0
	csel	w3, wzr, w7, lt
	cmp	w4, #0
	csel	w4, wzr, w22, lt
	orr	w13, w1, w13
	orr	w14, w2, w14
	orr	w12, w3, w12
	orr	w11, w4, w11
	subs	x17, x17, #4
	b.ne	LBB0_57
; %bb.58:
	orr	w13, w14, w13
	orr	w12, w12, w13
	orr	w11, w11, w12
	cmp	x10, x8
	b.eq	LBB0_61
LBB0_59:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
	mov	w10, #1
LBB0_60:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9], #8
	ldr	x12, [x12]
	ldr	w12, [x12]
	lsl	w13, w10, w12
	cmp	w12, #0
	csel	w12, wzr, w13, lt
	orr	w11, w12, w11
	subs	x8, x8, #1
	b.ne	LBB0_60
LBB0_61:
Lloh32:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	lsr	w8, w11, w8
	tbz	w8, #0, LBB0_63
; %bb.62:
Lloh35:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	lsr	w8, w11, w8
	tbnz	w8, #0, LBB0_64
LBB0_63:
	mov	w8, #34464
	movk	w8, #1, lsl #16
	cmp	w20, w8
	b.le	LBB0_44
LBB0_64:
Lloh38:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.2@PAGE
Lloh42:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
	mov	w0, #0
	ldr	w8, [x21]
	ldr	x9, [x19, #24]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
	b	LBB0_45
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Continuity check failed for pid %d expected %d got %d\n"

	.comm	_MPEGTS_PES,8,3                 ; @MPEGTS_PES
	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ; @AV_PKT_FLAG_CORRUPT
l_.str.1:                               ; @.str.1
	.asciz	"Packet had TEI flag set; marking as corrupt\n"

	.comm	_TS_PACKET_SIZE,4,2             ; @TS_PACKET_SIZE
	.comm	_MPEGTS_SECTION,8,3             ; @MPEGTS_SECTION
	.comm	_AVFMTCTX_NOHEADER,4,2          ; @AVFMTCTX_NOHEADER
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
l_.str.2:                               ; @.str.2
	.asciz	"All programs have pmt, headers found\n"

	.no_dead_strip	_handle_packet
.subsections_via_symbols
