#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 erfc(double);
double exp(double);
double theta_plus(double z, double k, double xi) {
  if (k * z < 600)
    return exp(k * z) * erfc(k / (2.0 * xi) + xi * z);
  else
    return 0.0;
}


x86 assembly (clang, -O0):
<theta_plus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeb7(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11aa <theta_plus+0x8a>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xe94(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <erfc@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11b2 <theta_plus+0x92>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<theta_plus>:
sub    $0x28,%rsp
movapd %xmm0,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
xorpd  %xmm0,%xmm0
movsd  0xec4(%rip),%xmm5
ucomisd %xmm4,%xmm5
jbe    1194 <theta_plus+0x74>
movapd %xmm4,%xmm0
movsd  %xmm3,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <erfc@plt>
mulsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @theta_plus(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %6
%9 = load double, double* %5
%10 = fmul double %8, %9
%11 = fcmp olt double %10, 6.000000e+02
br i1 %11, label %12, label %26
12: ; preds = %3
%13 = load double, double* %6
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = call double @exp(double %15)
%17 = load double, double* %6
%18 = load double, double* %7
%19 = fmul double 2.000000e+00, %18
%20 = fdiv double %17, %19
%21 = load double, double* %7
%22 = load double, double* %5
%23 = call double @llvm.fmuladd.f64(double %21, double %22, double %20)
%24 = call double @erfc(double %23)
%25 = fmul double %16, %24
store double %25, double* %4
br label %27
26: ; preds = %3
store double 0.000000e+00, double* %4
br label %27
27: ; preds = %26, %12
%28 = load double, double* %4
ret double %28
}

LLVM IR (-O2):
define double @theta_plus(double %0, double %1, double %2) {
%4 = fmul double %0, %1
%5 = fcmp olt double %4, 6.000000e+02
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = tail call double @exp(double %4)
%8 = fmul double %2, 2.000000e+00
%9 = fdiv double %1, %8
%10 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %9)
%11 = tail call double @erfc(double %10)
%12 = fmul double %7, %11
br label %13
13: ; preds = %3, %6
%14 = phi double [ %12, %6 ], [ 0.000000e+00, %3 ]
ret double %14
}