	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_ts_stream_getPEStype
_hb_ts_stream_getPEStype:               ## @hb_ts_stream_getPEStype
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	$-300000, %r14d                 ## imm = 0xFFFB6C20
	movq	_TS_HAS_RAP@GOTPCREL(%rip), %r12
	jmp	LBB0_1
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_hb_log
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%r14d
	je	LBB0_24
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_next_packet
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movl	4(%rax), %ecx
	andl	$31, %ecx
	shlq	$8, %rcx
	movslq	8(%rax), %rax
	orq	%rcx, %rax
	cmpq	%rax, 8(%r13)
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	$16, 20(%rbx)
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	12(%rbx), %ecx
	andl	$48, %ecx
	cmpl	$32, %ecx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$48, %ecx
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$7, 16(%rbx)
	jl	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_TS_HAS_PCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r13)
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	testb	$64, 20(%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %ecx
	orl	%ecx, (%r13)
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	testb	$64, 4(%rbx)
	je	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r15, %rax
	jne	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	12(%rbx), %eax
	andl	$48, %eax
	je	LBB0_23
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$32, %eax
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%esi, %esi
	cmpl	$48, %eax
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%rbx), %esi
	cmpl	$184, %esi
	jge	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	incl	%esi
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movslq	%esi, %rax
	cmpl	$0, 16(%rbx,%rax,4)
	jne	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 20(%rbx,%rax,4)
	jne	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, 24(%rbx,%rax,4)
	jne	LBB0_23
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%esi, (%rax)
	jmp	LBB0_25
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_hb_log
	jmp	LBB0_25
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_ts_stream_getPEStype: EOF while searching for PID 0x%x"

	.comm	_TS_HAS_PCR,4,2                 ## @TS_HAS_PCR
	.comm	_TS_HAS_RAP,4,2                 ## @TS_HAS_RAP
L_.str.1:                               ## @.str.1
	.asciz	"hb_ts_stream_getPEStype: invalid adaptation field length %d for PID 0x%x"

	.no_dead_strip	_hb_ts_stream_getPEStype
.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_getPEStype
_hb_ts_stream_getPEStype:               ; @hb_ts_stream_getPEStype
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	w23, #27680
	movk	w23, #65531, lsl #16
Lloh0:
	adrp	x24, _TS_HAS_PCR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TS_HAS_PCR@GOTPAGEOFF]
Lloh2:
	adrp	x25, _TS_HAS_RAP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TS_HAS_RAP@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	x19, [sp]
	mov	x0, x22
	bl	_hb_log
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	adds	w23, w23, #1
	b.hs	LBB0_25
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_next_packet
	cbz	x0, LBB0_24
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w9, [x0, #4]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	lsl	w8, w8, #8
	and	x8, x8, #0x1f00
	orr	x8, x8, x9
	ldr	x9, [x21, #8]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w9, [x0, #20]
	tbz	w9, #4, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x0, #12]
	and	w9, w9, #0x30
	cmp	w9, #32
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #48
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x0, #16]
	cmp	w9, #7
	b.lt	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x24]
	ldr	w10, [x21]
	orr	w9, w10, w9
	str	w9, [x21]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w9, [x0, #20]
	tbz	w9, #6, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x25]
	ldr	w10, [x21]
	orr	w9, w10, w9
	str	w9, [x21]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w9, [x0, #4]
	tbz	w9, #6, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x0, #12]
	ands	w8, w8, #0x30
	b.eq	LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #32
	b.eq	LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #48
	b.ne	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x0, #16]
	cmp	w1, #184
	b.ge	LBB0_1
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w1, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #0
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x0, w8, sxtw #2
	ldr	w9, [x9, #16]
	cbnz	w9, LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x9, w8
	add	x9, x0, x9, lsl #2
	ldr	w10, [x9, #20]
	cbnz	w10, LBB0_2
; %bb.22:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x9, #24]
	cmp	w9, #1
	b.ne	LBB0_2
; %bb.23:
	str	w8, [x20]
	b	LBB0_26
LBB0_24:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_hb_log
LBB0_25:
	mov	x0, #0
LBB0_26:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_ts_stream_getPEStype: EOF while searching for PID 0x%x"

	.comm	_TS_HAS_PCR,4,2                 ; @TS_HAS_PCR
	.comm	_TS_HAS_RAP,4,2                 ; @TS_HAS_RAP
l_.str.1:                               ; @.str.1
	.asciz	"hb_ts_stream_getPEStype: invalid adaptation field length %d for PID 0x%x"

	.no_dead_strip	_hb_ts_stream_getPEStype
.subsections_via_symbols
