	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_packets
_handle_packets:                        ## @handle_packets
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r14
	movq	_TS_PACKET_SIZE@GOTPCREL(%rip), %rcx
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%rcx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	callq	_avio_tell
	cmpq	(%rbx), %rax
	je	LBB0_10
## %bb.1:
	movq	24(%rbx), %rdi
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_NB_PID_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.2:
	movq	16(%rbx), %rcx
	xorl	%r13d, %r13d
	movq	_MPEGTS_PES@GOTPCREL(%rip), %r8
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rdx), %r12
	movq	%r14, %rbx
	movq	%r15, %r14
	movq	%r8, %r15
	leaq	16(%r12), %rdi
	callq	_av_buffer_unref
	movq	%r15, %r8
	movq	%r14, %r15
	movq	%rbx, %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	$0, 8(%r12)
	movq	_MPEGTS_SKIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	16(%rbx), %rcx
	movq	_NB_PID_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rcx,%r13,8), %rdx
	movq	$-1, 8(%rdx)
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movslq	%eax, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%r13,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rdx), %rsi
	cmpq	(%r8), %rsi
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_MPEGTS_SECTION@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$-1, 16(%rdx)
	jmp	LBB0_4
LBB0_10:
	movl	$0, 8(%rbx)
	movq	_TS_PACKET_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%r15, %r13
	jge	LBB0_17
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	8(%rbx), %eax
	cmpl	$2, %eax
	jge	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$1, %eax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	12(%rbx), %edx
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	-72(%rbp), %rcx
	callq	_read_packet
	testl	%eax, %eax
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_handle_packet
	movl	%eax, %r12d
	movl	12(%rbx), %esi
	movq	%r14, %rdi
	callq	_finished_reading_packet
	incq	%r13
	testl	%r12d, %r12d
	je	LBB0_11
	jmp	LBB0_20
LBB0_17:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_19:
	movl	%eax, %r12d
	jmp	LBB0_20
LBB0_18:
	xorl	%r12d, %r12d
LBB0_20:
	movl	(%r14), %edi
	callq	_avio_tell
	movq	%rax, (%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TS_PACKET_SIZE,4,2             ## @TS_PACKET_SIZE
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skipping after seek\n"

	.comm	_NB_PID_MAX,4,2                 ## @NB_PID_MAX
	.comm	_MPEGTS_PES,8,3                 ## @MPEGTS_PES
	.comm	_MPEGTS_SKIP,4,2                ## @MPEGTS_SKIP
	.comm	_MPEGTS_SECTION,8,3             ## @MPEGTS_SECTION
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_handle_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_packets
_handle_packets:                        ; @handle_packets
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	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]
	stur	x8, [x29, #-88]
	ldr	x20, [x0, #24]
Lloh3:
	adrp	x8, _TS_PACKET_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TS_PACKET_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	add	w8, w9, w8
	lsl	x9, x8, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w0, [x20]
	bl	_avio_tell
	ldr	x8, [x19]
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.1:
	ldr	x0, [x19, #24]
Lloh11:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh16:
	adrp	x25, _NB_PID_MAX@GOTPAGE
Lloh17:
	ldr	x25, [x25, _NB_PID_MAX@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x26, #0
	ldr	x9, [x19, #16]
Lloh18:
	adrp	x27, _MPEGTS_PES@GOTPAGE
Lloh19:
	ldr	x27, [x27, _MPEGTS_PES@GOTPAGEOFF]
Lloh20:
	adrp	x28, _MPEGTS_SKIP@GOTPAGE
Lloh21:
	ldr	x28, [x28, _MPEGTS_SKIP@GOTPAGEOFF]
	movi.2d	v0, #0xffffffffffffffff
Lloh22:
	adrp	x23, _MPEGTS_SECTION@GOTPAGE
Lloh23:
	ldr	x23, [x23, _MPEGTS_SECTION@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x24, [x10, #24]
	add	x0, x24, #16
	bl	_av_buffer_unref
	movi.2d	v0, #0xffffffffffffffff
	str	xzr, [x24, #8]
	ldr	w8, [x28]
	str	w8, [x24]
	ldr	x9, [x19, #16]
	ldr	w8, [x25]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x9, x26, lsl #3]
	str	d0, [x10, #8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, #1
	cmp	x26, w8, sxtw
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x26, lsl #3]
	cbz	x10, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x11, [x10]
	ldr	x12, [x27]
	cmp	x11, x12
	b.eq	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x12, [x23]
	cmp	x11, x12
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w11, #-1
	str	w11, [x10, #16]
	b	LBB0_4
LBB0_10:
	str	wzr, [x19, #8]
Lloh24:
	adrp	x8, _TS_PACKET_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TS_PACKET_SIZE@GOTPAGEOFF]
Lloh26:
	ldrsw	x8, [x8]
	add	x0, x22, x8, lsl #2
Lloh27:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	mov	w24, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cbz	x21, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x24, x21
	b.ge	LBB0_17
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.ge	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, #1
	b.eq	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x19, #12]
	sub	x3, x29, #96
	mov	x0, x20
	mov	x1, x22
	bl	_read_packet
	cbnz	w0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	x1, [x29, #-96]
	mov	x0, x19
	bl	_handle_packet
	mov	x23, x0
	ldr	w1, [x19, #12]
	mov	x0, x20
	bl	_finished_reading_packet
	add	x24, x24, #1
	cbz	w23, LBB0_11
	b	LBB0_20
LBB0_17:
Lloh30:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_18:
	mov	x23, x0
	b	LBB0_20
LBB0_19:
	mov	w23, #0
LBB0_20:
	ldr	w0, [x20]
	bl	_avio_tell
	str	x0, [x19]
	ldur	x8, [x29, #-88]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x23
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_TS_PACKET_SIZE,4,2             ; @TS_PACKET_SIZE
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skipping after seek\n"

	.comm	_NB_PID_MAX,4,2                 ; @NB_PID_MAX
	.comm	_MPEGTS_PES,8,3                 ; @MPEGTS_PES
	.comm	_MPEGTS_SKIP,4,2                ; @MPEGTS_SKIP
	.comm	_MPEGTS_SECTION,8,3             ; @MPEGTS_SECTION
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_handle_packets
.subsections_via_symbols
