#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 exp(double);
int pow(double, int);
double Planck_law(double wavelength, double T) {
  double c = 299792458;
  double h = 6.626070040 * pow(10, -34);
  double k = 1.38064852 * pow(10, -23);
  double E = (2 * h * pow(c, 2)) / pow(wavelength, 5) * 1 /
             (exp((h * c) / (wavelength * k * T)) - 1);
  return E;
}


x86 assembly (clang, -O0):
<Planck_law>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeee(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
mov    $0xffffffde,%edi
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeaa(%rip),%xmm0
mov    $0xffffffe9,%edi
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe8c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe73(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x48(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
movsd  -0x40(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x38(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Planck_law>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm1,0x18(%rsp)
movaps %xmm0,0x20(%rsp)
movsd  0xec8(%rip),%xmm0
mov    $0xffffffde,%edi
call   1040 <pow@plt>
mov    %eax,%ebx
movsd  0xeb4(%rip),%xmm0
mov    $0xffffffe9,%edi
call   1040 <pow@plt>
movd   %ebx,%xmm0
movd   %eax,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
mulpd  0xea2(%rip),%xmm0
movapd %xmm0,0x30(%rsp)
addsd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
movsd  0xe83(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movaps 0x20(%rsp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd 0xe54(%rip),%xmm0
unpcklpd 0x20(%rsp),%xmm0
mulpd  0x30(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
mulsd  0x18(%rsp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @Planck_law(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0x41B1DE784A000000, double* %5
%9 = call i32 @pow(double 1.000000e+01, i32 -34)
%10 = sitofp i32 %9 to double
%11 = fmul double 0x401A8118812B38BE, %10
store double %11, double* %6
%12 = call i32 @pow(double 1.000000e+01, i32 -23)
%13 = sitofp i32 %12 to double
%14 = fmul double 0x3FF61722E70ABB9B, %13
store double %14, double* %7
%15 = load double, double* %6
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %5
%18 = call i32 @pow(double %17, i32 2)
%19 = sitofp i32 %18 to double
%20 = fmul double %16, %19
%21 = load double, double* %3
%22 = call i32 @pow(double %21, i32 5)
%23 = sitofp i32 %22 to double
%24 = fdiv double %20, %23
%25 = fmul double %24, 1.000000e+00
%26 = load double, double* %6
%27 = load double, double* %5
%28 = fmul double %26, %27
%29 = load double, double* %3
%30 = load double, double* %7
%31 = fmul double %29, %30
%32 = load double, double* %4
%33 = fmul double %31, %32
%34 = fdiv double %28, %33
%35 = call i32 @exp(double %34)
%36 = sub nsw i32 %35, 1
%37 = sitofp i32 %36 to double
%38 = fdiv double %25, %37
store double %38, double* %8
%39 = load double, double* %8
ret double %39
}

LLVM IR (-O2):
define double @Planck_law(double %0, double %1) {
%3 = tail call i32 @pow(double 1.000000e+01, i32 -34)
%4 = tail call i32 @pow(double 1.000000e+01, i32 -23)
%5 = insertelement <2 x i32> poison, i32 %3, i64 0
%6 = insertelement <2 x i32> %5, i32 %4, i64 1
%7 = sitofp <2 x i32> %6 to <2 x double>
%8 = fmul <2 x double> %7, <double 0x401A8118812B38BE, double 0x3FF61722E70ABB9B>
%9 = extractelement <2 x double> %8, i64 0
%10 = fmul double %9, 2.000000e+00
%11 = tail call i32 @pow(double 0x41B1DE784A000000, i32 2)
%12 = sitofp i32 %11 to double
%13 = fmul double %10, %12
%14 = tail call i32 @pow(double %0, i32 5)
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
%17 = insertelement <2 x double> <double 0x41B1DE784A000000, double poison>, double %0, i64 1
%18 = fmul <2 x double> %8, %17
%19 = extractelement <2 x double> %18, i64 1
%20 = fmul double %19, %1
%21 = extractelement <2 x double> %18, i64 0
%22 = fdiv double %21, %20
%23 = tail call i32 @exp(double %22)
%24 = add nsw i32 %23, -1
%25 = sitofp i32 %24 to double
%26 = fdiv double %16, %25
ret double %26
}