#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
double log10(double);
int cmio_out(double time, double jcen[3], double rcen, double rmax, int nbod,
             int nbig, double *m, double **xh, double **vh, double **s,
             double *rho, int *stat, char **id, int opt[8], int opflag,
             int algor, FILE *outfile) {
  int len, nchar;
  double rhocgs, k_2, rfac, rcen_2, fr, fv, theta, phi, vtheta, vphi;
  char header[80];
  char c[2000][80];
  char mio_fl2c_out[8], mio_re2c_out[8];
  char fout[5] = {'(', 'a', ' ', ' ', ')'};
  rhocgs = 1.4959787e13 * 1.4959787e13 * 1.4959787e13 * 2.959122082855911e-4 /
           1.9891e33;
  k_2 = 1.0 / 2.959122082855911e-4;
  rcen_2 = 1.0 / (rcen * rcen);
  rfac = log10(rmax / rcen);
  if (opt[3] == 1) {
    nchar = 2;
  }
  if (opt[3] == 2) {
    nchar = 4;
  }
  if (opt[3] == 3) {
    nchar = 7;
  }
  len = 3 + 6 * nchar;
  if (opflag == -1 || opflag == 1) {
    for (int k = 1; k < nbod; k++) {
    }
    for (int k = 1; k < nbod; k++) {
    }
  }
  for (int k = 1; k < nbod; k++) {
  }
  for (int k = 1; k < nbod; k++) {
  }
  fclose(outfile);
  opflag = 0;
  return opflag;
}


