	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_packet
_write_packet:                          ## @write_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	%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	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	movq	(%rsi), %rbx
	movq	%rbx, -48(%rbp)
	movl	8(%rsi), %r13d
	movl	12(%rsi), %r14d
	addl	%r13d, %r14d
	movl	$16, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r12
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, (%r12)
	cmpq	%rax, (%r15)
	jle	LBB0_3
## %bb.2:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_av_log
LBB0_3:
	movq	-48(%rbp), %rbx
	cmpb	$44, (%rbx)
	jne	LBB0_5
## %bb.4:
	incq	%rbx
	movq	%rbx, -48(%rbp)
LBB0_5:
	cmpq	$0, 16(%r15)
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	$7, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	addq	$7, %rbx
	movq	%rbx, -48(%rbp)
LBB0_8:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	-48(%rbp), %r12
	xorl	%edx, %edx
	cmpb	$44, (%r12)
	sete	%dl
	cmpl	$3600000, %r13d                 ## imm = 0x36EE80
	jl	LBB0_9
## %bb.10:
	movl	$99, %r13d
	movl	$59, %r8d
	movl	$9, %ecx
	movl	$59, %r9d
	jmp	LBB0_11
LBB0_9:
	movslq	%r13d, %rsi
	imulq	$1563749871, %rsi, %rcx         ## imm = 0x5D34EDEF
	movq	%rcx, %rdi
	shrq	$63, %rdi
	shrq	$32, %rcx
	sarl	$17, %ecx
	addl	%edi, %ecx
	imulq	$91625969, %rsi, %rdi           ## imm = 0x57619F1
	movq	%rdi, %rbx
	shrq	$63, %rbx
	shrq	$32, %rdi
	sarl	$7, %edi
	addl	%ebx, %edi
	movslq	%edi, %r8
	imulq	$-2004318071, %r8, %rdi         ## imm = 0x88888889
	shrq	$32, %rdi
	addl	%r8d, %edi
	movl	%edi, %ebx
	shrl	$31, %ebx
	sarl	$5, %edi
	addl	%ebx, %edi
	imull	$60, %edi, %edi
	subl	%edi, %r8d
	imulq	$1374389535, %rsi, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rdi
	shrq	$63, %rdi
	shrq	$32, %rsi
	sarl	$5, %esi
	addl	%edi, %esi
	movslq	%esi, %r9
	imulq	$-2004318071, %r9, %rsi         ## imm = 0x88888889
	shrq	$32, %rsi
	addl	%r9d, %esi
	movl	%esi, %edi
	shrl	$31, %edi
	sarl	$5, %esi
	addl	%edi, %esi
	imull	$60, %esi, %esi
	imull	$100, %r9d, %edi
	subl	%esi, %r9d
	subl	%edi, %r13d
LBB0_11:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	addq	%rdx, %r12
	cmpl	$3600000, %r14d                 ## imm = 0x36EE80
	jl	LBB0_12
## %bb.13:
	movl	$99, %r11d
	movl	$59, %r14d
	movl	$9, %r15d
	movl	$59, %r10d
	jmp	LBB0_14
LBB0_12:
	movslq	%r14d, %r11
	imulq	$91625969, %r11, %rdx           ## imm = 0x57619F1
	movq	%rdx, %rsi
	shrq	$32, %rsi
	imulq	$1374389535, %r11, %rdi         ## imm = 0x51EB851F
	shrq	$63, %rdx
	movq	%rdi, %rbx
	shrq	$63, %rbx
	sarq	$37, %rdi
	sarl	$7, %esi
	addl	%edx, %esi
	addl	%ebx, %edi
	movslq	%esi, %r14
	movslq	%edi, %r10
	imulq	$-2004318071, %r14, %rdx        ## imm = 0x88888889
	imulq	$-2004318071, %r10, %rsi        ## imm = 0x88888889
	shrq	$32, %rdx
	shrq	$32, %rsi
	imulq	$1563749871, %r11, %rdi         ## imm = 0x5D34EDEF
	addl	%r14d, %edx
	addl	%r10d, %esi
	movq	%rdi, %r15
	shrq	$32, %r15
	movq	%r12, %rbx
	movl	%edx, %r12d
	shrl	$31, %r12d
	sarl	$5, %edx
	addl	%r12d, %edx
	movq	%rbx, %r12
	movl	%esi, %ebx
	shrl	$31, %ebx
	sarl	$5, %esi
	addl	%ebx, %esi
	shrq	$63, %rdi
	sarl	$17, %r15d
	imull	$60, %edx, %edx
	imull	$60, %esi, %esi
	imull	$100, %r10d, %ebx
	addl	%edi, %r15d
	subl	%edx, %r14d
	subl	%esi, %r10d
	subl	%ebx, %r11d
LBB0_14:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 16(%rbx)
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rdx, %rsi
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%r12
	pushq	%r11
	pushq	%r10
	pushq	%r14
	pushq	%r15
	pushq	%r13
	callq	_av_asprintf
	addq	$48, %rsp
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, 8(%rsi)
	testl	%eax, %eax
	je	LBB0_15
