	.file	"extr_mathematics.c_av_rescale_delta.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	av_rescale_delta
	.type	av_rescale_delta, @function
av_rescale_delta:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r9d
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	cmp	QWORD PTR AV_NOPTS_VALUE[rip], rdx
	mov	rcx, QWORD PTR 120[rsp]
	mov	rsi, QWORD PTR 128[rsp]
	setne	dil
	mov	rax, QWORD PTR 112[rsp]
	mov	QWORD PTR 16[rsp], rcx
	mov	QWORD PTR 24[rsp], rsi
	mov	QWORD PTR 8[rsp], rax
	call	av_assert0@PLT
	mov	edi, ebx
	not	edi
	shr	edi, 31
	call	av_assert0@PLT
	mov	rax, QWORD PTR 8[rsp]
	movsx	rcx, ebx
	mov	rsi, QWORD PTR AV_NOPTS_VALUE[rip]
	mov	QWORD PTR 32[rsp], rcx
	cmp	QWORD PTR [rax], rsi
	je	.L4
	test	ebx, ebx
	je	.L4
	mov	rdx, QWORD PTR 24[rsp]
	mov	rax, QWORD PTR 16[rsp]
	imul	rdx, r12
	imul	rax, r13
	cmp	rdx, rax
	jg	.L8
.L4:
	mov	rcx, r14
	mov	r8, r15
	mov	rsi, r12
	mov	rdx, r13
	mov	rdi, rbp
	call	av_rescale_q@PLT
	mov	rbx, QWORD PTR 8[rsp]
	mov	rsi, r12
	mov	rdx, r13
	add	rax, QWORD PTR 32[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	mov	r8, QWORD PTR 24[rsp]
.L6:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	av_rescale_q@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	r10d, [rbp+rbp]
	mov	rcx, r14
	mov	r8, r15
	mov	rsi, r12
	mov	r9d, DWORD PTR AV_ROUND_DOWN[rip]
	lea	edi, -1[r10]
	mov	rdx, r13
	mov	DWORD PTR 44[rsp], r10d
	call	av_rescale_q_rnd@PLT
	mov	r10d, DWORD PTR 44[rsp]
	mov	rsi, r12
	mov	rdx, r13
	mov	r9d, DWORD PTR AV_ROUND_UP[rip]
	sar	eax
	mov	rcx, r14
	mov	r8, r15
	lea	edi, 1[r10]
	movsx	rbx, eax
	call	av_rescale_q_rnd@PLT
	mov	rsi, QWORD PTR 8[rsp]
	lea	edx, 1[rax]
	lea	rax, [rbx+rbx]
	sar	edx
	mov	rdi, QWORD PTR [rsi]
	movsx	rdx, edx
	sub	rax, rdx
	cmp	rdi, rax
	jl	.L4
	lea	rax, [rdx+rdx]
	sub	rax, rbx
	cmp	rdi, rax
	jg	.L4
	mov	rsi, rbx
	call	av_clip64@PLT
	mov	rbx, QWORD PTR 32[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdx, r15
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR 24[rsp]
	mov	rdi, rax
	add	rbx, rax
	mov	QWORD PTR [rsi], rbx
	mov	rsi, r14
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	av_rescale_delta, .-av_rescale_delta
	.comm	AV_ROUND_UP,4,4
	.comm	AV_ROUND_DOWN,4,4
	.comm	AV_NOPTS_VALUE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mathematics.c_av_rescale_delta.c"
	.text
	.align	2
	.global	av_rescale_delta
	.syntax unified
	.arm
	.fpu softvfp
	.type	av_rescale_delta, %function
av_rescale_delta:
	@ args = 28, pretend = 8, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r2
	ldr	r8, .L7
	sub	sp, sp, #20
	ldr	r2, [r8]
	add	r4, sp, #8
	stm	r4, {r0, r1}
	ldr	r6, [sp, #60]
	subs	r0, r2, r5
	movne	r0, #1
	str	r3, [sp, #52]
	ldr	r7, [sp, #64]
	bl	av_assert0
	mvn	r0, r6
	lsr	r0, r0, #31
	bl	av_assert0
	ldr	r3, [r8]
	ldr	r2, [r7]
	cmp	r6, #0
	cmpne	r2, r3
	beq	.L3
	ldr	r2, [sp, #8]
	ldr	r0, [sp, #72]
	ldr	r3, [sp, #68]
	ldr	r1, [sp, #12]
	mul	r2, r0, r2
	mul	r3, r1, r3
	cmp	r2, r3
	bgt	.L6
.L3:
	ldm	r4, {r1, r2}
	ldr	r0, [sp, #56]
	ldr	r3, [sp, #52]
	str	r0, [sp]
	mov	r0, r5
	bl	av_rescale_q
	ldm	r4, {r1, r2}
	add	r6, r0, r6
	mov	r0, r5
	ldr	r3, [sp, #72]
	str	r6, [r7]
	str	r3, [sp, #56]
	ldr	r3, [sp, #68]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	add	sp, sp, #8
	b	av_rescale_q
.L6:
	ldr	r0, .L7+4
	ldr	r3, [sp, #56]
	ldr	r0, [r0]
	lsl	r9, r5, #1
	ldm	r4, {r1, r2}
	str	r0, [sp, #4]
	str	r3, [sp]
	sub	r0, r9, #1
	ldr	r3, [sp, #52]
	bl	av_rescale_q_rnd
	ldm	r4, {r1, r2}
	mov	r8, r0
	ldr	r0, .L7+8
	ldr	r3, [sp, #56]
	ldr	ip, [r0]
	add	r0, r9, #1
	stm	sp, {r3, ip}
	ldr	r3, [sp, #52]
	bl	av_rescale_q_rnd
	asr	r8, r8, #1
	add	r2, r0, #1
	lsl	r3, r8, #1
	ldr	r0, [r7]
	sub	r3, r3, r2, asr #1
	cmp	r0, r3
	asr	r2, r2, #1
	blt	.L3
	rsb	r3, r8, r2, lsl #1
	cmp	r0, r3
	bgt	.L3
	mov	r1, r8
	bl	av_clip64
	ldr	r3, [sp, #72]
	add	r6, r6, r0
	str	r6, [r7]
	ldr	r2, [sp, #56]
	str	r3, [sp]
	ldr	r1, [sp, #52]
	ldr	r3, [sp, #68]
	bl	av_rescale_q
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	add	sp, sp, #8
	bx	lr
.L8:
	.align	2
.L7:
	.word	AV_NOPTS_VALUE
	.word	AV_ROUND_DOWN
	.word	AV_ROUND_UP
	.size	av_rescale_delta, .-av_rescale_delta
	.comm	AV_ROUND_UP,4,4
	.comm	AV_ROUND_DOWN,4,4
	.comm	AV_NOPTS_VALUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
