	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpegts_read_packet
_mpegts_read_packet:                    ## @mpegts_read_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movl	$-1, (%rsi)
	movq	%rsi, 8(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_handle_packets
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
LBB0_11:
	testl	%r15d, %r15d
	jne	LBB0_13
LBB0_12:
	movl	(%r14), %r15d
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	sarl	$31, %r15d
	andl	(%rax), %r15d
	jmp	LBB0_13
LBB0_1:
	movq	8(%rbx), %rdi
	callq	_av_packet_unref
	movq	_NB_PID_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.2:
	movq	(%rbx), %rcx
	movq	_MPEGTS_PES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_MPEGTS_PAYLOAD@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%edi, %edi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	cmpq	%rdi, %rax
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdx, (%rbx)
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rbx
	cmpq	%rsi, (%rbx)
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 8(%rbx)
	jle	LBB0_10
## %bb.7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_new_pes_packet
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	_MPEGTS_SKIP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_12
LBB0_8:
	movl	%eax, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_PID_MAX,4,2                 ## @NB_PID_MAX
	.comm	_MPEGTS_PES,8,3                 ## @MPEGTS_PES
	.comm	_MPEGTS_PAYLOAD,8,3             ## @MPEGTS_PAYLOAD
	.comm	_MPEGTS_SKIP,8,3                ## @MPEGTS_SKIP
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_mpegts_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpegts_read_packet
_mpegts_read_packet:                    ; @mpegts_read_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	ldr	x21, [x0]
	mov	w8, #-1
	str	w8, [x1]
	str	x1, [x21, #8]
	mov	x0, x21
	mov	w1, #0
	bl	_handle_packets
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
LBB0_1:
	cbnz	w20, LBB0_13
LBB0_2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w20, w9, w8, asr #31
	b	LBB0_13
LBB0_3:
	ldr	x0, [x21, #8]
	bl	_av_packet_unref
Lloh3:
	adrp	x8, _NB_PID_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NB_PID_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.4:
	ldr	x9, [x21]
Lloh6:
	adrp	x10, _MPEGTS_PES@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MPEGTS_PES@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _MPEGTS_PAYLOAD@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MPEGTS_PAYLOAD@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	cbz	x12, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x12]
	cmp	x13, x10
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x21, [x12, #8]
	ldr	x12, [x21]
	cmp	x12, x11
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x12, [x21, #8]
	cmp	x12, #1
	b.lt	LBB0_5
; %bb.10:
	mov	x0, x21
	mov	x1, x19
	bl	_new_pes_packet
	tbnz	w0, #31, LBB0_12
; %bb.11:
Lloh12:
	adrp	x8, _MPEGTS_SKIP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MPEGTS_SKIP@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_2
LBB0_12:
	mov	x20, x0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_PID_MAX,4,2                 ; @NB_PID_MAX
	.comm	_MPEGTS_PES,8,3                 ; @MPEGTS_PES
	.comm	_MPEGTS_PAYLOAD,8,3             ; @MPEGTS_PAYLOAD
	.comm	_MPEGTS_SKIP,8,3                ; @MPEGTS_SKIP
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_mpegts_read_packet
.subsections_via_symbols
