	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function finalize_packet
_finalize_packet:                       ## @finalize_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), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.1:
	movq	%rsi, %r14
	cmpq	%rax, 8(%rsi)
	jne	LBB0_13
## %bb.2:
	movq	%rdx, %r15
	movq	_RTP_NOTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	%rdx, (%rcx)
	je	LBB0_13
## %bb.3:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	cmpq	%rax, %rdi
	je	LBB0_6
## %bb.4:
	movq	72(%rbx), %rax
	cmpl	$2, (%rax)
	jl	LBB0_6
## %bb.5:
	subl	8(%rbx), %r15d
	subq	16(%rbx), %rdi
	movq	64(%rbx), %rax
	movl	8(%rax), %esi
	callq	_av_rescale
	movslq	%r15d, %rcx
	addq	%rax, %rcx
	addq	24(%rbx), %rcx
	addq	32(%rbx), %rcx
	jmp	LBB0_12
LBB0_6:
	movq	40(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r15, 40(%rbx)
	movq	%r15, %rax
LBB0_8:
	movq	48(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.10:
	movq	%r15, %rcx
	subq	%rdx, %rcx
	addq	56(%rbx), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	56(%rbx), %rcx
	addq	%r15, %rcx
LBB0_11:
	movq	%rcx, 56(%rbx)
	movq	%r15, 48(%rbx)
	addq	24(%rbx), %rcx
	subq	%rax, %rcx
LBB0_12:
	movq	%rcx, (%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_RTP_NOTS_VALUE,8,3             ## @RTP_NOTS_VALUE
	.no_dead_strip	_finalize_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function finalize_packet
_finalize_packet:                       ; @finalize_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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.1:
	mov	x19, x1
	ldr	x9, [x1, #8]
Lloh3:
	adrp	x10, _RTP_NOTS_VALUE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RTP_NOTS_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x10, x2, #4, eq
	b.eq	LBB0_12
; %bb.2:
	mov	x20, x0
	ldr	x9, [x0]
	cmp	x9, x8
	b.eq	LBB0_5
; %bb.3:
	ldr	x8, [x20, #72]
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
	ldr	w8, [x20, #8]
	sub	w21, w2, w8
	ldr	x8, [x20, #16]
	sub	x0, x9, x8
	ldr	x8, [x20, #64]
	ldr	w1, [x8, #8]
	bl	_av_rescale
	ldp	x8, x9, [x20, #24]
	add	x10, x0, w21, sxtw
	add	x8, x10, x8
	add	x8, x8, x9
	b	LBB0_11
LBB0_5:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x9, [x20, #48]
	cbz	x9, LBB0_9
LBB0_7:
	ldr	x10, [x20, #56]
	sub	x9, x2, x9
	add	x9, x9, x10
	b	LBB0_10
LBB0_8:
	str	x2, [x20, #40]
	mov	x8, x2
	ldr	x9, [x20, #48]
	cbnz	x9, LBB0_7
LBB0_9:
	ldr	x9, [x20, #56]
	add	x9, x9, x2
LBB0_10:
	stp	x2, x9, [x20, #48]
	ldr	x10, [x20, #24]
	add	x9, x10, x9
	sub	x8, x9, x8
LBB0_11:
	str	x8, [x19]
LBB0_12:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_RTP_NOTS_VALUE,8,3             ; @RTP_NOTS_VALUE
	.no_dead_strip	_finalize_packet
.subsections_via_symbols
