double kepler(m, ecc)
double m, ecc;
{
  double e, delta;
  e = m = ((m) * (3.14159265358979323846 / 180.0));
  do {
    delta = e - ecc * sin(e) - m;
    e -= delta / (1 - ecc * cos(e));
  } while (((delta) < 0 ? (-(delta)) : delta) > 1E-6);
  return e;
}


x86 assembly (clang, -O0):
<kepler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xec6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%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,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xe1d(%rip),%xmm2
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1235 <kepler+0x115>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    123f <kepler+0x11f>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xdc4(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1149 <kepler+0x29>
movsd  -0x18(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kepler>:
sub    $0x38,%rsp
movapd %xmm0,%xmm2
mulsd  0xed0(%rip),%xmm2
xorpd  0xee8(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm2,(%rsp)
movapd %xmm2,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
addsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1040 <cos@plt>
movsd  (%rsp),%xmm2
mulsd  0x10(%rsp),%xmm0
addsd  0xe76(%rip),%xmm0
movapd 0x20(%rsp),%xmm3
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm3,%xmm0
xorpd  0xe70(%rip),%xmm0
movapd %xmm3,%xmm1
cmpltsd 0xe5b(%rip),%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm0,%xmm1
ucomisd 0xe3f(%rip),%xmm1
ja     1150 <kepler+0x30>
movapd %xmm2,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @kepler(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = fmul double %7, 0x3F91DF46A2529D39
store double %8, 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
store double %17, double* %6
%18 = load double, double* %6
%19 = load double, double* %4
%20 = load double, double* %5
%21 = call double @cos(double %20)
%22 = fneg double %19
%23 = call double @llvm.fmuladd.f64(double %22, double %21, double 1.000000e+00)
%24 = fdiv double %18, %23
%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 ogt double %36, 0x3EB0C6F7A0B5ED8D
br i1 %37, label %9, label %38
38: ; preds = %35
%39 = load double, double* %5
ret double %39
}

LLVM IR (-O2):
define double @kepler(double %0, double %1) {
%3 = fmul double %0, 0x3F91DF46A2529D39
%4 = fneg double %1
br label %5
5: ; preds = %5, %2
%6 = phi double [ %3, %2 ], [ %13, %5 ]
%7 = tail call double @sin(double %6)
%8 = tail call double @llvm.fmuladd.f64(double %4, double %7, double %6)
%9 = fsub double %8, %3
%10 = tail call double @cos(double %6)
%11 = tail call double @llvm.fmuladd.f64(double %4, double %10, double 1.000000e+00)
%12 = fdiv double %9, %11
%13 = fsub double %6, %12
%14 = fcmp olt double %9, 0.000000e+00
%15 = fneg double %9
%16 = select i1 %14, double %15, double %9
%17 = fcmp ogt double %16, 0x3EB0C6F7A0B5ED8D
br i1 %17, label %5, label %18
18: ; preds = %5
ret double %13
}