void psycho_3_minimummasking(double *LTg, double *LTmin, int *freq_subset) {
  int i;
  for (i = 0; i < 32; i++)
    LTmin[i] = 999999.9;
  for (i = 0; i < 136; i++) {
    int index = freq_subset[i] >> 4;
    if (LTmin[index] > LTg[i]) {
      LTmin[index] = LTg[i];
    }
  }
}


x86 assembly (clang, -O0):
<psycho_3_minimummasking>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x20,-0x1c(%rbp)
jge    1144 <psycho_3_minimummasking+0x44>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <psycho_3_minimummasking+0x17>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x88,-0x1c(%rbp)
jge    11b6 <psycho_3_minimummasking+0xb6>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sar    $0x4,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    11a3 <psycho_3_minimummasking+0xa3>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    11a8 <psycho_3_minimummasking+0xa8>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114b <psycho_3_minimummasking+0x4b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<psycho_3_minimummasking>:
movapd 0xef8(%rip),%xmm0
movupd %xmm0,(%rsi)
movupd %xmm0,0x10(%rsi)
movupd %xmm0,0x20(%rsi)
movupd %xmm0,0x30(%rsi)
movupd %xmm0,0x40(%rsi)
movupd %xmm0,0x50(%rsi)
movupd %xmm0,0x60(%rsi)
movupd %xmm0,0x70(%rsi)
movupd %xmm0,0x80(%rsi)
movupd %xmm0,0x90(%rsi)
movupd %xmm0,0xa0(%rsi)
movupd %xmm0,0xb0(%rsi)
movupd %xmm0,0xc0(%rsi)
movupd %xmm0,0xd0(%rsi)
movupd %xmm0,0xe0(%rsi)
movupd %xmm0,0xf0(%rsi)
mov    $0x1,%eax
jmp    118c <psycho_3_minimummasking+0x8c>
cs nopw 0x0(%rax,%rax,1)
add    $0x2,%rax
cmp    $0x89,%rax
je     11cc <psycho_3_minimummasking+0xcc>
mov    -0x4(%rdx,%rax,4),%ecx
sar    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rsi,%rcx,8),%xmm1
movsd  -0x8(%rdi,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jbe    11ac <psycho_3_minimummasking+0xac>
movsd  %xmm0,(%rsi,%rcx,8)
mov    (%rdx,%rax,4),%ecx
sar    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rsi,%rcx,8),%xmm1
movsd  (%rdi,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jbe    1180 <psycho_3_minimummasking+0x80>
movsd  %xmm0,(%rsi,%rcx,8)
jmp    1180 <psycho_3_minimummasking+0x80>
ret

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

LLVM IR (-O2):
define void @psycho_3_minimummasking(double* nocapture %0, double* nocapture %1, i32* nocapture %2) {
%4 = bitcast double* %1 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %4
%5 = getelementptr inbounds double, double* %1, i64 2
%6 = bitcast double* %5 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %6
%7 = getelementptr inbounds double, double* %1, i64 4
%8 = bitcast double* %7 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %8
%9 = getelementptr inbounds double, double* %1, i64 6
%10 = bitcast double* %9 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %10
%11 = getelementptr inbounds double, double* %1, i64 8
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %12
%13 = getelementptr inbounds double, double* %1, i64 10
%14 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %14
%15 = getelementptr inbounds double, double* %1, i64 12
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %16
%17 = getelementptr inbounds double, double* %1, i64 14
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %18
%19 = getelementptr inbounds double, double* %1, i64 16
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %20
%21 = getelementptr inbounds double, double* %1, i64 18
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %22
%23 = getelementptr inbounds double, double* %1, i64 20
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %24
%25 = getelementptr inbounds double, double* %1, i64 22
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %26
%27 = getelementptr inbounds double, double* %1, i64 24
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %28
%29 = getelementptr inbounds double, double* %1, i64 26
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %30
%31 = getelementptr inbounds double, double* %1, i64 28
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %32
%33 = getelementptr inbounds double, double* %1, i64 30
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> <double 0x412E847FCCCCCCCD, double 0x412E847FCCCCCCCD>, <2 x double>* %34
br label %35
35: ; preds = %59, %3
%36 = phi i64 [ 0, %3 ], [ %60, %59 ]
%37 = getelementptr inbounds i32, i32* %2, i64 %36
%38 = load i32, i32* %37
%39 = ashr i32 %38, 4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %1, i64 %40
%42 = load double, double* %41
%43 = getelementptr inbounds double, double* %0, i64 %36
%44 = load double, double* %43
%45 = fcmp ogt double %42, %44
br i1 %45, label %46, label %47
46: ; preds = %35
store double %44, double* %41
br label %47
47: ; preds = %46, %35
%48 = or i64 %36, 1
%49 = getelementptr inbounds i32, i32* %2, i64 %48
%50 = load i32, i32* %49
%51 = ashr i32 %50, 4
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %1, i64 %52
%54 = load double, double* %53
%55 = getelementptr inbounds double, double* %0, i64 %48
%56 = load double, double* %55
%57 = fcmp ogt double %54, %56
br i1 %57, label %58, label %59
58: ; preds = %47
store double %56, double* %53
br label %59
59: ; preds = %58, %47
%60 = add nuw nsw i64 %36, 2
%61 = icmp eq i64 %60, 136
br i1 %61, label %62, label %35
62: ; preds = %59
ret void
}