	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_stream_get_type
_hb_stream_get_type:                    ## @hb_stream_get_type
	.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	%rbx
	pushq	%rax
	movl	$32776, %eax                    ## imm = 0x8008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	8(%rdi), %ecx
	leaq	-32800(%rbp), %rdi
	movl	$1, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_fread
	xorl	%r14d, %r14d
	cmpl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_6
## %bb.1:
	leaq	-32800(%rbp), %rdi
	callq	_hb_stream_check_for_ts
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %edx
	sarl	$8, %edx
	movzbl	%al, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_hb_log
	movl	%r15d, (%rbx)
	movq	_transport@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_hb_ts_stream_init
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_hb_stream_check_for_ps
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_log
	movq	_program@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_hb_ps_stream_init
LBB0_5:
	movl	$1, %r14d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, %eax
	addq	$32776, %rsp                    ## imm = 0x8008
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file is MPEG Transport Stream with %d byte packets offset %d bytes"

	.comm	_transport,4,2                  ## @transport
L_.str.1:                               ## @.str.1
	.asciz	"file is MPEG Program Stream"

	.comm	_program,4,2                    ## @program
	.no_dead_strip	_hb_stream_get_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_stream_get_type
_hb_stream_get_type:                    ; @hb_stream_get_type
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	w9, #32800
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #8, lsl #12             ; =32768
	sub	sp, sp, #32
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	w3, [x0, #8]
	add	x0, sp, #24
	mov	w1, #1
	mov	w2, #32768
	bl	_fread
	cmp	w0, #8, lsl #12                 ; =32768
	b.ne	LBB0_6
; %bb.1:
	add	x0, sp, #24
	bl	_hb_stream_check_for_ts
	cbz	w0, LBB0_4
; %bb.2:
	asr	w8, w0, #8
	and	w20, w0, #0xff
	stp	x20, x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
	str	w20, [x19]
Lloh7:
	adrp	x8, _transport@GOTPAGE
Lloh8:
	ldr	x8, [x8, _transport@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_hb_ts_stream_init
	cbnz	x0, LBB0_6
; %bb.3:
	mov	w0, #1
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_hb_stream_check_for_ps
	cbz	x0, LBB0_6
; %bb.5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_hb_log
Lloh12:
	adrp	x8, _program@GOTPAGE
Lloh13:
	ldr	x8, [x8, _program@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_hb_ps_stream_init
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	add	sp, sp, #8, lsl #12             ; =32768
	add	sp, sp, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file is MPEG Transport Stream with %d byte packets offset %d bytes"

	.comm	_transport,4,2                  ; @transport
l_.str.1:                               ; @.str.1
	.asciz	"file is MPEG Program Stream"

	.comm	_program,4,2                    ; @program
	.no_dead_strip	_hb_stream_get_type
.subsections_via_symbols
