#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 /*<<< orphan*/ dcs_pair_production_range(double, double, double, double *,
                                             double *);
int /*<<< orphan*/ dcs_photonuclear_range(double, double, double *, double *);
void dcs_get_range(int process, double Z, double mass, double energy,
                   double *qmin, double *qmax) {
  if (process == 2) {
    dcs_photonuclear_range(mass, energy, qmin, qmax);
  } else {
    dcs_pair_production_range(Z, mass, energy, qmin, qmax);
    if (process == 0)
      *qmin = 0.;
  }
}


x86 assembly (clang, -O0):
<dcs_get_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1168 <dcs_get_range+0x48>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <dcs_photonuclear_range@plt>
jmp    119e <dcs_get_range+0x7e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <dcs_pair_production_range@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1199 <dcs_get_range+0x79>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    119e <dcs_get_range+0x7e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcs_get_range>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1142 <dcs_get_range+0x22>
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
mov    %rbx,%rdi
mov    %rdx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <dcs_photonuclear_range@plt>
mov    %edi,%ebp
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1040 <dcs_pair_production_range@plt>
test   %ebp,%ebp
jne    115a <dcs_get_range+0x3a>
movq   $0x0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @dcs_get_range(i32 %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
store i32 %0, i32* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load i32, i32* %7
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %21
15: ; preds = %6
%16 = load double, double* %9
%17 = load double, double* %10
%18 = load double*, double** %11
%19 = load double*, double** %12
%20 = call i32 @dcs_photonuclear_range(double %16, double %17, double* %18, double* %19)
br label %33
21: ; preds = %6
%22 = load double, double* %8
%23 = load double, double* %9
%24 = load double, double* %10
%25 = load double*, double** %11
%26 = load double*, double** %12
%27 = call i32 @dcs_pair_production_range(double %22, double %23, double %24, double* %25, double* %26)
%28 = load i32, i32* %7
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %21
%31 = load double*, double** %11
store double 0.000000e+00, double* %31
br label %32
32: ; preds = %30, %21
br label %33
33: ; preds = %32, %15
ret void
}

LLVM IR (-O2):
define void @dcs_get_range(i32 %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = icmp eq i32 %0, 2
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @dcs_photonuclear_range(double %2, double %3, double* %4, double* %5)
br label %14
10: ; preds = %6
%11 = tail call i32 @dcs_pair_production_range(double %1, double %2, double %3, double* %4, double* %5)
%12 = icmp eq i32 %0, 0
br i1 %12, label %13, label %14
13: ; preds = %10
store double 0.000000e+00, double* %4
br label %14
14: ; preds = %10, %13, %8
ret void
}