#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 asymm_mt2_lester_bisect(double, double, double, double, double, double,
                               double, double, double, double);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  double visA[3] = {100.0, 410.0, 20.0};
  double visB[4] = {150.0, -210.0, -300.0};
  double ptmiss[2] = {-200.0, 280.0};
  double mchi = 100.0;
  double mT2 =
      asymm_mt2_lester_bisect(visA[0], visA[1], visA[2], visB[0], visB[1],
                              visB[2], ptmiss[0], ptmiss[1], mchi, mchi);
  printf("MT2 = %f\n", mT2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xee0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x48(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x50(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movsd  -0x58(%rbp),%xmm9
movsd  -0x58(%rbp),%xmm8
movsd  %xmm9,(%rsp)
movsd  %xmm8,0x8(%rsp)
call   1040 <asymm_mt2_lester_bisect@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4059000000000000,%rax
movsd  0xecd(%rip),%xmm0
movsd  0xecd(%rip),%xmm1
movsd  0xecd(%rip),%xmm2
movsd  0xecd(%rip),%xmm3
movsd  0xecd(%rip),%xmm4
movsd  0xecd(%rip),%xmm5
movsd  0xecd(%rip),%xmm6
movsd  0xecd(%rip),%xmm7
push   %rax
push   %rax
call   1040 <asymm_mt2_lester_bisect@plt>
add    $0x10,%rsp
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.visA = [3 x double] [double 1.000000e+02, double 4.100000e+02, double 2.000000e+01]
@__const.main.visB = [4 x double] [double 1.500000e+02, double -2.100000e+02, double -3.000000e+02, double 0.000000e+00]
@__const.main.ptmiss = [2 x double] [double -2.000000e+02, double 2.800000e+02]
@.str = [10 x i8] c"MT2 = %f\0A\00"
define i32 @main() {
%1 = alloca [3 x double]
%2 = alloca [4 x double]
%3 = alloca [2 x double]
%4 = alloca double
%5 = alloca double
%6 = bitcast [3 x double]* %1 to i8*
%7 = bitcast [4 x double]* %2 to i8*
%8 = bitcast [2 x double]* %3 to i8*
store double 1.000000e+02, double* %4
%9 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%10 = load double, double* %9
%11 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
%12 = load double, double* %11
%13 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 1
%18 = load double, double* %17
%19 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
%20 = load double, double* %19
%21 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%22 = load double, double* %21
%23 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%24 = load double, double* %23
%25 = load double, double* %4
%26 = load double, double* %4
%27 = call double @asymm_mt2_lester_bisect(double %10, double %12, double %14, double %16, double %18, double %20, double %22, double %24, double %25, double %26)
store double %27, double* %5
%28 = load double, double* %5
%29 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"MT2 = %f\0A\00"
define i32 @main() {
%1 = tail call double @asymm_mt2_lester_bisect(double 1.000000e+02, double 4.100000e+02, double 2.000000e+01, double 1.500000e+02, double -2.100000e+02, double -3.000000e+02, double -2.000000e+02, double 2.800000e+02, double 1.000000e+02, double 1.000000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}