	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_rescale_delta               ## -- Begin function av_rescale_delta
	.p2align	4, 0x90
_av_rescale_delta:                      ## @av_rescale_delta
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r12
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpq	%rdx, (%r14)
	setne	%dil
	callq	_av_assert0
	movl	%r13d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_av_assert0
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	cmpq	%rax, (%r12)
	je	LBB0_2
## %bb.3:
	leaq	24(%rbp), %rax
	movq	(%rax), %r12
	movq	8(%rax), %rsi
	movq	%rsi, %rax
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	imulq	%r14, %rax
	movq	%r12, %rcx
	movq	%r15, %rdx
	imulq	%r15, %rcx
	cmpq	%rcx, %rax
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_4
## %bb.6:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%rbx), %edi
	decl	%edi
	movq	_AV_ROUND_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rsi
	movq	%rdx, %r15
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %r8
	callq	_av_rescale_q_rnd
	sarl	%eax
	cltq
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leal	(%rbx,%rbx), %edi
	incl	%edi
	movq	_AV_ROUND_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rsi
	movq	%r15, %r14
	movq	%r15, %rdx
	movq	%r13, %rcx
	movq	%r12, %r15
	movq	%r12, %r8
	callq	_av_rescale_q_rnd
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	incl	%eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	leaq	(%rsi,%rsi), %rax
	subq	%rdx, %rax
	cmpq	%rax, %rdi
	jl	LBB0_7
## %bb.8:
	leaq	(%rdx,%rdx), %rax
	subq	%rsi, %rax
	cmpq	%rax, %rdi
	jle	LBB0_9
LBB0_7:
	movq	%r13, %rcx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r15, %r8
	jmp	LBB0_5
LBB0_2:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	24(%rbp), %rax
	movq	(%rax), %r12
	movq	8(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	%r15, %rdx
	jmp	LBB0_5
LBB0_4:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_5:
	movq	%rbx, %r15
	movq	%rbx, %rdi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rdx, %r14
	callq	_av_rescale_q
	movslq	%r13d, %rcx
	addq	%rax, %rcx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
LBB0_10:
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_rescale_q                   ## TAILCALL
LBB0_9:
	movq	%rcx, %rbx
	callq	_av_clip64
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	addq	%rax, %rcx
	movq	%rcx, (%rbx)
	movq	%rax, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AV_ROUND_DOWN,4,2              ## @AV_ROUND_DOWN
	.comm	_AV_ROUND_UP,4,2                ## @AV_ROUND_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_rescale_delta               ; -- Begin function av_rescale_delta
	.p2align	2
_av_rescale_delta:                      ; @av_rescale_delta
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x26, x2
	mov	x25, x1
	mov	x27, x0
	ldp	x21, x19, [x29, #16]
Lloh0:
	adrp	x28, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x8, [x28]
	cmp	x8, x2
	cset	w0, ne
	bl	_av_assert0
	mvn	w8, w22
	lsr	w0, w8, #31
	bl	_av_assert0
	cbz	w22, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x28]
	cmp	x8, x9
	mul	x8, x19, x27
	mul	x9, x21, x25
	ccmp	x8, x9, #4, ne
	b.le	LBB0_4
; %bb.2:
	lsl	w8, w26, #1
	sub	w0, w8, #1
Lloh2:
	adrp	x8, _AV_ROUND_DOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_ROUND_DOWN@GOTPAGEOFF]
Lloh4:
	ldr	w5, [x8]
	mov	x1, x27
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	bl	_av_rescale_q_rnd
	mov	x28, x0
	asr	w8, w0, #1
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	w0, #1
	bfi	w0, w26, #1, #31
Lloh5:
	adrp	x8, _AV_ROUND_UP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_ROUND_UP@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
	mov	x1, x27
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	bl	_av_rescale_q_rnd
	add	w8, w0, #1
	sbfx	x2, x8, #1, #31
	ldr	x0, [x20]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	sbfiz	x8, x8, #1, #32
	sub	x8, x8, x2
	cmp	x0, x8
	b.lt	LBB0_4
; %bb.3:
	sbfx	x1, x28, #1, #31
	lsl	x8, x2, #1
	sub	x8, x8, x1
	cmp	x0, x8
	b.le	LBB0_6
LBB0_4:
	mov	x0, x26
	mov	x1, x27
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	bl	_av_rescale_q
	add	x8, x0, w22, sxtw
	str	x8, [x20]
	mov	x0, x26
	mov	x1, x27
	mov	x2, x25
LBB0_5:
	mov	x3, x21
	mov	x4, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_av_rescale_q
LBB0_6:
	bl	_av_clip64
	add	x8, x0, w22, sxtw
	str	x8, [x20]
	mov	x1, x24
	mov	x2, x23
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_ROUND_DOWN,4,2              ; @AV_ROUND_DOWN
	.comm	_AV_ROUND_UP,4,2                ; @AV_ROUND_UP
.subsections_via_symbols
