#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 */
scalar_t__ is_overloaded(int **, int ***, int, int);
int /*<<< orphan*/ repair_individual(int **, int ***, int **, int **, int, int,
                                     int, int, int *, int **, int, int, int **,
                                     int **);
void repair_population(int **population, int ***utilization, int **H, int **V,
                       int number_of_individuals, int h_size, int v_size,
                       int max_SLA, int *K, int **network_utilization,
                       int l_size, int **G, int **T) {
  int iterator_individual = 0;
  int iterator_virtual = 0;
  int iterator_physical = 0;
  int iterator_link = 0;
  int factibility = 1;
  for (iterator_individual = 0; iterator_individual < number_of_individuals;
       iterator_individual++) {
    factibility = 1;
    for (iterator_virtual = 0; iterator_virtual < v_size; iterator_virtual++) {
      if (V[iterator_virtual][3] == max_SLA &&
          population[iterator_individual][iterator_virtual] == 0) {
        factibility = 0;
        break;
      }
    }
    for (iterator_physical = 0; iterator_physical < h_size;
         iterator_physical++) {
      if (is_overloaded(H, utilization, iterator_individual,
                        iterator_physical)) {
        factibility = 0;
        break;
      }
    }
    if (factibility == 0) {
      repair_individual(population, utilization, H, V, number_of_individuals,
                        h_size, v_size, max_SLA, K, network_utilization, l_size,
                        iterator_individual, G, T);
    }
  }
}


