#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 */
double fabs(double);
int /*<<< orphan*/ memcpy(double *, double *, int);
void makeprotfreqs(double *eigm, double **probm, double *freqaa) {
  int i, mineig;
  mineig = 0;
  for (i = 0; i <= 19; i++)
    if (fabs(eigm[i]) < fabs(eigm[mineig]))
      mineig = i;
  memcpy(freqaa, probm[mineig], 20 * sizeof(double));
  for (i = 0; i <= 19; i++)
    freqaa[i] = fabs(freqaa[i]);
}


x86 assembly (clang, -O0):
<makeprotfreqs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x13,-0x1c(%rbp)
jg     118f <makeprotfreqs+0x7f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xeb0(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe98(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    117c <makeprotfreqs+0x6c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1181 <makeprotfreqs+0x71>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1132 <makeprotfreqs+0x22>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0xa0,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x13,-0x1c(%rbp)
jg     11ed <makeprotfreqs+0xdd>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe32(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b0 <makeprotfreqs+0xa0>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeprotfreqs>:
push   %rbx
mov    %rdx,%rbx
xor    %eax,%eax
movapd 0xee2(%rip),%xmm0
xor    %ecx,%ecx
jmp    113c <makeprotfreqs+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%ecx
add    $0x2,%rax
cmp    $0x14,%rax
je     117c <makeprotfreqs+0x6c>
movsd  (%rdi,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movslq %ecx,%rdx
movsd  (%rdi,%rdx,8),%xmm2
andpd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
mov    %eax,%edx
ja     115b <makeprotfreqs+0x4b>
mov    %ecx,%edx
movsd  0x8(%rdi,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movslq %edx,%rcx
movsd  (%rdi,%rcx,8),%xmm2
andpd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
jbe    1130 <makeprotfreqs+0x20>
lea    0x1(%rax),%ecx
jmp    1132 <makeprotfreqs+0x22>
movslq %ecx,%rax
mov    (%rsi,%rax,8),%rsi
mov    %rbx,%rdi
mov    $0xa0,%edx
call   1030 <memcpy@plt>
movaps 0xe69(%rip),%xmm0
movups (%rbx),%xmm1
movups 0x10(%rbx),%xmm2
movups 0x20(%rbx),%xmm3
movups 0x30(%rbx),%xmm4
andps  %xmm0,%xmm1
movups %xmm1,(%rbx)
andps  %xmm0,%xmm2
movups %xmm2,0x10(%rbx)
andps  %xmm0,%xmm3
movups %xmm3,0x20(%rbx)
andps  %xmm0,%xmm4
movups %xmm4,0x30(%rbx)
movups 0x40(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x40(%rbx)
movups 0x50(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x50(%rbx)
movups 0x60(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x60(%rbx)
movups 0x70(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x70(%rbx)
movups 0x80(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x80(%rbx)
movups 0x90(%rbx),%xmm1
andps  %xmm0,%xmm1
movups %xmm1,0x90(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @makeprotfreqs(double* %0, double** %1, double* %2) {
%4 = alloca double*
%5 = alloca double**
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %4
store double** %1, double*** %5
store double* %2, double** %6
store i32 0, i32* %8
store i32 0, i32* %7
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %7
%11 = icmp sle i32 %10, 19
br i1 %11, label %12, label %32
12: ; preds = %9
%13 = load double*, double** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = call double @llvm.fabs.f64(double %17)
%19 = load double*, double** %4
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = call double @llvm.fabs.f64(double %23)
%25 = fcmp olt double %18, %24
br i1 %25, label %26, label %28
26: ; preds = %12
%27 = load i32, i32* %7
store i32 %27, i32* %8
br label %28
28: ; preds = %26, %12
br label %29
29: ; preds = %28
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %9
32: ; preds = %9
%33 = load double*, double** %6
%34 = load double**, double*** %5
%35 = load i32, i32* %8
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double*, double** %34, i64 %36
%38 = load double*, double** %37
%39 = call i32 @memcpy(double* %33, double* %38, i32 160)
store i32 0, i32* %7
br label %40
40: ; preds = %54, %32
%41 = load i32, i32* %7
%42 = icmp sle i32 %41, 19
br i1 %42, label %43, label %57
43: ; preds = %40
%44 = load double*, double** %6
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
%48 = load double, double* %47
%49 = call double @llvm.fabs.f64(double %48)
%50 = load double*, double** %6
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %49, double* %53
br label %54
54: ; preds = %43
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %40
57: ; preds = %40
ret void
}

LLVM IR (-O2):
define void @makeprotfreqs(double* nocapture %0, double** nocapture %1, double* %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ 0, %3 ], [ %28, %4 ]
%6 = phi i32 [ 0, %3 ], [ %27, %4 ]
%7 = getelementptr inbounds double, double* %0, i64 %5
%8 = load double, double* %7
%9 = tail call double @llvm.fabs.f64(double %8)
%10 = sext i32 %6 to i64
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
%13 = tail call double @llvm.fabs.f64(double %12)
%14 = fcmp olt double %9, %13
%15 = trunc i64 %5 to i32
%16 = select i1 %14, i32 %15, i32 %6
%17 = or i64 %5, 1
%18 = getelementptr inbounds double, double* %0, i64 %17
%19 = load double, double* %18
%20 = tail call double @llvm.fabs.f64(double %19)
%21 = sext i32 %16 to i64
%22 = getelementptr inbounds double, double* %0, i64 %21
%23 = load double, double* %22
%24 = tail call double @llvm.fabs.f64(double %23)
%25 = fcmp olt double %20, %24
%26 = trunc i64 %17 to i32
%27 = select i1 %25, i32 %26, i32 %16
%28 = add nuw nsw i64 %5, 2
%29 = icmp eq i64 %28, 20
br i1 %29, label %30, label %4
30: ; preds = %4
%31 = sext i32 %27 to i64
%32 = getelementptr inbounds double*, double** %1, i64 %31
%33 = load double*, double** %32
%34 = tail call i32 @memcpy(double* %2, double* %33, i32 160)
%35 = bitcast double* %2 to <2 x double>*
%36 = load <2 x double>, <2 x double>* %35
%37 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %36)
%38 = bitcast double* %2 to <2 x double>*
store <2 x double> %37, <2 x double>* %38
%39 = getelementptr inbounds double, double* %2, i64 2
%40 = bitcast double* %39 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %41)
%43 = bitcast double* %39 to <2 x double>*
store <2 x double> %42, <2 x double>* %43
%44 = getelementptr inbounds double, double* %2, i64 4
%45 = bitcast double* %44 to <2 x double>*
%46 = load <2 x double>, <2 x double>* %45
%47 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %46)
%48 = bitcast double* %44 to <2 x double>*
store <2 x double> %47, <2 x double>* %48
%49 = getelementptr inbounds double, double* %2, i64 6
%50 = bitcast double* %49 to <2 x double>*
%51 = load <2 x double>, <2 x double>* %50
%52 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %51)
%53 = bitcast double* %49 to <2 x double>*
store <2 x double> %52, <2 x double>* %53
%54 = getelementptr inbounds double, double* %2, i64 8
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %56)
%58 = bitcast double* %54 to <2 x double>*
store <2 x double> %57, <2 x double>* %58
%59 = getelementptr inbounds double, double* %2, i64 10
%60 = bitcast double* %59 to <2 x double>*
%61 = load <2 x double>, <2 x double>* %60
%62 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %61)
%63 = bitcast double* %59 to <2 x double>*
store <2 x double> %62, <2 x double>* %63
%64 = getelementptr inbounds double, double* %2, i64 12
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %66)
%68 = bitcast double* %64 to <2 x double>*
store <2 x double> %67, <2 x double>* %68
%69 = getelementptr inbounds double, double* %2, i64 14
%70 = bitcast double* %69 to <2 x double>*
%71 = load <2 x double>, <2 x double>* %70
%72 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %71)
%73 = bitcast double* %69 to <2 x double>*
store <2 x double> %72, <2 x double>* %73
%74 = getelementptr inbounds double, double* %2, i64 16
%75 = bitcast double* %74 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %76)
%78 = bitcast double* %74 to <2 x double>*
store <2 x double> %77, <2 x double>* %78
%79 = getelementptr inbounds double, double* %2, i64 18
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %81)
%83 = bitcast double* %79 to <2 x double>*
store <2 x double> %82, <2 x double>* %83
ret void
}