	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_ts_stream_find_pids
_hb_ts_stream_find_pids:                ## @hb_ts_stream_find_pids
	.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
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_fseeko
	movl	16(%r14), %edi
	callq	_ftello
	movl	16(%r14), %edi
	sarl	%eax
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_fseeko
	movq	%r14, %rdi
	callq	_align_to_next_packet
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_ts_index_of_video
	shrq	$62, %rax
	notl	%eax
	andl	$2, %eax
	cmpl	$2, %eax
	je	LBB0_14
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r14, %rdi
	callq	_next_packet
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movl	4(%rax), %r12d
	shll	$8, %r12d
	orl	8(%rax), %r12d
	andl	$8191, %r12d                    ## imm = 0x1FFF
	movl	(%r14), %eax
	movl	%r12d, %ecx
	orl	%eax, %ecx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_decode_PAT
	movl	$3, %eax
	cmpl	$2, %eax
	jne	LBB0_1
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jle	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$8, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r14), %eax
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r13
	movslq	%eax, %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_12
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rcx
	cmpq	$0, -8(%rcx,%rbx)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpl	(%rcx,%rbx), %r12d
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_build_program_map
	testq	%rax, %rax
	jle	LBB0_10
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
LBB0_14:
	movq	%r14, %rdi
	callq	_ts_index_of_video
	testq	%rax, %rax
	js	LBB0_15
## %bb.16:
	movl	4(%r14), %esi
	movq	_P@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$-1, %ecx
	xorl	%r9d, %r9d
	callq	_update_ts_streams
	jmp	LBB0_17
LBB0_15:
	movl	$-1, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_ts_stream_find_pids - end of file"

	.comm	_P,4,2                          ## @P
	.no_dead_strip	_hb_ts_stream_find_pids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_ts_stream_find_pids
_hb_ts_stream_find_pids:                ; @hb_ts_stream_find_pids
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseeko
	ldr	w0, [x19, #16]
	bl	_ftello
	ldr	w8, [x19, #16]
	asr	w1, w0, #1
Lloh3:
	adrp	x9, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	mov	x0, x8
	bl	_fseeko
	mov	x0, x19
	bl	_align_to_next_packet
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_ts_index_of_video
	lsr	x8, x0, #62
	mvn	w8, w8
	and	w8, w8, #0x2
	cmp	w8, #2
	b.eq	LBB0_13
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x0, x19
	bl	_next_packet
	cbz	x0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x0
	ldp	w8, w9, [x0, #4]
	orr	w8, w9, w8, lsl #8
	and	w21, w8, #0x1fff
	ldr	w8, [x19]
	orr	w9, w21, w8
	cbnz	w9, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_decode_PAT
	mov	w8, #3
	cmp	w8, #2
	b.ne	LBB0_2
	b	LBB0_13
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, #0
	mov	x23, #0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x19]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x23, x23, #1
	add	x22, x22, #16
	cmp	x23, w8, sxtw
	b.ge	LBB0_1
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x19, #8]
	ldr	x10, [x9, x22]
	cbz	x10, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x9, x9, x22
	ldr	w9, [x9, #8]
	cmp	w21, w9
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x20
	mov	x1, x19
	bl	_build_program_map
	cmp	x0, #0
	b.le	LBB0_7
	b	LBB0_1
LBB0_12:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
LBB0_13:
	mov	x0, x19
	bl	_ts_index_of_video
	tbnz	x0, #63, LBB0_15
; %bb.14:
	ldr	w1, [x19, #4]
Lloh8:
	adrp	x8, _P@GOTPAGE
Lloh9:
	ldr	x8, [x8, _P@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #-1
	mov	x5, #0
	bl	_update_ts_streams
	mov	w0, #0
	b	LBB0_16
LBB0_15:
	mov	w0, #-1
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_ts_stream_find_pids - end of file"

	.comm	_P,4,2                          ; @P
	.no_dead_strip	_hb_ts_stream_find_pids
.subsections_via_symbols