x86 assembly (clang, -O0):
<repair_population>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8d,-0x4c(%rbp)
mov    %r9d,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x1,-0x64(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    12d4 <repair_population+0x1b4>
movl   $0x1,-0x64(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1206 <repair_population+0xe6>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0xc(%rax),%eax
cmp    0x18(%rbp),%eax
jne    11f3 <repair_population+0xd3>
mov    -0x30(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    11f3 <repair_population+0xd3>
movl   $0x0,-0x64(%rbp)
jmp    1206 <repair_population+0xe6>
jmp    11f8 <repair_population+0xd8>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11a9 <repair_population+0x89>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    1255 <repair_population+0x135>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x5c(%rbp),%ecx
call   1040 <is_overloaded@plt>
cmp    $0x0,%rax
je     1242 <repair_population+0x122>
movl   $0x0,-0x64(%rbp)
jmp    1255 <repair_population+0x135>
jmp    1247 <repair_population+0x127>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    120d <repair_population+0xed>
cmpl   $0x0,-0x64(%rbp)
jne    12c1 <repair_population+0x1a1>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x4c(%rbp),%r8d
mov    -0x50(%rbp),%r9d
mov    0x10(%rbp),%r13d
mov    0x18(%rbp),%r12d
mov    0x20(%rbp),%r15
mov    0x28(%rbp),%r14
mov    0x30(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    0x38(%rbp),%r10
mov    0x40(%rbp),%rax
mov    %r13d,(%rsp)
mov    %r12d,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1030 <repair_individual@plt>
jmp    12c6 <repair_population+0x1a6>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    118f <repair_population+0x6f>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<repair_population>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,0x10(%rsp)
mov    %r8d,0x4(%rsp)
test   %r8d,%r8d
jle    1296 <repair_population+0x176>
mov    %rcx,%rbp
mov    0x68(%rsp),%edx
mov    0x60(%rsp),%eax
movslq %eax,%r15
mov    0x4(%rsp),%eax
mov    %rax,0x20(%rsp)
mov    %r15d,%r12d
neg    %r12
xor    %r14d,%r14d
mov    %rdi,0x8(%rsp)
jmp    11f2 <repair_population+0xd2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    %rbp,%rcx
mov    0x4(%rsp),%r8d
mov    (%rsp),%r9d
push   0x90(%rsp)
push   0x90(%rsp)
push   %r14
mov    0x98(%rsp),%eax
push   %rax
push   0x98(%rsp)
push   0x98(%rsp)
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
call   1030 <repair_individual@plt>
add    $0x40,%rsp
add    $0x1,%r14
cmp    0x20(%rsp),%r14
mov    0x8(%rsp),%rdi
mov    0x68(%rsp),%edx
je     1296 <repair_population+0x176>
mov    0x60(%rsp),%eax
test   %eax,%eax
jle    1250 <repair_population+0x130>
mov    $0x1,%bl
mov    $0x1,%eax
jmp    1228 <repair_population+0x108>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %r15,%rax
setl   %bl
lea    (%r12,%rax,1),%rcx
add    $0x1,%rcx
add    $0x1,%rax
cmp    $0x1,%rcx
je     123d <repair_population+0x11d>
mov    -0x8(%rbp,%rax,8),%rcx
cmp    %edx,0xc(%rcx)
jne    1210 <repair_population+0xf0>
mov    (%rdi,%r14,8),%rcx
cmpl   $0x0,-0x4(%rcx,%rax,4)
jne    1210 <repair_population+0xf0>
cmpl   $0x0,(%rsp)
jg     1258 <repair_population+0x138>
jmp    1288 <repair_population+0x168>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebx,%ebx
cmpl   $0x0,(%rsp)
jle    1288 <repair_population+0x168>
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    %r14d,%edx
mov    %r13d,%ecx
call   1040 <is_overloaded@plt>
test   %rax,%rax
jne    1180 <repair_population+0x60>
add    $0x1,%r13d
cmp    %r13d,(%rsp)
jne    1260 <repair_population+0x140>
test   $0x1,%bl
jne    1180 <repair_population+0x60>
jmp    11da <repair_population+0xba>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @repair_population(i32** %0, i32*** %1, i32** %2, i32** %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8, i32** %9, i32 %10, i32** %11, i32** %12) {
%14 = alloca i32**
%15 = alloca i32***
%16 = alloca i32**
%17 = alloca i32**
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32*
%23 = alloca i32**
%24 = alloca i32
%25 = alloca i32**
%26 = alloca i32**
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
store i32** %0, i32*** %14
store i32*** %1, i32**** %15
store i32** %2, i32*** %16
store i32** %3, i32*** %17
store i32 %4, i32* %18
store i32 %5, i32* %19
store i32 %6, i32* %20
store i32 %7, i32* %21
store i32* %8, i32** %22
store i32** %9, i32*** %23
store i32 %10, i32* %24
store i32** %11, i32*** %25
store i32** %12, i32*** %26
store i32 0, i32* %27
store i32 0, i32* %28
store i32 0, i32* %29
store i32 0, i32* %30
store i32 1, i32* %31
store i32 0, i32* %27
br label %32
32: ; preds = %104, %13
%33 = load i32, i32* %27
%34 = load i32, i32* %18
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %107
36: ; preds = %32
store i32 1, i32* %31
store i32 0, i32* %28
br label %37
37: ; preds = %64, %36
%38 = load i32, i32* %28
%39 = load i32, i32* %20
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %67
41: ; preds = %37
%42 = load i32**, i32*** %17
%43 = load i32, i32* %28
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32*, i32** %42, i64 %44
%46 = load i32*, i32** %45
%47 = getelementptr inbounds i32, i32* %46, i64 3
%48 = load i32, i32* %47
%49 = load i32, i32* %21
%50 = icmp eq i32 %48, %49
br i1 %50, label %51, label %63
51: ; preds = %41
%52 = load i32**, i32*** %14
%53 = load i32, i32* %27
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32*, i32** %52, i64 %54
%56 = load i32*, i32** %55
%57 = load i32, i32* %28
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %56, i64 %58
%60 = load i32, i32* %59
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %51
store i32 0, i32* %31
br label %67
63: ; preds = %51, %41
br label %64
64: ; preds = %63
%65 = load i32, i32* %28
%66 = add nsw i32 %65, 1
store i32 %66, i32* %28
br label %37
67: ; preds = %62, %37
store i32 0, i32* %29
br label %68
68: ; preds = %81, %67
%69 = load i32, i32* %29
%70 = load i32, i32* %19
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %84
72: ; preds = %68
%73 = load i32**, i32*** %16
%74 = load i32***, i32**** %15
%75 = load i32, i32* %27
%76 = load i32, i32* %29
%77 = call i64 @is_overloaded(i32** %73, i32*** %74, i32 %75, i32 %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %80
79: ; preds = %72
store i32 0, i32* %31
br label %84
80: ; preds = %72
br label %81
81: ; preds = %80
%82 = load i32, i32* %29
%83 = add nsw i32 %82, 1
store i32 %83, i32* %29
br label %68
84: ; preds = %79, %68
%85 = load i32, i32* %31
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %103
87: ; preds = %84
%88 = load i32**, i32*** %14
%89 = load i32***, i32**** %15
%90 = load i32**, i32*** %16
%91 = load i32**, i32*** %17
%92 = load i32, i32* %18
%93 = load i32, i32* %19
%94 = load i32, i32* %20
%95 = load i32, i32* %21
%96 = load i32*, i32** %22
%97 = load i32**, i32*** %23
%98 = load i32, i32* %24
%99 = load i32, i32* %27
%100 = load i32**, i32*** %25
%101 = load i32**, i32*** %26
%102 = call i32 @repair_individual(i32** %88, i32*** %89, i32** %90, i32** %91, i32 %92, i32 %93, i32 %94, i32 %95, i32* %96, i32** %97, i32 %98, i32 %99, i32** %100, i32** %101)
br label %103
103: ; preds = %87, %84
br label %104
104: ; preds = %103
%105 = load i32, i32* %27
%106 = add nsw i32 %105, 1
store i32 %106, i32* %27
br label %32
107: ; preds = %32
ret void
}

LLVM IR (-O2):
define void @repair_population(i32** %0, i32*** %1, i32** %2, i32** %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8, i32** %9, i32 %10, i32** %11, i32** %12) {
%14 = icmp sgt i32 %4, 0
br i1 %14, label %15, label %59
15: ; preds = %13
%16 = icmp sgt i32 %6, 0
%17 = icmp sgt i32 %5, 0
%18 = sext i32 %6 to i64
%19 = zext i32 %4 to i64
%20 = zext i32 %6 to i64
br label %21
21: ; preds = %15, %56
%22 = phi i64 [ 0, %15 ], [ %57, %56 ]
%23 = getelementptr inbounds i32*, i32** %0, i64 %22
br i1 %16, label %24, label %41
24: ; preds = %21, %37
%25 = phi i64 [ %38, %37 ], [ 0, %21 ]
%26 = phi i1 [ %39, %37 ], [ true, %21 ]
%27 = getelementptr inbounds i32*, i32** %3, i64 %25
%28 = load i32*, i32** %27
%29 = getelementptr inbounds i32, i32* %28, i64 3
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, %7
br i1 %31, label %32, label %37
32: ; preds = %24
%33 = load i32*, i32** %23
%34 = getelementptr inbounds i32, i32* %33, i64 %25
%35 = load i32, i32* %34
%36 = icmp eq i32 %35, 0
br i1 %36, label %41, label %37
37: ; preds = %24, %32
%38 = add nuw nsw i64 %25, 1
%39 = icmp slt i64 %38, %18
%40 = icmp eq i64 %38, %20
br i1 %40, label %41, label %24
41: ; preds = %37, %32, %21
%42 = phi i1 [ false, %21 ], [ %26, %32 ], [ %39, %37 ]
br i1 %17, label %43, label %52
43: ; preds = %41
%44 = trunc i64 %22 to i32
br label %47
45: ; preds = %47
%46 = icmp eq i32 %51, %5
br i1 %46, label %52, label %47
47: ; preds = %43, %45
%48 = phi i32 [ %51, %45 ], [ 0, %43 ]
%49 = tail call i64 @is_overloaded(i32** %2, i32*** %1, i32 %44, i32 %48)
%50 = icmp eq i64 %49, 0
%51 = add nuw nsw i32 %48, 1
br i1 %50, label %45, label %53
52: ; preds = %45, %41
br i1 %42, label %53, label %56
53: ; preds = %47, %52
%54 = trunc i64 %22 to i32
%55 = tail call i32 @repair_individual(i32** %0, i32*** %1, i32** %2, i32** %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8, i32** %9, i32 %10, i32 %54, i32** %11, i32** %12)
br label %56
56: ; preds = %52, %53
%57 = add nuw nsw i64 %22, 1
%58 = icmp eq i64 %57, %19
br i1 %58, label %59, label %21
59: ; preds = %56, %13
ret void
}