	.file	"extr_ffplay.c_synchronize_audio.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\n"
	.text
	.p2align 4
	.type	synchronize_audio, @function
synchronize_audio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	call	get_master_sync_type@PLT
	cmp	rax, QWORD PTR AV_SYNC_AUDIO_MASTER[rip]
	jne	.L9
.L2:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	lea	rdi, 48[rbx]
	call	get_clock@PLT
	mov	rdi, rbx
	movsd	QWORD PTR [rsp], xmm0
	call	get_master_clock@PLT
	movsd	xmm2, QWORD PTR [rsp]
	subsd	xmm2, xmm0
	ucomisd	xmm2, xmm2
	jp	.L3
	movapd	xmm0, xmm2
	movsd	QWORD PTR [rsp], xmm2
	call	fabs@PLT
	cmp	rax, QWORD PTR AV_NOSYNC_THRESHOLD[rip]
	jge	.L3
	movsd	xmm1, QWORD PTR [rbx]
	movsd	xmm0, QWORD PTR 8[rbx]
	movsd	xmm2, QWORD PTR [rsp]
	mov	rax, QWORD PTR 16[rbx]
	mulsd	xmm1, xmm0
	cmp	rax, QWORD PTR AUDIO_DIFF_AVG_NB[rip]
	addsd	xmm1, xmm2
	movsd	QWORD PTR [rbx], xmm1
	jge	.L4
	add	rax, 1
	mov	QWORD PTR 16[rbx], rax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	QWORD PTR 16[rbx], 0
	mov	eax, r12d
	mov	QWORD PTR [rbx], 0x000000000
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	movsd	xmm3, QWORD PTR .LC0[rip]
	movsd	QWORD PTR 8[rsp], xmm2
	subsd	xmm3, xmm0
	mulsd	xmm1, xmm3
	movapd	xmm0, xmm1
	movsd	QWORD PTR [rsp], xmm1
	call	fabs@PLT
	mov	r9, QWORD PTR 24[rbx]
	xor	ecx, ecx
	movsd	xmm1, QWORD PTR [rsp]
	movsd	xmm2, QWORD PTR 8[rsp]
	cmp	rax, r9
	jge	.L10
