LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::calculate_frenkelNumbers()
void CMolecularSystem::calculate_frenkelNumbers()
{
  int frenkelcons;
  double scalar;
  for (int ti= 0;ti<this->parameter->nop;ti++)
  {
    frenkelcons = 0;
    for (int c = 0;c<this->molecules[ti].n_neighbors;c++)
    {
      scalar = this->get_NumberFromBond(ti,this->molecules[ti].neighbors[c]);
      if (scalar > 0.5) frenkelcons += 1;
    }
    this->molecules[ti].frenkelnumber = frenkelcons;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
movq 0xb4e8c0(%rcx), %rcx
cmpl 0x3208(%rcx), %eax
jge 0x8825
movl $0x0, -0xc(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %eax
movq 0xb4e8b8(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
cmpl 0x550(%rcx), %eax
jge 0x87f1
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq 0xb4e8b8(%rdi), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movl 0xa0(%rax,%rcx,4), %edx
callq 0x84a0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x39a3(%rip), %xmm1     # 0xc178
ucomisd %xmm1, %xmm0
jbe 0x87e4
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x87e6
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8773
movq -0x28(%rbp), %rax
cvtsi2sdl -0xc(%rbp), %xmm0
movq 0xb4e8b8(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
movsd %xmm0, 0x858(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x874b
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::sample_Q4Q6Histograms()
void CMolecularSystem::sample_Q4Q6Histograms()
{
  int q4box,q6box;
  for (int ti= 0;ti<this->parameter->nop;ti++)
  {
    q4box = int(this->molecules[ti].AQ4 * Q4FACTOR);
    q6box = int(this->molecules[ti].AQ6 * Q4FACTOR);
    this->QBCC[q4box][q6box] += 1.0;
    this->QFCC[q4box][q6box] += 1.0;
    this->QHCP[q4box][q6box] += 1.0;
    this->QLIQ[q4box][q6box] += 1.0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
movq 0xb4e8c0(%rcx), %rcx
cmpl 0x3208(%rcx), %eax
jge 0x8e5f
movq -0x20(%rbp), %rax
movq 0xb4e8b8(%rax), %rcx
movslq -0x14(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
movsd 0x344e(%rip), %xmm0     # 0xc1b0
mulsd 0x840(%rcx), %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0xc(%rbp)
movq 0xb4e8b8(%rax), %rcx
movslq -0x14(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
movsd 0x3422(%rip), %xmm0     # 0xc1b0
mulsd 0x838(%rcx), %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0x10(%rbp)
movq %rax, %rcx
addq $0x7a50b8, %rcx         # imm = 0x7A50B8
movslq -0xc(%rbp), %rdx
imulq $0x12c0, %rdx, %rdx     # imm = 0x12C0
addq %rdx, %rcx
movslq -0x10(%rbp), %rdx
movsd 0x32b7(%rip), %xmm0     # 0xc078
addsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
movq %rax, %rcx
addq $0x88f6b8, %rcx         # imm = 0x88F6B8
movslq -0xc(%rbp), %rdx
imulq $0x12c0, %rdx, %rdx     # imm = 0x12C0
addq %rdx, %rcx
movslq -0x10(%rbp), %rdx
movsd 0x3289(%rip), %xmm0     # 0xc078
addsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
movq %rax, %rcx
addq $0x979cb8, %rcx         # imm = 0x979CB8
movslq -0xc(%rbp), %rdx
imulq $0x12c0, %rdx, %rdx     # imm = 0x12C0
addq %rdx, %rcx
movslq -0x10(%rbp), %rdx
movsd 0x325b(%rip), %xmm0     # 0xc078
addsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
addq $0xa642b8, %rax         # imm = 0xA642B8
movslq -0xc(%rbp), %rcx
imulq $0x12c0, %rcx, %rcx     # imm = 0x12C0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd 0x3231(%rip), %xmm0     # 0xc078
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8d27
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x8eb1
movsd -0x10(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x8ec6
movq 0x6138(%rip), %rdi      # 0xeff0
leaq 0x3559(%rip), %rsi      # 0xc418
callq 0x3200
jmp 0x8eee
movsd -0x10(%rbp), %xmm0
subsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
subsd -0x18(%rbp), %xmm1
divsd %xmm1, %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x65b0
movq -0x10(%rbp), %rdi
callq 0x7290
movq -0x10(%rbp), %rdi
callq 0x7560
movq -0x10(%rbp), %rdi
callq 0x7b40
movq -0x10(%rbp), %rdi
callq 0x7da0
movq -0x10(%rbp), %rdi
callq 0x8040
movq -0x10(%rbp), %rdi
callq 0x8730
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x932b
movq -0x20(%rbp), %rax
movq 0xb4e8b8(%rax), %rcx
movslq -0xc(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
movsd 0x858(%rcx), %xmm0
movq 0xb4e8c0(%rax), %rax
cvtsi2sdl 0x3210(%rax), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x9322
movl $0x1, -0x14(%rbp)
jmp 0x9329
movl $0x0, -0x14(%rbp)
jmp 0x932b
movl -0x14(%rbp), %eax
popq %rbp
retq
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq 0xb4e8b8(%rax), %rcx
movslq -0xc(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movl 0xa0(%rcx,%rdx,4), %ecx
movl %ecx, -0x1c(%rbp)
movq 0xb4e8b8(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
cmpl $0x1fca055, 0x860(%rax) # imm = 0x1FCA055
jne 0x93e0
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x92c0
cmpl $0x0, %eax
je 0x93e0
movq -0x28(%rbp), %rdi
movl -0x10(%rbp), %ecx
movq 0xb4e8b8(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rax
movl %ecx, 0x860(%rax)
movl -0x1c(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x9330
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
cmpl $0x1fca055, 0xa0(%rax,%rcx,4) # imm = 0x1FCA055
jne 0x9354
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0xb4e8c0(%rax), %rax
movl 0x3208(%rax), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x948b
movq -0x28(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
movl $0x1fca055, 0x860(%rax) # imm = 0x1FCA055
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9455
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x9520
movq -0x28(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
cmpl $0x1fca055, 0x860(%rax) # imm = 0x1FCA055
jne 0x9510
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x92c0
cmpl $0x0, %eax
je 0x9510
movq -0x28(%rbp), %rdi
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq 0xb4e8b8(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rax
movl %ecx, 0x860(%rax)
movl -0x1c(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x9330
jmp 0x9512
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9492
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movq 0xb4e8c0(%rdi), %rax
movl 0x3208(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0xc(%rbp), %esi
callq 0x9420
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x95ba
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9598
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x9628
movq -0x50(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
addq %rcx, %rax
cmpl $0x1fca055, 0x860(%rax) # imm = 0x1FCA055
je 0x961b
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0xb4e8b8(%rcx), %rcx
movslq -0x3c(%rbp), %rdx
imulq $0x870, %rdx, %rdx      # imm = 0x870
addq %rdx, %rcx
movslq 0x860(%rcx), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x961d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x95c1
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x966b
movq -0x48(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x34(%rbp), %eax
jle 0x965e
movq -0x48(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x40(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x9660
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x962f
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x288(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x33f0
movl -0xc(%rbp), %edx
leaq 0x28bf(%rip), %rsi      # 0xc472
xorl %eax, %eax
leaq -0x60(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x3090
movl $0x10, %edi
movl $0x1, %esi
callq 0xadf0
movl %eax, -0x274(%rbp)
jmp 0x9bdc
movl -0x274(%rbp), %edx
movq -0x280(%rbp), %rsi
leaq -0x260(%rbp), %rdi
callq 0x3060
jmp 0x9bf7
leaq -0x260(%rbp), %rdi
callq 0x3180
movb %al, -0x289(%rbp)
jmp 0x9c0b
movb -0x289(%rbp), %al
testb $0x1, %al
jne 0x9c1a
jmp 0x9dc8
movq -0x288(%rbp), %rax
movq 0xb4e8c0(%rax), %rax
movl 0x3208(%rax), %esi
leaq -0x260(%rbp), %rdi
callq 0x3410
movq %rax, -0x298(%rbp)
jmp 0x9c43
movq -0x298(%rbp), %rdi
leaq 0x2838(%rip), %rsi      # 0xc489
callq 0x3200
jmp 0x9c58
movl $0x0, -0x270(%rbp)
movq -0x288(%rbp), %rcx
movl -0x270(%rbp), %eax
movq 0xb4e8c0(%rcx), %rcx
cmpl 0x3208(%rcx), %eax
jge 0x9dc6
leaq 0x2803(%rip), %rsi      # 0xc48c
leaq -0x260(%rbp), %rdi
callq 0x3200
movq %rax, -0x2a0(%rbp)
jmp 0x9c9e
movq -0x2a0(%rbp), %rdi
movq -0x288(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x270(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
movsd 0x8(%rax,%rcx), %xmm0
callq 0x3470
movq %rax, -0x2a8(%rbp)
jmp 0x9cd5
movq -0x2a8(%rbp), %rdi
leaq 0x2594(%rip), %rsi      # 0xc277
callq 0x3200
movq %rax, -0x2b0(%rbp)
jmp 0x9cf1
movq -0x2b0(%rbp), %rdi
movq -0x288(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x270(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
movsd 0x10(%rax,%rcx), %xmm0
callq 0x3470
movq %rax, -0x2b8(%rbp)
jmp 0x9d28
movq -0x2b8(%rbp), %rdi
leaq 0x2541(%rip), %rsi      # 0xc277
callq 0x3200
movq %rax, -0x2c0(%rbp)
jmp 0x9d44
movq -0x2c0(%rbp), %rdi
movq -0x288(%rbp), %rax
movq 0xb4e8b8(%rax), %rax
movslq -0x270(%rbp), %rcx
imulq $0x870, %rcx, %rcx      # imm = 0x870
movsd 0x18(%rax,%rcx), %xmm0
callq 0x3470
movq %rax, -0x2c8(%rbp)
jmp 0x9d7b
movq -0x2c8(%rbp), %rdi
leaq 0x2701(%rip), %rsi      # 0xc48a
callq 0x3200
jmp 0x9d90
jmp 0x9d92
movl -0x270(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x270(%rbp)
jmp 0x9c62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x3380
jmp 0x9deb
jmp 0x9dc8
leaq -0x260(%rbp), %rdi
callq 0x3350
jmp 0x9dd6
leaq -0x260(%rbp), %rdi
callq 0x3380
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
movq -0x268(%rbp), %rdi
callq 0x3430
nopw (%rax,%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x3b9d(%rip), %rcx      # 0xed78
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq %rax, %rcx
addq $0x3200, %rcx           # imm = 0x3200
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0xbb40
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x40, %rax
cmpq %rcx, %rax
movq %rax, -0x20(%rbp)
jne 0xb1fc
movq -0x38(%rbp), %rdi
addq $0x3230, %rdi           # imm = 0x3230
movq %rdi, -0x48(%rbp)
callq 0x3340
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rdi
movl $0xffffffff, 0x3208(%rax) # imm = 0xFFFFFFFF
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, 0x3218(%rax)
movq %rcx, 0x3220(%rax)
movq %rcx, 0x3228(%rax)
leaq 0xf84(%rip), %rsi       # 0xc1ee
callq 0x3330
jmp 0xb271
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x320c(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x3214(%rax) # imm = 0xFFFFFFFF
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x34a8
movq -0x30(%rbp), %rax
addq $0x3200, %rax           # imm = 0x3200
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x58(%rbp)
callq 0xbb70
movq -0x30(%rbp), %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x50(%rbp)
jne 0xb2b2
jmp 0xb2d6
movq -0x10(%rbp), %rdi
callq 0x3430
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movsd 0x3218(%rax), %xmm0
cvtsi2sdl 0x320c(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x6f3(%rip), %xmm0      # 0xc158
callq 0x31a0
movq -0x20(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x6d6(%rip), %xmm1      # 0xc158
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x3250(%rax), %xmm1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbb2f
movq 0x3547(%rip), %rdi      # 0xeff0
leaq 0xc43(%rip), %rsi       # 0xc6f3
callq 0x3200
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x3470
movq %rax, %rdi
leaq 0xc49(%rip), %rsi       # 0xc715
callq 0x3200
movq %rax, %rdi
movq -0x20(%rbp), %rax
movsd 0x3250(%rax), %xmm0
callq 0x3470
movq %rax, %rdi
leaq 0x99b(%rip), %rsi       # 0xc48a
callq 0x3200
movq 0x34f5(%rip), %rdi      # 0xeff0
leaq 0xc32(%rip), %rsi       # 0xc734
callq 0x3200
movq %rax, %rdi
leaq 0x979(%rip), %rsi       # 0xc48a
callq 0x3200
movq -0x20(%rbp), %rax
movsd 0xb2e(%rip), %xmm0      # 0xc650
addsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x3250(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: WolfgangLechner[P]StructureAnalysis/main.cpp
// Function: main
int main(int argc, char *argv[])
{
  // The program accepts one integer as a paramter.
  // eg. executing "./main 1" means that the parameterfile
  // parameter.1.txt in the input directory is used
  // as parameter file.
  // I have included 4 different parameter files for demonstration
  // parameter.1.txt reads a configuration file. With the
  // parameters 2,3,4 perfect crystals of FCC,BCC and HCP are
  // created, respectively. If no parameter is given, parameter.txt
  // is read.
  int t_parameter = 0;
  if (argc > 1)
  {
    t_parameter = atoi(argv[1]);
  }
  // The main obejct is created. It hold all the functions and data
  // used in the analysis.
  CMolecularSystem *m_MolSys = new CMolecularSystem;
  // The parameterfile is read
  m_MolSys->parameter->readParameter(t_parameter);
  // System is initalized, memory allocated, ...
  m_MolSys->InitializeSystem();
  // Neighborlists are used, this reduces the cost of searching for neighbors
  // to O(N) instead of O(N**2).
  //m_MolSys->fillLists();
  m_MolSys->outputSimpleVMDXYZFile(t_parameter);
  
  // The structure analysis is done here, get neighbors, calculate structure
  m_MolSys->calculate_bondOrderParameter();
  // Output the results for each particle.
  m_MolSys->outputSimpleResults(t_parameter);

  // If you are interested in the histogram of the structure parameters just
  // uncomment the next 4 lines.
  //m_MolSys->update_bondOrderHistogramms();
  //m_MolSys->sample_Q4Q6Histograms();
  //m_MolSys->outputBondOrderHistogramms(t_parameter);
  //m_MolSys->outputSimpleVMDXYZFile(t_parameter);

  //Free the memory.
  m_MolSys->deleteMolecules();

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x1, -0x8(%rbp)
jle 0xbbd3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x33b0
movl %eax, -0x14(%rbp)
movl $0xb4ec18, %edi         # imm = 0xB4EC18
callq 0x3220
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x3f80
jmp 0xbbee
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0xb4e8c0(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0xb380
movq -0x20(%rbp), %rdi
callq 0x4d60
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x9b80
movq -0x20(%rbp), %rdi
callq 0x9260
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x9e00
movq -0x20(%rbp), %rdi
callq 0x4cc0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xb4ec18, %esi         # imm = 0xB4EC18
callq 0x3230
movq -0x28(%rbp), %rdi
callq 0x3430
// File: gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::Character(int, int, int, int, int, int, int, double, double, double, double)
Character::Character(int _HP, int _MP, int _speed, int _character_class,
        int _attack, int _defense, int _magic, double _attack_percent,
        double _defense_percent, double _magic_percent, double _critical_percent)
{
    HP = _HP;
    current_HP = _HP;
    MP = _MP;
    current_MP = _MP;
    speed = _speed;
    character_class = _character_class;
    attack = _attack;
    defense = _defense;
    magic = _magic;
    attack_percent = _attack_percent;
    defense_percent = _defense_percent;
    magic_percent = _magic_percent;
    critical_percent = _critical_percent;

    level = 1;
    status = NORMAL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm2, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, 0x10(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x14(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movl 0x10(%rbp), %ecx
movl %ecx, 0x20(%rax)
movl 0x18(%rbp), %ecx
movl %ecx, 0x24(%rax)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x28(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x30(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x38(%rax)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x40(%rax)
movl $0x1, 0x18(%rax)
movl $0x0, 0x48(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jge 0x305a
movq 0x5fc0(%rip), %rdi      # 0x8fc8
leaq 0x3064(%rip), %rsi      # 0x6073
callq 0x21b0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
leaq 0x3050(%rip), %rsi      # 0x607a
callq 0x21b0
movq 0x5fa2(%rip), %rdi      # 0x8fd8
leaq -0x14(%rbp), %rsi
callq 0x20f0
cmpl $0x1, -0x14(%rbp)
jge 0x3058
movq 0x5f7c(%rip), %rdi      # 0x8fc8
leaq 0x3035(%rip), %rsi      # 0x6088
callq 0x21b0
jmp 0x2ffb
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss 0x2f78(%rip), %xmm0     # 0x6004
movss %xmm0, -0x14(%rbp)
movb $0x1, %al
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
movb %al, -0x21(%rbp)
ja 0x30b5
movss -0x14(%rbp), %xmm0
movss 0x2f5c(%rip), %xmm1     # 0x6008
ucomiss %xmm1, %xmm0
seta %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x30be
jmp 0x312f
movq 0x5f03(%rip), %rdi      # 0x8fc8
leaq 0x2fa7(%rip), %rsi      # 0x6073
callq 0x21b0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
leaq 0x2fc7(%rip), %rsi      # 0x60ae
callq 0x21b0
movq 0x5ee5(%rip), %rdi      # 0x8fd8
leaq -0x14(%rbp), %rsi
callq 0x2050
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
ja 0x3117
movss -0x14(%rbp), %xmm0
movss 0x2ef6(%rip), %xmm1     # 0x6008
ucomiss %xmm1, %xmm0
jbe 0x312a
movq 0x5eaa(%rip), %rdi      # 0x8fc8
leaq 0x2f95(%rip), %rsi      # 0x60ba
callq 0x21b0
jmp 0x3091
movss -0x14(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x1, %eax
je 0x3273
jmp 0x3254
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0x32f1
jmp 0x3262
movl -0x24(%rbp), %eax
subl $0x3, %eax
je 0x336d
jmp 0x33ae
movq 0x5d4e(%rip), %rdi      # 0x8fc8
leaq 0x2e72(%rip), %rsi      # 0x60f3
callq 0x21b0
movq %rax, -0x40(%rbp)
movl $0x4, %edi
callq 0x3560
movq -0x40(%rbp), %rdi
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x2310
movq %rax, %rdi
leaq 0x2e3c(%rip), %rsi      # 0x60f8
callq 0x21b0
movq %rax, -0x38(%rbp)
movl $0x4, %edi
callq 0x3560
movq -0x38(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0x2310
jmp 0x33b0
movq 0x5cd0(%rip), %rdi      # 0x8fc8
leaq 0x2dfd(%rip), %rsi      # 0x60fc
callq 0x21b0
movq %rax, -0x50(%rbp)
movl $0x4, %edi
callq 0x3560
movq -0x50(%rbp), %rdi
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x2310
movq %rax, %rdi
leaq 0x2dbe(%rip), %rsi      # 0x60f8
callq 0x21b0
movq %rax, -0x48(%rbp)
movl $0x4, %edi
callq 0x3560
movq -0x48(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x2310
jmp 0x33b0
movq 0x5c54(%rip), %rdi      # 0x8fc8
leaq 0x2d86(%rip), %rsi      # 0x6101
callq 0x21b0
movq %rax, -0x58(%rbp)
movl $0x7, %edi
callq 0x3560
movq -0x58(%rbp), %rdi
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %esi
callq 0x2240
movq %rax, %rdi
movq -0x30(%rbp), %rax
movl 0x48(%rax), %esi
callq 0x2310
jmp 0x33b0
jmp 0x33b0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::performAttack()
int Character::performAttack()
{
    int damage = 0;
    if (status != DEAD)
    {
        damage = attack * level;
    }
    return damage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x1, 0x48(%rax)
je 0x33eb
movq -0x18(%rbp), %rcx
movl 0x1c(%rcx), %eax
imull 0x18(%rcx), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl -0xc(%rbp), %eax
subl 0x20(%rcx), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x3580
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl (%rcx), %edx
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
cmpl $0x0, 0x4(%rax)
jg 0x344d
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, 0x48(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: gilecheverria[P]UP_Battle_Project/Character.cpp
// Function: Character::healDamage(int)
void Character::healDamage(int base_recovery)
{
    // Only a live character can be healed
    if (status != DEAD)
    {
        current_HP += base_recovery;
        // Limit the recovery to the maximum HP of the character
        if (current_HP > HP)
            current_HP = HP;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x1, 0x48(%rax)
je 0x3498
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
addl 0x4(%rcx), %eax
movl %eax, 0x4(%rcx)
movl 0x4(%rcx), %eax
cmpl (%rcx), %eax
jle 0x3496
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x3498
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x55bd(%rip), %rdi      # 0x8fc8
leaq 0x2735(%rip), %rsi      # 0x6147
callq 0x21b0
movq 0x55aa(%rip), %rdi      # 0x8fc8
leaq 0x273e(%rip), %rsi      # 0x6163
callq 0x21b0
movq -0x10(%rbp), %rsi
addq $0x54, %rsi
movq 0x559f(%rip), %rdi      # 0x8fd8
callq 0x3a50
movq -0x10(%rbp), %rdi
callq 0x2900
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x64, %esi
movl $0x14, %edx
movl $0x5, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
movsd 0x26a9(%rip), %xmm0     # 0x6180
movsd 0x26a9(%rip), %xmm2     # 0x6188
movsd 0x26a9(%rip), %xmm3     # 0x6190
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movaps %xmm2, %xmm1
callq 0x2850
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x4c(%rax)
movss 0x266c(%rip), %xmm0     # 0x617c
movss %xmm0, 0x50(%rax)
movss 0x265b(%rip), %xmm0     # 0x6178
movss %xmm0, 0x54(%rax)
movss 0x264a(%rip), %xmm0     # 0x6174
movss %xmm0, 0x58(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, %edi
movl $0x64, %esi
callq 0x4c20
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0x3bb5
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss 0x50(%rax,%rcx,4), %xmm1
cvtsi2ssl -0x18(%rbp), %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x3ba8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3bbc
jmp 0x3baa
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3b74
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x53dd(%rip), %rdi      # 0x8fc8
leaq 0x25c0(%rip), %rsi      # 0x61b2
callq 0x21b0
movq -0x10(%rbp), %rdi
callq 0x3cc0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq 0x53b8(%rip), %rdi      # 0x8fc8
leaq 0x25ba(%rip), %rsi      # 0x61d1
callq 0x21b0
movq 0x53a5(%rip), %rdi      # 0x8fc8
leaq 0x25e6(%rip), %rsi      # 0x6210
callq 0x21b0
movq 0x5392(%rip), %rdi      # 0x8fc8
leaq 0x260a(%rip), %rsi      # 0x6247
callq 0x21b0
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movq 0x5387(%rip), %rdi      # 0x8fd8
callq 0x2050
movq 0x536b(%rip), %rdi      # 0x8fc8
leaq 0x25f4(%rip), %rsi      # 0x6258
callq 0x21b0
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x4, %rsi
movq 0x535c(%rip), %rdi      # 0x8fd8
callq 0x2050
movq 0x5340(%rip), %rdi      # 0x8fc8
leaq 0x25da(%rip), %rsi      # 0x6269
callq 0x21b0
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x8, %rsi
movq 0x5331(%rip), %rdi      # 0x8fd8
callq 0x2050
movq -0x10(%rbp), %rdi
callq 0x2900
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0xd(%rbp)
movb -0xd(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3cde
jmp 0x3dac
movq 0x52e3(%rip), %rdi      # 0x8fc8
leaq 0x2597(%rip), %rsi      # 0x6283
callq 0x21b0
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x3d5f
movq 0x52c3(%rip), %rdi      # 0x8fc8
leaq 0x2587(%rip), %rsi      # 0x6293
callq 0x21b0
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x2310
movq %rax, %rdi
leaq 0x256f(%rip), %rsi      # 0x6295
callq 0x21b0
movq %rax, %rdi
movslq -0x14(%rbp), %rax
leaq 0x54b7(%rip), %rsi      # 0x91f0
shlq $0x5, %rax
addq %rax, %rsi
callq 0x2180
movq %rax, %rdi
leaq 0x2665(%rip), %rsi      # 0x63b4
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3cf8
movq 0x5262(%rip), %rdi      # 0x8fc8
leaq 0x252b(%rip), %rsi      # 0x6298
callq 0x21b0
movq 0x525f(%rip), %rdi      # 0x8fd8
leaq -0xc(%rbp), %rsi
callq 0x20f0
cmpl $0x0, -0xc(%rbp)
jl 0x3d94
cmpl $0x4, -0xc(%rbp)
jge 0x3d94
movb $0x1, -0xd(%rbp)
jmp 0x3da7
movq 0x522d(%rip), %rdi      # 0x8fc8
leaq 0x2504(%rip), %rsi      # 0x62a6
callq 0x21b0
jmp 0x3cd0
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x3f5d
movq 0x50f0(%rip), %rdi      # 0x8fc8
leaq 0x2260(%rip), %rsi      # 0x613f
callq 0x21b0
movq %rax, -0x68(%rbp)
movl $0x9, %edi
callq 0x3560
movq -0x68(%rbp), %rdi
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
callq 0x2240
movq -0x48(%rbp), %rsi
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3e70
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x2180
movq %rax, -0x50(%rbp)
jmp 0x3f29
movq -0x50(%rbp), %rdi
leaq 0x220f(%rip), %rsi      # 0x6143
callq 0x21b0
jmp 0x3f3b
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x3f69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x3f6f
movq -0x48(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3230
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2320
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, 0x8(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x4(%rax)
movslq (%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x405e
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0x405e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x30, %rsp
popq %rbp
retq
movl $0x10, %edi
callq 0x20e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x224c(%rip), %rsi      # 0x62c5
callq 0x2090
jmp 0x4080
movq -0x30(%rbp), %rdi
movq 0x4f65(%rip), %rsi      # 0x8ff0
movq 0x4f2e(%rip), %rdx      # 0x8fc0
callq 0x22f0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2130
movq -0x18(%rbp), %rdi
callq 0x2320
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0x41f2
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl (%rcx), %eax
jge 0x41c2
movq 0x4e86(%rip), %rdi      # 0x8fc8
leaq 0x218b(%rip), %rsi      # 0x62d4
callq 0x21b0
cmpl $0x0, -0xc(%rbp)
jne 0x419a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x4176
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
callq 0x3970
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x4198
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
callq 0x3eb0
jmp 0x41b2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
callq 0x3230
jmp 0x41b4
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x412c
movq 0x4dff(%rip), %rdi      # 0x8fc8
leaq 0x2108(%rip), %rsi      # 0x62d8
callq 0x21b0
movq %rax, %rdi
movq 0x4dd1(%rip), %rsi      # 0x8fb0
callq 0x21f0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x411b
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rdi)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rdi)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rdi)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rdi)
callq 0x4bb0
movq -0x20(%rbp), %rdi
movl %eax, 0x24(%rdi)
addq $0x10, %rdi
callq 0x4bb0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x28(%rax)
movl $0x0, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)