#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 */
void dcs_photonuclear_range(double m, double K, double *qmin, double *qmax) {
  const double M = 0.5 * (0.939565 + 0.938272);
  const double mpi = 0.13957018;
  if (qmin != NULL)
    *qmin = mpi + 0.5 * mpi * mpi / M;
  if (qmax != NULL)
    *qmax = K + m - 0.5 * (M + m * m / M);
}


x86 assembly (clang, -O0):
<dcs_photonuclear_range>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114b <dcs_photonuclear_range+0x4b>
mov    -0x18(%rbp),%rax
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     119a <dcs_photonuclear_range+0x9a>
movsd  -0x10(%rbp),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  0xe96(%rip),%xmm0
divsd  %xmm0,%xmm2
movsd  0xe8a(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  0xe8e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcs_photonuclear_range>:
test   %rdi,%rdi
je     1112 <dcs_photonuclear_range+0x12>
movabs $0x3fc3315b2b4dfce1,%rax
31 c3 3f
mov    %rax,(%rdi)
test   %rsi,%rsi
je     113f <dcs_photonuclear_range+0x3f>
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm0
movsd  0xed9(%rip),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm2,%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @dcs_photonuclear_range(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
store double 0x3FEE0B9ECF638002, double* %9
store double 0x3FC1DD6F874C6508, double* %10
%11 = load double*, double** %7
%12 = icmp ne double* %11, null
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = load double*, double** %7
store double 0x3FC3315B2B4DFCE1, double* %14
br label %15
15: ; preds = %13, %4
%16 = load double*, double** %8
%17 = icmp ne double* %16, null
br i1 %17, label %18, label %29
18: ; preds = %15
%19 = load double, double* %6
%20 = load double, double* %5
%21 = fadd double %19, %20
%22 = load double, double* %5
%23 = load double, double* %5
%24 = fmul double %22, %23
%25 = fdiv double %24, 0x3FEE0B9ECF638002
%26 = fadd double 0x3FEE0B9ECF638002, %25
%27 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %26, double %21)
%28 = load double*, double** %8
store double %27, double* %28
br label %29
29: ; preds = %18, %15
ret void
}

LLVM IR (-O2):
define void @dcs_photonuclear_range(double %0, double %1, double* writeonly %2, double* writeonly %3) {
%5 = icmp eq double* %2, null
br i1 %5, label %7, label %6
6: ; preds = %4
store double 0x3FC3315B2B4DFCE1, double* %2
br label %7
7: ; preds = %6, %4
%8 = icmp eq double* %3, null
br i1 %8, label %15, label %9
9: ; preds = %7
%10 = fadd double %0, %1
%11 = fmul double %0, %0
%12 = fdiv double %11, 0x3FEE0B9ECF638002
%13 = fadd double %12, 0x3FEE0B9ECF638002
%14 = tail call double @llvm.fmuladd.f64(double %13, double -5.000000e-01, double %10)
store double %14, double* %3
br label %15
15: ; preds = %9, %7
ret void
}