LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/exportDataAndIndex.cpp
// Function: writeIndexFile(char const*, void*, int)
int writeIndexFile(const char *path,void *ptr,int size){
    int fd=open(path,O_WRONLY | O_APPEND | O_CREAT,0555);
    if(fd == -1){
        printf("fail to open file %s\n",path);
        return -1;
    }
    int writedPointerBytes=write(fd,ptr,size);
    if(writedPointerBytes==-1){
        printf("write pointer info error!\n");
        return -1;
    }
    if(writedPointerBytes<size){
        printf("did not write enough pointer info!\n");
    }
    int writedIndexNumBytes=write(fd,compressedIndexArr,sizeof(unsigned)*indexOffset);
    if(writedIndexNumBytes==-1){
        printf("write index number error!\n");
        return -1;
    }
    if(writedIndexNumBytes<sizeof(unsigned)*indexOffset){
        printf("do not write enough index number data!\n");
    }
    return writedPointerBytes+writedIndexNumBytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl $0x441, %esi            # imm = 0x441
movl $0x16d, %edx            # imm = 0x16D
xorl %eax, %eax
callq 0x21c0
cmpl $-0x1, %eax
je 0x4b15
movl %eax, %r14d
movslq %r15d, %rdx
movl %eax, %edi
movq %r12, %rsi
callq 0x20d0
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x4b28
cmpl %r15d, %ebx
jge 0x4acf
leaq 0x18bd(%rip), %rdi      # 0x6387
callq 0x2450
leaq 0x679f741a(%rip), %r15  # 0x679fbef0
movslq (%r15), %rdx
shlq $0x2, %rdx
leaq 0x653d1a0c(%rip), %rsi  # 0x653d64f0
movl %r14d, %edi
callq 0x20d0
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x4b31
movslq %r14d, %rax
movslq (%r15), %rcx
shlq $0x2, %rcx
cmpq %rcx, %rax
jae 0x4b10
leaq 0x189f(%rip), %rdi      # 0x63aa
callq 0x2450
addl %r14d, %ebx
jmp 0x4b40
leaq 0x175b(%rip), %rdi      # 0x6277
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x4b3d
leaq 0x18bc(%rip), %rdi      # 0x63eb
jmp 0x4b38
leaq 0x1899(%rip), %rdi      # 0x63d1
callq 0x2450
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/test.c
// Function: processFunc(void*)
void *processFunc(void *arg){
    //pthread_setcanceltype(PTHREAD_CANCEL_ASYCHRONOUS,NULL);
    //pthread_t pro,con;
    pthread_mutex_init(&mutex,0);
    pthread_cond_init(&cond_p,0);
    pthread_cond_init(&cond_c,0);
    pthread_create(&pro,0,receiveData,0);
    pthread_create(&con,0,outputFlows,0);
    pthread_join(pro,0);
    pthread_join(con,0);
    pthread_mutex_destroy(&mutex);
    pthread_cond_destroy(&cond_p);
    pthread_cond_destroy(&cond_c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3643(%rip), %rbx      # 0x92b0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2400
leaq 0x365a(%rip), %r14      # 0x92d8
movq %r14, %rdi
xorl %esi, %esi
callq 0x2350
leaq 0x6ab0a379(%rip), %r15  # 0x6ab10008
movq %r15, %rdi
xorl %esi, %esi
callq 0x2350
leaq 0x6ab398c0(%rip), %rdi  # 0x6ab3f560
leaq -0x3230(%rip), %rdx     # 0x2a77
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x24d0
leaq 0x6ab398b1(%rip), %rdi  # 0x6ab3f568
leaq -0xc22(%rip), %rdx      # 0x509c
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x24d0
movq 0x6ab39892(%rip), %rdi  # 0x6ab3f560
xorl %esi, %esi
callq 0x2290
movq 0x6ab3988c(%rip), %rdi  # 0x6ab3f568
xorl %esi, %esi
callq 0x2290
movq %rbx, %rdi
callq 0x2310
movq %r14, %rdi
callq 0x24e0
movq %r15, %rdi
callq 0x24e0
// File: /workspace/github_cpp_makefile_star2_O2/yueww[P]TSR/test.c
// Function: processCommand(char const*, char const*)
char *processCommand(const char *opt,const char *name){
    char *command=(char *)malloc(sizeof(char)*COMMANDSIZE);
    if(!strcmp(opt,"-i")){
       strcpy(command,"fprobe -i ");
       strcat(command,name);
       strcat(command," -B 8192 -r 2 -q 10000 localhost:555");
    }else if(!strcmp(opt,"-f")){
       strcpy(command,"cat < ");
       strcat(command,name);
       strcat(command," | fprobe -i - -B 8192 -r 2 -q 10000 -t 10000:10000000 localhost:555");
    }else{
        printf("unknown options!\n");
        free(command);
        command=NULL;
    }
    return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x200, %edi            # imm = 0x200
callq 0x2370
movq %rax, %rbx
cmpb $0x2d, (%r15)
jne 0x5d3a
cmpb $0x69, 0x1(%r15)
jne 0x5d2c
cmpb $0x0, 0x2(%r15)
je 0x5d5e
cmpb $0x66, 0x1(%r15)
jne 0x5d3a
cmpb $0x0, 0x2(%r15)
je 0x5dad
leaq 0xa60(%rip), %rdi       # 0x67a1
callq 0x2450
movq %rbx, %rdi
callq 0x2340
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x2d2065626f727066, %rax # imm = 0x2D2065626F727066
movq %rax, (%rbx)
movl $0x20692d, 0x7(%rbx)    # imm = 0x20692D
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c0
movq %rbx, %rdi
callq 0x2110
movabsq $0x3535353a74736f, %rcx # imm = 0x3535353A74736F
movq %rcx, 0x1d(%rbx,%rax)
movups 0x822(%rip), %xmm0      # 0x65bd
movups %xmm0, (%rbx,%rax)
movups 0x827(%rip), %xmm0      # 0x65cd
movups %xmm0, 0x10(%rbx,%rax)
jmp 0x5d50
movl $0x203c20, 0x3(%rbx)    # imm = 0x203C20
movl $0x20746163, (%rbx)     # imm = 0x20746163
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c0
movq %rbx, %rdi
callq 0x2110
movq %rbx, %rdi
addq %rax, %rdi
leaq 0x80f(%rip), %rsi       # 0x65e9
pushq $0x45
popq %rdx
callq 0x2250
jmp 0x5d50
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/solver.h
// Function: BlitzL1::Solver::Solver()
Solver()
    {
      tolerance = 0.0001;
      use_intercept = true;
      verbose = false;
      min_time = -60.0;
      max_time = 3.15569e9;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rdi)
andq $0x0, 0x110(%rdi)
movl $0x90, %edx
xorl %esi, %esi
callq 0x7260
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xc0(%rbx)
movabsq $0x3f1a36e2eb1c432d, %rax # imm = 0x3F1A36E2EB1C432D
movq %rax, 0xd0(%rbx)
movw $0x100, 0xd8(%rbx)      # imm = 0x100
movaps 0x4413(%rip), %xmm0     # 0xc000
movups %xmm0, 0xe0(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::Column::l2_norm_centered() const
value_t Column::l2_norm_centered() const
  {
    if (l2_norm_centered_cache == -1.0)
    {
      value_t mean_value = this->mean();
      value_t value_sq = l2_norm_sq() - mean_value * mean_value * length;
      if (value_sq <= 0)
        l2_norm_centered_cache = 0.0;
      else
        l2_norm_centered_cache = sqrt(value_sq);
    }
    return l2_norm_centered_cache;
  }

// Assembly:
movsd 0x20(%rdi), %xmm1
ucomisd 0x43d3(%rip), %xmm1     # 0xc010
jne 0x7cb9
jp 0x7cb9
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x20(%rax)
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movsd 0x8(%rbx), %xmm1
unpcklps 0x43b6(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x43be(%rip), %xmm1     # 0xc030
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x7caf
ucomisd %xmm1, %xmm0
jb 0x7ca6
sqrtsd %xmm0, %xmm1
jmp 0x7caf
callq 0x7320
movapd %xmm0, %xmm1
movsd %xmm1, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::inner_product(std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::inner_product(const vector<value_t> &vec) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * vec[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
movq (%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
cmpq %rdi, %rax
je 0x7d1a
movslq (%rcx,%rdi,4), %r8
movsd (%rdx,%rdi,8), %xmm1
mulsd (%rsi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
jmp 0x7cfd
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::weighted_inner_product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::weighted_inner_product(const std::vector<value_t> &vec, const std::vector<value_t> &weights) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * vec[i] * weights[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdi
movq (%rsi), %rsi
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x7d59
movslq (%rcx,%r8,4), %r9
movsd (%rdi,%r8,8), %xmm1
mulsd (%rsi,%r9,8), %xmm1
mulsd (%rdx,%r9,8), %xmm1
addsd %xmm1, %xmm0
incq %r8
jmp 0x7d35
retq
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::SparseColumnFromPointers::h_norm_sq(std::vector<double, std::allocator<double>> const&) const
value_t SparseColumnFromPointers::h_norm_sq(const vector<value_t> &h_values) const
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < nnz; ++ind)
    {
      index_t i = indices[ind];
      result += values[ind] * values[ind] * h_values[i];
    }
    return result;
  }

// Assembly:
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
movq (%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
cmpq %rdi, %rax
je 0x7dc6
movslq (%rcx,%rdi,4), %r8
movsd (%rdx,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
mulsd (%rsi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
jmp 0x7da5
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::sum_array(double const*, unsigned long)
value_t sum_array(const value_t *values, size_t length)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < length; ++ind)
      result += values[ind];
    return result;
  }

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rsi
je 0x7e14
addsd (%rdi,%rax,8), %xmm0
incq %rax
jmp 0x7e05
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::l2_norm_sq(double const*, unsigned long)
value_t l2_norm_sq(const value_t *values, size_t length)
  {
    value_t result = 0.0;
    for (size_t ind = 0; ind < length; ++ind)
      result += values[ind] * values[ind];
    return result;
  }

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rsi
je 0x7e40
movsd (%rdi,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x7e29
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::inner_product(std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::inner_product(const vector<value_t> &vec) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * vec[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x7e95
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
jmp 0x7e7d
retq
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::weighted_inner_product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::weighted_inner_product(const std::vector<value_t> &vec, const std::vector<value_t> &weights) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * vec[i] * weights[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
movq (%rsi), %rsi
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %edi, %edi
cmpq %rdi, %rax
je 0x7ec7
movsd (%rcx,%rdi,8), %xmm1
mulsd (%rsi,%rdi,8), %xmm1
mulsd (%rdx,%rdi,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
jmp 0x7eaa
retq
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/common.cpp
// Function: BlitzL1::DenseColumnFromPointers::h_norm_sq(std::vector<double, std::allocator<double>> const&) const
value_t DenseColumnFromPointers::h_norm_sq(const vector<value_t> &h_values) const
  {
    value_t result = 0.0;
    for (size_t i = 0; i < length; ++i)
      result += values[i] * values[i] * h_values[i];
    return result;
  }

// Assembly:
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x7f21
movsd (%rcx,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
jmp 0x7f05
retq
// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
movq %r9, 0x18(%rsp)
movq %r9, 0x18(%rdi)
movq %rsi, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %r8, 0x30(%rdi)
callq 0x7360
xorl %r14d, %r14d
cmpq 0x20(%rbx), %r14
jae 0x801c
movslq (%r12,%r14,4), %r13
movslq 0x4(%r12,%r14,4), %r15
pushq $0x38
popq %rdi
callq 0x7450
movq %rax, %rbp
movq 0x8(%rsp), %rax
leaq (%rax,%r13,4), %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r13,8), %rdx
subq %r13, %r15
movq %rbp, %rdi
movq %r15, %rcx
movq 0x18(%rsp), %r8
callq 0x7370
movq %rbp, 0x20(%rsp)
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7590
incq %r14
jmp 0x7fc6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x803d
movq %rax, %r14
pushq $0x38
popq %rsi
movq %rbp, %rdi
callq 0x7460
jmp 0x8040
movq %rax, %r14
movq %rbx, %rdi
callq 0x7210
movq %r14, %rdi
callq 0x77e0
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbp
movq %rsi, %r12
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%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 0x7360
movq %rbp, %r15
shlq $0x3, %r15
subq $0x1, %r14
jb 0x80ca
pushq $0x30
popq %rdi
callq 0x7450
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x7840
movq %r13, (%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
callq 0x7590
addq %r15, %r12
jmp 0x8098
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x80eb
movq %rax, %r14
pushq $0x30
popq %rsi
movq %r13, %rdi
callq 0x7460
jmp 0x80ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x7210
movq %r14, %rdi
callq 0x77e0
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x3, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x8129
movsd (%rax,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x8112
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorpd %xmm1, %xmm1
xorl %eax, %eax
movapd 0x3f18(%rip), %xmm2     # 0xc050
xorpd %xmm0, %xmm0
cmpq %rax, %rsi
je 0x816c
movsd (%rdi,%rax,8), %xmm3
movapd %xmm3, %xmm4
andpd %xmm2, %xmm4
addsd %xmm0, %xmm4
cmpneqsd %xmm1, %xmm3
andpd %xmm3, %xmm4
andnpd %xmm0, %xmm3
orpd %xmm4, %xmm3
incq %rax
movapd %xmm3, %xmm0
jmp 0x813c
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x8190
movsd (%rdi,%rcx,8), %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rdx
subl %edx, %eax
incq %rcx
jmp 0x8175
movl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x3, %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x81c6
movsd (%rax,%rsi,8), %xmm1
subsd (%rdx,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rsi
jmp 0x81aa
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x3, %rcx
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x8243
movsd (%rax,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
jmp 0x822b
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x3, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movapd 0x3df0(%rip), %xmm1     # 0xc050
cmpq %rdx, %rcx
je 0x827b
movsd (%rax,%rdx,8), %xmm2
andpd %xmm1, %xmm2
maxsd %xmm0, %xmm2
incq %rdx
movapd %xmm2, %xmm0
jmp 0x8260
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8288
subsd %xmm1, %xmm0
jmp 0x82a2
movapd 0x3dd0(%rip), %xmm3     # 0xc060
xorpd %xmm1, %xmm3
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm3
jbe 0x82a6
addsd %xmm1, %xmm0
movapd %xmm0, %xmm2
movapd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x110, %rsp            # imm = 0x110
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r8
movq (%rdi), %rcx
movl 0x8(%rdi), %r9d
leaq 0x3a4e(%rip), %rdx      # 0xc0f5
leaq 0x10(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7700
leaq 0x3a3c(%rip), %rsi      # 0xc0fe
movq %rbx, %rdi
callq 0x7520
testq %rax, %rax
je 0x86f9
movq %rax, %rbx
leaq 0x3a4a(%rip), %rsi      # 0xc123
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x7610
movq %rbx, %rdi
addq $0x110, %rsp            # imm = 0x110
popq %rbx
jmp 0x7420
movq 0x78f0(%rip), %rdi      # 0xfff0
leaq 0x39f9(%rip), %rsi      # 0xc100
callq 0x7410
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x7410
leaq 0x3a01(%rip), %rsi      # 0xc121
movq %rax, %rdi
callq 0x7410
movq %rax, %rdi
callq 0x71f0
addq $0x110, %rsp            # imm = 0x110
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/logger.cpp
// Function: BlitzL1::Logger::log_point(double, double)
void Logger::log_point(double elapsed_time, value_t obj)
{
  if (!strlen(log_directory))
    return;

  char time_str[] = "time";
  log_value(time_str, (value_t)elapsed_time);
  char obj_str[] = "obj";
  log_value(obj_str, obj);

  num_points_logged++;
}

// Assembly:
movq (%rdi), %rax
cmpb $0x0, (%rax)
je 0x8785
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rsi
movb $0x0, 0x4(%rsi)
movl $0x656d6974, (%rsi)     # imm = 0x656D6974
movsd %xmm1, 0x8(%rsp)
callq 0x7140
leaq 0x14(%rsp), %rsi
movl $0x6a626f, (%rsi)       # imm = 0x6A626F
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x7140
incl 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x20(%rcx), %r12d
movq %r15, %rdi
callq 0x7830
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x87ed
movsd (%r14,%r13,8), %xmm0
ucomisd 0x395c(%rip), %xmm0     # 0xc130
jne 0x87d8
jnp 0x87e8
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x18(%rax)
incq %r13
jmp 0x87c1
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/loss_logistic.cpp
// Function: BlitzL1::LogisticLoss::primal_loss(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, BlitzL1::Dataset const*) const
value_t LogisticLoss::primal_loss(const vector<value_t> &theta,
                                  const vector<value_t> &aux_dual,
                                  const Dataset *data) const
{
  value_t loss = 0.0;
  size_t n = data->get_n();
  for (size_t i = 0; i < n; ++i)
  {
    loss += log1p(aux_dual[i]);
  }
  return loss;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq 0x18(%rcx), %r14
xorps %xmm0, %xmm0
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x89f0
movq (%rbx), %rax
movsd %xmm0, 0x8(%rsp)
movsd (%rax,%r15,8), %xmm0
callq 0x78b0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r15
jmp 0x89bc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movl 0x18(%rdx), %r12d
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
xorpd %xmm0, %xmm0
cmpq %r15, %r12
je 0x8ad4
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x73d0
movapd %xmm0, %xmm1
andpd 0x3607(%rip), %xmm1     # 0xc050
movsd 0x3737(%rip), %xmm2     # 0xc188
ucomisd %xmm1, %xmm2
movsd 0x3723(%rip), %xmm1     # 0xc180
ja 0x8ac2
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movapd %xmm1, %xmm0
xorpd 0x35dc(%rip), %xmm0     # 0xc060
callq 0x7340
movsd %xmm0, 0x10(%rsp)
movapd 0x20(%rsp), %xmm0
movapd %xmm0, %xmm1
addsd 0x36ef(%rip), %xmm1     # 0xc190
movapd %xmm1, 0x30(%rsp)
callq 0x78b0
movsd 0x10(%rsp), %xmm1
mulsd 0x30(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
incq %r15
jmp 0x8a23
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
movslq %eax, %r13
movq %rdx, %rdi
movq %r13, %rsi
callq 0x7470
movq %r14, %rdi
movq %r13, %rsi
callq 0x7470
xorl %ebp, %ebp
testl %r13d, %r13d
cmovlel %ebp, %r13d
cmpq %rbp, %r13
je 0x8b7c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x73d0
movapd %xmm0, %xmm1
xorpd 0x3525(%rip), %xmm1     # 0xc060
movapd %xmm1, (%rsp)
movq (%r12), %rax
movsd (%rax,%rbp,8), %xmm0
mulsd %xmm1, %xmm0
callq 0x7800
movq (%r14), %rax
movsd %xmm0, (%rax,%rbp,8)
movapd (%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x3625(%rip), %xmm0     # 0xc190
divsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%rbp,8)
incq %rbp
jmp 0x8b20
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
movslq %eax, %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x7470
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x8bf1
movq %rbx, %rdi
movl %r13d, %esi
callq 0x73d0
movq (%r14), %rax
movsd (%rax,%r13,8), %xmm1
addsd %xmm1, %xmm0
xorpd 0x3481(%rip), %xmm1     # 0xc060
mulsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
jmp 0x8bba
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movsd %xmm0, 0x8(%rsp)
movl 0x18(%r8), %ebp
xorl %r13d, %r13d
testl %ebp, %ebp
cmovlel %r13d, %ebp
cmpq %r13, %rbp
je 0x8c97
movq %rbx, %rdi
movl %r13d, %esi
callq 0x73d0
movapd %xmm0, %xmm1
xorpd 0x341b(%rip), %xmm1     # 0xc060
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 0x7800
movq (%r14), %rax
movsd %xmm0, (%rax,%r13,8)
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x350b(%rip), %xmm0     # 0xc190
divsd %xmm0, %xmm1
movq (%r15), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
jmp 0x8c29
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %r14
movq %rsi, %rbx
movl 0x18(%rdx), %r12d
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpq %r15, %r12
je 0x8eb8
movq %r14, %rdi
movl %r15d, %esi
callq 0x73d0
movq (%rbx), %rax
mulsd (%rax,%r15,8), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
incq %r15
jmp 0x8e8c
movsd 0x3338(%rip), %xmm0     # 0xc1f8
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x76b0
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_O2/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 0x7470
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x8f5d
movq (%r15), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x73d0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movq (%r14), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
jmp 0x8f26
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9107
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movsd (%rsi), %xmm1
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %rax
andq $0x0, 0x10(%rax)
movapd %xmm0, (%rax)
leaq 0x18(%rdi), %rbp
leaq 0x78(%rdi), %rax
movq %rax, 0x18(%rsp)
pushq $0xa
popq %r13
movsd %xmm1, 0x10(%rsp)
subl $0x1, %r13d
jb 0x90ed
movq %r12, %rdi
callq 0x7300
movapd %xmm0, (%rsp)
movapd (%rsp), %xmm0
andpd 0x2fe0(%rip), %xmm0     # 0xc050
movsd 0x31a8(%rip), %xmm1     # 0xc220
ucomisd %xmm0, %xmm1
jae 0x90e8
movq (%r15), %rax
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq *0x18(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7300
movapd (%rsp), %xmm1
xorpd 0x2fb4(%rip), %xmm1     # 0xc060
divsd %xmm0, %xmm1
movq (%r15), %rax
movq %r15, %rdi
movapd %xmm1, (%rsp)
movapd %xmm1, %xmm0
movq %rbp, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
movq %rbx, %r8
callq *0x20(%rax)
movapd (%rsp), %xmm0
addsd (%r14), %xmm0
movapd %xmm0, %xmm1
movsd %xmm0, (%r14)
jmp 0x904c
movsd (%r14), %xmm1
subsd 0x10(%rsp), %xmm1
movapd %xmm1, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x77a0
movapd (%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x911a
jmp 0x911a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x77a0
movq %rbx, %rdi
callq 0x77e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3103(%rip), %rsi      # 0xc240
callq 0x75e0
testl %eax, %eax
je 0x916e
leaq 0x30fc(%rip), %rsi      # 0xc249
movq %rbx, %rdi
callq 0x75e0
testl %eax, %eax
jne 0x918c
pushq $0x18
popq %rdi
callq 0x7450
movq %rax, %rbx
movq %rax, %rdi
callq 0x74e0
jmp 0x9181
pushq $0x18
popq %rdi
callq 0x7450
movq %rax, %rbx
movq %rax, %rdi
callq 0x7620
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x8
popq %rdi
callq 0x7200
movq %rbx, (%rax)
movq 0x6e1a(%rip), %rsi      # 0xffb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x7780
jmp 0x91aa
movq %rax, %r14
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x7460
movq %r14, %rdi
callq 0x77e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x70a0
movq %rax, %r12
movq 0x18(%r14), %rsi
movq 0x20(%r14), %r15
leaq 0x18(%rbx), %r13
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %r13, %rdi
callq 0x7830
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 0x7860
leaq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x7550
movq 0xa0(%rbx), %rax
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x924b
movq %rcx, (%rax,%rcx,8)
incq %rcx
jmp 0x923d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7080
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x7580
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tbjohns[P]BlitzL1/src/solver.cpp
// Function: BlitzL1::Solver::update_ATtheta(BlitzL1::Dataset const*)
void Solver::update_ATtheta(const Dataset *data)
  {
    // Updates values of ATtheta for all feature indices in
    // prioritized_features vector

    size_t d = data->get_d();
    ATtheta.resize(d);
    for (vector<size_t>::iterator j = prioritized_features.begin();
         j != prioritized_features.end();
         ++j)
    {
      const Column *col = data->get_column(*j);
      ATtheta[*j] = col->inner_product(theta);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rsi
addq $0x30, %rdi
callq 0x7470
movq 0xa0(%r14), %r15
cmpq 0xa8(%r14), %r15
je 0x92bc
movslq (%r15), %rax
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
movq (%r15), %rax
movq 0x30(%r14), %rcx
movsd %xmm0, (%rcx,%rax,8)
addq $0x8, %r15
jmp 0x928f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %rbx
movq %rdi, %r14
movq 0xa0(%rdi), %r15
movapd 0x24c6(%rip), %xmm1     # 0xc060
xorpd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd 0x25e4(%rip), %xmm1     # 0xc190
movsd %xmm1, (%rsp)
movapd %xmm0, 0x20(%rsp)
cmpq 0xa8(%r14), %r15
je 0x9c49
movq (%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7050
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x9c40
movq (%r15), %rax
movq 0x30(%r14), %rcx
movsd (%rcx,%rax,8), %xmm4
mulsd 0x8(%rsp), %xmm4
movapd %xmm4, %xmm1
andpd 0x2456(%rip), %xmm1     # 0xc050
movapd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jae 0x9c40
movq 0x60(%r14), %rcx
movsd (%rcx,%rax,8), %xmm1
xorpd %xmm2, %xmm2
cmpnlesd %xmm4, %xmm2
subsd %xmm1, %xmm4
movapd %xmm2, %xmm3
andpd 0x10(%rsp), %xmm3
andnpd %xmm0, %xmm2
orpd %xmm3, %xmm2
subsd %xmm1, %xmm2
divsd %xmm4, %xmm2
minsd (%rsp), %xmm2
movsd %xmm2, (%rsp)
addq $0x8, %r15
jmp 0x9bb7
movsd (%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movsd %xmm0, (%rsp)
movq %rsi, %r13
movq %rdi, %r14
movq 0x20(%rsi), %rsi
leaq 0xb8(%rdi), %rbx
movq %rbx, %rdi
callq 0x7470
movq 0xa0(%r14), %rbp
movq 0xa8(%r14), %rdx
cmpq %rdx, %rbp
je 0x9d8b
movq (%rbp), %rsi
movsd (%r12,%rsi,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x9d7d
jp 0x9d7d
movq %r14, %rdi
movq %r13, %rdx
callq 0x7050
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movq (%rbp), %rsi
jae 0x9d75
movq 0x60(%r14), %rax
movsd (%rax,%rsi,8), %xmm2
andpd 0x22ea(%rip), %xmm2     # 0xc050
movsd (%rsp), %xmm1
subsd %xmm2, %xmm1
divsd %xmm0, %xmm1
jmp 0x9d7d
movsd 0x24b3(%rip), %xmm1     # 0xc230
movq (%rbx), %rax
movsd %xmm1, (%rax,%rsi,8)
addq $0x8, %rbp
jmp 0x9d1a
movq 0xa0(%r14), %rdi
leaq (%rdi,%r15,8), %rsi
movq %rbx, %rcx
callq 0x76d0
movq 0xa0(%r14), %rdi
movq 0xa8(%r14), %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7650
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/main.cpp
// Function: main
int main(int argc,char *argv[]) {

    if ( argv[2] )
        /*    New Game   */  {
        /* - [ Arguments ] -    argv[0] is the name of the program; Heroes  */
        const string playOrLoad = argv[1];
        const int warriors = atoi(argv[2]);
        const int thieves = atoi(argv[3]);
        const int Necromancers = atoi(argv[4]);
        GameUnit *gamePlay = new GameUnit(warriors,thieves,Necromancers);
        delete gamePlay;
    } else  /*  Load last Game  */{
        GameUnit *gamePlay = new GameUnit();
        delete gamePlay;
    }
//    cout << "\t...main.cpp END...‬‬" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpq $0x0, 0x10(%rsi)
je 0x3882
movq %rsi, %r14
movq 0x8(%rsi), %rsi
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x38f0
movq 0x10(%r14), %rdi
callq 0x3340
movl %eax, %ebx
movq 0x18(%r14), %rdi
callq 0x3340
movl %eax, %r15d
movq 0x20(%r14), %rdi
callq 0x3340
movl %eax, %r12d
pushq $0x38
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x4486
movq %r14, %rdi
callq 0x4e02
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x3290
leaq -0x48(%rbp), %rdi
callq 0x3130
jmp 0x38a8
pushq $0x38
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x39cc
movq %r14, %rdi
callq 0x4e02
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x3290
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x3290
jmp 0x38e8
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x3290
jmp 0x38da
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3130
jmp 0x38e8
movq %rax, %rbx
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x4a14(%rip), %rsi      # 0x948a
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x38f0
movq -0x38(%rbp), %rdi
callq 0x3220
leaq -0x38(%rbp), %rdi
callq 0x3130
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3130
jmp 0x4ab5
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x4aed
movq %rbx, %rdi
callq 0x3100
movq 0x94f6(%rip), %rdi      # 0xdfc0
leaq 0x49ef(%rip), %rsi      # 0x94c0
callq 0x3270
movq %rax, %rdi
callq 0x3150
callq 0x3390
jmp 0x4a95
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x5858
nop