#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*/ CalcLon(float, double *);
int /*<<< orphan*/ CalcTass17Elem(float, double *, 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[7];
  double lon[7];
  printf("{\n");
  for (body = 0; body < 8; body++) {
    printf("\t\"%d\": [\n", body);
    for (jd2k = start; jd2k < end; jd2k += step) {
      float time = jd2k + 7305.0;
      CalcLon(time, lon);
      CalcTass17Elem(time, lon, 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    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1260 <main+0x130>
mov    -0x8(%rbp),%esi
lea    0xe91(%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
jbe    1244 <main+0x114>
movsd  0xe59(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xa4(%rbp)
ff
movss  -0xa4(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
call   1050 <CalcLon@plt>
movss  -0xa4(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
mov    -0x8(%rbp),%esi
lea    -0x60(%rbp),%rdx
call   1040 <CalcTass17Elem@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    0xe04(%rip),%rdi
mov    $0x7,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11a3 <main+0x73>
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117e <main+0x4e>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%r15
lea    0xeb4(%rip),%r12
lea    0xee7(%rip),%r13
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
lea    0xe91(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffb0ff,%r14d
movsd  0xe62(%rip),%xmm1
xchg   %ax,%ax
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
addsd  0xe56(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
call   1060 <CalcLon@plt>
movss  0x4(%rsp),%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
call   1050 <CalcTass17Elem@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    %r12,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x7,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xdf7(%rip),%xmm1
add    $0xe1,%r14d
cmp    $0x4d3f,%r14d
jl     11a0 <main+0x60>
mov    %r13,%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    1180 <main+0x40>
lea    0xe12(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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 [7 x double]
%8 = alloca [7 x double]
%9 = 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
%10 = 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 %11
11: ; preds = %54, %0
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %57
14: ; preds = %11
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load double, double* %4
store double %17, double* %3
br label %18
18: ; preds = %48, %14
%19 = load double, double* %3
%20 = load double, double* %5
%21 = fcmp olt double %19, %20
br i1 %21, label %22, label %52
22: ; preds = %18
%23 = load double, double* %3
%24 = fadd double %23, 7.305000e+03
%25 = fptrunc double %24 to float
store float %25, float* %9
%26 = load float, float* %9
%27 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 0
%28 = call i32 @CalcLon(float %26, double* %27)
%29 = load float, float* %9
%30 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 0
%31 = load i32, i32* %2
%32 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 0
%33 = call i32 @CalcTass17Elem(float %29, double* %30, i32 %31, double* %32)
%34 = load double, double* %3
%35 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 0
%36 = load double, double* %35
%37 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 1
%38 = load double, double* %37
%39 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 2
%40 = load double, double* %39
%41 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 3
%42 = load double, double* %41
%43 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 4
%44 = load double, double* %43
%45 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 5
%46 = load double, double* %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %34, double %36, double %38, double %40, double %42, double %44, double %46)
br label %48
48: ; preds = %22
%49 = load double, double* %6
%50 = load double, double* %3
%51 = fadd double %50, %49
store double %51, double* %3
br label %18
52: ; preds = %18
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %54
54: ; preds = %52
%55 = load i32, i32* %2
%56 = add nsw i32 %55, 1
store i32 %56, i32* %2
br label %11
57: ; preds = %11
%58 = 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 [7 x double]
%2 = alloca [7 x double]
%3 = bitcast [7 x double]* %1 to i8*
%4 = bitcast [7 x double]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 0
%8 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 1
%9 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 2
%10 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 3
%11 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 4
%12 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 5
br label %13
13: ; preds = %0, %32
%14 = phi i32 [ 0, %0 ], [ %34, %32 ]
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %16
%17 = phi i32 [ -20000, %13 ], [ %30, %16 ]
%18 = sitofp i32 %17 to double
%19 = fadd double %18, 7.305000e+03
%20 = fptrunc double %19 to float
%21 = call i32 @CalcLon(float %20, double* %6)
%22 = call i32 @CalcTass17Elem(float %20, double* %6, i32 %14, double* %7)
%23 = load double, double* %7
%24 = load double, double* %8
%25 = load double, double* %9
%26 = load double, double* %10
%27 = load double, double* %11
%28 = load double, double* %12
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %18, double %23, double %24, double %25, double %26, double %27, double %28)
%30 = add nsw i32 %17, 225
%31 = icmp slt i32 %17, 19775
br i1 %31, label %16, label %32
32: ; preds = %16
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%34 = add nuw nsw i32 %14, 1
%35 = icmp eq i32 %34, 8
br i1 %35, label %36, label %13
36: ; preds = %32
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}