#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 */
int /*<<< orphan*/ createAnimal();
int /*<<< orphan*/ createProtector();
int /*<<< orphan*/ destroyEntity(unsigned int);
void InitEntities() {
  unsigned int entity;
  for (entity = 0; entity < (40 + 20 + 5); entity++) {
    destroyEntity(entity);
  }
  for (entity = 0; entity < 40; entity++) {
    createAnimal();
  }
  for (entity = 0; entity < 20; entity++) {
    createProtector();
  }
  return;
}


x86 assembly (clang, -O0):
<InitEntities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jae    115f <InitEntities+0x2f>
mov    -0x4(%rbp),%edi
call   1040 <destroyEntity@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <InitEntities+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x28,-0x4(%rbp)
jae    1185 <InitEntities+0x55>
mov    $0x0,%al
call   1030 <createAnimal@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <InitEntities+0x36>
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jae    11ab <InitEntities+0x7b>
mov    $0x0,%al
call   1050 <createProtector@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <InitEntities+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitEntities>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1040 <destroyEntity@plt>
add    $0x1,%ebx
cmp    $0x41,%ebx
jne    1140 <InitEntities+0x10>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1030 <createAnimal@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
call   1050 <createProtector@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <createProtector@plt>

LLVM IR (-O0):
define void @InitEntities() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp ult i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @destroyEntity(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
store i32 0, i32* %1
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %1
%14 = icmp ult i32 %13, 40
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = call i32 (...) @createAnimal()
br label %17
17: ; preds = %15
%18 = load i32, i32* %1
%19 = add i32 %18, 1
store i32 %19, i32* %1
br label %12
20: ; preds = %12
store i32 0, i32* %1
br label %21
21: ; preds = %26, %20
%22 = load i32, i32* %1
%23 = icmp ult i32 %22, 20
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = call i32 (...) @createProtector()
br label %26
26: ; preds = %24
%27 = load i32, i32* %1
%28 = add i32 %27, 1
store i32 %28, i32* %1
br label %21
29: ; preds = %21
ret void
}

LLVM IR (-O2):
define void @InitEntities() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @destroyEntity(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 65
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 (...) @createAnimal()
%8 = tail call i32 (...) @createAnimal()
%9 = tail call i32 (...) @createAnimal()
%10 = tail call i32 (...) @createAnimal()
%11 = tail call i32 (...) @createAnimal()
%12 = tail call i32 (...) @createAnimal()
%13 = tail call i32 (...) @createAnimal()
%14 = tail call i32 (...) @createAnimal()
%15 = tail call i32 (...) @createAnimal()
%16 = tail call i32 (...) @createAnimal()
%17 = tail call i32 (...) @createAnimal()
%18 = tail call i32 (...) @createAnimal()
%19 = tail call i32 (...) @createAnimal()
%20 = tail call i32 (...) @createAnimal()
%21 = tail call i32 (...) @createAnimal()
%22 = tail call i32 (...) @createAnimal()
%23 = tail call i32 (...) @createAnimal()
%24 = tail call i32 (...) @createAnimal()
%25 = tail call i32 (...) @createAnimal()
%26 = tail call i32 (...) @createAnimal()
%27 = tail call i32 (...) @createAnimal()
%28 = tail call i32 (...) @createAnimal()
%29 = tail call i32 (...) @createAnimal()
%30 = tail call i32 (...) @createAnimal()
%31 = tail call i32 (...) @createAnimal()
%32 = tail call i32 (...) @createAnimal()
%33 = tail call i32 (...) @createAnimal()
%34 = tail call i32 (...) @createAnimal()
%35 = tail call i32 (...) @createAnimal()
%36 = tail call i32 (...) @createAnimal()
%37 = tail call i32 (...) @createAnimal()
%38 = tail call i32 (...) @createAnimal()
%39 = tail call i32 (...) @createAnimal()
%40 = tail call i32 (...) @createAnimal()
%41 = tail call i32 (...) @createAnimal()
%42 = tail call i32 (...) @createAnimal()
%43 = tail call i32 (...) @createAnimal()
%44 = tail call i32 (...) @createAnimal()
%45 = tail call i32 (...) @createAnimal()
%46 = tail call i32 (...) @createAnimal()
%47 = tail call i32 (...) @createProtector()
%48 = tail call i32 (...) @createProtector()
%49 = tail call i32 (...) @createProtector()
%50 = tail call i32 (...) @createProtector()
%51 = tail call i32 (...) @createProtector()
%52 = tail call i32 (...) @createProtector()
%53 = tail call i32 (...) @createProtector()
%54 = tail call i32 (...) @createProtector()
%55 = tail call i32 (...) @createProtector()
%56 = tail call i32 (...) @createProtector()
%57 = tail call i32 (...) @createProtector()
%58 = tail call i32 (...) @createProtector()
%59 = tail call i32 (...) @createProtector()
%60 = tail call i32 (...) @createProtector()
%61 = tail call i32 (...) @createProtector()
%62 = tail call i32 (...) @createProtector()
%63 = tail call i32 (...) @createProtector()
%64 = tail call i32 (...) @createProtector()
%65 = tail call i32 (...) @createProtector()
%66 = tail call i32 (...) @createProtector()
ret void
}