	.file	"extr_af_loudnorm.c_detect_peak.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	detect_peak, @function
detect_peak:
.LFB0:
	.cfi_startproc
	endbr64
	imul	esi, ecx
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imul	eax, ecx, 1920
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsd	xmm4, QWORD PTR 8[rdi]
	mov	DWORD PTR [r8], -1
	mov	ebx, DWORD PTR 16[rdi]
	add	ebx, esi
	mov	esi, DWORD PTR 20[rdi]
	mov	QWORD PTR -16[rsp], r8
	add	ebx, eax
	mov	QWORD PTR -88[rsp], rdi
	mov	r8, QWORD PTR [rdi]
	mov	eax, ebx
	mov	DWORD PTR -24[rsp], edx
	sub	eax, esi
	cmp	esi, ebx
	mov	QWORD PTR -8[rsp], r9
	cmovle	ebx, eax
	mov	rax, QWORD PTR FIRST_FRAME[rip]
	cmp	QWORD PTR 24[rdi], rax
	je	.L3
.L6:
	mov	eax, DWORD PTR -24[rsp]
	test	eax, eax
	jle	.L1
	movsx	rax, ecx
	mov	r15d, ecx
	movq	xmm1, QWORD PTR .LC0[rip]
	xor	r14d, r14d
	mov	QWORD PTR -40[rsp], rax
	sal	rax, 3
	sub	r15d, esi
	mov	QWORD PTR -32[rsp], rax
	lea	eax, [rcx+rcx]
	cdqe
	mov	QWORD PTR -48[rsp], rax
.L5:
	lea	r10d, [rcx+rbx]
	test	ecx, ecx
	jle	.L27
	mov	rax, QWORD PTR -88[rsp]
	mov	r11, QWORD PTR -48[rsp]
	lea	r10d, [rcx+rbx]
	mov	r12, QWORD PTR -40[rsp]
	mov	rdi, QWORD PTR 32[rax]
	movsx	rax, ebx
	add	r11, rax
	lea	r13, 0[0+rax*8]
	add	r12, rax
	mov	QWORD PTR -64[rsp], rax
	mov	rax, r11
	mov	QWORD PTR -72[rsp], rdi
	sal	r12, 3
	mov	rdx, rdi
	sal	rax, 3
	mov	QWORD PTR -56[rsp], r13
	sub	r12, rdi
	sub	r13, rdi
	sub	rax, rdi
	mov	QWORD PTR -80[rsp], rax
	mov	eax, ebx
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, [rdx+r13]
	cmp	esi, eax
	jg	.L9
	mov	edi, eax
	sub	edi, esi
	movsx	rdi, edi
	sal	rdi, 3
.L9:
	movsd	xmm0, QWORD PTR [r8+rdi]
	lea	edi, [rcx+rax]
	lea	r9, [rdx+r12]
	andpd	xmm0, xmm1
	cmp	esi, edi
	jg	.L11
	lea	r9d, [r15+rax]
	movsx	r9, r9d
	sal	r9, 3
.L11:
	comisd	xmm0, QWORD PTR [rdx]
	jb	.L12
	movsd	xmm2, QWORD PTR [r8+r9]
	andpd	xmm2, xmm1
	comisd	xmm0, xmm2
	jb	.L12
	test	r14d, r14d
	je	.L12
	comisd	xmm0, xmm4
	ja	.L48
	.p2align 4,,10
	.p2align 3
.L12:
	movsd	QWORD PTR [rdx], xmm0
.L16:
	add	eax, 1
	add	rdx, 8
	cmp	r10d, eax
	jne	.L24
.L27:
	mov	ebx, r10d
	sub	ebx, esi
	cmp	esi, r10d
	cmovg	ebx, r10d
	add	r14d, 1
	cmp	DWORD PTR -24[rsp], r14d
	jne	.L5
.L1:
	pop	rbx
	.cfi_remember_state
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	mov	r11, QWORD PTR -80[rsp]
	mov	DWORD PTR -20[rsp], eax
	add	edi, ecx
	mov	ebp, 10
	mov	rax, QWORD PTR -32[rsp]
	add	r11, rdx
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r9, r11
	cmp	esi, edi
	jg	.L15
	mov	r9d, edi
	sub	r9d, esi
	movsx	r9, r9d
	sal	r9, 3
.L15:
	movsd	xmm2, QWORD PTR [r8+r9]
	andpd	xmm2, xmm1
	comisd	xmm2, xmm0
	ja	.L45
	add	edi, ecx
	add	r11, rax
	sub	ebp, 1
	jne	.L17
	mov	rax, QWORD PTR -64[rsp]
	mov	rdx, QWORD PTR -72[rsp]
	mov	r9d, ebx
	mov	r11, QWORD PTR -56[rsp]
	sub	r9d, esi
	neg	rax
	lea	rdi, [rdx+rax*8]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L22:
	movsd	xmm0, QWORD PTR [r8+r11]
	test	eax, eax
	je	.L18
	movapd	xmm2, xmm0
	andpd	xmm2, xmm1
	comisd	xmm2, xmm3
	jbe	.L19
