LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DatasetFromCSCPointers::DatasetFromCSCPointers(int*, int*, double*, double*, unsigned long, unsigned long, unsigned long)
DatasetFromCSCPointers::DatasetFromCSCPointers(index_t *indices,
                                                 index_t *indptr,
                                                 value_t *data,
                                                 value_t *labels,
                                                 size_t n,
                                                 size_t d,
                                                 size_t nnz)
  {
    this->n = n;
    this->d = d;
    this->nnz = nnz;
    this->labels = labels;
    columns_vec.clear();
    columns_vec.reserve(d);
    for (size_t j = 0; j < this->d; ++j)
    {
      index_t offset = indptr[j];
      index_t col_nnz = (size_t)(indptr[j + 1] - offset);
      value_t *col_data = data + offset;
      index_t *col_indices = indices + offset;
      Column *col = new SparseColumnFromPointers(col_indices, col_data, col_nnz, n);
      columns_vec.push_back(col);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %r9, 0x18(%rsp)
movq %r9, 0x18(%rdi)
movq %rsi, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %r8, 0x30(%rdi)
callq 0x5260
cmpq $0x0, 0x20(%rbx)
je 0x5e8a
xorl %r13d, %r13d
movslq (%r12,%r13,4), %r14
movslq 0x4(%r12,%r13,4), %r15
movl $0x38, %edi
callq 0x5320
movq %rax, %rbp
movq 0x8(%rsp), %rax
leaq (%rax,%r14,4), %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r14,8), %rdx
subq %r14, %r15
movq %rbp, %rdi
movq %r15, %rcx
movq 0x18(%rsp), %r8
callq 0x5270
movq %rbp, 0x20(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5e74
movq %rbp, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x5e81
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5290
incq %r13
cmpq 0x20(%rbx), %r13
jb 0x5e20
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5ead
movq %rax, %r14
movl $0x38, %esi
movq %rbp, %rdi
callq 0x5330
jmp 0x5eb0
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5ec4
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x5330
movq %r14, %rdi
callq 0x5580
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DatasetFromFContiguousPointer::DatasetFromFContiguousPointer(double*, double*, unsigned long, unsigned long)
DatasetFromFContiguousPointer::DatasetFromFContiguousPointer(
      value_t *data, value_t *labels, size_t n, size_t d)
  {
    this->n = n;
    this->d = d;
    this->nnz = n * d;
    this->labels = labels;
    columns_vec.clear();
    columns_vec.reserve(d);
    for (size_t j = 0; j < d; ++j)
    {
      value_t *col_data = data + j * n;
      Column *col = new DenseColumnFromPointers(col_data, n);
      columns_vec.push_back(col);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r13
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r8, %rax
imulq %rcx, %rax
movq %rax, 0x28(%rdi)
movq %rdx, 0x30(%rdi)
movq %r8, %rsi
callq 0x5260
testq %r14, %r14
je 0x5f62
movq %r13, %r15
shlq $0x3, %r15
movl $0x30, %edi
callq 0x5320
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x55b0
movq %rbp, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5f4f
movq %rbp, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x5f5a
movq %rbx, %rdi
movq %rsp, %rdx
callq 0x5290
addq %r15, %r12
decq %r14
jne 0x5f1c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f85
movq %rax, %r14
movl $0x30, %esi
movq %rbp, %rdi
callq 0x5330
jmp 0x5f88
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5f9c
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x5330
movq %r14, %rdi
callq 0x5580
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l2_norm_sq(std::vector<double, std::allocator<double>> const&)
value_t l2_norm_sq(const vector<value_t> &vec)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < vec.size(); ++ind)
      result += vec[ind] * vec[ind];
    return result;
  }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x5fd8
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x5fc2
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l1_norm(double const*, unsigned long)
value_t l1_norm(const value_t *vec, size_t len)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < len; ++ind)
    {
      if (vec[ind] != 0.0)
        result += fabs(vec[ind]);
    }
    return result;
  }

// Assembly:
testq %rsi, %rsi
je 0x6022
xorpd %xmm1, %xmm1
xorl %eax, %eax
movapd 0x4061(%rip), %xmm2     # 0xa050
xorpd %xmm3, %xmm3
movsd (%rdi,%rax,8), %xmm0
movapd %xmm0, %xmm4
andpd %xmm2, %xmm4
addsd %xmm3, %xmm4
cmpneqsd %xmm1, %xmm0
andpd %xmm0, %xmm4
andnpd %xmm3, %xmm0
orpd %xmm4, %xmm0
incq %rax
movapd %xmm0, %xmm3
cmpq %rax, %rsi
jne 0x5ff3
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l0_norm(double const*, unsigned long)
size_t l0_norm(const value_t *values, size_t len)
  {
    index_t result = 0;
    for (size_t ind = 0; ind < len; ++ind)
    {
      if (values[ind] != 0.0)
        result++;
    }
    return result;
  }

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x604e
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rdx
subl %edx, %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x6033
movl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l2_norm_diff_sq(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
value_t l2_norm_diff_sq(const std::vector<value_t> &vec1,
                          const std::vector<value_t> &vec2)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < vec1.size(); ++ind)
    {
      value_t diff = vec1[ind] - vec2[ind];
      result += diff * diff;
    }
    return result;
  }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x608b
