#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float frac_pch(float *, float *, float, int /*<<< orphan*/, int, int, int);
void double_ver(float sig_in[], float *pcorr, float pitch, int pmin, int pmax,
                int lmin) {
  int mult;
  float corr, temp_pit;
  mult = 1;
  while (pitch * mult < 30)
    mult++;
  if (mult > 1) {
    temp_pit = pitch * mult;
    temp_pit = frac_pch(sig_in, &corr, temp_pit, 0, pmin, pmax, lmin);
    if (corr < *pcorr)
      *pcorr = corr;
  }
}


x86 assembly (clang, -O0):
<double_ver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movss  -0x14(%rbp),%xmm1
cvtsi2ssl -0x24(%rbp),%xmm0
mulss  %xmm0,%xmm1
movss  0xeb4(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1163 <double_ver+0x53>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1136 <double_ver+0x26>
cmpl   $0x1,-0x24(%rbp)
jle    11cc <double_ver+0xbc>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x24(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0x2c(%rbp),%xmm0
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1030 <frac_pch@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x28(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    11c7 <double_ver+0xb7>
movss  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    11cc <double_ver+0xbc>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_ver>:
push   %rbx
sub    $0x10,%rsp
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
movaps %xmm0,%xmm1
mov    %rsi,%rbx
xor    %eax,%eax
movss  0xed3(%rip),%xmm2
nopl   (%rax)
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
ucomiss %xmm0,%xmm2
ja     1130 <double_ver+0x20>
cmp    $0x2,%eax
jb     1167 <double_ver+0x57>
lea    0xc(%rsp),%rsi
xor    %edx,%edx
call   1030 <frac_pch@plt>
movss  0xc(%rsp),%xmm0
movss  (%rbx),%xmm1
ucomiss %xmm0,%xmm1
jbe    1167 <double_ver+0x57>
movss  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @double_ver(float* %0, float* %1, float %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
%15 = alloca float
store float* %0, float** %7
store float* %1, float** %8
store float %2, float* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 1, i32* %13
br label %16
16: ; preds = %22, %6
%17 = load float, float* %9
%18 = load i32, i32* %13
%19 = sitofp i32 %18 to float
%20 = fmul float %17, %19
%21 = fcmp olt float %20, 3.000000e+01
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = load i32, i32* %13
%24 = add nsw i32 %23, 1
store i32 %24, i32* %13
br label %16
25: ; preds = %16
%26 = load i32, i32* %13
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %47
28: ; preds = %25
%29 = load float, float* %9
%30 = load i32, i32* %13
%31 = sitofp i32 %30 to float
%32 = fmul float %29, %31
store float %32, float* %15
%33 = load float*, float** %7
%34 = load float, float* %15
%35 = load i32, i32* %10
%36 = load i32, i32* %11
%37 = load i32, i32* %12
%38 = call float @frac_pch(float* %33, float* %14, float %34, i32 0, i32 %35, i32 %36, i32 %37)
store float %38, float* %15
%39 = load float, float* %14
%40 = load float*, float** %8
%41 = load float, float* %40
%42 = fcmp olt float %39, %41
br i1 %42, label %43, label %46
43: ; preds = %28
%44 = load float, float* %14
%45 = load float*, float** %8
store float %44, float* %45
br label %46
46: ; preds = %43, %28
br label %47
47: ; preds = %46, %25
ret void
}

LLVM IR (-O2):
define void @double_ver(float* %0, float* nocapture %1, float %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca float
%8 = bitcast float* %7 to i8*
br label %9
9: ; preds = %9, %6
%10 = phi i32 [ 1, %6 ], [ %14, %9 ]
%11 = sitofp i32 %10 to float
%12 = fmul float %11, %2
%13 = fcmp olt float %12, 3.000000e+01
%14 = add nuw nsw i32 %10, 1
br i1 %13, label %9, label %15
15: ; preds = %9
%16 = icmp ugt i32 %10, 1
br i1 %16, label %17, label %23
17: ; preds = %15
%18 = call float @frac_pch(float* %0, float* %7, float %12, i32 0, i32 %3, i32 %4, i32 %5)
%19 = load float, float* %7
%20 = load float, float* %1
%21 = fcmp olt float %19, %20
br i1 %21, label %22, label %23
22: ; preds = %17
store float %19, float* %1
br label %23
23: ; preds = %17, %22, %15
ret void
}