.L5:
	mov	r8d, DWORD PTR 32[rbx]
	mov	esi, DWORD PTR AV_LOG_TRACE[rip]
	movapd	xmm0, xmm2
	xor	edi, edi
	lea	rdx, .LC1[rip]
	call	av_log@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	mov	ecx, DWORD PTR SAMPLE_CORRECTION_PERCENT_MAX[rip]
	movapd	xmm0, xmm2
	movsd	QWORD PTR 8[rsp], xmm1
	mulsd	xmm0, QWORD PTR 40[rbx]
	movsd	QWORD PTR [rsp], xmm2
	lea	eax, 100[rcx]
	imul	eax, r12d
	movsx	rdx, eax
	sar	eax, 31
	cvttsd2si	edi, xmm0
	imul	rdx, rdx, 1374389535
	sar	rdx, 37
	add	edi, r12d
	sub	edx, eax
	mov	eax, 100
	sub	eax, ecx
	imul	eax, r12d
	movsx	rsi, eax
	sar	eax, 31
	imul	rsi, rsi, 1374389535
	sar	rsi, 37
	sub	esi, eax
	call	av_clip@PLT
	mov	r9, QWORD PTR 24[rbx]
	movsd	xmm1, QWORD PTR 8[rsp]
	mov	ecx, eax
	movsd	xmm2, QWORD PTR [rsp]
	sub	ecx, r12d
	mov	r12d, eax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	synchronize_audio, .-synchronize_audio
	.comm	SAMPLE_CORRECTION_PERCENT_MAX,4,4
	.comm	AV_SYNC_AUDIO_MASTER,8,8
	.comm	AV_NOSYNC_THRESHOLD,8,8
	.comm	AV_LOG_TRACE,4,4
	.comm	AUDIO_DIFF_AVG_NB,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.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_ffplay.c_synchronize_audio.c"
	.text
	.global	__aeabi_dsub
	.global	__aeabi_dcmpun
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	synchronize_audio, %function
synchronize_audio:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	mov	fp, r1
	mov	r10, r0
	bl	get_master_sync_type
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L9
.L2:
	mov	r0, fp
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	add	r0, r10, #40
	bl	get_clock
	mov	r4, r0
	mov	r0, r10
	mov	r5, r1
	bl	get_master_clock
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dsub
	mov	r3, r1
	mov	r2, r0
	mov	r4, r0
	mov	r5, r1
	bl	__aeabi_dcmpun
	subs	r3, r0, #0
	str	r3, [sp, #36]
	bne	.L3
	mov	r0, r4
	mov	r1, r5
	bl	fabs
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L3
	ldmia	r10, {r2-r3}
	add	r9, r10, #8
	ldmia	r9, {r8-r9}
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_dmul
	mov	r2, r4
	mov	r3, r5
	bl	__aeabi_dadd
	mov	r6, r0
	mov	r7, r1
	ldr	r2, .L11+8
	ldr	r3, [r10, #16]
	ldr	r2, [r2]
	stm	r10, {r6-r7}
	cmp	r3, r2
	bge	.L4
	mov	r0, fp
	add	r3, r3, #1
	str	r3, [r10, #16]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r0, #0
	mov	r1, #0
	mov	r3, #0
	stm	r10, {r0-r1}
	mov	r0, fp
	str	r3, [r10, #16]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r2, r8
	mov	r3, r9
	mov	r0, #0
	ldr	r1, .L11+12
	bl	__aeabi_dsub
	mov	r3, r7
	mov	r2, r6
	bl	__aeabi_dmul
	mov	r6, r0
	mov	r7, r1
	bl	fabs
	ldr	r3, [r10, #20]
	cmp	r0, r3
	ldrlt	r0, [sp, #36]
	bge	.L10
.L5:
	ldr	r1, [r10, #24]
	str	r6, [sp, #8]
	str	r7, [sp, #12]
	stm	sp, {r4-r5}
	ldr	r2, .L11+16
	str	r0, [sp, #16]
	str	r1, [sp, #20]
	str	r3, [sp, #24]
	ldr	r1, [r2]
	mov	r0, #0
	ldr	r2, .L11+20
	bl	av_log
	b	.L2
.L10:
	add	r3, r10, #32
	ldmia	r3, {r2-r3}
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	bl	__aeabi_d2iz
	ldr	r3, .L11+24
	ldr	r1, .L11+28
	ldr	r3, [r3]
	add	r0, r0, fp
	add	ip, r3, #100
	rsb	r3, r3, #100
	mul	ip, fp, ip
	mul	r3, fp, r3
	smull	lr, r2, r1, ip
	smull	lr, r1, r3, r1
	asr	ip, ip, #31
	asr	r3, r3, #31
	rsb	r2, ip, r2, asr #5
	rsb	r1, r3, r1, asr #5
	bl	av_clip
	mov	r2, r0
	ldr	r3, [r10, #20]
	sub	r0, r0, fp
	mov	fp, r2
	b	.L5
.L12:
	.align	2
.L11:
	.word	AV_SYNC_AUDIO_MASTER
	.word	AV_NOSYNC_THRESHOLD
	.word	AUDIO_DIFF_AVG_NB
	.word	1072693248
	.word	AV_LOG_TRACE
	.word	.LC0
	.word	SAMPLE_CORRECTION_PERCENT_MAX
	.word	1374389535
	.size	synchronize_audio, .-synchronize_audio
	.comm	SAMPLE_CORRECTION_PERCENT_MAX,4,4
	.comm	AV_SYNC_AUDIO_MASTER,4,4
	.comm	AV_NOSYNC_THRESHOLD,4,4
	.comm	AV_LOG_TRACE,4,4
	.comm	AUDIO_DIFF_AVG_NB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
