void psycho_3_decimation(double *ath, int *tonelabel, double *Xtm,
                         int *noiselabel, double *Xnm, double *bark) {
  int i;
  for (i = 1; i < 513; i++) {
    if (noiselabel[i] == 10) {
      if (Xnm[i] < ath[i]) {
        Xnm[i] = -200.0;
        noiselabel[i] = 0;
      }
    }
    if (tonelabel[i] == 20) {
      if (Xtm[i] < ath[i]) {
        Xtm[i] = -200.0;
        tonelabel[i] = 0;
      }
    }
  }
}


x86 assembly (clang, -O0):
<psycho_3_decimation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
cmpl   $0x201,-0x34(%rbp)
jge    1201 <psycho_3_decimation+0x101>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0xa,(%rax,%rcx,4)
jne    118f <psycho_3_decimation+0x8f>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    118a <psycho_3_decimation+0x8a>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe8a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    118f <psycho_3_decimation+0x8f>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x14,(%rax,%rcx,4)
jne    11ee <psycho_3_decimation+0xee>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    11e9 <psycho_3_decimation+0xe9>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe2b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    11ee <psycho_3_decimation+0xee>
jmp    11f3 <psycho_3_decimation+0xf3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1123 <psycho_3_decimation+0x23>
pop    %rbp
ret

x86 assembly (clang, -O2):
<psycho_3_decimation>:
xor    %eax,%eax
movabs $0xc069000000000000,%r9
jmp    111c <psycho_3_decimation+0x1c>
xchg   %ax,%ax
add    $0x4,%rax
cmp    $0x800,%rax
je     1163 <psycho_3_decimation+0x63>
cmpl   $0xa,0x4(%rcx,%rax,1)
jne    113f <psycho_3_decimation+0x3f>
movsd  0x8(%rdi,%rax,2),%xmm0
ucomisd 0x8(%r8,%rax,2),%xmm0
jbe    113f <psycho_3_decimation+0x3f>
mov    %r9,0x8(%r8,%rax,2)
movl   $0x0,0x4(%rcx,%rax,1)
cmpl   $0x14,0x4(%rsi,%rax,1)
jne    1110 <psycho_3_decimation+0x10>
movsd  0x8(%rdi,%rax,2),%xmm0
ucomisd 0x8(%rdx,%rax,2),%xmm0
jbe    1110 <psycho_3_decimation+0x10>
mov    %r9,0x8(%rdx,%rax,2)
movl   $0x0,0x4(%rsi,%rax,1)
jmp    1110 <psycho_3_decimation+0x10>
ret

LLVM IR (-O0):
define void @psycho_3_decimation(double* %0, i32* %1, double* %2, i32* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
store double* %0, double** %7
store i32* %1, i32** %8
store double* %2, double** %9
store i32* %3, i32** %10
store double* %4, double** %11
store double* %5, double** %12
store i32 1, i32* %13
br label %14
14: ; preds = %76, %6
%15 = load i32, i32* %13
%16 = icmp slt i32 %15, 513
br i1 %16, label %17, label %79
17: ; preds = %14
%18 = load i32*, i32** %10
%19 = load i32, i32* %13
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 10
br i1 %23, label %24, label %46
24: ; preds = %17
%25 = load double*, double** %11
%26 = load i32, i32* %13
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %25, i64 %27
%29 = load double, double* %28
%30 = load double*, double** %7
%31 = load i32, i32* %13
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %30, i64 %32
%34 = load double, double* %33
%35 = fcmp olt double %29, %34
br i1 %35, label %36, label %45
36: ; preds = %24
%37 = load double*, double** %11
%38 = load i32, i32* %13
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
store double -2.000000e+02, double* %40
%41 = load i32*, i32** %10
%42 = load i32, i32* %13
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %41, i64 %43
store i32 0, i32* %44
br label %45
45: ; preds = %36, %24
br label %46
46: ; preds = %45, %17
%47 = load i32*, i32** %8
%48 = load i32, i32* %13
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %47, i64 %49
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 20
br i1 %52, label %53, label %75
53: ; preds = %46
%54 = load double*, double** %9
%55 = load i32, i32* %13
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
%58 = load double, double* %57
%59 = load double*, double** %7
%60 = load i32, i32* %13
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = fcmp olt double %58, %63
br i1 %64, label %65, label %74
65: ; preds = %53
%66 = load double*, double** %9
%67 = load i32, i32* %13
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double -2.000000e+02, double* %69
%70 = load i32*, i32** %8
%71 = load i32, i32* %13
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
store i32 0, i32* %73
br label %74
74: ; preds = %65, %53
br label %75
75: ; preds = %74, %46
br label %76
76: ; preds = %75
%77 = load i32, i32* %13
%78 = add nsw i32 %77, 1
store i32 %78, i32* %13
br label %14
79: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @psycho_3_decimation(double* nocapture %0, i32* nocapture %1, double* nocapture %2, i32* nocapture %3, double* nocapture %4, double* nocapture readnone %5) {
br label %7
7: ; preds = %6, %30
%8 = phi i64 [ 1, %6 ], [ %31, %30 ]
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = getelementptr inbounds double, double* %4, i64 %8
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %0, i64 %8
%16 = load double, double* %15
%17 = fcmp olt double %14, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store double -2.000000e+02, double* %13
store i32 0, i32* %9
br label %19
19: ; preds = %12, %18, %7
%20 = getelementptr inbounds i32, i32* %1, i64 %8
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 20
br i1 %22, label %23, label %30
23: ; preds = %19
%24 = getelementptr inbounds double, double* %2, i64 %8
%25 = load double, double* %24
%26 = getelementptr inbounds double, double* %0, i64 %8
%27 = load double, double* %26
%28 = fcmp olt double %25, %27
br i1 %28, label %29, label %30
29: ; preds = %23
store double -2.000000e+02, double* %24
store i32 0, i32* %20
br label %30
30: ; preds = %19, %29, %23
%31 = add nuw nsw i64 %8, 1
%32 = icmp eq i64 %31, 513
br i1 %32, label %33, label %7
33: ; preds = %30
ret void
}