#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(float, double);
double component_tempk(double frac1, double tk1, double composite_tk) {
  float numer, tk2;
  if (frac1 < 0.8 && frac1 >= 0.0) {
    numer = pow(composite_tk, 4.0) - (frac1 * pow(tk1, 4.0));
    tk2 = pow(numer / (1.0 - frac1), 0.25);
  } else
    tk2 = composite_tk;
  return (tk2);
}


x86 assembly (clang, -O0):
<component_tempk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11f5 <component_tempk+0xe5>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11f5 <component_tempk+0xe5>
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xebb(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe96(%rip),%xmm1
call   1030 <pow@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
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe43(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe26(%rip),%xmm1
call   1030 <pow@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1203 <component_tempk+0xf3>
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_tempk>:
sub    $0x18,%rsp
movapd %xmm0,%xmm4
movsd  0xee0(%rip),%xmm0
ucomisd %xmm4,%xmm0
jbe    11b9 <component_tempk+0xa9>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
jb     11b9 <component_tempk+0xa9>
movaps %xmm1,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movsd  0xebe(%rip),%xmm1
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,(%rsp)
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe97(%rip),%xmm1
call   1030 <pow@plt>
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe73(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe67(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @component_tempk(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca float
%8 = alloca float
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = fcmp olt double %9, 8.000000e-01
br i1 %10, label %11, label %33
11: ; preds = %3
%12 = load double, double* %4
%13 = fcmp oge double %12, 0.000000e+00
br i1 %13, label %14, label %33
14: ; preds = %11
%15 = load double, double* %6
%16 = fptrunc double %15 to float
%17 = call double @pow(float %16, double 4.000000e+00)
%18 = load double, double* %4
%19 = load double, double* %5
%20 = fptrunc double %19 to float
%21 = call double @pow(float %20, double 4.000000e+00)
%22 = fneg double %18
%23 = call double @llvm.fmuladd.f64(double %22, double %21, double %17)
%24 = fptrunc double %23 to float
store float %24, float* %7
%25 = load float, float* %7
%26 = fpext float %25 to double
%27 = load double, double* %4
%28 = fsub double 1.000000e+00, %27
%29 = fdiv double %26, %28
%30 = fptrunc double %29 to float
%31 = call double @pow(float %30, double 2.500000e-01)
%32 = fptrunc double %31 to float
store float %32, float* %8
br label %36
33: ; preds = %11, %3
%34 = load double, double* %6
%35 = fptrunc double %34 to float
store float %35, float* %8
br label %36
36: ; preds = %33, %14
%37 = load float, float* %8
%38 = fpext float %37 to double
ret double %38
}

LLVM IR (-O2):
define double @component_tempk(double %0, double %1, double %2) {
%4 = fcmp olt double %0, 8.000000e-01
%5 = fcmp oge double %0, 0.000000e+00
%6 = and i1 %4, %5
br i1 %6, label %7, label %20
7: ; preds = %3
%8 = fptrunc double %2 to float
%9 = tail call double @pow(float %8, double 4.000000e+00)
%10 = fptrunc double %1 to float
%11 = tail call double @pow(float %10, double 4.000000e+00)
%12 = fneg double %0
%13 = tail call double @llvm.fmuladd.f64(double %12, double %11, double %9)
%14 = fptrunc double %13 to float
%15 = fpext float %14 to double
%16 = fsub double 1.000000e+00, %0
%17 = fdiv double %15, %16
%18 = fptrunc double %17 to float
%19 = tail call double @pow(float %18, double 2.500000e-01)
br label %20
20: ; preds = %3, %7
%21 = phi double [ %19, %7 ], [ %2, %3 ]
%22 = fptrunc double %21 to float
%23 = fpext float %22 to double
ret double %23
}