	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_ts_decode_pkt               ## -- Begin function hb_ts_decode_pkt
	.p2align	4, 0x90
_hb_ts_decode_pkt:                      ## @hb_ts_decode_pkt
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_ts_index_of_video
	movl	%eax, %r12d
	leaq	-84(%rbp), %rdi
	callq	_hb_buffer_list_clear
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.1:
	movl	%ebx, (%r13)
LBB0_2:
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_flush_ts_streams
	leaq	-84(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movl	$1, 16(%r13)
LBB0_4:
	movl	4(%r15), %esi
	andl	$31, %esi
	shll	$8, %esi
	orl	8(%r15), %esi
	movq	%r13, %rdi
	callq	_index_of_pid
	testl	%eax, %eax
	js	LBB0_73
## %bb.5:
	movl	%eax, %r14d
	testb	$-128, 4(%r15)
	jne	LBB0_6
## %bb.8:
	movl	%r12d, -124(%rbp)               ## 4-byte Spill
	movl	12(%r15), %r12d
	movl	%r12d, %ebx
	shrl	$4, %ebx
	andl	$3, %ebx
	cmpl	$3, %ebx
	je	LBB0_13
## %bb.9:
	cmpl	$2, %ebx
	je	LBB0_10
## %bb.11:
	xorl	%r8d, %r8d
	testl	%ebx, %ebx
	jne	LBB0_25
## %bb.12:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rdx
LBB0_7:
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_ts_err
LBB0_73:
	leaq	-84(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_75
## %bb.74:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	16(%r15), %eax
	leal	1(%rax), %r8d
	cmpl	$184, %eax
	jl	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r8d, %ecx
	xorl	%eax, %eax
	callq	_ts_err
	jmp	LBB0_73
LBB0_10:
	movl	$184, %r8d
	jmp	LBB0_16
LBB0_15:
	testl	%eax, %eax
	js	LBB0_25
LBB0_16:
	cmpl	$8, %r8d
	jb	LBB0_25
## %bb.17:
	movl	20(%r15), %eax
	movl	%eax, %ecx
	andl	$16, %ecx
	je	LBB0_25
## %bb.18:
	cmpl	$255, %eax
	jne	LBB0_24
## %bb.19:
	cmpl	$255, 24(%r15)
	jne	LBB0_24
## %bb.20:
	cmpl	$255, 28(%r15)
	jne	LBB0_24
## %bb.21:
	cmpl	$255, 32(%r15)
	jne	LBB0_24
## %bb.22:
	cmpl	$255, 36(%r15)
	jne	LBB0_24
## %bb.23:
	cmpl	$255, 40(%r15)
	je	LBB0_25
LBB0_24:
	movq	%r13, %rdi
	movl	%r8d, -88(%rbp)                 ## 4-byte Spill
	callq	_flush_ts_streams
	leaq	-84(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	movl	24(%r15), %eax
	movl	28(%r15), %ecx
	shll	$25, %eax
	shll	$17, %ecx
	orl	%eax, %ecx
	movl	32(%r15), %eax
	shll	$9, %eax
	movl	36(%r15), %edx
	addl	%edx, %edx
	orl	%eax, %edx
	orl	%ecx, %edx
	movl	40(%r15), %eax
	sarl	$7, %eax
	orl	%edx, %eax
	movl	$1, 20(%r13)
	movq	_TS_HAS_PCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%r13)
	movl	%eax, 24(%r13)
LBB0_25:
	cmpl	$0, 20(%r13)
	je	LBB0_26
LBB0_27:
	movq	40(%r13), %rdx
	movl	%r14d, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movl	4(%r15), %eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	testb	$16, %r12b
	movl	%r8d, -88(%rbp)                 ## 4-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_43
## %bb.28:
	movl	12(%r15), %r12d
	andl	$15, %r12d
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rax,8), %rsi
	cmpl	(%rdx,%rsi,8), %r12d
	jne	LBB0_34
## %bb.29:
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movl	%ebx, -80(%rbp)
	movl	%r8d, -76(%rbp)
	leaq	-72(%rbp), %rdi
	cmpl	$169, %r8d
	jg	LBB0_31
## %bb.30:
	movslq	%r8d, %rax
	leaq	(%r15,%rax,4), %rsi
	addq	$52, %rsi
	movl	$6, %edx
	callq	_memcpy
	jmp	LBB0_32
LBB0_26:
	movq	_TS_HAS_PCR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	jne	LBB0_73
	jmp	LBB0_27
LBB0_31:
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_memset
LBB0_32:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rax,%rcx,8), %rsi
	leaq	-80(%rbp), %rdi
	movl	$8, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_73
