#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 probability(int, int);
double six_f1(int a, int b, int c, int d, int e, int f) {
  double ab, ac, ad, bc, bd, cb, cd, db, dc, ef, fe, ae, af;
  ab = probability(a, b);
  ac = probability(a, c);
  ad = probability(a, d);
  ae = probability(a, e);
  af = probability(a, f);
  bc = probability(b, c);
  bd = probability(b, d);
  cd = probability(c, d);
  ef = probability(e, f);
  cb = 1.0 - bc;
  db = 1.0 - bd;
  dc = 1.0 - cd;
  fe = 1.0 - ef;
  return (ab * ac * (cd + bd) + ac * ad * (db + cb) + ab * ad * (dc + bc)) *
         (ef * ae + fe * af);
}


x86 assembly (clang, -O0):
<six_f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <probability@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xe39(%rip),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe27(%rip),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe15(%rip),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe03(%rip),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
addsd  -0x40(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm3
addsd  -0x48(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
addsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
movsd  -0x70(%rbp),%xmm2
mulsd  -0x80(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<six_f1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <probability@plt>
movsd  %xmm0,0x38(%rsp)
mov    %ebp,%edi
mov    %r13d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebp,%edi
mov    %r12d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x20(%rsp)
mov    %ebp,%edi
mov    %r15d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x40(%rsp)
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x30(%rsp)
mov    %ebx,%edi
mov    %r13d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x18(%rsp)
mov    %ebx,%edi
mov    %r12d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x10(%rsp)
mov    %r13d,%edi
mov    %r12d,%esi
call   1030 <probability@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r15d,%edi
mov    %r14d,%esi
call   1030 <probability@plt>
movsd  0xe43(%rip),%xmm1
movapd %xmm1,%xmm2
movsd  0x18(%rsp),%xmm8
subsd  %xmm8,%xmm2
movapd %xmm1,%xmm3
movsd  0x10(%rsp),%xmm7
subsd  %xmm7,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm1,%xmm2
movsd  0x8(%rsp),%xmm9
subsd  %xmm9,%xmm2
subsd  %xmm0,%xmm1
movsd  0x38(%rsp),%xmm5
movapd %xmm5,%xmm4
movsd  0x28(%rsp),%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm9,%xmm7
mulsd  %xmm4,%xmm7
movsd  0x20(%rsp),%xmm4
mulsd  %xmm4,%xmm6
mulsd  %xmm3,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm4,%xmm5
addsd  %xmm8,%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm6,%xmm2
mulsd  0x30(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @six_f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = call double @probability(i32 %26, i32 %27)
store double %28, double* %13
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = call double @probability(i32 %29, i32 %30)
store double %31, double* %14
%32 = load i32, i32* %7
%33 = load i32, i32* %10
%34 = call double @probability(i32 %32, i32 %33)
store double %34, double* %15
%35 = load i32, i32* %7
%36 = load i32, i32* %11
%37 = call double @probability(i32 %35, i32 %36)
store double %37, double* %24
%38 = load i32, i32* %7
%39 = load i32, i32* %12
%40 = call double @probability(i32 %38, i32 %39)
store double %40, double* %25
%41 = load i32, i32* %8
%42 = load i32, i32* %9
%43 = call double @probability(i32 %41, i32 %42)
store double %43, double* %16
%44 = load i32, i32* %8
%45 = load i32, i32* %10
%46 = call double @probability(i32 %44, i32 %45)
store double %46, double* %17
%47 = load i32, i32* %9
%48 = load i32, i32* %10
%49 = call double @probability(i32 %47, i32 %48)
store double %49, double* %19
%50 = load i32, i32* %11
%51 = load i32, i32* %12
%52 = call double @probability(i32 %50, i32 %51)
store double %52, double* %22
%53 = load double, double* %16
%54 = fsub double 1.000000e+00, %53
store double %54, double* %18
%55 = load double, double* %17
%56 = fsub double 1.000000e+00, %55
store double %56, double* %20
%57 = load double, double* %19
%58 = fsub double 1.000000e+00, %57
store double %58, double* %21
%59 = load double, double* %22
%60 = fsub double 1.000000e+00, %59
store double %60, double* %23
%61 = load double, double* %13
%62 = load double, double* %14
%63 = fmul double %61, %62
%64 = load double, double* %19
%65 = load double, double* %17
%66 = fadd double %64, %65
%67 = load double, double* %14
%68 = load double, double* %15
%69 = fmul double %67, %68
%70 = load double, double* %20
%71 = load double, double* %18
%72 = fadd double %70, %71
%73 = fmul double %69, %72
%74 = call double @llvm.fmuladd.f64(double %63, double %66, double %73)
%75 = load double, double* %13
%76 = load double, double* %15
%77 = fmul double %75, %76
%78 = load double, double* %21
%79 = load double, double* %16
%80 = fadd double %78, %79
%81 = call double @llvm.fmuladd.f64(double %77, double %80, double %74)
%82 = load double, double* %22
%83 = load double, double* %24
%84 = load double, double* %23
%85 = load double, double* %25
%86 = fmul double %84, %85
%87 = call double @llvm.fmuladd.f64(double %82, double %83, double %86)
%88 = fmul double %81, %87
ret double %88
}

LLVM IR (-O2):
define double @six_f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call double @probability(i32 %0, i32 %1)
%8 = tail call double @probability(i32 %0, i32 %2)
%9 = tail call double @probability(i32 %0, i32 %3)
%10 = tail call double @probability(i32 %0, i32 %4)
%11 = tail call double @probability(i32 %0, i32 %5)
%12 = tail call double @probability(i32 %1, i32 %2)
%13 = tail call double @probability(i32 %1, i32 %3)
%14 = tail call double @probability(i32 %2, i32 %3)
%15 = tail call double @probability(i32 %4, i32 %5)
%16 = fsub double 1.000000e+00, %12
%17 = fsub double 1.000000e+00, %13
%18 = fsub double 1.000000e+00, %14
%19 = fsub double 1.000000e+00, %15
%20 = fmul double %7, %8
%21 = fadd double %13, %14
%22 = fmul double %8, %9
%23 = fadd double %16, %17
%24 = fmul double %22, %23
%25 = tail call double @llvm.fmuladd.f64(double %20, double %21, double %24)
%26 = fmul double %7, %9
%27 = fadd double %12, %18
%28 = tail call double @llvm.fmuladd.f64(double %26, double %27, double %25)
%29 = fmul double %11, %19
%30 = tail call double @llvm.fmuladd.f64(double %15, double %10, double %29)
%31 = fmul double %28, %30
ret double %31
}