void plot_star(x, n, time, ratio, m, initm) double (*x)[(3)];
int n;
double time;
double ratio;
double *m, initm;
{
  static double anix[(120000)][(3)], maxx, button;
  static int tmpc[(120000)];
  int i, d;
  int num = 0;
  for (i = 0; i < n; i++) {
    if (m[i] <= initm) {
      anix[num][0] = x[i][0] * ratio + 0.5;
      anix[num][1] = x[i][1] * ratio + 0.5;
      anix[num][2] = x[i][2] * ratio + 0.5;
      tmpc[num] = 0;
      num++;
    }
  }
  plot_particle2D(anix, num, tmpc, time);
}


x86 assembly (clang, -O0):
<plot_star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1254 <plot_star+0x144>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1241 <plot_star+0x131>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe74(%rip),%xmm1
addsd  %xmm1,%xmm0
movslq -0x3c(%rbp),%rcx
lea    0x2ea5(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe35(%rip),%xmm1
addsd  %xmm1,%xmm0
movslq -0x3c(%rbp),%rcx
lea    0x2e66(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf5(%rip),%xmm1
addsd  %xmm1,%xmm0
movslq -0x3c(%rbp),%rcx
lea    0x2e26(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
movslq -0x3c(%rbp),%rcx
lea    0x2c201f(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1246 <plot_star+0x136>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1140 <plot_star+0x30>
mov    -0x3c(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0x2ddd(%rip),%rdi
lea    0x2c1fe6(%rip),%rdx
mov    $0x1,%al
call   1030 <plot_particle2D@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plot_star>:
test   %esi,%esi
jle    11a2 <plot_star+0x92>
mov    %esi,%r10d
add    $0x10,%rdi
xor    %ecx,%ecx
movsd  0xed7(%rip),%xmm3
lea    0x2f10(%rip),%r8
lea    0x2c2109(%rip),%r9
xor    %esi,%esi
jmp    114d <plot_star+0x3d>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
add    $0x18,%rdi
cmp    %rcx,%r10
je     11a4 <plot_star+0x94>
ucomisd (%rdx,%rcx,8),%xmm2
jb     1140 <plot_star+0x30>
movsd  -0x10(%rdi),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movslq %esi,%rsi
lea    (%rsi,%rsi,2),%rax
movsd  %xmm4,(%r8,%rax,8)
movsd  -0x8(%rdi),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x8(%r8,%rax,8)
movsd  (%rdi),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x10(%r8,%rax,8)
movl   $0x0,(%r9,%rsi,4)
add    $0x1,%esi
jmp    1140 <plot_star+0x30>
xor    %esi,%esi
lea    0x2e95(%rip),%rdi
lea    0x2c208e(%rip),%rdx
mov    $0x1,%al
jmp    1030 <plot_particle2D@plt>

LLVM IR (-O0):
@plot_star.anix = internal global [120000 x [3 x double]] zeroinitializer
@plot_star.maxx = internal global double 0.000000e+00
@plot_star.button = internal global double 0.000000e+00
@plot_star.tmpc = internal global [120000 x i32] zeroinitializer
define void @plot_star([3 x double]* %0, i32 %1, double %2, double %3, double* %4, double %5) {
%7 = alloca [3 x double]*
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store [3 x double]* %0, [3 x double]** %7
store i32 %1, i32* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
store double %5, double* %12
store i32 0, i32* %15
store i32 0, i32* %13
br label %16
16: ; preds = %71, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %8
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %74
20: ; preds = %16
%21 = load double*, double** %11
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
%25 = load double, double* %24
%26 = load double, double* %12
%27 = fcmp ole double %25, %26
br i1 %27, label %28, label %70
28: ; preds = %20
%29 = load [3 x double]*, [3 x double]** %7
%30 = load i32, i32* %13
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3 x double], [3 x double]* %29, i64 %31
%33 = getelementptr inbounds [3 x double], [3 x double]* %32, i64 0, i64 0
%34 = load double, double* %33
%35 = load double, double* %10
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 5.000000e-01)
%37 = load i32, i32* %15
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %38
%40 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 0, i64 0
store double %36, double* %40
%41 = load [3 x double]*, [3 x double]** %7
%42 = load i32, i32* %13
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [3 x double], [3 x double]* %41, i64 %43
%45 = getelementptr inbounds [3 x double], [3 x double]* %44, i64 0, i64 1
%46 = load double, double* %45
%47 = load double, double* %10
%48 = call double @llvm.fmuladd.f64(double %46, double %47, double 5.000000e-01)
%49 = load i32, i32* %15
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %50
%52 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 0, i64 1
store double %48, double* %52
%53 = load [3 x double]*, [3 x double]** %7
%54 = load i32, i32* %13
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x double], [3 x double]* %53, i64 %55
%57 = getelementptr inbounds [3 x double], [3 x double]* %56, i64 0, i64 2
%58 = load double, double* %57
%59 = load double, double* %10
%60 = call double @llvm.fmuladd.f64(double %58, double %59, double 5.000000e-01)
%61 = load i32, i32* %15
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %62
%64 = getelementptr inbounds [3 x double], [3 x double]* %63, i64 0, i64 2
store double %60, double* %64
%65 = load i32, i32* %15
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [120000 x i32], [120000 x i32]* @plot_star.tmpc, i64 0, i64 %66
store i32 0, i32* %67
%68 = load i32, i32* %15
%69 = add nsw i32 %68, 1
store i32 %69, i32* %15
br label %70
70: ; preds = %28, %20
br label %71
71: ; preds = %70
%72 = load i32, i32* %13
%73 = add nsw i32 %72, 1
store i32 %73, i32* %13
br label %16
74: ; preds = %16
%75 = load i32, i32* %15
%76 = load double, double* %9
%77 = call i32 ([3 x double]*, i32, i32*, double, ...) bitcast (i32 (...)* @plot_particle2D to i32 ([3 x double]*, i32, i32*, double, ...)*)([3 x double]* getelementptr inbounds ([120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 0), i32 %75, i32* getelementptr inbounds ([120000 x i32], [120000 x i32]* @plot_star.tmpc, i64 0, i64 0), double %76)
ret void
}

LLVM IR (-O2):
@plot_star.anix = internal global [120000 x [3 x double]] zeroinitializer
@plot_star.tmpc = internal global [120000 x i32] zeroinitializer
define void @plot_star([3 x double]* nocapture %0, i32 %1, double %2, double %3, double* nocapture %4, double %5) {
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %36
8: ; preds = %6
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %8, %32
%11 = phi i64 [ 0, %8 ], [ %34, %32 ]
%12 = phi i32 [ 0, %8 ], [ %33, %32 ]
%13 = getelementptr inbounds double, double* %4, i64 %11
%14 = load double, double* %13
%15 = fcmp ugt double %14, %5
br i1 %15, label %32, label %16
16: ; preds = %10
%17 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 %11, i64 0
%18 = load double, double* %17
%19 = tail call double @llvm.fmuladd.f64(double %18, double %3, double 5.000000e-01)
%20 = sext i32 %12 to i64
%21 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %20, i64 0
store double %19, double* %21
%22 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 %11, i64 1
%23 = load double, double* %22
%24 = tail call double @llvm.fmuladd.f64(double %23, double %3, double 5.000000e-01)
%25 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %20, i64 1
store double %24, double* %25
%26 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 %11, i64 2
%27 = load double, double* %26
%28 = tail call double @llvm.fmuladd.f64(double %27, double %3, double 5.000000e-01)
%29 = getelementptr inbounds [120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 %20, i64 2
store double %28, double* %29
%30 = getelementptr inbounds [120000 x i32], [120000 x i32]* @plot_star.tmpc, i64 0, i64 %20
store i32 0, i32* %30
%31 = add nsw i32 %12, 1
br label %32
32: ; preds = %10, %16
%33 = phi i32 [ %31, %16 ], [ %12, %10 ]
%34 = add nuw nsw i64 %11, 1
%35 = icmp eq i64 %34, %9
br i1 %35, label %36, label %10
36: ; preds = %32, %6
%37 = phi i32 [ 0, %6 ], [ %33, %32 ]
%38 = tail call i32 ([3 x double]*, i32, i32*, double, ...) bitcast (i32 (...)* @plot_particle2D to i32 ([3 x double]*, i32, i32*, double, ...)*)([3 x double]* getelementptr inbounds ([120000 x [3 x double]], [120000 x [3 x double]]* @plot_star.anix, i64 0, i64 0), i32 %37, i32* getelementptr inbounds ([120000 x i32], [120000 x i32]* @plot_star.tmpc, i64 0, i64 0), double %2)
ret void
}