#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_minus(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_minus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xea0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ef <theta_minus+0xcf>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xe66(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
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    11f7 <theta_minus+0xd7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<theta_minus>:
sub    $0x38,%rsp
movapd %xmm0,%xmm5
movapd 0xed0(%rip),%xmm0
xorpd  %xmm1,%xmm0
mulsd  %xmm5,%xmm0
xorpd  %xmm3,%xmm3
movsd  0xecc(%rip),%xmm4
ucomisd %xmm0,%xmm4
jbe    11a0 <theta_minus+0x80>
movapd %xmm1,0x20(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm5,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
movapd 0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <erfc@plt>
movapd %xmm0,%xmm3
mulsd  0x18(%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @theta_minus(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 = fneg double %8
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = fcmp olt double %11, 6.000000e+02
br i1 %12, label %13, label %29
13: ; preds = %3
%14 = load double, double* %6
%15 = fneg double %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = call double @exp(double %17)
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fmul double 2.000000e+00, %20
%22 = fdiv double %19, %21
%23 = load double, double* %7
%24 = load double, double* %5
%25 = fneg double %23
%26 = call double @llvm.fmuladd.f64(double %25, double %24, double %22)
%27 = call double @erfc(double %26)
%28 = fmul double %18, %27
store double %28, double* %4
br label %30
29: ; preds = %3
store double 0.000000e+00, double* %4
br label %30
30: ; preds = %29, %13
%31 = load double, double* %4
ret double %31
}

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