x86 assembly (clang, -O0):
<cmio_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x27220,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    %edx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    0xea4(%rip),%eax
mov    %eax,-0x27205(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0x27201(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xe4e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1040 <log10@plt>
movsd  %xmm0,-0x60(%rbp)
mov    0x30(%rbp),%rax
cmpl   $0x1,0xc(%rax)
jne    11e4 <cmio_out+0xc4>
movl   $0x2,-0x48(%rbp)
mov    0x30(%rbp),%rax
cmpl   $0x2,0xc(%rax)
jne    11f9 <cmio_out+0xd9>
movl   $0x4,-0x48(%rbp)
mov    0x30(%rbp),%rax
cmpl   $0x3,0xc(%rax)
jne    120e <cmio_out+0xee>
movl   $0x7,-0x48(%rbp)
imul   $0x6,-0x48(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0xffffffff,0x38(%rbp)
je     122c <cmio_out+0x10c>
cmpl   $0x1,0x38(%rbp)
jne    1295 <cmio_out+0x175>
movl   $0x1,-0x2720c(%rbp)
mov    -0x2720c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    125e <cmio_out+0x13e>
jmp    124a <cmio_out+0x12a>
mov    -0x2720c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2720c(%rbp)
jmp    1236 <cmio_out+0x116>
movl   $0x1,-0x27210(%rbp)
mov    -0x27210(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1290 <cmio_out+0x170>
jmp    127c <cmio_out+0x15c>
mov    -0x27210(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27210(%rbp)
jmp    1268 <cmio_out+0x148>
jmp    1295 <cmio_out+0x175>
movl   $0x1,-0x27214(%rbp)
mov    -0x27214(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12c7 <cmio_out+0x1a7>
jmp    12b3 <cmio_out+0x193>
mov    -0x27214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27214(%rbp)
jmp    129f <cmio_out+0x17f>
movl   $0x1,-0x27218(%rbp)
mov    -0x27218(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12f9 <cmio_out+0x1d9>
jmp    12e5 <cmio_out+0x1c5>
mov    -0x27218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27218(%rbp)
jmp    12d1 <cmio_out+0x1b1>
mov    0x48(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,0x38(%rbp)
mov    0x38(%rbp),%eax
add    $0x27220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmio_out>:
push   %rbx
mov    0x48(%rsp),%rbx
divsd  %xmm1,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
jae    1140 <cmio_out+0x20>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret
movapd %xmm2,%xmm0
call   1040 <log10@plt>
jmp    1134 <cmio_out+0x14>

LLVM IR (-O0):
@__const.cmio_out.fout = [5 x i8] c"(a )"
define i32 @cmio_out(double %0, double* %1, double %2, double %3, i32 %4, i32 %5, double* %6, double** %7, double** %8, double** %9, double* %10, i32* %11, i8** %12, i32* %13, i32 %14, i32 %15, i32* %16) {
%18 = alloca double
%19 = alloca double*
%20 = alloca double
%21 = alloca double
%22 = alloca i32
%23 = alloca i32
%24 = alloca double*
%25 = alloca double**
%26 = alloca double**
%27 = alloca double**
%28 = alloca double*
%29 = alloca i32*
%30 = alloca i8**
%31 = alloca i32*
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32*
%35 = alloca i32
%36 = alloca i32
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca double
%47 = alloca [80 x i8]
%48 = alloca [2000 x [80 x i8]]
%49 = alloca [8 x i8]
%50 = alloca [8 x i8]
%51 = alloca [5 x i8]
%52 = alloca i32
%53 = alloca i32
%54 = alloca i32
%55 = alloca i32
store double %0, double* %18
store double* %1, double** %19
store double %2, double* %20
store double %3, double* %21
store i32 %4, i32* %22
store i32 %5, i32* %23
store double* %6, double** %24
store double** %7, double*** %25
store double** %8, double*** %26
store double** %9, double*** %27
store double* %10, double** %28
store i32* %11, i32** %29
store i8** %12, i8*** %30
store i32* %13, i32** %31
store i32 %14, i32* %32
store i32 %15, i32* %33
store i32* %16, i32** %34
%56 = bitcast [5 x i8]* %51 to i8*
store double 0x407F20F9AA534B1B, double* %37
store double 0x40AA66C2E8A420EB, double* %38
%57 = load double, double* %20
%58 = load double, double* %20
%59 = fmul double %57, %58
%60 = fdiv double 1.000000e+00, %59
store double %60, double* %40
%61 = load double, double* %21
%62 = load double, double* %20
%63 = fdiv double %61, %62
%64 = call double @log10(double %63)
store double %64, double* %39
%65 = load i32*, i32** %31
%66 = getelementptr inbounds i32, i32* %65, i64 3
%67 = load i32, i32* %66
%68 = icmp eq i32 %67, 1
br i1 %68, label %69, label %70
69: ; preds = %17
store i32 2, i32* %36
br label %70
70: ; preds = %69, %17
%71 = load i32*, i32** %31
%72 = getelementptr inbounds i32, i32* %71, i64 3
%73 = load i32, i32* %72
%74 = icmp eq i32 %73, 2
br i1 %74, label %75, label %76
75: ; preds = %70
store i32 4, i32* %36
br label %76
76: ; preds = %75, %70
%77 = load i32*, i32** %31
%78 = getelementptr inbounds i32, i32* %77, i64 3
%79 = load i32, i32* %78
%80 = icmp eq i32 %79, 3
br i1 %80, label %81, label %82
81: ; preds = %76
store i32 7, i32* %36
br label %82
82: ; preds = %81, %76
%83 = load i32, i32* %36
%84 = mul nsw i32 6, %83
%85 = add nsw i32 3, %84
store i32 %85, i32* %35
%86 = load i32, i32* %32
%87 = icmp eq i32 %86, -1
br i1 %87, label %91, label %88
88: ; preds = %82
%89 = load i32, i32* %32
%90 = icmp eq i32 %89, 1
br i1 %90, label %91, label %110
91: ; preds = %88, %82
store i32 1, i32* %52
br label %92
92: ; preds = %97, %91
%93 = load i32, i32* %52
%94 = load i32, i32* %22
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %100
96: ; preds = %92
br label %97
97: ; preds = %96
%98 = load i32, i32* %52
%99 = add nsw i32 %98, 1
store i32 %99, i32* %52
br label %92
100: ; preds = %92
store i32 1, i32* %53
br label %101
101: ; preds = %106, %100
%102 = load i32, i32* %53
%103 = load i32, i32* %22
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %109
105: ; preds = %101
br label %106
106: ; preds = %105
%107 = load i32, i32* %53
%108 = add nsw i32 %107, 1
store i32 %108, i32* %53
br label %101
109: ; preds = %101
br label %110
110: ; preds = %109, %88
store i32 1, i32* %54
br label %111
111: ; preds = %116, %110
%112 = load i32, i32* %54
%113 = load i32, i32* %22
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %119
115: ; preds = %111
br label %116
116: ; preds = %115
%117 = load i32, i32* %54
%118 = add nsw i32 %117, 1
store i32 %118, i32* %54
br label %111
119: ; preds = %111
store i32 1, i32* %55
br label %120
120: ; preds = %125, %119
%121 = load i32, i32* %55
%122 = load i32, i32* %22
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %128
124: ; preds = %120
br label %125
125: ; preds = %124
%126 = load i32, i32* %55
%127 = add nsw i32 %126, 1
store i32 %127, i32* %55
br label %120
128: ; preds = %120
%129 = load i32*, i32** %34
%130 = call i32 @fclose(i32* %129)
store i32 0, i32* %32
%131 = load i32, i32* %32
ret i32 %131
}

LLVM IR (-O2):
define i32 @cmio_out(double %0, double* nocapture readnone %1, double %2, double %3, i32 %4, i32 %5, double* nocapture readnone %6, double** nocapture readnone %7, double** nocapture readnone %8, double** nocapture readnone %9, double* nocapture readnone %10, i32* nocapture readnone %11, i8** nocapture readnone %12, i32* nocapture %13, i32 %14, i32 %15, i32* nocapture %16) {
%18 = fdiv double %3, %2
%19 = fcmp ugt double %18, 0.000000e+00
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = tail call double @log10(double %18)
br label %22
22: ; preds = %20, %17
%23 = tail call i32 @fclose(i32* %16)
ret i32 0
}