## %bb.17:
	movq	%rbx, %rdi
	callq	_insert_dialogue
	movl	8(%rbx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_purge_dialogues
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%rsi, %rdi
	callq	_av_free
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected ReadOrder %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Marked="

L_.str.2:                               ## @.str.2
	.asciz	"%s%ld,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s"

L_.str.3:                               ## @.str.3
	.space	1

	.no_dead_strip	_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_packet
_write_packet:                          ; @write_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x20, [x0]
	ldr	x22, [x1]
	str	x22, [sp, #24]
	ldp	w23, w24, [x1, #8]
	mov	w0, #16
	bl	_av_mallocz
	cbz	x0, LBB0_17
; %bb.1:
	mov	x21, x0
	add	x1, sp, #24
	mov	x0, x22
	mov	w2, #10
	bl	_strtol
	str	x0, [x21]
	ldr	x8, [x20]
	cmp	x8, x0
	b.le	LBB0_3
; %bb.2:
	mov	x3, x0
Lloh0:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_3:
	ldr	x22, [sp, #24]
	ldrb	w8, [x22]
	cmp	w8, #44
	b.ne	LBB0_5
; %bb.4:
	add	x22, x22, #1
	str	x22, [sp, #24]
LBB0_5:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
; %bb.6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w2, #7
	bl	_strncmp
	cbnz	w0, LBB0_8
; %bb.7:
	add	x22, x22, #7
	str	x22, [sp, #24]
LBB0_8:
	add	w24, w24, w23
	mov	w25, #61055
	movk	w25, #54, lsl #16
	add	x1, sp, #24
	mov	x0, x22
	mov	w2, #10
	bl	_strtol
	mov	x2, x0
	ldr	x8, [sp, #24]
	mov	x9, x8
	ldrb	w10, [x9], #1
	cmp	w10, #44
	csel	x8, x8, x9, ne
	mov	w11, #60911
	movk	w11, #23860, lsl #16
	mov	w13, #6641
	movk	w13, #1398, lsl #16
	mov	w12, #34953
	movk	w12, #34952, lsl #16
	mov	w9, #60
	mov	w14, #34079
	movk	w14, #20971, lsl #16
	mov	w10, #100
	cmp	w23, w25
	b.le	LBB0_10
; %bb.9:
	mov	w6, #99
	mov	w4, #59
	mov	w3, #9
	mov	w5, #59
	b	LBB0_11
LBB0_10:
	smull	x15, w23, w11
	lsr	x16, x15, #32
	lsr	x15, x15, #63
	add	w3, w15, w16, asr #17
	smull	x15, w23, w13
	lsr	x16, x15, #32
	lsr	x15, x15, #63
	add	w15, w15, w16, asr #7
	smull	x16, w15, w12
	lsr	x16, x16, #32
	add	w16, w16, w15
	asr	w17, w16, #5
	add	w16, w17, w16, lsr #31
	msub	w4, w16, w9, w15
	smull	x15, w23, w14
	lsr	x16, x15, #32
	lsr	x15, x15, #63
	add	w15, w15, w16, asr #5
	smull	x16, w15, w12
	lsr	x16, x16, #32
	add	w16, w16, w15
	asr	w17, w16, #5
	add	w16, w17, w16, lsr #31
	msub	w5, w16, w9, w15
	msub	w6, w15, w10, w23
LBB0_11:
Lloh7:
	adrp	x15, l_.str.1@PAGE
Lloh8:
	add	x15, x15, l_.str.1@PAGEOFF
	cmp	w24, w25
	b.le	LBB0_13
; %bb.12:
	mov	w9, #99
	mov	w11, #59
	mov	w7, #9
	mov	w12, #59
	b	LBB0_14
LBB0_13:
	smull	x13, w24, w13
	smull	x14, w24, w14
	lsr	x16, x13, #32
	lsr	x13, x13, #63
	lsr	x17, x14, #32
	lsr	x14, x14, #63
	add	w13, w13, w16, asr #7
	add	w14, w14, w17, asr #5
	smull	x16, w13, w12
	smull	x12, w14, w12
	lsr	x16, x16, #32
	lsr	x12, x12, #32
	smull	x11, w24, w11
	add	w16, w16, w13
	add	w12, w12, w14
	lsr	x17, x11, #32
	lsr	x11, x11, #63
	asr	w0, w16, #5
	asr	w1, w12, #5
	add	w16, w0, w16, lsr #31
	add	w12, w1, w12, lsr #31
	add	w7, w11, w17, asr #17
	msub	w11, w16, w9, w13
	msub	w12, w12, w9, w14
	msub	w9, w14, w10, w24
LBB0_14:
	ldr	x10, [x20, #16]
Lloh9:
	adrp	x13, l_.str.3@PAGE
Lloh10:
	add	x13, x13, l_.str.3@PAGEOFF
	cmp	x10, #0
	csel	x1, x13, x15, eq
	str	x8, [sp, #16]
	stp	w12, w9, [sp, #4]
	str	w11, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_av_asprintf
	str	w0, [x21, #8]
	cbz	w0, LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x21
	bl	_insert_dialogue
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_purge_dialogues
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	mov	x0, x21
	bl	_av_free
LBB0_17:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected ReadOrder %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Marked="

l_.str.2:                               ; @.str.2
	.asciz	"%s%ld,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s"

l_.str.3:                               ; @.str.3
	.space	1

	.no_dead_strip	_write_packet
.subsections_via_symbols
