#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 */
int /*<<< orphan*/ CalcMarsSatElem(float, int, double *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int body;
  double jd2k;
  double start = -20000.0;
  double end = +20000.0;
  double step = 225.0;
  double elem[6];
  printf("{\n");
  for (body = 0; body < 2; body++) {
    printf("\t\"%d\": [\n", body);
    for (jd2k = start; jd2k <= end; jd2k += step) {
      float time = jd2k + 6491.5;
      CalcMarsSatElem(time, body, elem);
      printf("\t\t[%.13f, %.13f, %.13f, %.13f, %.13f, %.13f, %.13f],\n", jd2k,
             elem[0], elem[1], elem[2], elem[3], elem[4], elem[5]);
    }
    printf("\t],\n");
  }
  printf("}\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    122c <main+0x10c>
mov    -0x8(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1210 <main+0xf0>
movsd  0xe6c(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x64(%rbp),%xmm0
mov    -0x8(%rbp),%edi
lea    -0x60(%rbp),%rsi
call   1040 <CalcMarsSatElem@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x40(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm6
lea    0xe38(%rip),%rdi
mov    $0x7,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1190 <main+0x70>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116b <main+0x4b>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0xea4(%rip),%xmm0
mov    $0xffffb0ff,%ebp
lea    0x10(%rsp),%r14
lea    0xeb5(%rip),%rbx
nopl   (%rax)
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xe84(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
xor    %edi,%edi
mov    %r14,%rsi
call   1050 <CalcMarsSatElem@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
movsd  0x30(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x7,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xe3c(%rip),%xmm0
add    $0xe1,%ebp
cmp    $0x4d40,%ebp
jl     1170 <main+0x40>
lea    0xe73(%rip),%rdi
call   1030 <puts@plt>
lea    0xe23(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0xdf7(%rip),%xmm0
mov    $0xffffb0ff,%ebp
lea    0x10(%rsp),%r14
lea    0xe08(%rip),%rbx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xdd4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x1,%edi
mov    %r14,%rsi
call   1050 <CalcMarsSatElem@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
movsd  0x30(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x7,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xd89(%rip),%xmm0
add    $0xe1,%ebp
cmp    $0x4d40,%ebp
jl     1220 <main+0xf0>
lea    0xdc0(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"{\0A\00"
@.str.1 = [10 x i8] c"\09\22%d\22: [\0A\00"
@.str.2 = [54 x i8] c"\09\09[%.13f, %.13f, %.13f, %.13f, %.13f, %.13f, %.13f],\0A\00"
@.str.3 = [5 x i8] c"\09],\0A\00"
@.str.4 = [3 x i8] c"}\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca [6 x double]
%8 = alloca float
store i32 0, i32* %1
store double -2.000000e+04, double* %4
store double 2.000000e+04, double* %5
store double 2.250000e+02, double* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %10
10: ; preds = %49, %0
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %52
13: ; preds = %10
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load double, double* %4
store double %16, double* %3
br label %17
17: ; preds = %43, %13
%18 = load double, double* %3
%19 = load double, double* %5
%20 = fcmp ole double %18, %19
br i1 %20, label %21, label %47
21: ; preds = %17
%22 = load double, double* %3
%23 = fadd double %22, 6.491500e+03
%24 = fptrunc double %23 to float
store float %24, float* %8
%25 = load float, float* %8
%26 = load i32, i32* %2
%27 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 0
%28 = call i32 @CalcMarsSatElem(float %25, i32 %26, double* %27)
%29 = load double, double* %3
%30 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 0
%31 = load double, double* %30
%32 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 1
%33 = load double, double* %32
%34 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 2
%35 = load double, double* %34
%36 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 3
%37 = load double, double* %36
%38 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 4
%39 = load double, double* %38
%40 = getelementptr inbounds [6 x double], [6 x double]* %7, i64 0, i64 5
%41 = load double, double* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %29, double %31, double %33, double %35, double %37, double %39, double %41)
br label %43
43: ; preds = %21
%44 = load double, double* %6
%45 = load double, double* %3
%46 = fadd double %45, %44
store double %46, double* %3
br label %17
47: ; preds = %17
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %49
49: ; preds = %47
%50 = load i32, i32* %2
%51 = add nsw i32 %50, 1
store i32 %51, i32* %2
br label %10
52: ; preds = %10
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"\09\22%d\22: [\0A\00"
@.str.2 = [54 x i8] c"\09\09[%.13f, %.13f, %.13f, %.13f, %.13f, %.13f, %.13f],\0A\00"
@str = [2 x i8] c"{\00"
@str.5 = [2 x i8] c"}\00"
@str.6 = [4 x i8] c"\09],\00"
define i32 @main() {
%1 = alloca [6 x double]
%2 = bitcast [6 x double]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 0
%5 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 1
%6 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 2
%7 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 3
%8 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 4
%9 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 5
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %11
11: ; preds = %0, %11
%12 = phi i32 [ -20000, %0 ], [ %24, %11 ]
%13 = sitofp i32 %12 to double
%14 = fadd double %13, 6.491500e+03
%15 = fptrunc double %14 to float
%16 = call i32 @CalcMarsSatElem(float %15, i32 0, double* %4)
%17 = load double, double* %4
%18 = load double, double* %5
%19 = load double, double* %6
%20 = load double, double* %7
%21 = load double, double* %8
%22 = load double, double* %9
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %13, double %17, double %18, double %19, double %20, double %21, double %22)
%24 = add nsw i32 %12, 225
%25 = icmp sgt i32 %12, 19775
br i1 %25, label %26, label %11
26: ; preds = %11
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %29
29: ; preds = %29, %26
%30 = phi i32 [ -20000, %26 ], [ %42, %29 ]
%31 = sitofp i32 %30 to double
%32 = fadd double %31, 6.491500e+03
%33 = fptrunc double %32 to float
%34 = call i32 @CalcMarsSatElem(float %33, i32 1, double* %4)
%35 = load double, double* %4
%36 = load double, double* %5
%37 = load double, double* %6
%38 = load double, double* %7
%39 = load double, double* %8
%40 = load double, double* %9
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %31, double %35, double %36, double %37, double %38, double %39, double %40)
%42 = add nsw i32 %30, 225
%43 = icmp sgt i32 %30, 19775
br i1 %43, label %44, label %29
44: ; preds = %29
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}