LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::get_HistoBox(double, double, double, int)
int CMolecularSystem::get_HistoBox(double value,double a, double b, int n)
{
  int box;
  box = 0;
  if ((value < a) || (value > b))
  {
   cerr << "value out of Histogram bound, check OrderParameterHistoStart and OrderParameterHistoStop\n";
  } else {
    box = int((value - a)/(b - a)*n);
  }
  return box;
}

// Assembly:
ucomisd %xmm0, %xmm1
ja 0x6138
ucomisd %xmm2, %xmm0
ja 0x6138
subsd %xmm1, %xmm0
subsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
divsd %xmm2, %xmm0
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x4ead(%rip), %rdi      # 0xaff0
leaq 0x21be(%rip), %rsi      # 0x8308
movl $0x59, %edx
callq 0x21f0
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::calculate_bondOrderParameter()
void CMolecularSystem::calculate_bondOrderParameter()
{
  //Find all particles within a radius of neighbordistance
  this->get_AllNeighbors();
  //Calculate q_lm vector
  this->calculate_complexQLM();
  //Calculate averaged version of q_lm as in J. Chem. Phys. 129, 114707 (2008)
  this->calculate_averageComplexQLM();
  //From these vectors calculate the q_4 and q_4
  this->calculate_qFromComplexVector();
  //and also aq_4 and aq_6
  this->calculate_averagedqFromComplexVector();
  //and Q_6 and Q_4
  this->calculate_globalqFromComplexVector();
  //and the number of bonds to find the largest cluster
  this->calculate_frenkelNumbers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4a28
movq %rbx, %rdi
callq 0x52b2
movq %rbx, %rdi
callq 0x54aa
movq %rbx, %rdi
callq 0x56ca
movq %rbx, %rdi
callq 0x57e2
movq %rbx, %rdi
callq 0x5926
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5caa
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::clusterCriterium(int, int)
int CMolecularSystem::clusterCriterium(int ti,int criterium)
{
  int value;
  value = 0;
  if (criterium == 0)
  {
    if (this->molecules[ti].frenkelnumber > parameter->minfrenkel)
    { value = 1; } else {value = 0;}
  }
  return value;
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
je 0x65ad
retq
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
imulq $0x870, %rax, %rax      # imm = 0x870
movq 0xb4e8b8(%rdi), %rcx
movq 0xb4e8c0(%rdi), %rdx
movsd 0x858(%rcx,%rax), %xmm0
cvtsi2sdl 0x3210(%rdx), %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
seta %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::harvestCluster(int, int, int)
void CMolecularSystem::harvestCluster(int ti,int numberofCluster,int criterium)
{
  int c;
  int neighbor;
  c = 0;
  do
  {
    neighbor =  this->molecules[ti].neighbors[c];
    if ((this->molecules[neighbor].belongsto == nilvalue) && (clusterCriterium(neighbor,criterium)))
    {
      this->molecules[neighbor].belongsto = numberofCluster;
      harvestCluster(neighbor,numberofCluster,criterium);
    }
    c += 1;
    } while (this->molecules[ti].neighbors[c] != nilvalue);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r14d
movq %rdi, %r15
movslq %esi, %rax
imulq $0x870, %rax, %r12      # imm = 0x870
testl %ebx, %ebx
jne 0x6664
movq 0xb4e8b8(%r15), %rax
movslq 0xa0(%rax,%r12), %rsi
imulq $0x870, %rsi, %rcx      # imm = 0x870
cmpl $0x1fca055, 0x860(%rax,%rcx) # imm = 0x1FCA055
jne 0x6664
movsd 0x858(%rax,%rcx), %xmm0
movq 0xb4e8c0(%r15), %rdx
xorps %xmm1, %xmm1
cvtsi2sdl 0x3210(%rdx), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6664
addq %rcx, %rax
addq $0x860, %rax            # imm = 0x860
movl %r14d, (%rax)
movq %r15, %rdi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x65e6
movq 0xb4e8b8(%r15), %rax
cmpl $0x1fca055, 0xa4(%rax,%r12) # imm = 0x1FCA055
leaq 0x4(%r12), %r12
jne 0x6603
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::buildClusters(int)
int CMolecularSystem::buildClusters(int criterium)
{
  int numberofCluster;
  int nop;
  nop = parameter->nop;
  numberofCluster = 0;
  for (int ti= 0;ti<nop;ti++)
  {
    this->molecules[ti].belongsto = nilvalue;
  }
  for (int ti= 0;ti<nop;ti++)
  {
    if ((this->molecules[ti].belongsto == nilvalue) && (clusterCriterium(ti,criterium)))
    {
      numberofCluster += 1;
      this->molecules[ti].belongsto = numberofCluster;
      harvestCluster(ti,numberofCluster,criterium);
    }
  }
  return numberofCluster;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq 0xb4e8c0(%rdi), %rax
movslq 0x3208(%rax), %rsi
testq %rsi, %rsi
jle 0x66d6
movq 0xb4e8b8(%rbx), %rax
imulq $0x870, %rsi, %r8       # imm = 0x870
xorl %edx, %edx
movl $0x1fca055, 0x860(%rax,%rdx) # imm = 0x1FCA055
addq $0x870, %rdx            # imm = 0x870
cmpq %rdx, %r8
jne 0x66bf
testl %esi, %esi
jle 0x674d
xorl %r12d, %r12d
movl $0x860, %r13d           # imm = 0x860
xorl %r14d, %r14d
movq %rsi, -0x30(%rbp)
testl %r15d, %r15d
jne 0x673c
movq 0xb4e8b8(%rbx), %rax
cmpl $0x1fca055, (%rax,%r13) # imm = 0x1FCA055
jne 0x673c
movsd -0x8(%rax,%r13), %xmm0
movq 0xb4e8c0(%rbx), %r8
xorps %xmm1, %xmm1
cvtsi2sdl 0x3210(%r8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x673c
incl %r14d
movl %r14d, (%rax,%r13)
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x65e6
movq -0x30(%rbp), %rsi
incq %r12
addq $0x870, %r13            # imm = 0x870
cmpq %r12, %rsi
jne 0x66ea
jmp 0x6750
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::get_greatestCluster(int, int&)
int CMolecularSystem::get_greatestCluster(int criterium,int &greatestbelongsto)
{
  int nop;
  nop = parameter->nop;
  int clusterhisto[nop];
  int greatestcluster ;
  greatestcluster = 0;

  this->buildClusters(criterium);

  for (int ti= 0;ti<nop;ti++)
  {
    clusterhisto[ti] = 0;
  }
  //Builds an histo of clustersizes
  for (int ti= 0;ti<nop;ti++)
  {
    if (this->molecules[ti].belongsto != nilvalue) clusterhisto[this->molecules[ti].belongsto] += 1;
  }
  //From the clustersize histo we can find the largest one.
  for (int ti= 0;ti<nop;ti++)
  {
    if (clusterhisto[ti] > greatestcluster)
    {
      greatestcluster = clusterhisto[ti];
      greatestbelongsto = ti;
    }
  }
  //return the size of the greatest cluster. To investigate the cluster use the variable
  //greatestbelongs to.
  return greatestcluster;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r15
movq 0xb4e8c0(%rdi), %rax
movl 0x3208(%rax), %r12d
movq %rsp, %r14
leaq 0xf(,%r12,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
callq 0x6688
testl %r12d, %r12d
jle 0x67b2
leaq (,%r12,4), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2120
testl %r12d, %r12d
jle 0x67e8
movq 0xb4e8b8(%r15), %rax
imulq $0x870, %r12, %rcx      # imm = 0x870
xorl %edx, %edx
movslq 0x860(%rax,%rdx), %rsi
cmpq $0x1fca055, %rsi        # imm = 0x1FCA055
je 0x67dc
incl (%r14,%rsi,4)
addq $0x870, %rdx            # imm = 0x870
cmpq %rdx, %rcx
jne 0x67c7
testl %r12d, %r12d
jle 0x6807
xorl %ecx, %ecx
xorl %eax, %eax
movl (%r14,%rcx,4), %edx
cmpl %eax, %edx
jle 0x67fd
movl %ecx, (%rbx)
movl %edx, %eax
incq %rcx
cmpq %rcx, %r12
jne 0x67f1
jmp 0x6809
xorl %eax, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::makeperiodic(int)
void CMolecularSystem::makeperiodic(int ti)
{ 
  double boxx,boxy,boxz;
  boxx = this->parameter->boxx;
  boxy = this->parameter->boxy;
  boxz = this->parameter->boxz;
  
  if (this->molecules[ti].posx >=  boxx) {this->molecules[ti].posx -=boxx;}
  if (this->molecules[ti].posx <   0.0)  {this->molecules[ti].posx +=boxx;}
  if (this->molecules[ti].posy >=  boxy) {this->molecules[ti].posy -=boxy;}
  if (this->molecules[ti].posy <   0.0)  {this->molecules[ti].posy +=boxy;}
  if (this->molecules[ti].posz >=  boxz) {this->molecules[ti].posz -=boxz;}
  if (this->molecules[ti].posz <   0.0)  {this->molecules[ti].posz +=boxz;}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb4e8b8(%rdi), %rax
movq 0xb4e8c0(%rdi), %rcx
movsd 0x3218(%rcx), %xmm2
movsd 0x3220(%rcx), %xmm1
movsd 0x3228(%rcx), %xmm0
movslq %esi, %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
leaq (%rax,%rcx), %rdx
addq $0x8, %rdx
movsd (%rdx), %xmm3
ucomisd %xmm2, %xmm3
jb 0x6864
subsd %xmm2, %xmm3
movsd %xmm3, (%rdx)
movsd (%rdx), %xmm3
xorpd %xmm4, %xmm4
ucomisd %xmm3, %xmm4
jbe 0x687a
addsd %xmm3, %xmm2
movsd %xmm2, (%rdx)
leaq (%rax,%rcx), %rdx
addq $0x10, %rdx
movsd (%rdx), %xmm2
ucomisd %xmm1, %xmm2
jb 0x6894
subsd %xmm1, %xmm2
movsd %xmm2, (%rdx)
movsd (%rdx), %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm2, %xmm3
jbe 0x68aa
addsd %xmm2, %xmm1
movsd %xmm1, (%rdx)
addq %rcx, %rax
addq $0x18, %rax
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0x68c3
subsd %xmm0, %xmm1
movsd %xmm1, (%rax)
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x68d9
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::get_distancePosition(int, double, double, double, double&, double&, double&)
void CMolecularSystem::get_distancePosition(int ti ,double posx, double posy,double posz ,double &diffx,double &diffy,double &diffz)
{
  diffx = posx - this->molecules[ti].posx;
  diffy = posy - this->molecules[ti].posy;
  diffz = posz - this->molecules[ti].posz;

  //nearest image
  if (diffx >  this->parameter->boxx/2.0) {diffx = diffx - this->parameter->boxx;};
  if (diffx < -this->parameter->boxx/2.0) {diffx = diffx + this->parameter->boxx;};
  if (diffy >  this->parameter->boxy/2.0) {diffy = diffy - this->parameter->boxy;};
  if (diffy < -this->parameter->boxy/2.0) {diffy = diffy + this->parameter->boxy;};
  if (diffz >  this->parameter->boxz/2.0) {diffz = diffz - this->parameter->boxz;};
  if (diffz < -this->parameter->boxz/2.0) {diffz = diffz + this->parameter->boxz;};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb4e8b8(%rdi), %rax
movslq %esi, %rsi
imulq $0x870, %rsi, %rsi      # imm = 0x870
subsd 0x8(%rax,%rsi), %xmm0
movsd %xmm0, (%rdx)
subsd 0x10(%rax,%rsi), %xmm1
movsd %xmm1, (%rcx)
subsd 0x18(%rax,%rsi), %xmm2
movsd %xmm2, (%r8)
movsd (%rdx), %xmm0
movq 0xb4e8c0(%rdi), %rax
movsd 0x3218(%rax), %xmm1
movsd 0x16ed(%rip), %xmm2     # 0x8018
mulsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x693d
subsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
movsd (%rdx), %xmm0
movsd 0x3218(%rax), %xmm1
movsd 0x16e7(%rip), %xmm2     # 0x8038
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x6963
addsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
movsd (%rcx), %xmm0
movsd 0x3220(%rax), %xmm1
movsd 0x16a1(%rip), %xmm2     # 0x8018
mulsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x6989
subsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
movsd (%rcx), %xmm0
movsd 0x3220(%rax), %xmm1
movsd 0x169b(%rip), %xmm2     # 0x8038
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x69af
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
movsd (%r8), %xmm0
movsd 0x3228(%rax), %xmm1
movsd 0x1654(%rip), %xmm2     # 0x8018
mulsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x69d7
subsd %xmm1, %xmm0
movsd %xmm0, (%r8)
movsd (%r8), %xmm0
movsd 0x3228(%rax), %xmm1
movsd 0x164c(%rip), %xmm2     # 0x8038
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x69ff
addsd %xmm1, %xmm0
movsd %xmm0, (%r8)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::outputSimpleVMDXYZFile(int)
void CMolecularSystem::outputSimpleVMDXYZFile(int number)
{
  char IntStr[80];
  ofstream of;
  sprintf( IntStr, "./output/simple.%d.xyz", number);
  of.open (IntStr, ofstream::out | ofstream::app);
  if (of.is_open())
  {
    of << this->parameter->nop << "\n\n"; 
    for (int ti=0;ti<this->parameter->nop;ti++)
    {
      of << "h " << this->molecules[ti].posx  << " " << this->molecules[ti].posy  << " " <<this->molecules[ti].posz  << "\n";
    }
  }
  of.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x228(%rbp), %r15
movq %r15, %rdi
callq 0x2310
leaq 0x1930(%rip), %rsi      # 0x8362
leaq -0x280(%rbp), %r12
movq %r12, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2070
movq %r15, %rdi
movq %r12, %rsi
movl $0x11, %edx
callq 0x2050
leaq -0x1b8(%rbp), %rdi
callq 0x2090
testb %al, %al
je 0x6b71
movq 0xb4e8c0(%rbx), %rax
movl 0x3208(%rax), %esi
leaq -0x228(%rbp), %rdi
callq 0x2330
leaq 0x18ef(%rip), %rsi      # 0x8379
movl $0x2, %edx
movq %rax, %rdi
callq 0x21f0
movq 0xb4e8c0(%rbx), %rax
cmpl $0x0, 0x3208(%rax)
jle 0x6b71
xorl %r13d, %r13d
leaq 0x16b2(%rip), %r12      # 0x8167
xorl %r15d, %r15d
movl $0x2, %edx
leaq -0x228(%rbp), %rdi
leaq 0x18b1(%rip), %rsi      # 0x837c
callq 0x21f0
movq 0xb4e8b8(%rbx), %rax
movsd 0x8(%rax,%r13), %xmm0
leaq -0x228(%rbp), %rdi
callq 0x22e0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq 0xb4e8b8(%rbx), %rax
movsd 0x10(%rax,%r13), %xmm0
movq %r14, %rdi
callq 0x22e0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq 0xb4e8b8(%rbx), %rax
movsd 0x18(%rax,%r13), %xmm0
movq %r14, %rdi
callq 0x22e0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x182f(%rip), %rsi      # 0x837a
callq 0x21f0
incq %r15
movq 0xb4e8c0(%rbx), %rax
movslq 0x3208(%rax), %rax
addq $0x870, %r13            # imm = 0x870
cmpq %rax, %r15
jl 0x6ab8
leaq -0x228(%rbp), %rdi
callq 0x2270
movq 0x443c(%rip), %rax      # 0xafc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x220(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x228(%rbp,%rcx)
callq 0x2160
leaq -0x130(%rbp), %rdi
callq 0x20d0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6bc7
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/parameter.cpp
// Function: CParameter::CParameter()
CParameter::CParameter()
{
  this->nop = -1;
  this->boxx = -1.0;
  this->boxy = -1.0;
  this->boxz = -1.0;
  this->xyzFile = "notset";
  this->baseunit = -1;
  this->noc = -1;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x3723(%rip), %rax      # 0xad78
movq %rax, (%rdi)
leaq 0x38(%rdi), %rax
movl $0x3200, %ecx           # imm = 0x3200
xorl %edx, %edx
leaq -0x20(%rax), %rsi
movq %rsi, -0x30(%rax)
movq %rdx, -0x28(%rax)
movb %dl, -0x20(%rax)
movq %rax, -0x10(%rax)
movq %rdx, -0x8(%rax)
movb %dl, (%rax)
addq $0x40, %rax
addq $-0x40, %rcx
jne 0x7663
leaq 0x3230(%rbx), %r15
leaq 0x3240(%rbx), %r12
movq %r12, 0x3230(%rbx)
movq $0x0, 0x3238(%rbx)
movb $0x0, 0x3240(%rbx)
movl $0xffffffff, 0x3208(%rbx) # imm = 0xFFFFFFFF
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x3218(%rbx)
movq %rax, 0x3220(%rbx)
movq %rax, 0x3228(%rbx)
leaq 0xa01(%rip), %rcx       # 0x80de
movl $0x6, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x320c(%rbx)
movl %eax, 0x3214(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x7720
movq (%r12), %rsi
incq %rsi
callq 0x21c0
movl $0x31c8, %r15d          # imm = 0x31C8
leaq (%rbx,%r15), %rdi
callq 0x7ca8
addq $-0x40, %r15
cmpq $-0x38, %r15
jne 0x7726
movq %r14, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O1/WolfgangLechner[P]StructureAnalysis/parameter.cpp
// Function: CParameter::checkParameter()
void CParameter::checkParameter()
{
  double minnd;
  minnd = double(this->boxx)/double(this->baseunit)*sqrt(2.0)/2.0;
  if (this->neighbordistance < minnd)
  {
    cerr << "The minimal neighbor distance is " << minnd << "in parameter.txt it is set to " << this->neighbordistance << "\n";
    cerr << "I now set the neighbordistance to reach the first shell " <<"\n";
    this->neighbordistance = minnd + 0.2;
  }


}

// Assembly:
movsd 0x3218(%rdi), %xmm1
cvtsi2sdl 0x320c(%rdi), %xmm0
divsd %xmm0, %xmm1
mulsd 0x44a(%rip), %xmm1      # 0x8020
mulsd 0x43a(%rip), %xmm1      # 0x8018
ucomisd 0x3250(%rdi), %xmm1
jbe 0x7ca7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x33f0(%rip), %r14      # 0xaff0
leaq 0x99c(%rip), %rsi       # 0x85a3
movl $0x21, %edx
movq %r14, %rdi
movsd %xmm1, -0x20(%rbp)
callq 0x21f0
movq %r14, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x22e0
movq %rax, %r15
leaq 0x995(%rip), %rsi       # 0x85c5
movl $0x1e, %edx
movq %rax, %rdi
callq 0x21f0
movsd 0x3250(%rbx), %xmm0
movq %r15, %rdi
callq 0x22e0
leaq 0x726(%rip), %r15       # 0x837a
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
leaq 0x979(%rip), %rsi       # 0x85e4
movl $0x38, %edx
movq %r14, %rdi
callq 0x21f0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21f0
movsd -0x20(%rbp), %xmm0
addsd 0x883(%rip), %xmm0      # 0x8518
movsd %xmm0, 0x3250(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::validatePositiveInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Character::validatePositiveInt(std::string value_name)
{
    int value = 0;
    while (value < 1)
    {
        std::cout << "Enter " << value_name << " (integer) : ";
        std::cin >> value;

        if (value < 1)
            std::cout << "Can't be a negative value. Try again\n";
    }
    return value; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
movq 0x55f7(%rip), %r15      # 0x7fc8
leaq 0x269b(%rip), %r12      # 0x5073
leaq 0x269b(%rip), %r13      # 0x507a
movq 0x55f2(%rip), %rbp      # 0x7fd8
movl $0x6, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x2180
movl $0xd, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
movq %rbp, %rdi
movq %r14, %rsi
callq 0x20a0
cmpl $0x0, 0x4(%rsp)
jg 0x2a3b
movl $0x25, %edx
movq %r15, %rdi
leaq 0x2652(%rip), %rsi      # 0x5088
callq 0x2180
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x29e6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::validatePercent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
float Character::validatePercent(std::string value_name)
{
    float value = -1;
    while (value < 0 || value > 1)
    {
        std::cout << "Enter " << value_name << " (float) : ";
        std::cin >> value;

        if (value < 0 || value > 1)
            std::cout << "Can't only be decimal number between 0 and 1. Try again\n";
    }
    return value; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x4(%rsp), %r14
movl $0xbf800000, (%r14)     # imm = 0xBF800000
movq 0x5555(%rip), %r15      # 0x7fc8
leaq 0x25f9(%rip), %r12      # 0x5073
leaq 0x262d(%rip), %r13      # 0x50ae
movq 0x5550(%rip), %rbp      # 0x7fd8
movl $0x6, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x2180
movl $0xb, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2260
movss 0x4(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x2ad9
ucomiss 0x252d(%rip), %xmm0     # 0x5004
jbe 0x2aed
movl $0x38, %edx
movq %r15, %rdi
leaq 0x25d2(%rip), %rsi      # 0x50ba
callq 0x2180
movss 0x4(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x2a88
ucomiss 0x2502(%rip), %xmm0     # 0x5004
ja 0x2a88
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::print(int)
void Character::print(int line)
{
    switch (line)
    {
        case 1:
            std::cout << "HP: " << std::setw(4) << current_HP << " / " << std::setw(4) << HP;
            break;
        case 2:
            std::cout << "MP: " << std::setw(4) << current_MP << " / " << std::setw(4) << MP;
            break;
        case 3:
            std::cout << "Status: " << std::setw(7) << status;
            break;
        default:
            // Don't do anything
            break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x3, %esi
je 0x2d2e
cmpl $0x2, %esi
je 0x2ccd
cmpl $0x1, %esi
jne 0x2d6c
movq 0x5354(%rip), %r14      # 0x7fc8
leaq 0x2478(%rip), %rsi      # 0x50f3
movl $0x4, %r15d
movl $0x4, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r15, 0x10(%r14,%rax)
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x2220
movq %rax, %r14
leaq 0x2449(%rip), %rsi      # 0x50f8
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r15, 0x10(%r14,%rax)
jmp 0x2d5d
movq 0x52f4(%rip), %r14      # 0x7fc8
leaq 0x2421(%rip), %rsi      # 0x50fc
movl $0x4, %r15d
movl $0x4, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r15, 0x10(%r14,%rax)
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x2220
movq %rax, %r14
leaq 0x23e9(%rip), %rsi      # 0x50f8
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r15, 0x10(%r14,%rax)
addq $0x8, %rbx
jmp 0x2d5d
movq 0x5293(%rip), %r14      # 0x7fc8
leaq 0x23c5(%rip), %rsi      # 0x5101
movl $0x8, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x7, 0x10(%r14,%rax)
addq $0x48, %rbx
movl (%rbx), %esi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::receiveDamage(int)
void Character::receiveDamage(int base_damage)
{
    // Do not allow negative damage. The std::max function will return
    //  the highest value from 0 or the damage minus the defense
    current_HP -= std::max( (base_damage - defense), 0 );
    if (current_HP <= 0)
    {
        current_HP = 0;
        status = DEAD;
    }
}

// Assembly:
subl 0x20(%rdi), %esi
xorl %eax, %eax
testl %esi, %esi
cmovgl %esi, %eax
subl %eax, 0x4(%rdi)
jle 0x2d94
retq
movl $0x0, 0x4(%rdi)
movl $0x1, 0x48(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Hero.cpp
// Function: Hero::print(int)
void Hero::print(int line)
{
    if (line == 0)
        std::cout << "== " << std::setw(NAME_LENGTH) << name << " ==";
    else
        Character::print(line);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x2f24
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2c4e
movq 0x509d(%rip), %r14      # 0x7fc8
leaq 0x220d(%rip), %rsi      # 0x513f
movl $0x3, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x9, 0x10(%r14,%rax)
addq $0x54, %rbx
movq %rbx, %rdi
callq 0x2080
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2180
leaq 0x21d3(%rip), %rsi      # 0x5143
movl $0x3, %edx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Hero.cpp
// Function: Hero::inputData()
void Hero::inputData()
{
    std::cout << "== Hero creation module ==\n";

    std::cout << "Enter the name: ";
    std::cin >> name;

    Character::inputData();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5036(%rip), %r14      # 0x7fc8
leaq 0x21ae(%rip), %rsi      # 0x5147
movl $0x1b, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x21b6(%rip), %rsi      # 0x5163
movl $0x10, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x54(%rbx), %rsi
movq 0x5013(%rip), %rdi      # 0x7fd8
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
callq 0x2210
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x25e6
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Monster.cpp
// Function: Monster::Monster(monster_t)
Monster::Monster(monster_t _type)
{
    // Set the type of the monster
    type = _type;

    action_percent[ATTACK] = 50;
    action_percent[DEFEND] = 40;
    action_percent[HEAL] = 10;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %eax, %eax
movsd 0x2181(%rip), %xmm0     # 0x5178
movsd 0x2181(%rip), %xmm1     # 0x5180
movsd 0x2181(%rip), %xmm3     # 0x5188
movl $0x64, %esi
movl $0x14, %edx
movl $0x5, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
movaps %xmm1, %xmm2
pushq %rax
pushq %rax
callq 0x259c
addq $0x10, %rsp
movl %ebx, 0x4c(%r14)
movabsq $0x4220000042480000, %rax # imm = 0x4220000042480000
movq %rax, 0x50(%r14)
movl $0x41200000, 0x58(%r14) # imm = 0x41200000
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Monster.cpp
// Function: Monster::selectAction()
action_t Monster::selectAction()
{
    int selection = Randomizer::randomRange(1, 100);
    int accum = 0;

    // Loop over the possible actions
    for (int i=0; i<NUM_ACTIONS; i++)
    {
        // Compute the accumulated percentages
        accum += action_percent[i];
        if (selection <= accum)
        {
            // Cast the integer into an action_t variable
            return (action_t)i;
        }
    }
    // A default action
    // if the percents are correctly filled this should never happen
    return ATTACK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
movl $0x64, %esi
callq 0x3ed4
movl %eax, %ecx
xorl %eax, %eax
xorl %edx, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
addss 0x50(%rbx,%rax,4), %xmm0
cvttss2si %xmm0, %edx
cmpl %edx, %ecx
jle 0x3089
incq %rax
cmpq $0x3, %rax
jne 0x3069
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Monster.cpp
// Function: Monster::inputData()
void Monster::inputData()
{
    std::cout << "== Monster creation module ==\n";

    // Ask for a correct monster type
    type = (monster_t)validateMonsterType();

    // Ask for the behaviour percents of the monster
    std::cout << "Enter the following percentages as integers between 0 and 100\n";
    std::cout << "It is up to you to make the percentages add up to 100\n";
    std::cout << "Attack percent: ";
    std::cin >> action_percent[ATTACK];
    std::cout << "Defend percent: ";
    std::cin >> action_percent[DEFEND];
    std::cout << "Heal percent: ";
    std::cin >> action_percent[HEAL];

    // Call the input data method from the parent class
    Character::inputData();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x4f2d(%rip), %r14      # 0x7fc8
leaq 0x2108(%rip), %rsi      # 0x51aa
movl $0x1e, %edx
movq %r14, %rdi
callq 0x2180
callq 0x3154
movl %eax, 0x4c(%rbx)
leaq 0x210b(%rip), %rsi      # 0x51c9
movl $0x3e, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x2136(%rip), %rsi      # 0x5208
movl $0x36, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x2159(%rip), %rsi      # 0x523f
movl $0x10, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x50(%rbx), %rsi
movq 0x4eda(%rip), %r15      # 0x7fd8
movq %r15, %rdi
callq 0x2260
leaq 0x2143(%rip), %rsi      # 0x5250
movl $0x10, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x54(%rbx), %rsi
movq %r15, %rdi
callq 0x2260
leaq 0x2134(%rip), %rsi      # 0x5261
movl $0xe, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x58(%rbx), %rsi
movq %r15, %rdi
callq 0x2260
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x25e6
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Monster.cpp
// Function: Monster::validateMonsterType()
int Monster::validateMonsterType()
{
    int the_type;
    bool valid = false;

    while (!valid)
    {
        std::cout << "Monster types:\n";
        for (int i=0; i<NUM_TYPES; i++)
        {
            std::cout << "\t" << i << ". " << text_names[i] << "\n";
        }
        std::cout << "Select type: ";
        std::cin >> the_type;

        // Check that the type entered is valid
        if (the_type >= 0 and the_type < NUM_TYPES)
            valid = true;
        else
            std::cout << "Incorrect type. Try again ...\n";
    }
    return the_type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ecx, %ecx
movq 0x4e5d(%rip), %rbx      # 0x7fc8
leaq 0x2119(%rip), %rbp      # 0x528b
leaq 0x21ea(%rip), %r13      # 0x5363
movq %rcx, 0x10(%rsp)
movl $0xf, %edx
movq %rbx, %rdi
leaq 0x20ee(%rip), %rsi      # 0x527b
callq 0x2180
leaq 0x4fdf(%rip), %r15      # 0x8178
xorl %r14d, %r14d
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2180
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2220
movq %rbp, %r12
movq %rax, %rbp
movl $0x2, %edx
movq %rax, %rdi
leaq 0x20c1(%rip), %rsi      # 0x528d
callq 0x2180
movq -0x8(%r15), %rsi
movq (%r15), %rdx
movq %rbp, %rdi
movq %r12, %rbp
callq 0x2180
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
incq %r14
addq $0x20, %r15
cmpq $0x4, %r14
jne 0x319c
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x2081(%rip), %rsi      # 0x5290
callq 0x2180
movq 0x4dbd(%rip), %rdi      # 0x7fd8
leaq 0xc(%rsp), %rsi
callq 0x20a0
movb $0x1, %al
cmpl $0x4, 0xc(%rsp)
jb 0x3247
movl $0x1e, %edx
movq %rbx, %rdi
leaq 0x2061(%rip), %rsi      # 0x529e
callq 0x2180
movq 0x10(%rsp), %rax
movl %eax, %ecx
testb $0x1, %al
je 0x3179
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Monster.cpp
// Function: Monster::print(int)
void Monster::print(int line)
{
    if (line == 0)
        std::cout << "== " << std::setw(9) << getName() << " ==";
    else
        Character::print(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
testl %esi, %esi
je 0x33a9
movq %r14, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2c4e
movq 0x4c18(%rip), %rbx      # 0x7fc8
leaq 0x1d88(%rip), %rsi      # 0x513f
movl $0x3, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x9, 0x10(%rbx,%rax)
movl 0x4c(%r14), %eax
shlq $0x5, %rax
leaq 0x4d8d(%rip), %rcx      # 0x8170
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3468
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2180
leaq 0x1d2a(%rip), %rsi      # 0x5143
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x343c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x345f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Party.cpp
// Function: Party::Party(int, party_t)
Party::Party(int _size, party_t _type)
{
    size = _size;
    type = _type;
    // Using 'new' calls malloc and calls the constructor for the class
    members = new Character*[size];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movslq %esi, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Party.cpp
// Function: Party::getMember(int)
Character * Party::getMember(int index)
{
    if (index >= 0 && index < size)
        return members[index];
    else
        // Do something
        throw std::runtime_error("Invalid index!");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x3558
cmpl %esi, (%rdi)
jle 0x3558
movq 0x8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x2090
movq %rax, %rbx
leaq 0x1d51(%rip), %rsi      # 0x52bd
movq %rax, %rdi
callq 0x2070
movq 0x4a75(%rip), %rsi      # 0x7ff0
movq 0x4a3e(%rip), %rdx      # 0x7fc0
movq %rbx, %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Party.cpp
// Function: Party::print()
void Party::print()
{
    // Print all the members of a party horizontally
    for (int line=0; line<PRINT_LINES; line++)
    {
        for (int i=0; i<size; i++)
        {
            std::cout << " | ";
            // The first line is the name of the character
            if (line == 0)
            {
                // Cast the type of character to be able to call the correct methods
                if (type == HERO)
                {
                    static_cast<Hero*>(members[i])->print(line);
                }
                if (type == MONSTER)
                {
                    static_cast<Monster*>(members[i])->print(line);
                }
            }
            // All other lines are generic Character data
            else
            {
                members[i]->print(line);
            }
        }
        std::cout << " |" << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x49fe(%rip), %r15      # 0x7fc8
leaq 0x1cfb(%rip), %r12      # 0x52cc
leaq 0x1cf8(%rip), %r13      # 0x52d0
cmpl $0x0, (%rbx)
jle 0x363b
xorl %ebp, %ebp
movl $0x3, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
testl %r14d, %r14d
je 0x3606
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movl %r14d, %esi
callq 0x2c4e
jmp 0x3630
cmpl $0x0, 0x4(%rbx)
jne 0x361b
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rdi
xorl %esi, %esi
callq 0x2f0a
cmpl $0x1, 0x4(%rbx)
jne 0x3630
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rdi
xorl %esi, %esi
callq 0x3388
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x35df
movl $0x2, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x2180
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
incl %r14d
cmpl $0x4, %r14d
jne 0x35d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Battle.cpp
// Function: Battle::Battle(Party&, Party&)
Battle::Battle(Party & _hero_party, Party & _enemy_party)
{
    // Start the random seed
    Randomizer::init();
    // Call the method to set the battle parameters
    initialize(_hero_party, _enemy_party);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x2, %esi
movl $0x1, %edx
callq 0x34f8
leaq 0x10(%rbx), %r12
movq %r12, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x34f8
callq 0x3ec4
movups (%r15), %xmm0
movups %xmm0, (%rbx)
movups (%r14), %xmm0
movups %xmm0, (%r12)
movl (%rbx), %eax
movl 0x10(%rbx), %ecx
movl %eax, 0x24(%rbx)
movl %ecx, 0x28(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x352c
jmp 0x3709
movq %rax, %r14
movq %rbx, %rdi
callq 0x352c
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Battle.cpp
// Function: Battle::initialize(Party&, Party&)
void Battle::initialize(Party & _hero_party, Party & _enemy_party)
{
    hero_party = _hero_party;
    enemy_party = _enemy_party;

    num_heroes = hero_party.getSize();
    num_enemies = enemy_party.getSize();

    state = FIGHTING;
}

// Assembly:
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x10(%rdi)
movl (%rdi), %eax
movl %eax, 0x24(%rdi)
movl 0x10(%rdi), %eax
movl %eax, 0x28(%rdi)
movl $0x0, 0x20(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Battle.cpp
// Function: Battle::battleLoop()
void Battle::battleLoop()
{
    int turn = 1;

    while (state == FIGHTING)
    {
        std::cout << "---- TURN # " << turn++ << " ----" << std::endl;
        // Print the current values for the parties
        std::cout << "HEROES:" << std::endl;
        hero_party.print();
        std::cout << "MONSTERS:" << std::endl;
        enemy_party.print();

        // Select the actions for the heroes
        for (int i=0; i<num_heroes; i++)
        {
            playerAction(i);
        }
        // Select the actions for the enemies
        for (int i=0; i<num_enemies; i++)
        {
            enemyAction(i);
        }

        // Check if any of the parties has been defeated
        updateBattleState();
    }

    if (state == HERO_WON)
    {
        std::cout << "The heros have won!! Congratulations!" << std::endl;
    }
    else
    {
        std::cout << "Your heroes have been defeated. Game over!" << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x10(%rdi), %r15
movl $0x1, %ebp
movq 0x4870(%rip), %rbx      # 0x7fc8
leaq 0x1b8f(%rip), %r13      # 0x52ee
movl 0x20(%r14), %eax
testl %eax, %eax
jne 0x3895
movl $0xc, %edx
movq %rbx, %rdi
leaq 0x1b59(%rip), %rsi      # 0x52d3
callq 0x2180
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2220
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1b45(%rip), %rsi      # 0x52e0
callq 0x2180
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x1b0f(%rip), %rsi      # 0x52e6
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x35b2
movl $0x9, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movq %r15, %rdi
callq 0x35b2
cmpl $0x0, 0x24(%r14)
jle 0x3868
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x38f6
incl %r12d
cmpl 0x24(%r14), %r12d
jl 0x3854
cmpl $0x0, 0x28(%r14)
jle 0x3886
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x3aca
incl %r12d
cmpl 0x28(%r14), %r12d
jl 0x3872
incl %ebp
movq %r14, %rdi
callq 0x3cae
jmp 0x375f
movq 0x472c(%rip), %rdi      # 0x7fc8
cmpl $0x1, %eax
jne 0x38af
leaq 0x1a50(%rip), %rsi      # 0x52f8
movl $0x25, %edx
jmp 0x38bb
leaq 0x1a68(%rip), %rsi      # 0x531e
movl $0x2a, %edx
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Battle.cpp
// Function: Battle::updateBattleState()
void Battle::updateBattleState()
{
    bool alive = false;

    // Check if there are enemies alive
    for (int i=0; i<num_enemies; i++)
    {
        if (enemy_party.getMember(i)->getStatus() != DEAD)
            alive = true;
    }
    // If all enemies have been defeated, the heroes won
    if (!alive)
    {
        state = HERO_WON;
        return;
    }

    alive = false;
    // Check if there are heroes alive
    for (int i=0; i<num_heroes; i++)
    {
        if (hero_party.getMember(i)->getStatus() != DEAD)
            alive = true;
    }
    // If all heroes have been defeated, the monsters won
    if (!alive)
    {
        state = ENEMY_WON;
        return;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x28(%rdi)
jle 0x3d33
leaq 0x10(%rbx), %r14
xorl %ebp, %ebp
movl $0x1, %r12d
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x353a
cmpl $0x1, 0x48(%rax)
movzbl %r15b, %r15d
cmovnel %r12d, %r15d
incl %ebp
cmpl 0x28(%rbx), %ebp
jl 0x3cce
movl $0x1, %r14d
testb $0x1, %r15b
je 0x3d39
movl $0x2, %r14d
cmpl $0x0, 0x24(%rbx)
jle 0x3d39
xorl %ebp, %ebp
movl $0x1, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x353a
cmpl $0x1, 0x48(%rax)
movzbl %r12b, %r12d
cmovnel %r15d, %r12d
incl %ebp
cmpl 0x24(%rbx), %ebp
jl 0x3d0e
testb $0x1, %r12b
je 0x3d39
jmp 0x3d3d
movl $0x1, %r14d
movl %r14d, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Battle.cpp
// Function: Battle::selectEnemyTarget()
int Battle::selectEnemyTarget()
{
    int choice = -1;
    Monster * the_enemy = nullptr;

    while (choice < 1 || choice > num_enemies)
    {
        std::cout << "Your opponents are:\n";
        for (int i=0; i<num_enemies; i++)
        {
            // Get the current monster
            the_enemy = static_cast<Monster*> (enemy_party.getMember(i));
            // Print it's identifier name
            std::cout << "\t" << i+1 << ". " << the_enemy->getName() << std::endl;
        }
        std::cout << "Select one: ";
        std::cin >> choice;
    }
    return choice-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x10(%rdi), %r15
movq 0x425b(%rip), %r12      # 0x7fc8
movl $0x14, %edx
movq %r12, %rdi
leaq 0x16d4(%rip), %rsi      # 0x5450
callq 0x2180
cmpl $0x0, 0x28(%rbx)
jle 0x3e3f
xorl %ebp, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x353a
movq %rax, %r13
movl $0x1, %edx
movq %r12, %rdi
leaq 0x14e2(%rip), %rsi      # 0x528b
callq 0x2180
incl %ebp
movq %r12, %rdi
movl %ebp, %esi
callq 0x2220
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x14c1(%rip), %rsi      # 0x528d
callq 0x2180
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x3358
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x2180
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3e36
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
cmpl 0x28(%rbx), %ebp
jl 0x3d8d
movl $0xc, %edx
movq %r12, %rdi
leaq 0x1617(%rip), %rsi      # 0x5465
callq 0x2180
movq 0x417e(%rip), %rdi      # 0x7fd8
leaq 0x4(%rsp), %rsi
callq 0x20a0
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x3d6d
cmpl 0x28(%rbx), %eax
jg 0x3d6d
decl %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3ea9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::Game()
Game::Game()
{
    // Create the Party objects for the opposing teams
    the_heros = new Party(hero_party_size, HERO);
    the_monsters = new Party(monster_party_size);
    // Create the Battle object
    the_battle = new Battle(*the_heros, *the_monsters);

    // Load the data in the files
    num_heroes = FileIOTemplate<Hero>::readData(hero_database, MAX_HEROS, "heros.bin");
    num_monsters = FileIOTemplate<Monster>::readData(monster_database, MAX_MONSTERS, "monsters.bin");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movaps 0x1577(%rip), %xmm0     # 0x5480
movups %xmm0, (%rdi)
movl $0x10, %r14d
xorl %r15d, %r15d
leaq (%rbx,%r14), %rdi
movl $0x64, %esi
movl $0x14, %edx
movl $0x5, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
movsd 0x123f(%rip), %xmm0     # 0x5178
movsd 0x123f(%rip), %xmm1     # 0x5180
movaps %xmm1, %xmm2
movsd 0x123c(%rip), %xmm3     # 0x5188
pushq %r15
pushq %r15
callq 0x259c
addq $0x10, %rsp
addq $0x60, %r14
cmpq $0x130, %r14            # imm = 0x130
jne 0x3f15
leaq 0x10(%rbx), %r14
movl $0x130, %r15d           # imm = 0x130
xorl %r12d, %r12d
leaq (%rbx,%r15), %rdi
movl $0x64, %esi
movl $0x14, %edx
movl $0x5, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
movsd 0x11e1(%rip), %xmm0     # 0x5178
movsd 0x11e1(%rip), %xmm1     # 0x5180
movaps %xmm1, %xmm2
movsd 0x11de(%rip), %xmm3     # 0x5188
pushq %r12
pushq %r12
callq 0x259c
addq $0x10, %rsp
addq $0x68, %r15
cmpq $0x2d0, %r15            # imm = 0x2D0
jne 0x3f73
xorps %xmm0, %xmm0
movups %xmm0, 0x2d8(%rbx)
movl $0x10, %edi
callq 0x2160
movq %rax, %r15
movl 0x8(%rbx), %esi
movq %rax, %rdi
xorl %edx, %edx
callq 0x34f8
movq %r15, 0x2d8(%rbx)
movl $0x10, %edi
callq 0x2160
movq %rax, %r15
movl 0xc(%rbx), %esi
movq %rax, %rdi
movl $0x1, %edx
callq 0x34f8
movq %r15, 0x2e0(%rbx)
movl $0x30, %edi
callq 0x2160
movq %rax, %r12
movq 0x2d8(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x3690
movq %r12, 0x2d0(%rbx)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1446(%rip), %rsi      # 0x5490
leaq 0x1448(%rip), %rdx      # 0x5499
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x2dba
movl $0x3, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4826
leaq 0x130(%rbx), %r14
movl %eax, (%rbx)
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x408e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13fb(%rip), %rsi      # 0x549a
leaq 0x1400(%rip), %rdx      # 0x54a6
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2dba
movl $0x4, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4872
movl %eax, 0x4(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x40dd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4133
movq 0x18(%rsp), %rsi
jmp 0x410f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4133
movq 0x38(%rsp), %rsi
incq %rsi
jmp 0x412e
movq %rax, %rbx
movl $0x30, %esi
movq %r12, %rdi
jmp 0x412e
jmp 0x4123
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::printHeroArray()
void Game::printHeroArray()
{
    std::cout << "\nThe heros:\n";
    for (int i=0; i<num_heroes; i++)
    {
        std::cout << "INDEX #" << i << std::endl;
        hero_database[i].print();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3b39(%rip), %rdi      # 0x7fc8
leaq 0x116c(%rip), %rsi      # 0x5602
movl $0xc, %edx
callq 0x2180
cmpl $0x0, (%rbx)
jle 0x4516
leaq 0x10(%rbx), %r14
xorl %r15d, %r15d
movq 0x3b15(%rip), %r12      # 0x7fc8
leaq 0x1155(%rip), %r13      # 0x560f
movl $0x7, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x2180
movq %r12, %rdi
movl %r15d, %esi
callq 0x2220
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2e84
incq %r15
movslq (%rbx), %rax
addq $0x60, %r14
cmpq %rax, %r15
jl 0x44ba
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop