#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 CalculateHypervolume(double **, int, int);
int FilterNondominatedSet(double **, int, int);
int /*<<< orphan*/ populateFront(double ***, double *, size_t, int);
int /*<<< orphan*/ printf(char *, double);
void incr_hv(double *hv_i, double *A, size_t numelA, size_t nObjs) {
  double **front1;
  int sizeFront1 = numelA;
  int redSizeFront1;
  double volFront1;
  int noObjectives = nObjs;
  populateFront(&front1, A, numelA, noObjectives);
  redSizeFront1 = FilterNondominatedSet(front1, sizeFront1, noObjectives);
  volFront1 = CalculateHypervolume(front1, redSizeFront1, noObjectives);
  printf("%.10f ", volFront1);
}


x86 assembly (clang, -O0):
<incr_hv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
lea    -0x28(%rbp),%rdi
call   1030 <populateFront@plt>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1040 <FilterNondominatedSet@plt>
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1060 <CalculateHypervolume@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe54(%rip),%rdi
call   1050 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<incr_hv>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsp,%rdi
call   1030 <populateFront@plt>
mov    (%rsp),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1040 <FilterNondominatedSet@plt>
mov    (%rsp),%rdi
mov    %eax,%esi
mov    %ebx,%edx
call   1060 <CalculateHypervolume@plt>
lea    0xe8c(%rip),%rdi
call   1050 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.10f \00"
define void @incr_hv(double* %0, double* %1, i64 %2, i64 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i64
%8 = alloca i64
%9 = alloca double**
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%14 = load i64, i64* %7
%15 = trunc i64 %14 to i32
store i32 %15, i32* %10
%16 = load i64, i64* %8
%17 = trunc i64 %16 to i32
store i32 %17, i32* %13
%18 = load double*, double** %6
%19 = load i64, i64* %7
%20 = load i32, i32* %13
%21 = call i32 @populateFront(double*** %9, double* %18, i64 %19, i32 %20)
%22 = load double**, double*** %9
%23 = load i32, i32* %10
%24 = load i32, i32* %13
%25 = call i32 @FilterNondominatedSet(double** %22, i32 %23, i32 %24)
store i32 %25, i32* %11
%26 = load double**, double*** %9
%27 = load i32, i32* %11
%28 = load i32, i32* %13
%29 = call double @CalculateHypervolume(double** %26, i32 %27, i32 %28)
store double %29, double* %12
%30 = load double, double* %12
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %30)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.10f \00"
define void @incr_hv(double* nocapture readnone %0, double* %1, i64 %2, i64 %3) {
%5 = alloca double**
%6 = bitcast double*** %5 to i8*
%7 = trunc i64 %2 to i32
%8 = trunc i64 %3 to i32
%9 = call i32 @populateFront(double*** %5, double* %1, i64 %2, i32 %8)
%10 = load double**, double*** %5
%11 = call i32 @FilterNondominatedSet(double** %10, i32 %7, i32 %8)
%12 = load double**, double*** %5
%13 = call double @CalculateHypervolume(double** %12, i32 %11, i32 %8)
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %13)
ret void
}