.L18:
	movapd	xmm3, xmm0
	andpd	xmm3, xmm1
.L19:
	lea	r10d, [rax+rbx]
	mov	rdx, r11
	cmp	esi, r10d
	jg	.L21
	lea	edx, [r9+rax]
	movsx	rdx, edx
	sal	rdx, 3
.L21:
	movsd	xmm0, QWORD PTR [r8+rdx]
	add	eax, 1
	andpd	xmm0, xmm1
	movsd	QWORD PTR [rdi+r11], xmm0
	add	r11, 8
	cmp	ecx, eax
	jne	.L22
	mov	rax, QWORD PTR -16[rsp]
	mov	DWORD PTR [rax], r14d
	mov	rax, QWORD PTR -88[rsp]
	mov	DWORD PTR 40[rax], ebx
	mov	rax, QWORD PTR -8[rsp]
	movsd	QWORD PTR [rax], xmm3
	pop	rbx
	.cfi_remember_state
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore_state
	mov	eax, DWORD PTR -20[rsp]
	jmp	.L16
.L3:
	test	ecx, ecx
	jle	.L6
	mov	rax, QWORD PTR -88[rsp]
	movsx	rdx, ecx
	movq	xmm1, QWORD PTR .LC0[rip]
	lea	r9d, -1[rcx]
	mov	r10, QWORD PTR 32[rax]
	movsx	rax, ebx
	sub	rax, rdx
	lea	rdi, [r8+rax*8]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L7:
	movsd	xmm0, QWORD PTR [rdi+rax*8]
	mov	rdx, rax
	andpd	xmm0, xmm1
	movsd	QWORD PTR [r10+rax*8], xmm0
	add	rax, 1
	cmp	rdx, r9
	jne	.L7
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	detect_peak, .-detect_peak
	.comm	FIRST_FRAME,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	4294967295
	.long	2147483647
	.long	0
	.long	0
	.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_af_loudnorm.c_detect_peak.c"
	.text
	.global	__aeabi_dcmple
	.global	__aeabi_dcmpge
	.global	__aeabi_dcmplt
	.global	__aeabi_dcmpgt
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	detect_peak, %function
detect_peak:
	@ args = 8, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	mvn	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	r5, r0, #8
	ldmia	r5, {r4-r5}
	sub	sp, sp, #84
	mov	lr, r3
	str	r4, [sp, #24]
	str	r5, [sp, #28]
	ldr	r4, [sp, #120]
	str	r0, [sp, #36]
	str	ip, [r4]
	mov	ip, r0
	ldr	r0, [r0, #16]
	ldr	r10, [ip, #20]
	mla	lr, r1, lr, r0
	str	r3, [sp, #32]
	rsb	r3, r3, r3, lsl #4
	add	r3, lr, r3, lsl #7
	cmp	r10, r3
	str	r3, [sp, #16]
	suble	r3, r3, r10
	strle	r3, [sp, #16]
	str	r2, [sp, #44]
	ldr	r3, .L48
	ldr	r2, [sp, #36]
	ldr	r3, [r3]
	ldr	r2, [r2, #24]
	ldr	fp, [ip]
	cmp	r2, r3
	beq	.L3
.L6:
	ldr	r3, [sp, #44]
	cmp	r3, #0
	ble	.L1
	rsb	r3, r10, r10, lsl #29
	lsl	r3, r3, #3
	str	r3, [sp, #56]
	mov	r3, #0
	str	r3, [sp, #20]
	ldr	r3, [sp, #32]
	sub	r3, r3, r10
	str	r3, [sp, #52]
.L5:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	ble	.L46
	ldr	r3, [sp, #36]
	ldr	r2, [sp, #32]
	ldr	r1, [r3, #28]
	ldr	r0, [sp, #52]
	mov	r5, r1
	ldr	r3, [sp, #16]
	str	r1, [sp, #48]
	add	r8, r2, r3
	mov	r6, r3
	sub	r2, r3, r10
	add	r3, r0, r3
	rsb	r2, r1, r2, lsl #3
	rsb	r3, r1, r3, lsl #3
	str	r8, [sp, #40]
	str	r8, [sp, #4]
	str	r2, [sp, #8]
	str	r3, [sp, #12]
.L27:
	cmp	r10, r6
	ldrle	r3, [sp, #8]
	lslgt	r3, r6, #3
	addle	r3, r5, r3
	add	r2, fp, r3
	cmp	r10, r8
	ldr	r4, [r2, #4]
	ldr	r7, [fp, r3]
	ldrle	r3, [sp, #12]
	bic	r4, r4, #-2147483648
	addle	r9, r5, r3
	mov	r2, r7
	ldmia	r5, {r0-r1}
	mov	r3, r4
	lslgt	r9, r8, #3
	bl	__aeabi_dcmple
	cmp	r0, #0
	beq	.L12
	add	ip, fp, r9
	ldr	ip, [ip, #4]
	mov	r0, r7
	mov	r1, r4
	ldr	r2, [fp, r9]
	bic	r3, ip, #-2147483648
	bl	__aeabi_dcmpge
	cmp	r0, #0
	beq	.L12
	add	r1, sp, #24
	ldmia	r1, {r0-r1}
	mov	r3, r4
	mov	r2, r7
	bl	__aeabi_dcmplt
	ldr	r3, [sp, #20]
	subs	r3, r3, #0
	movne	r3, #1
	cmp	r0, #0
	moveq	r3, #0
	cmp	r3, #0
	bne	.L47
.L12:
	mov	r2, r7
	mov	r3, r4
	stm	r5, {r2-r3}
.L18:
	ldr	r3, [sp, #4]
	add	r6, r6, #1
	cmp	r3, r6
	add	r5, r5, #8
	add	r8, r8, #1
	bne	.L27
.L30:
	ldr	r3, [sp, #40]
	ldr	r2, [sp, #44]
	cmp	r10, r3
	str	r3, [sp, #16]
	suble	r3, r3, r10
	strle	r3, [sp, #16]
	ldr	r3, [sp, #20]
	add	r3, r3, #1
	cmp	r2, r3
	str	r3, [sp, #20]
	bne	.L5
.L1:
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L47:
	mov	r2, #10
	ldr	r3, [sp, #32]
	str	r8, [sp, #60]
	add	r9, r3, r8
	str	r5, [sp, #64]
	mov	r8, r2
	mov	r5, r3
	str	r6, [sp, #68]
	ldr	r6, [sp, #56]
.L19:
	cmp	r10, r9
	lslgt	ip, r9, #3
	addle	ip, r6, r9, lsl #3
	add	lr, fp, ip
	ldr	r2, [fp, ip]
	ldr	ip, [lr, #4]
	mov	r0, r7
	mov	r1, r4
	bic	r3, ip, #-2147483648
	bl	__aeabi_dcmplt
	cmp	r0, #0
	bne	.L43
	subs	r8, r8, #1
	add	r9, r9, r5
	bne	.L19
	ldr	r3, [sp, #16]
	ldr	r7, [sp, #48]
	mov	r4, r8
	rsb	r6, r7, r3, lsl #3
	str	r6, [sp, #4]
	ldr	r9, [sp, #72]
	ldr	r6, [sp, #32]
	ldr	r8, [sp, #76]
	add	r5, fp, r3, lsl #3
.L25:
	cmp	r4, #0
	beq	.L20
	ldm	r5, {r0, ip}
	mov	r2, r9
	mov	r3, r8
	bic	r1, ip, #-2147483648
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	beq	.L21
.L20:
	ldr	r8, [r5, #4]
	ldr	r9, [r5]
	bic	r8, r8, #-2147483648
.L21:
	ldr	r3, [sp, #16]
	add	r5, r5, #8
	add	r3, r4, r3
	cmp	r10, r3
	ldrgt	r3, [sp, #4]
	ldrle	r3, [sp, #8]
	add	r4, r4, #1
	add	r1, r7, r3
	ldr	r2, [fp, r1]
	add	r1, fp, r1
	ldr	r1, [r1, #4]
	cmp	r6, r4
	bic	r3, r1, #-2147483648
	stm	r7!, {r2-r3}
	bne	.L25
	mov	r2, r9
	mov	r3, r8
	ldr	r1, [sp, #120]
	ldr	r0, [sp, #20]
	str	r0, [r1]
	ldr	r1, [sp, #36]
	ldr	r0, [sp, #16]
	str	r0, [r1, #32]
	ldr	r1, [sp, #124]
	stm	r1, {r2-r3}
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L43:
	ldr	r8, [sp, #60]
	ldr	r5, [sp, #64]
	ldr	r6, [sp, #68]
	b	.L18
.L3:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	ble	.L6
	ldr	r1, [sp, #16]
	ldr	r2, [sp, #36]
	sub	r3, r1, r3
	ldr	r2, [r2, #28]
	add	r3, fp, r3, lsl #3
	add	ip, fp, r1, lsl #3
.L7:
	ldm	r3, {r0, r1}
	add	r3, r3, #8
	bic	r1, r1, #-2147483648
	cmp	r3, ip
	stm	r2, {r0, r1}
	add	r2, r2, #8
	bne	.L7
	b	.L6
.L46:
	ldr	r2, [sp, #16]
	add	r3, r3, r2
	str	r3, [sp, #40]
	b	.L30
.L49:
	.align	2
.L48:
	.word	FIRST_FRAME
	.size	detect_peak, .-detect_peak
	.comm	FIRST_FRAME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
