#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 exp(double);
double pow(double, int);
double tk2rad(double tk, double lambda, double emiss) {
  double term, lam, rad;
  lam = lambda * 1e-6;
  term = exp(0.0143876912 / (lam * tk)) - 1.0;
  rad = (emiss * 3.741774922e-22 / ((pow(lam, 5)) * 3.1415927 * term)) * 1000.0;
  return (rad);
}


x86 assembly (clang, -O0):
<tk2rad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xec5(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xeac(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe93(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xe62(%rip),%xmm2
mulsd  %xmm2,%xmm1
mulsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tk2rad>:
sub    $0x18,%rsp
mulsd  0xed4(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,(%rsp)
mulsd  %xmm1,%xmm0
movsd  0xec5(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
addsd  0xeb8(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xead(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x5,%edi
call   1040 <pow@plt>
mulsd  0xe98(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xe89(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tk2rad(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %5
%11 = fmul double %10, 0x3EB0C6F7A0B5ED8D
store double %11, double* %8
%12 = load double, double* %8
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = fdiv double 0x3F8D774B395A00E2, %14
%16 = call double @exp(double %15)
%17 = fsub double %16, 1.000000e+00
store double %17, double* %7
%18 = load double, double* %6
%19 = fmul double %18, 0x3B7C45A532944800
%20 = load double, double* %8
%21 = call double @pow(double %20, i32 5)
%22 = fmul double %21, 0x400921FB5A7ED197
%23 = load double, double* %7
%24 = fmul double %22, %23
%25 = fdiv double %19, %24
%26 = fmul double %25, 1.000000e+03
store double %26, double* %9
%27 = load double, double* %9
ret double %27
}

LLVM IR (-O2):
define double @tk2rad(double %0, double %1, double %2) {
%4 = fmul double %1, 0x3EB0C6F7A0B5ED8D
%5 = fmul double %4, %0
%6 = fdiv double 0x3F8D774B395A00E2, %5
%7 = tail call double @exp(double %6)
%8 = fadd double %7, -1.000000e+00
%9 = fmul double %2, 0x3B7C45A532944800
%10 = tail call double @pow(double %4, i32 5)
%11 = fmul double %10, 0x400921FB5A7ED197
%12 = fmul double %8, %11
%13 = fdiv double %9, %12
%14 = fmul double %13, 1.000000e+03
ret double %14
}