sarq $0x3, %rcx
movq (%rsi), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm1
subsd (%rdx,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x6070
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::inner_product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
value_t inner_product(const vector<value_t> &vec1,
                        const vector<value_t> &vec2)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < vec1.size(); ++ind)
      result += vec1[ind] * vec2[ind];
    return result;
  }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x6128
sarq $0x3, %rcx
movq (%rsi), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x6111
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::max_abs(std::vector<double, std::allocator<double>> const&)
value_t max_abs(const vector<value_t> &vec)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < vec.size(); ++ind)
    {
      if (fabs(vec[ind]) > result)
        result = fabs(vec[ind]);
    }
    return result;
  }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x616c
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm2, %xmm2
xorl %edx, %edx
movapd 0x3efe(%rip), %xmm1     # 0xa050
movsd (%rax,%rdx,8), %xmm0
andpd %xmm1, %xmm0
maxsd %xmm2, %xmm0
incq %rdx
movapd %xmm0, %xmm2
cmpq %rdx, %rcx
jne 0x6152
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::soft_threshold(double, double)
value_t soft_threshold(value_t value, value_t threshold)
  {
    if (value > threshold)
      return value - threshold;
    else if (value < -threshold)
      return value + threshold;
    else
      return 0.0;
  }

// Assembly:
ucomisd %xmm1, %xmm0
jbe 0x617c
subsd %xmm1, %xmm0
jmp 0x6196
movapd 0x3edc(%rip), %xmm3     # 0xa060
xorpd %xmm1, %xmm3
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm3
jbe 0x619a
addsd %xmm1, %xmm0
movapd %xmm0, %xmm2
movapd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/logger.cpp
// Function: BlitzL1::Logger::log_value(char*, double)
void Logger::log_value(char *name, value_t value)
{
  FILE *out_file;
  char file_path[256];

  snprintf(file_path, 256, "%s/%s.%d", log_directory, name, num_points_logged);

  out_file = fopen(file_path, "w");
  if (out_file == NULL)
  {
    std::cerr << "Warning: could not open log path \"" << file_path << "\"" << std::endl;
  }
  else
  {
    fprintf(out_file, "%.15f\n", value);
    fclose(out_file);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r8
movq (%rdi), %rcx
movl 0x8(%rdi), %r9d
leaq 0x3bd4(%rip), %rdx      # 0xa0f5
leaq 0x10(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x54d0
leaq 0x3bc2(%rip), %rsi      # 0xa0fe
movq %rbx, %rdi
callq 0x53e0
testq %rax, %rax
je 0x6575
movq %rax, %rbx
leaq 0x3bd0(%rip), %rsi      # 0xa123
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x5440
movq %rbx, %rdi
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
jmp 0x5300
movq 0x6a74(%rip), %rbx      # 0xcff0
leaq 0x3b7d(%rip), %rsi      # 0xa100
movl $0x22, %edx
movq %rbx, %rdi
callq 0x53d0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5110
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x53d0
leaq 0x3b6f(%rip), %rsi      # 0xa121
movl $0x1, %edx
movq %rbx, %rdi
callq 0x53d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x52d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5200
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss.cpp
// Function: BlitzL1::Loss::compute_Ax(std::vector<double, std::allocator<double>>&, double const*, double, BlitzL1::Dataset const*) const
void Loss::compute_Ax(
    std::vector<value_t> &Ax,
    const value_t *x,
    value_t intercept,
    const Dataset *data) const
{

  index_t n = data->get_n();
  index_t d = data->get_d();
  Ax.assign(n, intercept);
  for (index_t j = 0; j < d; ++j)
  {
    if (x[j] != 0)
      data->get_column(j)->add_multiple(Ax, x[j]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x8(%rsp), %rdx
movsd %xmm0, (%rdx)
movslq 0x18(%rcx), %rsi
movq 0x20(%rcx), %r12
movq %r15, %rdi
callq 0x55a0
testl %r12d, %r12d
jle 0x66a8
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movsd (%r14,%r13,8), %xmm0
ucomisd 0x3aa4(%rip), %xmm0     # 0xa130
jne 0x6690
jnp 0x66a0
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x18(%rax)
incq %r13
cmpq %r13, %r12
jne 0x667e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_logistic.cpp
// Function: BlitzL1::LogisticLoss::dual_obj(std::vector<double, std::allocator<double>> const&, BlitzL1::Dataset const*, double) const
value_t LogisticLoss::dual_obj(const vector<value_t> &theta,
                               const Dataset *data,
                               value_t theta_scaler) const
{
  value_t result = 0.0;
  index_t n = data->get_n();
  for (index_t i = 0; i < n; ++i)
  {
    value_t label = data->get_label(i);
    if (fabs(label) < MIN_ABS_LABEL)
    {
      result += log(2.0);
    }
    else
    {
      value_t val = theta_scaler * theta[i] / label;
      result += val * log(-val) - (1 + val) * log1p(val);
    }
  }
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm0, 0x8(%rsp)
movq 0x18(%rdx), %r12
testl %r12d, %r12d
jle 0x6bda
movq %rdx, %rbx
movq %rsi, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x52c0
movapd %xmm0, %xmm1
andpd 0x3507(%rip), %xmm1     # 0xa050
movsd 0x3667(%rip), %xmm2     # 0xa1b8
ucomisd %xmm1, %xmm2
movsd 0x3653(%rip), %xmm1     # 0xa1b0
ja 0x6bc2
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movapd %xmm1, %xmm0
xorpd 0x34dc(%rip), %xmm0     # 0xa060
callq 0x5240
movsd %xmm0, 0x10(%rsp)
movapd 0x20(%rsp), %xmm0
movapd %xmm0, %xmm1
addsd 0x361f(%rip), %xmm1     # 0xa1c0
movapd %xmm1, 0x30(%rsp)
callq 0x5600
movsd 0x10(%rsp), %xmm1
mulsd 0x30(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
incq %r15
cmpq %r15, %r12
jne 0x6b2c
jmp 0x6bde
xorpd %xmm0, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_logistic.cpp
// Function: BlitzL1::LogisticLoss::compute_dual_points(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, BlitzL1::Dataset const*) const
void LogisticLoss::compute_dual_points(
    vector<value_t> &Ax,
    vector<value_t> &theta,
    vector<value_t> &aux_dual,
    const Dataset *data) const
{

  index_t n = data->get_n();
  theta.resize(n);
  aux_dual.resize(n);
  for (index_t i = 0; i < n; ++i)
  {
    value_t minus_label = -data->get_label(i);
    aux_dual[i] = exp(minus_label * Ax[i]);
    theta[i] = minus_label * aux_dual[i] / (1.0 + aux_dual[i]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x18(%r8), %rbp
movslq %ebp, %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x5340
movq %r14, %rdi
movq %r13, %rsi
callq 0x5340
testl %r13d, %r13d
jle 0x6c8d
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x52c0
movapd %xmm0, %xmm1
xorpd 0x341a(%rip), %xmm1     # 0xa060
movapd %xmm1, (%rsp)
movq (%r12), %rax
movsd (%rax,%r13,8), %xmm0
mulsd %xmm1, %xmm0
callq 0x5590
movq (%r14), %rax
movsd %xmm0, (%rax,%r13,8)
movapd (%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x3548(%rip), %xmm0     # 0xa1c0
divsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
cmpq %r13, %rbp
jne 0x6c2f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_logistic.cpp
// Function: BlitzL1::LogisticLoss::compute_H(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, BlitzL1::Dataset const*) const
void LogisticLoss::compute_H(vector<value_t> &H,
                             const vector<value_t> &theta,
                             const vector<value_t> &Ax,
                             const Dataset *data) const
{
  index_t n = data->get_n();
  H.resize(n);
  for (index_t i = 0; i < n; ++i)
  {
    value_t label = data->get_label(i);
    H[i] = -theta[i] * (label + theta[i]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x18(%r8), %r13
movslq %r13d, %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x5340
testl %r12d, %r12d
jle 0x6d04
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x52c0
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm1
addsd %xmm1, %xmm0
xorpd 0x3371(%rip), %xmm1     # 0xa060
mulsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%r12,8)
incq %r12
cmpq %r12, %r13
jne 0x6ccf
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_logistic.cpp
// Function: BlitzL1::LogisticLoss::apply_intercept_update(double, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, BlitzL1::Dataset const*) const
void LogisticLoss::apply_intercept_update(
    value_t delta,
    vector<value_t> &Ax,
    vector<value_t> &theta,
    vector<value_t> &aux_dual,
    const Dataset *data) const
{
  index_t n = data->get_n();
  for (index_t i = 0; i < n; ++i)
  {
    value_t minus_label = -data->get_label(i);
    Ax[i] += delta;
    aux_dual[i] = exp(minus_label * Ax[i]);
    theta[i] = minus_label * aux_dual[i] / (1.0 + aux_dual[i]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x8(%rsp)
movq 0x18(%r8), %rbp
testl %ebp, %ebp
jle 0x6daf
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x52c0
movapd %xmm0, %xmm1
xorpd 0x3306(%rip), %xmm1     # 0xa060
movapd %xmm1, 0x10(%rsp)
movq (%r12), %rax
movsd (%rax,%r13,8), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax,%r13,8)
mulsd %xmm1, %xmm0
callq 0x5590
movq (%r14), %rax
movsd %xmm0, (%rax,%r13,8)
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x3426(%rip), %xmm0     # 0xa1c0
divsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
cmpq %r13, %rbp
jne 0x6d43
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_squared.cpp
// Function: BlitzL1::SquaredLoss::dual_obj(std::vector<double, std::allocator<double>> const&, BlitzL1::Dataset const*, double) const
value_t SquaredLoss::dual_obj(const vector<value_t> &theta,
                              const Dataset *data,
                              value_t theta_scaler) const
{
  value_t dot_prod = 0;
  index_t n = data->get_n();
  for (index_t i = 0; i < n; ++i)
    dot_prod += data->get_label(i) * theta[i];
  return -0.5 * theta_scaler * theta_scaler * l2_norm_sq(theta) - theta_scaler * dot_prod;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq 0x18(%rdx), %r12
testl %r12d, %r12d
jle 0x6fd1
movq %rdx, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x52c0
movq (%rbx), %rax
mulsd (%rax,%r15,8), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
incq %r15
cmpq %r15, %r12
jne 0x6fa5
jmp 0x6fda
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movsd 0x3246(%rip), %xmm0     # 0xa228
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x5490
movsd (%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/loss_squared.cpp
// Function: BlitzL1::SquaredLoss::compute_dual_points(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, BlitzL1::Dataset const*) const
void SquaredLoss::compute_dual_points(
    vector<value_t> &Ax,
    vector<value_t> &theta,
    vector<value_t> &aux_dual,
    const Dataset *data) const
{
  size_t n = data->get_n();
  theta.resize(n);
  for (size_t i = 0; i < n; ++i)
  {
    theta[i] = Ax[i] - data->get_label(i);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x18(%r8), %r12
movq %rdx, %rdi
movq %r12, %rsi
callq 0x5340
testq %r12, %r12
je 0x7082
xorl %r13d, %r13d
movq (%r15), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x52c0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movq (%r14), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x704d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::Solver::update_intercept(double&, BlitzL1::Loss const*, BlitzL1::Dataset const*)
value_t Solver::update_intercept(value_t &intercept,
                                   const Loss *loss_function,
                                   const Dataset *data)
  {
    // Optimizes over intercept variable with other weights fixed
    // Modifies intercept, theta, and Ax
    // Returns change in intercept value

    if (!use_intercept)
      return 0.0;

    // 1-d newton method:
    value_t intercept_old = intercept;
    vector<value_t> H;
    for (int itr = 0; itr < 10; ++itr)
    {
      value_t grad = sum_vector(theta);
      if (fabs(grad) <= 1e-14)
        break;
      loss_function->compute_H(H, theta, Ax, data);
      value_t hess = sum_vector(H);
      value_t delta = -grad / hess;
      loss_function->apply_intercept_update(
          delta, Ax, theta, aux_dual, data);
      intercept += delta;
    }

    return intercept - intercept_old;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorpd %xmm0, %xmm0
cmpb $0x1, 0xd9(%rdi)
jne 0x7239
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movsd (%rsi), %xmm0
movsd %xmm0, 0x28(%rsp)
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movapd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x18(%rdi), %rbp
leaq 0x78(%rdi), %rax
movq %rax, 0x30(%rsp)
movl $0xa, %r13d
movq %r12, %rdi
callq 0x5210
movapd %xmm0, (%rsp)
movapd (%rsp), %xmm0
andpd 0x2ebd(%rip), %xmm0     # 0xa050
movsd 0x30b5(%rip), %xmm1     # 0xa250
ucomisd %xmm0, %xmm1
jae 0x720d
movq (%r15), %rax
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq *0x18(%rax)
leaq 0x10(%rsp), %rdi
callq 0x5210
movapd (%rsp), %xmm1
xorpd 0x2e91(%rip), %xmm1     # 0xa060
divsd %xmm0, %xmm1
movq (%r15), %rax
movq %r15, %rdi
movapd %xmm1, (%rsp)
movapd %xmm1, %xmm0
movq %rbp, %rsi
movq %r12, %rdx
movq 0x30(%rsp), %rcx
movq %rbx, %r8
callq *0x20(%rax)
movapd (%rsp), %xmm0
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
decl %r13d
jne 0x7179
jmp 0x7212
movsd (%r14), %xmm0
movapd %xmm0, (%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x722e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5330
movapd (%rsp), %xmm0
subsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x724c
jmp 0x724c
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7266
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5330
movq %rbx, %rdi
callq 0x5580
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::get_loss_function(char const*)
Loss *get_loss_function(const char *loss_type)
  {
    // Returns pointer to new loss object of type "loss_type"
    // Raises exception if loss type not recognized

    if (strcmp(loss_type, "logistic") == 0)
      return new LogisticLoss();
    else if (strcmp(loss_type, "squared") == 0)
      return new SquaredLoss();
    else
      throw loss_type;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3034(%rip), %rsi      # 0xa2b0
callq 0x5430
testl %eax, %eax
je 0x72af
leaq 0x302d(%rip), %rsi      # 0xa2b9
movq %rbx, %rdi
callq 0x5430
testl %eax, %eax
jne 0x72cf
movl $0x18, %edi
callq 0x5320
movq %rax, %rbx
movq %rax, %rdi
callq 0x5390
jmp 0x72c4
movl $0x18, %edi
callq 0x5320
movq %rax, %rbx
movq %rax, %rdi
callq 0x5450
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x8, %edi
callq 0x5160
movq %rbx, (%rax)
movq 0x5cd5(%rip), %rsi      # 0xcfb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x5540
jmp 0x72ef
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5580
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::Solver::compute_lambda_max(BlitzL1::Dataset const*, char const*)
value_t Solver::compute_lambda_max(const Dataset *data, const char *loss_type)
  {
    // Returns smallest lambda value for which solution is entirely 0

    // Initialize theta:
    Loss *loss_function = get_loss_function(loss_type);
    size_t n = data->get_n();
    size_t d = data->get_d();
    Ax.assign(n, 0.0);
    loss_function->compute_dual_points(Ax, theta, aux_dual, data);

    // Center theta (if using intercept term):
    value_t intercept;
    update_intercept(intercept, loss_function, data);

    // Compute loss gradient for all features:
    prioritized_features.resize(d);
    for (size_t j = 0; j < d; ++j)
      prioritized_features[j] = j;
    update_ATtheta(data);

    // Return largest magnitude in loss gradients:
    return max_abs(ATtheta);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x5090
movq %rax, %r12
movq 0x18(%r14), %rsi
movq 0x20(%r14), %r15
leaq 0x18(%rbx), %r13
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %r13, %rdi
callq 0x55a0
leaq 0x78(%rbx), %rcx
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq *0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x55d0
leaq 0xa0(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x53f0
testq %r15, %r15
je 0x7421
movq (%r12), %rax
leaq 0x1(%r15), %rcx
andq $-0x2, %rcx
decq %r15
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x2d94(%rip), %xmm1     # 0xa140
xorl %edx, %edx
movdqa 0x2d9a(%rip), %xmm2     # 0xa150
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x2eaa(%rip), %xmm4     # 0xa270
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x73fc
movq %rdx, (%rax,%rdx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x7414
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rax,%rdx,8)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0x73c6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5080
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x5410
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::Solver::compute_alpha(BlitzL1::Dataset const*, double, double)
value_t Solver::compute_alpha(const Dataset *data, value_t lambda, value_t theta_scale)
  {
    // Returns alpha, the largest value in [0,1] such that
    // (1 - alpha) * phi + alpha * theta * theta_scale is feasible
    // Requires values of ATphi and ATtheta to be current

    value_t best_alpha = 1.0;
    for (vector<size_t>::iterator j = prioritized_features.begin();
         j != prioritized_features.end();
         ++j)
    {

      value_t norm = priority_norm_j(*j, data);
      if (norm <= 0.0)
        continue;

      value_t l = ATphi[*j];
      value_t r = theta_scale * ATtheta[*j];
      if (fabs(r) <= lambda)
        continue;

      value_t alpha;
      if (r >= 0)
        alpha = (lambda - l) / (r - l);
      else
        alpha = (-lambda - l) / (r - l);

      if (alpha < best_alpha)
        best_alpha = alpha;
    }
    return best_alpha;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movsd %xmm1, 0x8(%rsp)
movq 0xa0(%rdi), %r15
cmpq 0xa8(%rdi), %r15
je 0x7f4f
movq %rsi, %rbx
movq %rdi, %r14
movapd 0x21bd(%rip), %xmm1     # 0xa060
movapd %xmm0, 0x20(%rsp)
xorpd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd 0x2305(%rip), %xmm0     # 0xa1c0
movsd %xmm0, (%rsp)
movq (%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5060
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x7f3c
movq (%r15), %rax
movq 0x30(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
mulsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
andpd 0x215a(%rip), %xmm1     # 0xa050
movapd 0x20(%rsp), %xmm4
ucomisd %xmm1, %xmm4
jae 0x7f3c
movq 0x60(%r14), %rcx
movsd (%rcx,%rax,8), %xmm1
xorpd %xmm2, %xmm2
cmpnlesd %xmm0, %xmm2
subsd %xmm1, %xmm0
movapd %xmm2, %xmm3
andpd 0x10(%rsp), %xmm3
andnpd %xmm4, %xmm2
orpd %xmm3, %xmm2
subsd %xmm1, %xmm2
divsd %xmm0, %xmm2
minsd (%rsp), %xmm2
movsd %xmm2, (%rsp)
addq $0x8, %r15
cmpq 0xa8(%r14), %r15
jne 0x7ec0
jmp 0x7f5c
movsd 0x2269(%rip), %xmm0     # 0xa1c0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::Solver::prioritize_features(BlitzL1::Dataset const*, double, double const*, unsigned long)
void Solver::prioritize_features(const Dataset *data, value_t lambda, const value_t *x, size_t max_size_C)
  {
    // Reorders prioritized_features so that first max_size_C
    // elements are feature indices with highest priority in order

    size_t d = data->get_d();
    feature_priorities.resize(d);

    for (vector<size_t>::iterator j = prioritized_features.begin();
         j != prioritized_features.end();
         ++j)
    {
      if (x[*j] != 0)
      {
        feature_priorities[*j] = 0.0;
      }
      else
      {
        value_t norm = priority_norm_j(*j, data);
        if (norm <= 0)
        {
          feature_priorities[*j] = std::numeric_limits<value_t>::max();
        }
        else
        {
          value_t priority_value = (lambda - fabs(ATphi[*j])) / norm;
          feature_priorities[*j] = priority_value;
        }
      }
    }
    IndirectComparator cmp(feature_priorities);
    nth_element(
        prioritized_features.begin(),
        prioritized_features.begin() + max_size_C,
        prioritized_features.end(),
        cmp);
    sort(
        prioritized_features.begin(),
        prioritized_features.end(),
        cmp);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %rbp
movsd %xmm0, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r15
movq 0x20(%rsi), %rsi
leaq 0xb8(%rdi), %rbx
movq %rbx, %rdi
callq 0x5340
movq 0xa0(%r15), %r14
movq 0xa8(%r15), %r13
cmpq %r13, %r14
je 0x80df
xorpd %xmm3, %xmm3
movq (%r14), %rsi
movsd (%rbp,%rsi,8), %xmm0
ucomisd %xmm3, %xmm0
jne 0x8075
jnp 0x807b
xorpd %xmm1, %xmm1
jmp 0x80bc
movq %r15, %rdi
movq %r12, %rdx
callq 0x5060
xorpd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
movq (%r14), %rsi
jae 0x80b4
movq 0x60(%r15), %rax
movsd (%rax,%rsi,8), %xmm2
andpd 0x1fac(%rip), %xmm2     # 0xa050
movsd 0x10(%rsp), %xmm1
subsd %xmm2, %xmm1
divsd %xmm0, %xmm1
jmp 0x80bc
movsd 0x21a4(%rip), %xmm1     # 0xa260
movq 0xb8(%r15), %rax
movsd %xmm1, (%rax,%rsi,8)
addq $0x8, %r14
movq 0xa8(%r15), %r13
cmpq %r13, %r14
jne 0x8064
movq 0xa0(%r15), %r14
movq 0x8(%rsp), %rax
leaq (%r14,%rax,8), %rsi
cmpq %r13, %r14
sete %al
cmpq %r13, %rsi
sete %cl
orb %al, %cl
jne 0x812b
movq %r13, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rcx
xorl $0x3f, %ecx
addl %ecx, %ecx
xorq $0x7e, %rcx
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %r8
callq 0x53a0
movq 0xa0(%r15), %r14
movq 0xa8(%r15), %r13
cmpq %r13, %r14
je 0x8171
movq %r13, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x5130
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5030
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbjohns[P]BlitzL1/src/timer.h
// Function: BlitzL1::Timer::elapsed_time()
double elapsed_time()
    {
      if (is_paused)
        return absolute_pause_time - absolute_start_time - pause_accum;
      else
        return get_real_time() - absolute_start_time - pause_accum;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x8b5d
movsd 0x8(%rbx), %xmm0
jmp 0x8b83
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5500
cvtsi2sdq (%r14), %xmm1
cvtsi2sdq 0x8(%r14), %xmm0
divsd 0x16c9(%rip), %xmm0     # 0xa248
addsd %xmm1, %xmm0
subsd (%rbx), %xmm0
subsd 0x10(%rbx), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::rmdir()
void GameUnit::rmdir() {
    try {
        string comand = "find * -type d | grep -v \"^CMakeFiles\" | xargs rm -rf";
        const char *runComand = comand.c_str();
        system(runComand);
    } catch( std::exception &e ) {
        cout << "Error deleting directory!n" << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x6148(%rip), %rsi      # 0xb48a
leaq 0x6176(%rip), %rdx      # 0xb4bf
leaq -0x38(%rbp), %rdi
callq 0x39b0
movq -0x38(%rbp), %rdi
callq 0x3220
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x5370
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3290
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x539e
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3290
jmp 0x539e
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x53df
movq %rbx, %rdi
callq 0x3100
movq 0xac0d(%rip), %rdi      # 0xffc0
leaq 0x6106(%rip), %rsi      # 0xb4c0
movl $0x1a, %edx
callq 0x32d0
movq 0xabf5(%rip), %rdi      # 0xffc0
callq 0x3130
callq 0x33c0
jmp 0x5370
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x3420
movq %rax, %rdi
callq 0x6837
nop
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::mkdir()
bool GameUnit::mkdir() {
    try {
        string comand = "mkdir game";
        const char *runComand = comand.c_str();
        system(runComand);
    } catch( std::exception &e ) {
        cout << "Error creating directory!" << endl;
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x6059(%rip), %rsi      # 0xb465
leaq 0x605c(%rip), %rdx      # 0xb46f
leaq -0x38(%rbp), %rdi
callq 0x39b0
movq -0x38(%rbp), %rdi
callq 0x3220
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x543a
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3290
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x546a
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3290
jmp 0x546a
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x54ad
movq %rbx, %rdi
callq 0x3100
movq 0xab41(%rip), %rdi      # 0xffc0
leaq 0x5fea(%rip), %rsi      # 0xb470
movl $0x19, %edx
callq 0x32d0
movq 0xab29(%rip), %rdi      # 0xffc0
callq 0x3130
callq 0x33c0
xorl %eax, %eax
jmp 0x543c
movq %rax, %rbx
callq 0x33c0
movq %rbx, %rdi
callq 0x3420
movq %rax, %rdi
callq 0x6837
nop
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::getHeroByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Hero *GameUnit::getHeroByName(string heroName) {
    for (int i = 0; i < ::numberOfPlayers; ++ i)
        if ( realOrder[i]->getName() == heroName )
            return realOrder[i];
    return NULL;
}

// Assembly:
cmpl $0x0, 0xa1bd(%rip)      # 0x1029c
jle 0x6170
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax,%rbx,8), %rsi
leaq -0x48(%rbp), %rdi
callq 0x7c0c
movq -0x40(%rbp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x6134
movq -0x48(%rbp), %r13
testq %rdx, %rdx
je 0x613d
movq (%r15), %rsi
movq %r13, %rdi
callq 0x32a0
testl %eax, %eax
sete %r12b
jmp 0x6140
movq -0x48(%rbp), %r13
xorl %r12d, %r12d
jmp 0x6140
movb $0x1, %r12b
leaq -0x38(%rbp), %rax
cmpq %rax, %r13
je 0x6158
movq -0x38(%rbp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x3290
testb %r12b, %r12b
jne 0x6173
incq %rbx
movslq 0xa135(%rip), %rax      # 0x1029c
cmpq %rax, %rbx
jl 0x60fe
xorl %eax, %eax
jmp 0x617a
xorl %eax, %eax
retq
movq (%r14), %rax
movq (%rax,%rbx,8), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::nextTurn()
void GameUnit::nextTurn() {
    int check = currentTurn;
    if ( check + 1 >= ::numberOfPlayers ) {
        currentTurn = 0;
        ::roundNumber ++;
        mainMenu(turnOrder[currentTurn]);
    } else {
        currentTurn ++;
        mainMenu(turnOrder[currentTurn]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x30(%rdi), %rax
incq %rax
cmpl 0xa101(%rip), %eax      # 0x1029c
jge 0x61aa
movl %eax, 0x30(%rdi)
shlq $0x3, %rax
addq 0x18(%rdi), %rax
jmp 0x61bb
movl $0x0, 0x30(%rdi)
incl 0xa0e1(%rip)            # 0x10298
movq 0x18(%rdi), %rax
movq (%rax), %rsi
popq %rbp
jmp 0x42ae
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::showHeroes()
void GameUnit::showHeroes() {
    for (int i = 0; i < ::numberOfPlayers; ++ i) {
        if ( realOrder[i]->getName() != turnOrder[currentTurn]->getName()) {
            cout << realOrder[i]->getName() << " ";
            cout << realOrder[i]->displayType() << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpl $0x0, 0xa0c0(%rip)      # 0x1029c
jle 0x6346
movq %rdi, %rbx
xorl %r12d, %r12d
leaq -0x48(%rbp), %r14
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x7c0c
movslq 0x30(%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
leaq -0x68(%rbp), %rdi
callq 0x7c0c
movq -0x40(%rbp), %rdx
cmpq -0x60(%rbp), %rdx
jne 0x6237
movq -0x68(%rbp), %r13
testq %rdx, %rdx
je 0x6240
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x32a0
testl %eax, %eax
setne %r15b
jmp 0x6243
movb $0x1, %r15b
movq -0x68(%rbp), %r13
jmp 0x6243
xorl %r15d, %r15d
leaq -0x58(%rbp), %rax
cmpq %rax, %r13
je 0x625b
movq -0x58(%rbp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x3290
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6274
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3290
testb %r15b, %r15b
je 0x6333
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x7c0c
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x9d25(%rip), %rdi      # 0xffc0
callq 0x32d0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5556(%rip), %rsi      # 0xb805
callq 0x32d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x62cd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3290
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x86fc
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x9cd5(%rip), %rdi      # 0xffc0
callq 0x32d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31b0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6333
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3290
incq %r12
movslq 0x9f5f(%rip), %rax      # 0x1029c
cmpq %rax, %r12
jl 0x61ec
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6359
jmp 0x6359
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6375
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::eraseKilled()
void GameUnit::eraseKilled() {
    unsigned long size = realOrder.size();
    for (int i = 0; i < size; i ++) {
        if ( realOrder[i]->inLife() == 0 && realOrder[i]->showArmy() == "." ) {
            realOrder[i]->rmdir();
            realOrder[i]->~Hero();
            realOrder.erase(realOrder.begin() + i);
            ::numberOfPlayers --;
        }
    }
    realOrder.shrink_to_fit();
    turnOrder.shrink_to_fit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rax, %r13
subq (%rdi), %r13
je 0x646d
sarq $0x3, %r13
cmpq $0x1, %r13
adcq $0x0, %r13
movl $0x8, %r15d
movq $-0x8, %r14
movq (%rbx), %rax
movq -0x8(%rax,%r15), %rsi
cmpb $0x0, 0x3a(%rsi)
jne 0x6458
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x8362
movq %r12, %rdi
leaq 0x4cb8(%rip), %rsi      # 0xb09b
callq 0x30b0
movl %eax, %r12d
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6404
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3290
testl %r12d, %r12d
jne 0x6458
movq (%rbx), %rax
movq -0x8(%rax,%r15), %rdi
callq 0x96d2
movq (%rbx), %rax
movq -0x8(%rax,%r15), %rdi
callq 0x6846
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
leaq (%rax,%r15), %rsi
cmpq %rdx, %rsi
je 0x644a
leaq (%rax,%r15), %rdi
addq $-0x8, %rdi
subq %rax, %rdx
addq %r14, %rdx
callq 0x33b0
movq 0x8(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x8(%rbx)
decl 0x9e44(%rip)            # 0x1029c
addq $0x8, %r15
addq $-0x8, %r14
decq %r13
jne 0x63bb
movq 0x8(%rbx), %rax
cmpq %rax, 0x10(%rbx)
je 0x647b
movq %rbx, %rdi
callq 0x6e3c
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x6491
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x6e3c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::getTurnOrder[abi:cxx11]()
string GameUnit::getTurnOrder() {
    string turnList = "";
    for (Hero *i : turnOrder)
        turnList += i->getName() + " ";
    return turnList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x5062(%rip), %rdx      # 0xb52b
movq %rdx, %rsi
callq 0x39b0
movq 0x18(%r14), %r12
movq 0x20(%r14), %r15
cmpq %r15, %r12
je 0x658f
leaq -0x40(%rbp), %r13
leaq -0x70(%rbp), %r14
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7c0c
movq %r14, %rdi
leaq 0x5305(%rip), %rsi      # 0xb805
callq 0x3470
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6525
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x652d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x6569
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6582
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3290
addq $0x8, %r12
cmpq %r15, %r12
jne 0x64ea
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x65dc
movq %rax, %r14
jmp 0x65c3
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x65c3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x65dc
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3290
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x65f4
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3290
movq %r14, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O3/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::Army()
Army::Army() {
    try {
        realArmy = {new Zombie(),new Vampire(),new Archer(),
                    new Wizard(),new BlackDragon()};
        vector<int> vect(6); // emty armyList
        armyList = vect;
        vect.clear();
    }
    catch( std::bad_alloc &exc ) {
        cout << exc.what() << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x18, %edi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0xa538
movq %r13, -0x50(%rbp)
movl $0x18, %edi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0xa47c
movq %r13, -0x48(%rbp)
movl $0x18, %edi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0xa37c
movq %r13, -0x40(%rbp)
movl $0x18, %edi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0xa2a4
movq %r13, -0x38(%rbp)
movl $0x18, %edi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0xa1c4
leaq -0x28(%rbp), %rdx
movq %r13, -0x8(%rdx)
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x79c8
movl $0x18, %edi
callq 0x3280
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x10(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rcx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x7868
movq -0x50(%rbp), %rdi
cmpq %rdi, -0x48(%rbp)
je 0x706b
movq %rdi, -0x48(%rbp)
testq %rdi, %rdi
je 0x707c
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3290
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r12
movq %rax, %r15
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x70c8
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
jmp 0x70bb
jmp 0x70c2
jmp 0x70ad
jmp 0x70ad
jmp 0x70ad
jmp 0x70ad
movq %rdx, %r12
movq %rax, %r15
movl $0x18, %esi
movq %r13, %rdi
callq 0x3290
jmp 0x70c8
movq %rdx, %r12
movq %rax, %r15
cmpl $0x1, %r12d
jne 0x710d
movq %r15, %rdi
callq 0x3100
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x8eda(%rip), %rdi      # 0xffc0
movq %rax, %rsi
callq 0x3270
movq %rax, %rdi
callq 0x3130
callq 0x33c0
jmp 0x707c
movq %rax, %r15
jmp 0x710d
movq %rax, %r15
callq 0x33c0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x7121
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x3290
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7135
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3290
movq %r15, %rdi
callq 0x3420
movq %rax, %rdi
callq 0x6837
nop