#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 atan(int);
double cos(double);
double sin(double);
int sqrt(int);
int tan(double);
double Kepler(double MeanAnomaly, double Eccentricity) {
  register double E;
  register double Error;
  register double TrueAnomaly;
  E = MeanAnomaly;
  do {
    Error =
        (E - Eccentricity * sin(E) - MeanAnomaly) / (1 - Eccentricity * cos(E));
    E -= Error;
  } while (((Error) < 0 ? (-(Error)) : (Error)) >=
           ((3.141592653589793 / 180) / 3600));
  if (((E - 3.141592653589793) < 0
           ? (-(E - 3.141592653589793))
           : (E - 3.141592653589793)) < ((3.141592653589793 / 180) / 3600))
    TrueAnomaly = 3.141592653589793;
  else
    TrueAnomaly =
        2 * atan(sqrt((1 + Eccentricity) / (1 - Eccentricity)) * tan(E / 2));
  if (TrueAnomaly < 0)
    TrueAnomaly += (3.141592653589793 * 2);
  return TrueAnomaly;
}


x86 assembly (clang, -O0):
<Kepler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x48(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <cos@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdfc(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1258 <Kepler+0x108>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1262 <Kepler+0x112>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xd99(%rip),%xmm1
ucomisd %xmm1,%xmm0
jae    116c <Kepler+0x1c>
movsd  -0x18(%rbp),%xmm1
movsd  0xd8a(%rip),%xmm0
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    12c9 <Kepler+0x179>
movsd  -0x18(%rbp),%xmm0
movsd  0xd6c(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    12df <Kepler+0x18f>
movsd  -0x18(%rbp),%xmm0
movsd  0xd3a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  0xd1c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1308 <Kepler+0x1b8>
movsd  0xd12(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    135f <Kepler+0x20f>
movsd  0xcf0(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xce3(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
mov    %eax,-0x5c(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xcd9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <tan@plt>
mov    -0x5c(%rbp),%edi
imul   %eax,%edi
call   1040 <atan@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    137f <Kepler+0x22f>
movsd  0xcab(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kepler>:
push   %rbx
sub    $0x40,%rsp
movapd %xmm0,%xmm3
movapd 0xe9f(%rip),%xmm2
movapd %xmm1,0x20(%rsp)
xorpd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
nopw   0x0(%rax,%rax,1)
movsd  %xmm3,(%rsp)
movapd %xmm3,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
addsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
call   1060 <cos@plt>
movsd  0xe59(%rip),%xmm4
movsd  (%rsp),%xmm3
mulsd  0x10(%rsp),%xmm0
addsd  %xmm4,%xmm0
movapd 0x30(%rsp),%xmm2
divsd  %xmm0,%xmm2
subsd  %xmm2,%xmm3
movapd %xmm2,%xmm0
xorpd  0xe20(%rip),%xmm0
movapd %xmm2,%xmm1
cmpltsd 0xe53(%rip),%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
ucomisd 0xe17(%rip),%xmm1
jae    1180 <Kepler+0x30>
movsd  0xe11(%rip),%xmm0
addsd  %xmm3,%xmm0
movapd 0xde5(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm5,%xmm5
movapd %xmm0,%xmm2
cmpltsd %xmm5,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movsd  0xdd8(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    1250 <Kepler+0x100>
movsd  0xdda(%rip),%xmm1
jmp    129f <Kepler+0x14f>
movapd 0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
addsd  %xmm4,%xmm0
subsd  %xmm1,%xmm4
divsd  %xmm4,%xmm0
cvttsd2si %xmm0,%edi
movsd  %xmm3,(%rsp)
call   1070 <sqrt@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
mulsd  0xdad(%rip),%xmm0
call   1050 <tan@plt>
imul   %eax,%ebx
mov    %ebx,%edi
call   1040 <atan@plt>
xorpd  %xmm5,%xmm5
add    %eax,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xd91(%rip),%xmm2
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
cmpltsd %xmm5,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @Kepler(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
store double %8, double* %5
br label %9
9: ; preds = %35, %2
%10 = load double, double* %5
%11 = load double, double* %4
%12 = load double, double* %5
%13 = call double @sin(double %12)
%14 = fneg double %11
%15 = call double @llvm.fmuladd.f64(double %14, double %13, double %10)
%16 = load double, double* %3
%17 = fsub double %15, %16
%18 = load double, double* %4
%19 = load double, double* %5
%20 = call double @cos(double %19)
%21 = fneg double %18
%22 = call double @llvm.fmuladd.f64(double %21, double %20, double 1.000000e+00)
%23 = fdiv double %17, %22
store double %23, double* %6
%24 = load double, double* %6
%25 = load double, double* %5
%26 = fsub double %25, %24
store double %26, double* %5
br label %27
27: ; preds = %9
%28 = load double, double* %6
%29 = fcmp olt double %28, 0.000000e+00
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load double, double* %6
%32 = fneg double %31
br label %35
33: ; preds = %27
%34 = load double, double* %6
br label %35
35: ; preds = %33, %30
%36 = phi double [ %32, %30 ], [ %34, %33 ]
%37 = fcmp oge double %36, 0x3ED455A5B2FF8F9D
br i1 %37, label %9, label %38
38: ; preds = %35
%39 = load double, double* %5
%40 = fsub double %39, 0x400921FB54442D18
%41 = fcmp olt double %40, 0.000000e+00
br i1 %41, label %42, label %46
42: ; preds = %38
%43 = load double, double* %5
%44 = fsub double %43, 0x400921FB54442D18
%45 = fneg double %44
br label %49
46: ; preds = %38
%47 = load double, double* %5
%48 = fsub double %47, 0x400921FB54442D18
br label %49
49: ; preds = %46, %42
%50 = phi double [ %45, %42 ], [ %48, %46 ]
%51 = fcmp olt double %50, 0x3ED455A5B2FF8F9D
br i1 %51, label %52, label %53
52: ; preds = %49
store double 0x400921FB54442D18, double* %7
br label %68
53: ; preds = %49
%54 = load double, double* %4
%55 = fadd double 1.000000e+00, %54
%56 = load double, double* %4
%57 = fsub double 1.000000e+00, %56
%58 = fdiv double %55, %57
%59 = fptosi double %58 to i32
%60 = call i32 @sqrt(i32 %59)
%61 = load double, double* %5
%62 = fdiv double %61, 2.000000e+00
%63 = call i32 @tan(double %62)
%64 = mul nsw i32 %60, %63
%65 = call i32 @atan(i32 %64)
%66 = mul nsw i32 2, %65
%67 = sitofp i32 %66 to double
store double %67, double* %7
br label %68
68: ; preds = %53, %52
%69 = load double, double* %7
%70 = fcmp olt double %69, 0.000000e+00
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load double, double* %7
%73 = fadd double %72, 0x401921FB54442D18
store double %73, double* %7
br label %74
74: ; preds = %71, %68
%75 = load double, double* %7
ret double %75
}

LLVM IR (-O2):
define double @Kepler(double %0, double %1) {
%3 = fneg double %1
br label %4
4: ; preds = %4, %2
%5 = phi double [ %0, %2 ], [ %12, %4 ]
%6 = tail call double @sin(double %5)
%7 = tail call double @llvm.fmuladd.f64(double %3, double %6, double %5)
%8 = fsub double %7, %0
%9 = tail call double @cos(double %5)
%10 = tail call double @llvm.fmuladd.f64(double %3, double %9, double 1.000000e+00)
%11 = fdiv double %8, %10
%12 = fsub double %5, %11
%13 = fcmp olt double %11, 0.000000e+00
%14 = fneg double %11
%15 = select i1 %13, double %14, double %11
%16 = fcmp ult double %15, 0x3ED455A5B2FF8F9D
br i1 %16, label %17, label %4
17: ; preds = %4
%18 = fadd double %12, 0xC00921FB54442D18
%19 = fcmp olt double %18, 0.000000e+00
%20 = fneg double %18
%21 = select i1 %19, double %20, double %18
%22 = fcmp olt double %21, 0x3ED455A5B2FF8F9D
br i1 %22, label %35, label %23
23: ; preds = %17
%24 = fadd double %1, 1.000000e+00
%25 = fsub double 1.000000e+00, %1
%26 = fdiv double %24, %25
%27 = fptosi double %26 to i32
%28 = tail call i32 @sqrt(i32 %27)
%29 = fmul double %12, 5.000000e-01
%30 = tail call i32 @tan(double %29)
%31 = mul nsw i32 %30, %28
%32 = tail call i32 @atan(i32 %31)
%33 = shl nsw i32 %32, 1
%34 = sitofp i32 %33 to double
br label %35
35: ; preds = %17, %23
%36 = phi double [ %34, %23 ], [ 0x400921FB54442D18, %17 ]
%37 = fcmp olt double %36, 0.000000e+00
%38 = fadd double %36, 0x401921FB54442D18
%39 = select i1 %37, double %38, double %36
ret double %39
}