## %bb.33:
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	-112(%rbp), %rsi                ## 8-byte Reload
LBB0_34:
	leaq	(%rdx,%rsi,8), %rdi
	testb	$64, -100(%rbp)                 ## 1-byte Folded Reload
	jne	LBB0_40
## %bb.35:
	movl	(%rdi), %eax
	cmpl	$-1, %eax
	je	LBB0_40
## %bb.36:
	cmpl	$0, 16(%rdx,%rsi,8)
	jne	LBB0_40
## %bb.37:
	leal	1(%rax), %ecx
	andl	$15, %ecx
	cmpl	%ecx, %r12d
	je	LBB0_40
## %bb.38:
	cmpl	%eax, %r12d
	je	LBB0_73
## %bb.39:
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	leaq	L_.str.3(%rip), %rsi
	movq	%rdi, -136(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_ts_warn
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	movl	%r12d, (%rdi)
LBB0_40:
	movl	%r12d, (%rdi)
	movq	8(%rdx,%rsi,8), %rdi
	movl	%ebx, (%rdi)
	movl	%r8d, 4(%rdi)
	addq	$8, %rdi
	cmpl	$169, %r8d
	jg	LBB0_42
## %bb.41:
	movslq	%r8d, %rax
	leaq	(%r15,%rax,4), %rsi
	addq	$52, %rsi
	movl	$6, %edx
	callq	_memcpy
	jmp	LBB0_43
LBB0_42:
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_memset
LBB0_43:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_ts_stream_kind
	movq	_P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_73
## %bb.44:
	testb	$64, -100(%rbp)                 ## 1-byte Folded Reload
	jne	LBB0_46
## %bb.45:
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	movslq	%esi, %r12
LBB0_62:
	leaq	(%r15,%r12,4), %rdx
	addq	$16, %rdx
	movl	$184, %ecx
	subl	%esi, %ecx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_hb_ts_stream_append_pkt
	movl	(%r13), %eax
	testl	%eax, %eax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_65
## %bb.63:
	movq	8(%r13), %rdx
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rcx,8), %rcx
	movq	32(%rbx,%rcx,8), %rsi
	movq	(%rdx,%rsi,8), %rdx
	movq	_V@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_65
## %bb.64:
	movq	64(%rbx,%rcx,8), %rcx
	movl	%eax, 8(%rcx)
	movl	$0, (%r13)
LBB0_65:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rax,8), %r12
	cmpl	$0, 20(%rbx,%r12,8)
	je	LBB0_66
LBB0_70:
	movq	40(%rbx,%r12,8), %rax
	testq	%rax, %rax
	jle	LBB0_73
## %bb.71:
	addq	$6, %rax
	cmpq	%rax, 24(%rbx,%r12,8)
	jl	LBB0_73
## %bb.72:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_generate_output_data
	leaq	-84(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	jmp	LBB0_73
LBB0_46:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rax,8), %rbx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	64(%rcx,%rbx,8), %rax
	cmpl	$0, (%rax)
	jle	LBB0_48
