#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 IsoBiE(int, int);
double IsoQ(int ZP, int ZT, int ZProd, int AP, int AT, int AProd) {
  double BiEP = 0, BiET = 0, BiEProd = 0, BiERes = 0;
  if ((BiEP = IsoBiE(ZP, AP)) == -9999999.0)
    return -9999999.0;
  if ((BiET = IsoBiE(ZT, AT)) == -9999999.0)
    return -9999999.0;
  if ((BiEProd = IsoBiE(ZProd, AProd)) == -9999999.0)
    return -9999999.0;
  if ((BiERes = IsoBiE(ZP + ZT - ZProd, AP + AT - AProd)) == -9999999.0)
    return -9999999.0;
  return BiERes + BiEProd - BiET - BiEP;
}


x86 assembly (clang, -O0):
<IsoQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <IsoBiE@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1186 <IsoQ+0x76>
jp     1186 <IsoQ+0x76>
movsd  0xe84(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1259 <IsoQ+0x149>
mov    -0x10(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1030 <IsoBiE@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe62(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11c0 <IsoQ+0xb0>
jp     11c0 <IsoQ+0xb0>
movsd  0xe4a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1259 <IsoQ+0x149>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1030 <IsoBiE@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xe28(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11fa <IsoQ+0xea>
jp     11fa <IsoQ+0xea>
movsd  0xe10(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1259 <IsoQ+0x149>
mov    -0xc(%rbp),%edi
add    -0x10(%rbp),%edi
sub    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x1c(%rbp),%esi
sub    -0x20(%rbp),%esi
call   1030 <IsoBiE@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  0xde2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1240 <IsoQ+0x130>
jp     1240 <IsoQ+0x130>
movsd  0xdca(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1259 <IsoQ+0x149>
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsoQ>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%ebx
mov    %edx,%r12d
mov    %esi,%r13d
mov    %edi,%ebp
mov    %ecx,%esi
call   1030 <IsoBiE@plt>
movapd %xmm0,%xmm1
movsd  0xebf(%rip),%xmm0
movsd  %xmm1,0x10(%rsp)
ucomisd %xmm0,%xmm1
jne    1153 <IsoQ+0x43>
jnp    11e4 <IsoQ+0xd4>
mov    %r13d,%edi
mov    %r15d,%esi
call   1030 <IsoBiE@plt>
movapd %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    1172 <IsoQ+0x62>
jnp    11e4 <IsoQ+0xd4>
mov    %r12d,%edi
mov    %r14d,%esi
movsd  %xmm1,0x8(%rsp)
call   1030 <IsoBiE@plt>
movapd %xmm0,%xmm1
movsd  0xe71(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    1197 <IsoQ+0x87>
jnp    11e4 <IsoQ+0xd4>
add    %ebp,%r13d
sub    %r12d,%r13d
add    %ebx,%r15d
sub    %r14d,%r15d
mov    %r13d,%edi
mov    %r15d,%esi
movsd  %xmm1,(%rsp)
call   1030 <IsoBiE@plt>
movsd  (%rsp),%xmm3
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
movsd  0xe36(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    11d2 <IsoQ+0xc2>
jnp    11e4 <IsoQ+0xd4>
addsd  %xmm1,%xmm3
subsd  %xmm2,%xmm3
subsd  0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @IsoQ(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
%18 = load i32, i32* %8
%19 = load i32, i32* %11
%20 = call double @IsoBiE(i32 %18, i32 %19)
store double %20, double* %14
%21 = fcmp oeq double %20, 0xC16312CFE0000000
br i1 %21, label %22, label %23
22: ; preds = %6
store double 0xC16312CFE0000000, double* %7
br label %57
23: ; preds = %6
%24 = load i32, i32* %9
%25 = load i32, i32* %12
%26 = call double @IsoBiE(i32 %24, i32 %25)
store double %26, double* %15
%27 = fcmp oeq double %26, 0xC16312CFE0000000
br i1 %27, label %28, label %29
28: ; preds = %23
store double 0xC16312CFE0000000, double* %7
br label %57
29: ; preds = %23
%30 = load i32, i32* %10
%31 = load i32, i32* %13
%32 = call double @IsoBiE(i32 %30, i32 %31)
store double %32, double* %16
%33 = fcmp oeq double %32, 0xC16312CFE0000000
br i1 %33, label %34, label %35
34: ; preds = %29
store double 0xC16312CFE0000000, double* %7
br label %57
35: ; preds = %29
%36 = load i32, i32* %8
%37 = load i32, i32* %9
%38 = add nsw i32 %36, %37
%39 = load i32, i32* %10
%40 = sub nsw i32 %38, %39
%41 = load i32, i32* %11
%42 = load i32, i32* %12
%43 = add nsw i32 %41, %42
%44 = load i32, i32* %13
%45 = sub nsw i32 %43, %44
%46 = call double @IsoBiE(i32 %40, i32 %45)
store double %46, double* %17
%47 = fcmp oeq double %46, 0xC16312CFE0000000
br i1 %47, label %48, label %49
48: ; preds = %35
store double 0xC16312CFE0000000, double* %7
br label %57
49: ; preds = %35
%50 = load double, double* %17
%51 = load double, double* %16
%52 = fadd double %50, %51
%53 = load double, double* %15
%54 = fsub double %52, %53
%55 = load double, double* %14
%56 = fsub double %54, %55
store double %56, double* %7
br label %57
57: ; preds = %49, %48, %34, %28, %22
%58 = load double, double* %7
ret double %58
}

LLVM IR (-O2):
define double @IsoQ(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call double @IsoBiE(i32 %0, i32 %3)
%8 = fcmp oeq double %7, 0xC16312CFE0000000
br i1 %8, label %26, label %9
9: ; preds = %6
%10 = tail call double @IsoBiE(i32 %1, i32 %4)
%11 = fcmp oeq double %10, 0xC16312CFE0000000
br i1 %11, label %26, label %12
12: ; preds = %9
%13 = tail call double @IsoBiE(i32 %2, i32 %5)
%14 = fcmp oeq double %13, 0xC16312CFE0000000
br i1 %14, label %26, label %15
15: ; preds = %12
%16 = add nsw i32 %1, %0
%17 = sub i32 %16, %2
%18 = add nsw i32 %4, %3
%19 = sub i32 %18, %5
%20 = tail call double @IsoBiE(i32 %17, i32 %19)
%21 = fcmp oeq double %20, 0xC16312CFE0000000
br i1 %21, label %26, label %22
22: ; preds = %15
%23 = fadd double %13, %20
%24 = fsub double %23, %10
%25 = fsub double %24, %7
br label %26
26: ; preds = %15, %12, %9, %6, %22
%27 = phi double [ %25, %22 ], [ 0xC16312CFE0000000, %6 ], [ 0xC16312CFE0000000, %9 ], [ 0xC16312CFE0000000, %12 ], [ 0xC16312CFE0000000, %15 ]
ret double %27
}