#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 */
double pow(int, double);
double sqrt(double);
double n(double lmbda) {
  double index, l;
  l = lmbda / 1.e-6;
  index = sqrt(3.3646 + (0.0912 / (2.383 - pow(l, -2.0))) +
               (50.37298 / (7.835 - pow(1, -2.0))));
  return index;
}


x86 assembly (clang, -O0):
<n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%edi
movsd  0xec0(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xea0(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x1,%edi
movsd  0xe82(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe65(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0xe51(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n>:
sub    $0x18,%rsp
divsd  0xed4(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xed0(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,(%rsp)
mov    $0x1,%edi
movsd  0xeba(%rip),%xmm0
call   1030 <pow@plt>
movapd (%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd 0xebc(%rip),%xmm1
subpd  %xmm2,%xmm1
movapd 0xec0(%rip),%xmm0
divpd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
addsd  %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     119b <n+0x7b>
sqrtsd %xmm0,%xmm0
add    $0x18,%rsp
ret
add    $0x18,%rsp
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @n(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fdiv double %5, 0x3EB0C6F7A0B5ED8D
store double %6, double* %4
%7 = load double, double* %4
%8 = fptosi double %7 to i32
%9 = call double @pow(i32 %8, double -2.000000e+00)
%10 = fsub double 2.383000e+00, %9
%11 = fdiv double 9.120000e-02, %10
%12 = fadd double 3.364600e+00, %11
%13 = call double @pow(i32 1, double -2.000000e+00)
%14 = fsub double 0x401F570A3D70A3D7, %13
%15 = fdiv double 0x40492FBDCF0307F2, %14
%16 = fadd double %12, %15
%17 = call double @sqrt(double %16)
store double %17, double* %3
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @n(double %0) {
%2 = fdiv double %0, 0x3EB0C6F7A0B5ED8D
%3 = fptosi double %2 to i32
%4 = tail call double @pow(i32 %3, double -2.000000e+00)
%5 = tail call double @pow(i32 1, double -2.000000e+00)
%6 = insertelement <2 x double> poison, double %4, i64 0
%7 = insertelement <2 x double> %6, double %5, i64 1
%8 = fsub <2 x double> <double 2.383000e+00, double 0x401F570A3D70A3D7>, %7
%9 = fdiv <2 x double> <double 9.120000e-02, double 0x40492FBDCF0307F2>, %8
%10 = extractelement <2 x double> %9, i64 0
%11 = fadd double %10, 3.364600e+00
%12 = extractelement <2 x double> %9, i64 1
%13 = fadd double %11, %12
%14 = tail call double @sqrt(double %13)
ret double %14
}