## %bb.47:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_generate_output_data
	leaq	-84(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
LBB0_48:
	movl	$0, 20(%rcx,%rbx,8)
	movq	$0, 24(%rcx,%rbx,8)
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	movslq	%esi, %r12
	cmpl	$0, 16(%r15,%r12,4)
	jne	LBB0_51
## %bb.49:
	leaq	(%r15,%r12,4), %rdi
	addq	$16, %rdi
	cmpl	$0, 4(%rdi)
	jne	LBB0_51
## %bb.50:
	cmpl	$1, 8(%rdi)
	jne	LBB0_51
## %bb.52:
	movl	$0, 16(%rcx,%rbx,8)
	cmpl	-124(%rbp), %r14d               ## 4-byte Folded Reload
	jne	LBB0_62
## %bb.53:
	incl	48(%r13)
	cmpl	$0, 20(%r13)
	jne	LBB0_62
## %bb.54:
	cmpq	$0, 32(%r13)
	movl	28(%rdi), %eax
	js	LBB0_55
## %bb.56:
	cmpl	$64, %eax
	jb	LBB0_62
	jmp	LBB0_57
LBB0_51:
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	movq	%rcx, %r14
	callq	_ts_err
	movl	$1, 16(%r14,%rbx,8)
	jmp	LBB0_73
LBB0_66:
	movq	64(%rbx,%r12,8), %rax
	movl	(%rax), %edx
	cmpl	$19, %edx
	jl	LBB0_73
## %bb.67:
	leaq	(%rbx,%r12,8), %r15
	addq	$20, %r15
	movl	4(%rax), %esi
	leaq	(%rbx,%r12,8), %rcx
	addq	$40, %rcx
	movq	%r13, %rdi
	callq	_hb_parse_ps
	testq	%rax, %rax
	je	LBB0_69
## %bb.68:
	movl	$1, (%r15)
	movl	48(%rbx,%r12,8), %eax
	movl	%eax, 56(%rbx,%r12,8)
	jmp	LBB0_70
LBB0_69:
	cmpl	$0, (%r15)
	jne	LBB0_70
	jmp	LBB0_73
LBB0_55:
	cmpl	$63, %eax
	jbe	LBB0_73
LBB0_57:
	leaq	56(%rdi), %rcx
	addq	$36, %rdi
	testb	$64, %al
	cmovneq	%rcx, %rdi
	callq	_pes_timestamp
	movq	32(%r13), %rdx
	movslq	%eax, %rcx
	testq	%rdx, %rdx
	js	LBB0_60
## %bb.58:
	movq	%rcx, %rsi
	subq	%rdx, %rsi
	cmpq	$54000, %rsi                    ## imm = 0xD2F0
	jg	LBB0_60
## %bb.59:
	subq	%rcx, %rdx
	cmpq	$54001, %rdx                    ## imm = 0xD2F1
	jl	LBB0_61
LBB0_60:
	movl	%eax, 24(%r13)
LBB0_61:
	movq	%rcx, 32(%r13)
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_62
LBB0_75:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"packet error bit set"

L_.str.1:                               ## @.str.1
	.asciz	"adaptation code 0"

L_.str.2:                               ## @.str.2
	.asciz	"invalid adapt len %d"

	.comm	_TS_HAS_PCR,4,2                 ## @TS_HAS_PCR
L_.str.3:                               ## @.str.3
	.asciz	"continuity error: got %d expected %d"

	.comm	_P,8,3                          ## @P
L_.str.4:                               ## @.str.4
	.asciz	"missing start code"

	.comm	_V,8,3                          ## @V
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_ts_decode_pkt               ; -- Begin function hb_ts_decode_pkt
	.p2align	2
_hb_ts_decode_pkt:                      ; @hb_ts_decode_pkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	bl	_ts_index_of_video
	mov	x22, x0
	add	x0, sp, #20
	bl	_hb_buffer_list_clear
	cmp	w23, #1
	b.lt	LBB0_2
; %bb.1:
	str	w23, [x19]
LBB0_2:
	cbz	w20, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_flush_ts_streams
	mov	x1, x0
	add	x0, sp, #20
	bl	_hb_buffer_list_append
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_4:
	ldp	w8, w9, [x21, #4]
	ubfiz	w8, w8, #8, #5
	orr	w1, w8, w9
	mov	x0, x19
	bl	_index_of_pid
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	x20, x0
	ldrb	w8, [x21, #4]
	tbnz	w8, #7, LBB0_10
; %bb.6:
	ldr	w23, [x21, #12]
	ubfx	w27, w23, #4, #2
	cmp	w27, #3
	b.eq	LBB0_14
; %bb.7:
	cmp	w27, #2
	b.eq	LBB0_16
; %bb.8:
	cbnz	w27, LBB0_17
; %bb.9:
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_ts_err
LBB0_12:
	add	x0, sp, #20
	bl	_hb_buffer_list_clear
	ldr	x8, [sp, #56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_74
; %bb.13:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_14:
	ldr	w8, [x21, #16]
	add	w24, w8, #1
	cmp	w8, #184
	b.lt	LBB0_18
; %bb.15:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_16:
	mov	w24, #184
	b	LBB0_19
LBB0_17:
	mov	w24, #0
	b	LBB0_28
LBB0_18:
	tbnz	w8, #31, LBB0_28
LBB0_19:
	cmp	w24, #8
	b.lo	LBB0_28
; %bb.20:
	ldr	w8, [x21, #20]
	tbz	w8, #4, LBB0_28
; %bb.21:
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.22:
	ldr	w8, [x21, #24]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.23:
	ldr	w8, [x21, #28]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.24:
	ldr	w8, [x21, #32]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.25:
	ldr	w8, [x21, #36]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.26:
	ldr	w8, [x21, #40]
	cmp	w8, #255
	b.eq	LBB0_28
LBB0_27:
	mov	x0, x19
	bl	_flush_ts_streams
	mov	x1, x0
	add	x0, sp, #20
	bl	_hb_buffer_list_append
	ldp	w8, w9, [x21, #24]
	lsl	w9, w9, #17
	orr	w8, w9, w8, lsl #25
	ldp	w9, w10, [x21, #32]
	orr	w8, w8, w9, lsl #9
	orr	w8, w8, w10, lsl #1
	ldr	w9, [x21, #40]
	orr	w8, w8, w9, asr #7
Lloh12:
	adrp	x9, _TS_HAS_PCR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TS_HAS_PCR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	w10, [x19, #4]
	orr	w9, w10, w9
	str	w9, [x19, #4]
	mov	w9, #1
	stp	w9, w8, [x19, #20]
LBB0_28:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_33
LBB0_29:
	ldr	x25, [x19, #40]
	mov	w26, w20
	ldr	w28, [x21, #4]
	tbz	w23, #4, LBB0_42
; %bb.30:
	ldr	w8, [x21, #12]
	and	w23, w8, #0xf
	mov	w8, #72
	mov	x9, x26
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	madd	x25, x26, x8, x25
	ldr	w8, [x25]
	cmp	w23, w8
	b.ne	LBB0_36
; %bb.31:
	stp	w27, w24, [sp, #24]
	add	x8, sp, #24
	add	x0, x8, #8
	cmp	w24, #169
	b.gt	LBB0_34
; %bb.32:
	add	x8, x21, w24, sxtw #2
	add	x1, x8, #52
	mov	w2, #6
	bl	_memcpy
	b	LBB0_35
LBB0_33:
	ldr	w8, [x19, #4]
Lloh15:
	adrp	x9, _TS_HAS_PCR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TS_HAS_PCR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
	b	LBB0_29
LBB0_34:
	mov	w1, #0
	mov	w2, #6
	bl	_memset
LBB0_35:
	mov	w8, #72
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	madd	x8, x26, x8, x9
	ldr	x1, [x8, #8]
	add	x0, sp, #24
	mov	w2, #8
	bl	_memcmp
	cbz	x0, LBB0_12
LBB0_36:
	tbnz	w28, #6, LBB0_39
; %bb.37:
	ldr	w8, [x25]
	cmn	w8, #1
	b.eq	LBB0_39
; %bb.38:
	mov	w9, #72
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	madd	x9, x26, x9, x10
	ldr	w9, [x9, #16]
	cmp	w9, #0
	add	w9, w8, #1
	and	w3, w9, #0xf
	ccmp	w23, w3, #4, eq
	b.ne	LBB0_65
LBB0_39:
	str	w23, [x25]
	mov	w8, #72
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	madd	x8, x26, x8, x25
	ldr	x8, [x8, #8]
	stp	w27, w24, [x8]
	add	x0, x8, #8
	cmp	w24, #169
	b.gt	LBB0_41
; %bb.40:
	add	x8, x21, w24, sxtw #2
	add	x1, x8, #52
	mov	w2, #6
	bl	_memcpy
	b	LBB0_42
LBB0_41:
	mov	w1, #0
	mov	w2, #6
	bl	_memset
LBB0_42:
	mov	x0, x19
	mov	x1, x20
	bl	_ts_stream_kind
Lloh18:
	adrp	x8, _P@GOTPAGE
Lloh19:
	ldr	x8, [x8, _P@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.43:
	tbnz	w28, #6, LBB0_52
; %bb.44:
	mov	x8, x24
	sxtw	x23, w8
LBB0_45:
	add	x8, x21, x23, lsl #2
	add	x2, x8, #16
	mov	w8, #184
	sub	w3, w8, w24
	mov	x0, x19
	mov	x1, x20
	bl	_hb_ts_stream_append_pkt
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_48
; %bb.46:
	ldr	x9, [x19, #8]
	mov	w10, #72
	madd	x10, x26, x10, x25
	ldr	x10, [x10, #32]
	ldr	x9, [x9, x10, lsl #3]
Lloh21:
	adrp	x10, _V@GOTPAGE
Lloh22:
	ldr	x10, [x10, _V@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_48
; %bb.47:
	mov	w9, #72
	madd	x9, x26, x9, x25
	ldr	x9, [x9, #64]
	str	w8, [x9, #8]
	str	wzr, [x19]
LBB0_48:
	mov	w8, #72
	madd	x21, x26, x8, x25
	ldr	w8, [x21, #20]!
	cbz	w8, LBB0_62
LBB0_49:
	mov	w8, #72
	madd	x8, x26, x8, x25
	ldr	x8, [x8, #40]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.50:
	mov	w9, #72
	madd	x9, x26, x9, x25
	ldr	x9, [x9, #24]
	add	x8, x8, #6
	cmp	x9, x8
	b.lt	LBB0_12
; %bb.51:
	mov	x0, x19
	mov	x1, x20
	bl	_generate_output_data
	mov	x1, x0
	add	x0, sp, #20
	bl	_hb_buffer_list_append
	b	LBB0_12
LBB0_52:
	mov	w8, #72
	madd	x8, x26, x8, x25
	ldr	x8, [x8, #64]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_54
; %bb.53:
	mov	x0, x19
	mov	x1, x20
	bl	_generate_output_data
	mov	x1, x0
	add	x0, sp, #20
	bl	_hb_buffer_list_append
LBB0_54:
	mov	w8, #72
	madd	x8, x26, x8, x25
	str	wzr, [x8, #20]
	str	xzr, [x8, #24]
	add	x8, x21, w24, sxtw #2
	ldr	w9, [x8, #16]!
	cbnz	w9, LBB0_61
; %bb.55:
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_61
; %bb.56:
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.ne	LBB0_61
; %bb.57:
	sxtw	x23, w24
	mov	w9, #72
	madd	x9, x26, x9, x25
	str	wzr, [x9, #16]
	cmp	w20, w22
	b.ne	LBB0_45
; %bb.58:
	ldr	w9, [x19, #48]
	add	w9, w9, #1
	str	w9, [x19, #48]
	ldr	w9, [x19, #20]
	cbnz	w9, LBB0_45
; %bb.59:
	ldr	x10, [x19, #32]
	ldr	w9, [x8, #28]
	tbnz	x10, #63, LBB0_68
; %bb.60:
	cmp	w9, #64
	b.lo	LBB0_45
	b	LBB0_69
LBB0_61:
Lloh24:
	adrp	x2, l_.str.4@PAGE
Lloh25:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_ts_err
	mov	w8, #72
	madd	x8, x26, x8, x25
	mov	w9, #1
	str	w9, [x8, #16]
	b	LBB0_12
LBB0_62:
	mov	w8, #72
	madd	x8, x26, x8, x25
	ldr	x8, [x8, #64]
	ldr	w2, [x8]
	cmp	w2, #19
	b.lt	LBB0_12
; %bb.63:
	ldr	w1, [x8, #4]
	mov	w8, #72
	madd	x8, x26, x8, x25
	add	x3, x8, #40
	mov	x0, x19
	bl	_hb_parse_ps
	cbz	x0, LBB0_67
; %bb.64:
	mov	w8, #1
	str	w8, [x21]
	mov	w8, #72
	madd	x8, x26, x8, x25
	ldr	w9, [x8, #48]
	str	w9, [x8, #56]
	b	LBB0_49
LBB0_65:
	cmp	w23, w8
	b.eq	LBB0_12
; %bb.66:
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_ts_warn
	str	w23, [x25]
	b	LBB0_39
LBB0_67:
	ldr	w8, [x21]
	cbnz	w8, LBB0_49
	b	LBB0_12
LBB0_68:
	cmp	w9, #63
	b.ls	LBB0_12
LBB0_69:
	tst	w9, #0x40
	mov	w9, #56
	mov	w10, #36
	csel	x9, x10, x9, eq
	add	x0, x8, x9
	bl	_pes_timestamp
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x9, [x19, #32]
	sxtw	x8, w0
	tbnz	x9, #63, LBB0_72
; %bb.70:
	mov	w10, #54000
	sub	x11, x8, x9
	cmp	x11, x10
	b.gt	LBB0_72
; %bb.71:
	mov	w10, #54001
	sub	x9, x9, x8
	cmp	x9, x10
	b.lt	LBB0_73
LBB0_72:
	str	w0, [x19, #24]
LBB0_73:
	str	x8, [x19, #32]
	b	LBB0_45
LBB0_74:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"packet error bit set"

l_.str.1:                               ; @.str.1
	.asciz	"adaptation code 0"

l_.str.2:                               ; @.str.2
	.asciz	"invalid adapt len %d"

	.comm	_TS_HAS_PCR,4,2                 ; @TS_HAS_PCR
l_.str.3:                               ; @.str.3
	.asciz	"continuity error: got %d expected %d"

	.comm	_P,8,3                          ; @P
l_.str.4:                               ; @.str.4
	.asciz	"missing start code"

	.comm	_V,8,3                          ; @V
.subsections_via_symbols
