LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/parser.cpp
// Function: Parser::parseGraph()
void Parser::parseGraph() {
    int node = 0; 
    string line;

    auto &graph_sparse_index = this->gcnData->graph;
    graph_sparse_index.indptr.push_back(0);
 
    while(getline(this->graph_file, line)) {    // get the line out of the graph file, which iilutrates node relation
        graph_sparse_index.indices.push_back(node);  
        graph_sparse_index.indptr.push_back(graph_sparse_index.indptr.back() + 1);
        node++;
        
        istringstream ss(line);    // analyze the line 
        int neighbor;
        while(ss >> neighbor) {       // get the number out of the line
            graph_sparse_index.indices.push_back(neighbor);
            graph_sparse_index.indptr.back() += 1;
        }
    }
    this->gcnParams->num_nodes = node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
andl $0x0, 0x4(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
movq 0x620(%rdi), %r14
leaq 0x48(%r14), %rdi
leaq 0x38(%rsp), %rsi
andl $0x0, (%rsi)
movq %rdi, 0x8(%rsp)
callq 0x57b4
leaq 0x30(%r14), %r15
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %rbp
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5206
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x5696
movq 0x50(%r14), %rax
movl -0x4(%rax), %eax
incl %eax
movl %eax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x57b4
incl 0x4(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x3340
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3160
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x51f9
movq %r15, %rdi
movq %r13, %rsi
callq 0x5696
movq 0x50(%r14), %rax
incl -0x4(%rax)
jmp 0x51cc
movq %rbp, %rdi
callq 0x3110
jmp 0x517a
movl 0x4(%rsp), %eax
movq 0x618(%rbx), %rcx
movl %eax, (%rcx)
leaq 0x18(%rsp), %rdi
callq 0x3100
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5235
jmp 0x5235
jmp 0x5235
movq %rax, %rbx
jmp 0x5247
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3110
leaq 0x18(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/parser.cpp
// Function: Parser::parseSplit()
void Parser::parseSplit() {
    auto &split = this->gcnData->split;
    string line;
    while(getline(split_file, line)) {
       split.push_back(stoi(line));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x620(%rdi), %r14
addq $0x60, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x208, %rbx            # imm = 0x208
leaq 0x10(%rsp), %r15
pushq $0xa
popq %rbp
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x551d
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x56d6
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x57b4
jmp 0x54e7
leaq 0x10(%rsp), %rdi
callq 0x3100
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5536
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/parser.cpp
// Function: Parser::parse()
bool Parser::parse() {
    if(!isValidInput()) return false;
    this->parseGraph();
    cout << "parse Graph successfully" << endl;
    this->parseNode();
    cout << "parse Node successfully" << endl;
    this->parseSplit();
    cout << "parse Split successfully" << endl;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x554c
movl %eax, %ebx
testb %al, %al
je 0x55f9
movq %r14, %rdi
callq 0x5120
movq 0x6a24(%rip), %r15      # 0xbfc8
leaq 0x2bb6(%rip), %rsi      # 0x8161
movq %r15, %rdi
callq 0x31e0
movq %rax, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x525a
leaq 0x2bb0(%rip), %rsi      # 0x817a
movq %r15, %rdi
callq 0x31e0
movq %rax, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x54a8
leaq 0x2ba9(%rip), %rsi      # 0x8192
movq %r15, %rdi
callq 0x31e0
movq %rax, %rdi
callq 0x3120
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/sparse.cpp
// Function: SparseIndex::print()
void SparseIndex::print() {
    cout << "----sparse index info----" << endl;

    cout << "indptr: ";
    for(auto i: indptr) {
        cout << i << " ";
    } 
    cout << endl;

    
    cout << "indices: ";
    for(auto i: indices) {
        cout << i << " ";
    } 
    cout << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x653d(%rip), %r14      # 0xbfc8
leaq 0x271e(%rip), %rsi      # 0x81b0
movq %r14, %rdi
callq 0x31e0
movq %rax, %rdi
callq 0x3120
leaq 0x2721(%rip), %rsi      # 0x81ca
movq %r14, %rdi
callq 0x31e0
movq 0x18(%rbx), %r12
movq 0x20(%rbx), %r13
leaq 0x2711(%rip), %r15      # 0x81d1
cmpq %r13, %r12
je 0x5ae2
movl (%r12), %esi
movq %r14, %rdi
callq 0x3350
movq %rax, %rdi
movq %r15, %rsi
callq 0x31e0
addq $0x4, %r12
jmp 0x5ac0
movq 0x64df(%rip), %r14      # 0xbfc8
movq %r14, %rdi
callq 0x3120
leaq 0x26db(%rip), %rsi      # 0x81d3
movq %r14, %rdi
callq 0x31e0
movq (%rbx), %r15
movq 0x8(%rbx), %r12
leaq 0x26c3(%rip), %rbx      # 0x81d1
cmpq %r12, %r15
je 0x5b2f
movl (%r15), %esi
movq %r14, %rdi
callq 0x3350
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31e0
addq $0x4, %r15
jmp 0x5b0e
movq 0x6492(%rip), %rdi      # 0xbfc8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3120
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: Matmul::forward(bool)
void Matmul::forward(bool training) {
    z->zero();
#pragma omp parallel for schedule(static)
    for(int i = 0; i < m; i++) {
        for(int j = 0; j < n; j++) {
#ifdef SIMD
#pragma omp simd
#endif
            for(int k = 0; k < l; k++) {
                z->data[i * l + k] += x->data[i * n + j] * y->data[j * l + k];
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x671e
movl 0x20(%rbx), %eax
movslq 0x24(%rbx), %rcx
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %esi
movq %rcx, (%rsp)
cmovgl %ecx, %esi
movq %rsi, 0x20(%rsp)
testl %eax, %eax
cmovlel %edx, %eax
movq %rax, 0x8(%rsp)
xorl %r9d, %r9d
cmpq 0x8(%rsp), %r9
je 0x5c59
movslq 0x28(%rbx), %r8
movq %r9, 0x10(%rsp)
imulq (%rsp), %r9
testl %r8d, %r8d
movl $0x0, %ecx
cmovgl %r8d, %ecx
movq %rdx, 0x18(%rsp)
imulq %r8, %rdx
shlq $0x2, %r8
shlq $0x2, %r9
xorl %eax, %eax
xorl %r15d, %r15d
cmpq 0x20(%rsp), %r15
je 0x5c43
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r13
movq 0x18(%rbx), %rbp
movq %rcx, %r10
movq %rax, %r14
movq %rdx, %r11
subq $0x1, %r10
jb 0x5c3b
movq (%r12), %rdi
addq %r9, %rdi
movss (%rdi,%r15,4), %xmm0
movq (%r13), %rdi
movq (%rbp), %rsi
mulss (%rdi,%r14), %xmm0
addss (%rsi,%r11), %xmm0
movss %xmm0, (%rsi,%r11)
addq $0x4, %r11
addq $0x4, %r14
jmp 0x5c04
incq %r15
addq %r8, %rax
jmp 0x5be8
movq 0x10(%rsp), %r9
incq %r9
movq 0x18(%rsp), %rdx
addq $0x4, %rdx
jmp 0x5bad
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: Matmul::backward()
void Matmul::backward() {
    x->zero_grad();
    y->zero_grad();
#pragma omp parallel for schedule(static)
    for(int i =0; i < m; i++) {
        for(int j = 0; j < n; j++) {
            float tmp = 0;
#ifdef SIMD
#pragma omp simd reduction(+:tmp)
#endif
            for(int k = 0; k < l; k++) {
                tmp += z->grad[i * l + k] * y->data[j * l + k];
#ifdef OMP
                b->local_grad[omp_get_thread_num()][j * l + k] += z->grad[i * l + k] * y->data[j * l + k];
#else 
                y->grad[j * l + k] += z->grad[i * l + k] * x->data[i * n + j];
#endif
            }
            x->grad[i * n + j] = tmp;
        }
#ifdef OMP
#ifdef SIMD
#pragma omp parallel for simd schedule(static)
#else
#pragma omp parallel for schedule(static)
#endif
        for(int i = 0; i < b->grad.size();i++) {
            for(int thread = 0; thread < omp_get_num_threads(); thread++) {
                b->grad[i] += b->local_grad[thread][i];
            }
        }
#endif
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x673e
movq 0x10(%rbx), %rdi
callq 0x673e
movl 0x20(%rbx), %eax
movslq 0x24(%rbx), %rcx
xorl %esi, %esi
testl %ecx, %ecx
movl $0x0, %edx
movq %rcx, (%rsp)
cmovgl %ecx, %edx
movq %rdx, 0x30(%rsp)
testl %eax, %eax
cmovlel %esi, %eax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
cmpq 0x8(%rsp), %rax
je 0x5d93
movslq 0x28(%rbx), %r8
movq %rax, 0x10(%rsp)
imulq (%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x20(%rsp)
testl %r8d, %r8d
movl $0x0, %edi
cmovgl %r8d, %edi
movq %rsi, 0x18(%rsp)
imulq %r8, %rsi
shlq $0x2, %r8
xorl %edx, %edx
xorl %r12d, %r12d
cmpq 0x30(%rsp), %r12
je 0x5d7d
movq 0x18(%rbx), %r13
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
movq 0x28(%rsp), %r9
leaq (%r9,%r12), %rbp
xorps %xmm0, %xmm0
movq %rdx, %r15
movq %rdi, %r11
movq %rsi, %r14
subq $0x1, %r11
jb 0x5d64
movq 0x18(%r13), %r10
movss (%r10,%r14), %xmm1
movq (%rax), %r10
movq 0x18(%rax), %r9
movss (%r10,%r15), %xmm2
mulss %xmm1, %xmm2
movq (%rcx), %r10
mulss (%r10,%rbp,4), %xmm1
addss (%r9,%r15), %xmm1
addss %xmm2, %xmm0
movss %xmm1, (%r9,%r15)
addq $0x4, %r14
addq $0x4, %r15
jmp 0x5d20
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movss %xmm0, (%rax,%rbp,4)
incq %r12
addq %r8, %rdx
jmp 0x5cf8
movq 0x10(%rsp), %rax
incq %rax
movq 0x18(%rsp), %rsi
addq $0x4, %rsi
jmp 0x5cb3
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: SparseMatmul::forward(bool)
void SparseMatmul::forward(bool training) {
    z->zero();
    
    for(int i = 0; i < sp->indptr.size() - 1; i++) {
        for(int jj = sp->indptr[i]; jj < sp->indptr[i + 1]; jj++) {
            int j = sp->indices[jj];  // get the dst vertex 
            for(int k = 0; k < l; k++) {
                z->data[i * l + k] += x->data[jj] * y->data[j * l + k];
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x671e
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdx
movq %rcx, (%rsp)
subq %rcx, %rdx
sarq $0x2, %rdx
decq %rdx
movq %rdx, 0x8(%rsp)
xorl %esi, %esi
cmpq 0x8(%rsp), %rsi
je 0x5eac
movl %esi, %edx
movq (%rsp), %rcx
movslq (%rcx,%rsi,4), %rdi
movslq 0x4(%rcx,%rsi,4), %r8
incq %rsi
movq %rsi, 0x10(%rsp)
movl 0x28(%rbx), %r9d
testl %r9d, %r9d
movl $0x0, %r10d
cmovgl %r9d, %r10d
imull %r9d, %edx
movslq %edx, %rdx
cmpq %r8, %rdi
jge 0x5ea2
movq (%rax), %r11
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r15
movl (%r11,%rdi,4), %r11d
imull %r9d, %r11d
movq 0x18(%rbx), %r12
movslq %r11d, %r13
movq %r10, %rbp
movq %rdx, %r11
subq $0x1, %rbp
jb 0x5e9d
movq (%r14), %rcx
movss (%rcx,%rdi,4), %xmm0
movq (%r15), %rcx
movq (%r12), %rsi
mulss (%rcx,%r13,4), %xmm0
addss (%rsi,%r11,4), %xmm0
movss %xmm0, (%rsi,%r11,4)
incq %r11
incq %r13
jmp 0x5e6e
incq %rdi
jmp 0x5e49
movq 0x10(%rsp), %rsi
jmp 0x5e0f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: SparseMatmul::backward()
void SparseMatmul::backward() {
    y->zero_grad();

    for(int i = 0; i < sp->indptr.size() - 1; i++) {
        for(int jj = sp->indptr[i]; jj < sp->indptr[i + 1]; jj++) {
            int j = sp->indices[jj];
            for(int k = 0; k < l; k++) {
                y->grad[j * l + k] += z->grad[i * l + k] * x->data[jj];
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x673e
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdx
movq %rcx, (%rsp)
subq %rcx, %rdx
sarq $0x2, %rdx
decq %rdx
movq %rdx, 0x8(%rsp)
xorl %esi, %esi
cmpq 0x8(%rsp), %rsi
je 0x5f96
movl %esi, %edx
movq (%rsp), %rcx
movslq (%rcx,%rsi,4), %rdi
movslq 0x4(%rcx,%rsi,4), %r8
incq %rsi
movq %rsi, 0x10(%rsp)
movl 0x28(%rbx), %r9d
testl %r9d, %r9d
movl $0x0, %r10d
cmovgl %r9d, %r10d
imull %r9d, %edx
movslq %edx, %rdx
cmpq %r8, %rdi
jge 0x5f8c
movq (%rax), %r11
movq 0x18(%rbx), %r14
movq 0x8(%rbx), %r15
movq 0x10(%rbx), %r12
movl (%r11,%rdi,4), %r11d
imull %r9d, %r11d
movslq %r11d, %r13
movq %r10, %rbp
movq %rdx, %r11
subq $0x1, %rbp
jb 0x5f87
movq 0x18(%r14), %rcx
movss (%rcx,%r11,4), %xmm0
movq (%r15), %rcx
movq 0x18(%r12), %rsi
mulss (%rcx,%rdi,4), %xmm0
addss (%rsi,%r13,4), %xmm0
movss %xmm0, (%rsi,%r13,4)
incq %r13
incq %r11
jmp 0x5f56
incq %rdi
jmp 0x5f31
movq 0x10(%rsp), %rsi
jmp 0x5ef7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: GraphSum::forward(bool)
void GraphSum::forward(bool training) {
    out->zero();
    for(int src = 0; src < graph->indptr.size() - 1; src++) {
        for(int i = graph->indptr[src]; i < graph->indptr[src + 1]; i++) {
            int dst = graph->indices[i];
            float coef = 1.0 / sqrtf(
                (graph->indptr[src + 1] - graph->indptr[src]) * (graph->indptr[dst + 1] - graph->indptr[dst])
            );

            for(int j = 0; j < dim; j++) {
                out->data[src*dim + j] += coef * in->data[dst * dim + j];
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x671e
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
xorl %r14d, %r14d
xorps %xmm2, %xmm2
movss 0x21f3(%rip), %xmm3     # 0x81e0
movq 0x20(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %r14, %rdx
jbe 0x60bd
movslq (%rax,%r14,4), %r12
leaq 0x1(%r14), %r15
movslq (%rax,%r15,4), %rdx
cmpq %rdx, %r12
jge 0x60b5
movq (%rcx), %rcx
movslq (%rcx,%r12,4), %r13
movl (%rax,%r14,4), %ecx
subl %ecx, %edx
movl 0x4(%rax,%r13,4), %ecx
subl (%rax,%r13,4), %ecx
imull %edx, %ecx
cvtsi2ss %ecx, %xmm0
ucomiss %xmm2, %xmm0
jb 0x6041
sqrtss %xmm0, %xmm0
jmp 0x6051
callq 0x3380
movss 0x2192(%rip), %xmm3     # 0x81e0
xorps %xmm2, %xmm2
movaps %xmm3, %xmm1
divss %xmm0, %xmm1
movl 0x20(%rbx), %edi
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
imull %edi, %r13d
movslq %r13d, %rdx
testl %edi, %edi
movl $0x0, %esi
cmovgl %edi, %esi
imull %r14d, %edi
movslq %edi, %rdi
subq $0x1, %rsi
jb 0x60a5
movq (%rax), %r8
movq (%rcx), %r9
movss (%r8,%rdx,4), %xmm0
mulss %xmm1, %xmm0
addss (%r9,%rdi,4), %xmm0
movss %xmm0, (%r9,%rdi,4)
incq %rdi
incq %rdx
jmp 0x607b
incq %r12
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
jmp 0x600c
movq %r15, %r14
jmp 0x5fed
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: GraphSum::backward()
void GraphSum::backward() {
    in->zero_grad();
    for(int src = 0; src < graph->indptr.size() - 1; src++) {
        for(int i = graph->indptr[src]; i < graph->indptr[src + 1]; i++) {
            int dst = graph->indices[i];
            float coef = 1.0 / sqrtf(
                (graph->indptr[src + 1] - graph->indptr[src]) * (graph->indptr[dst + 1] - graph->indptr[dst])
            );

            for(int j = 0; j < dim; j++) {
                in->grad[src*dim + j] += coef * in->data[dst * dim + j];
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x673e
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
xorl %r14d, %r14d
xorps %xmm2, %xmm2
movss 0x20ed(%rip), %xmm3     # 0x81e0
movq 0x20(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %r14, %rdx
jbe 0x61bf
movslq (%rax,%r14,4), %r12
leaq 0x1(%r14), %r15
movslq (%rax,%r15,4), %rdx
cmpq %rdx, %r12
jge 0x61b7
movq (%rcx), %rcx
movslq (%rcx,%r12,4), %r13
movl (%rax,%r14,4), %ecx
subl %ecx, %edx
movl 0x4(%rax,%r13,4), %ecx
subl (%rax,%r13,4), %ecx
imull %edx, %ecx
cvtsi2ss %ecx, %xmm0
ucomiss %xmm2, %xmm0
jb 0x6147
sqrtss %xmm0, %xmm0
jmp 0x6157
callq 0x3380
movss 0x208c(%rip), %xmm3     # 0x81e0
xorps %xmm2, %xmm2
movaps %xmm3, %xmm1
divss %xmm0, %xmm1
movl 0x20(%rbx), %esi
movq 0x8(%rbx), %rax
imull %esi, %r13d
movslq %r13d, %rcx
testl %esi, %esi
movl $0x0, %edx
cmovgl %esi, %edx
imull %r14d, %esi
movslq %esi, %rsi
subq $0x1, %rdx
jb 0x61a7
movq (%rax), %rdi
movq 0x18(%rax), %r8
movss (%rdi,%rcx,4), %xmm0
mulss %xmm1, %xmm0
addss (%r8,%rsi,4), %xmm0
movss %xmm0, (%r8,%rsi,4)
incq %rsi
incq %rcx
jmp 0x617d
incq %r12
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
jmp 0x6112
movq %r15, %r14
jmp 0x60f3
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: ReLU::forward(bool)
void ReLU::forward(bool training) {
    for(int i = 0; i < in->data.size(); i++) {
        bool keep = in->data[i] > 0;
        if(training) {
            mask[i] = keep;
        }
        if(!keep) {
            in->data[i] = 0;
        }
    }
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
xorl %edi, %edi
xorps %xmm0, %xmm0
cmpq %rdi, %rdx
jbe 0x647f
movss (%rcx,%rdi,4), %xmm1
testb %sil, %sil
je 0x6471
ucomiss %xmm0, %xmm1
seta (%rax,%rdi)
ucomiss %xmm0, %xmm1
ja 0x647a
andl $0x0, (%rcx,%rdi,4)
incq %rdi
jmp 0x645b
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: Dropout::Dropout(Variable*, float)
Dropout::Dropout(Variable *in, float p): in(in), p(p) {
    if(!in->grad.empty()) {
        mask = new int[in->data.size()];
    } else {
        mask = nullptr;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5827(%rip), %rax      # 0xbce0
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movss %xmm0, 0x18(%rdi)
movq 0x18(%rsi), %rax
cmpq 0x20(%rsi), %rax
je 0x64e4
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
jmp 0x64e6
xorl %eax, %eax
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: Dropout::forward(bool)
void Dropout::forward(bool training) {
    if(!training) return;
    const int threshold = int(p * GCN_RAND_MAX);
    float scale = 1 / (1 - p);

    for(int i = 0; i < in->data.size(); i++) {
        bool keep = int(RAND()) >= threshold;
        in->data[i] *= keep ? scale : 0;
        if(mask) {
            mask[i] = keep;
        }
    }
}

// Assembly:
testl %esi, %esi
je 0x65bc
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movss 0x18(%rdi), %xmm0
movss 0x1cb2(%rip), %xmm1     # 0x81ec
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ebp
movss 0x1c96(%rip), %xmm2     # 0x81e0
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
divss %xmm1, %xmm2
movss %xmm2, 0xc(%rsp)
movq 0x8(%rdi), %rdx
movq (%rdx), %rcx
xorl %r14d, %r14d
movq 0x8(%rdx), %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %r14, %rax
jbe 0x65b4
callq 0x68e4
movss 0xc(%rsp), %xmm0
cmpl %ebp, %eax
jge 0x6587
xorps %xmm0, %xmm0
movq 0x8(%rbx), %rdx
movq (%rdx), %rcx
mulss (%rcx,%r14,4), %xmm0
movss %xmm0, (%rcx,%r14,4)
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x65af
xorl %edi, %edi
cmpl %ebp, %eax
setge %dil
movl %edi, (%rsi,%r14,4)
incq %r14
jmp 0x6565
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/module.cpp
// Function: Dropout::backward()
void Dropout::backward() {
    if(!mask) return;

    float scale = 1 / (1 - p);
    for(int i = 0; i < in->data.size(); i++) {
        in->grad[i] *= mask[i] ? scale : 0;
    }
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x6610
movss 0x1c11(%rip), %xmm0     # 0x81e0
movaps %xmm0, %xmm1
subss 0x18(%rdi), %xmm1
divss %xmm1, %xmm0
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
sarq $0x2, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x6610
cmpl $0x0, (%rax,%rsi,4)
xorps %xmm1, %xmm1
je 0x65fd
movaps %xmm0, %xmm1
movq 0x18(%rcx), %rdi
mulss (%rdi,%rsi,4), %xmm1
movss %xmm1, (%rdi,%rsi,4)
incq %rsi
jmp 0x65ec
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/variable.cpp
// Function: Variable::print(int)
void Variable::print(int col) {
    int count = 0;
    for(float x: data) {
        printf("%.4f", x);
        count++;
        if(count % col ==0) printf("\n");
    }
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq (%rdi), %r12
movq 0x8(%rdi), %r13
pushq $0x1
popq %rbp
leaq 0x1aa0(%rip), %r14      # 0x8250
pushq $0xa
popq %r15
cmpq %r13, %r12
je 0x67e2
cvtss2sd (%r12), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x3050
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x67da
movl %r15d, %edi
callq 0x3290
addq $0x4, %r12
incl %ebp
jmp 0x67b4
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3290
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/rand.cpp
// Function: xorshift128plus()
uint32_t xorshift128plus() {
    uint64_t state[2];
    state[0] = rand();
    state[1] = rand();
    uint64_t t = state[0];
    uint64_t const s = state[1];
    assert(t && s);
    state[0] = t;
    t ^= t << 23;
    t ^= t >> 17;
    t ^= s ^ (s >> 26);
    state[1] = t;
    uint32_t res = (t + s) & 0x7fffffff;
    return res;
}

// Assembly:
pushq %rbx
callq 0x30b0
movl %eax, %ebx
callq 0x30b0
testl %ebx, %ebx
je 0x6926
testl %eax, %eax
je 0x6926
movslq %eax, %rdx
movslq %ebx, %rsi
movq %rsi, %rcx
shlq $0x17, %rcx
xorq %rsi, %rcx
movq %rcx, %rsi
shrq $0x11, %rsi
shrq $0x1a, %rdx
xorl %eax, %edx
xorl %edx, %ecx
xorl %esi, %ecx
addl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %eax
popq %rbx
retq
leaq 0x1928(%rip), %rdi      # 0x8255
leaq 0x1928(%rip), %rsi      # 0x825c
leaq 0x192e(%rip), %rcx      # 0x8269
pushq $0x11
popq %rdx
callq 0x3170
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/optim.cpp
// Function: Adam::Adam(std::vector<std::pair<Variable*, bool>, std::allocator<std::pair<Variable*, bool>>>, AdamParams)
Adam::Adam(vector<pair<Variable*, bool>> vars, AdamParams params) {
    step_count = 0;
    this->params = params;
    for(auto v: vars) {
        this->adamVars.emplace_back(v.first, v.second);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x18(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x14(%rdi)
movl 0x50(%rsp), %eax
movl %eax, 0x10(%rdi)
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %r12
movq 0x8(%rsi), %r13
leaq 0x8(%rsp), %r14
movq %rsp, %r15
cmpq %r13, %r12
je 0x6a4c
movups (%r12), %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6c7c
addq $0x10, %r12
jmp 0x6a2a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x43ae
movq %r14, %rdi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/optim.cpp
// Function: Adam::step()
void Adam::step() {
    step_count++;
    float step_size = params.lr * sqrtf(1 - powf(params.beta2, step_count)) / (1 - powf(params.beta1, step_count));
    for(auto &var: adamVars) {
        for(int i = 0; i < var.size(); i++) {
            float grad = (*var.grad)[i];
            if(var.decay) {
                grad += params.weight_decay * (*var.data)[i];
            }
            var.m[i] = params.beta1 * var.m[i] + (1.0 - params.beta1) * grad;
            var.v[i] = params.beta2 * var.v[i] + (1.0 - params.beta2) * grad * grad;
            (*var.data)[i] -= step_size * var.m[i] / (sqrtf(var.v[i]) + params.eps);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %eax
incl %eax
movl %eax, 0x14(%rdi)
movss (%rdi), %xmm0
movss %xmm0, (%rsp)
movss 0x8(%rdi), %xmm0
cvtsi2ss %eax, %xmm1
callq 0x32f0
movaps %xmm0, %xmm1
movss 0x173d(%rip), %xmm0     # 0x81e0
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x6ab5
sqrtss %xmm0, %xmm0
jmp 0x6aba
callq 0x3380
movss (%rsp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss 0x4(%rbx), %xmm0
cvtsi2ssl 0x14(%rbx), %xmm1
callq 0x32f0
movss 0x1701(%rip), %xmm1     # 0x81e0
subss %xmm0, %xmm1
movss (%rsp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rsp)
movq 0x18(%rbx), %r14
movq 0x20(%rbx), %r15
movsd 0x17a7(%rip), %xmm4     # 0x82a8
cmpq %r15, %r14
je 0x6c1a
movq (%r14), %rcx
movq (%rcx), %rax
xorl %r12d, %r12d
movq 0x8(%rcx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r12
jge 0x6c11
movq 0x8(%r14), %rcx
movq (%rcx), %rcx
movss (%rcx,%r12,4), %xmm0
cmpb $0x1, 0x40(%r14)
jne 0x6b4d
movss 0x10(%rbx), %xmm1
mulss (%rax,%r12,4), %xmm1
addss %xmm1, %xmm0
movss 0x4(%rbx), %xmm1
movq 0x10(%r14), %rax
cvtss2sd %xmm1, %xmm2
mulss (%rax,%r12,4), %xmm1
cvtss2sd %xmm1, %xmm1
movapd %xmm4, %xmm3
subsd %xmm2, %xmm3
cvtss2sd %xmm0, %xmm0
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm1
movss %xmm1, (%rax,%r12,4)
movss 0x8(%rbx), %xmm1
movq 0x28(%r14), %rcx
cvtss2sd %xmm1, %xmm2
mulss (%rcx,%r12,4), %xmm1
cvtss2sd %xmm1, %xmm1
movapd %xmm4, %xmm3
subsd %xmm2, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm0
movss %xmm0, (%rcx,%r12,4)
movss (%rax,%r12,4), %xmm1
mulss (%rsp), %xmm1
ucomiss 0x16d7(%rip), %xmm0     # 0x82a0
jb 0x6bd1
sqrtss %xmm0, %xmm0
jmp 0x6bea
movss %xmm1, 0x4(%rsp)
callq 0x3380
movss 0x4(%rsp), %xmm1
movsd 0x16be(%rip), %xmm4     # 0x82a8
addss 0xc(%rbx), %xmm0
divss %xmm0, %xmm1
movq (%r14), %rcx
movq (%rcx), %rax
movss (%rax,%r12,4), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%rax,%r12,4)
incq %r12
jmp 0x6b13
addq $0x48, %r14
jmp 0x6b01
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuang-chen[P]paraGCN/src/main.cpp
// Function: main
int main(int argc, char **argv) {
    setbuf(stdout, NULL);

    if(argc < 2) {
        cout << "gcn-* graph_dataset" << endl;
        return EXIT_FAILURE;
    }

    GCNParams params = GCNParams::get_default();
    GCNData data;
    string input_name(argv[1]);
    Parser parser(&params, &data, input_name);
    if(!parser.parse()) {
        cerr << "cannot read input: " << input_name << endl;
        exit(EXIT_FAILURE);
    }

    GCN gcn(params, &data);
    gcn.run();
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x828, %rsp            # imm = 0x828
movq %rsi, %rbx
movl %edi, %ebp
movq 0x501b(%rip), %rax      # 0xbfb0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x32a0
cmpl $0x1, %ebp
jg 0x6fc7
movq 0x501d(%rip), %rdi      # 0xbfc8
leaq 0x1302(%rip), %rsi      # 0x82b4
callq 0x31e0
movq %rax, %rdi
callq 0x3120
pushq $0x1
popq %rax
jmp 0x70b4
leaq 0x50(%rsp), %rdi
callq 0x35ec
leaq 0x98(%rsp), %rdi
movl $0xa8, %edx
xorl %esi, %esi
callq 0x3140
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x200(%rsp), %rdx
callq 0x714a
leaq 0x78(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3280
leaq 0x200(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x4f84
leaq 0x78(%rsp), %rdi
callq 0x3100
leaq 0x200(%rsp), %rdi
callq 0x5582
testb %al, %al
je 0x70be
movl 0x70(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x361a
leaq 0x140(%rsp), %rdi
callq 0x3e96
leaq 0x140(%rsp), %rdi
callq 0x3ba8
leaq 0x200(%rsp), %rdi
callq 0x7186
leaq 0x30(%rsp), %rdi
callq 0x3100
leaq 0x98(%rsp), %rdi
callq 0x71ac
xorl %eax, %eax
addq $0x828, %rsp            # imm = 0x828
popq %rbx
popq %rbp
retq
movq 0x4f2b(%rip), %rdi      # 0xbff0
leaq 0x11fc(%rip), %rsi      # 0x82c8
callq 0x31e0
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x3120
pushq $0x1
popq %rdi
callq 0x3230
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x3ba8
jmp 0x711e
jmp 0x711b
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x3100
jmp 0x712b
movq %rax, %rbx
jmp 0x712b
movq %rax, %rbx
jmp 0x7135
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0x7186
leaq 0x30(%rsp), %rdi
callq 0x3100
leaq 0x98(%rsp), %rdi
callq 0x71ac
movq %rbx, %rdi
callq 0x3360
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/MemoryBuffer.cpp
// Function: MemoryBuffer::readString(char*, unsigned long)
int MemoryBuffer::readString(char *buf, size_t size)
{
	long savedRptr = rptr;
	uint32_t len = 0;

	if (readUint32(len) < 0) return - 1;
	if (rptr + len > wptr) {
		// buffer is not enough for this string
		rptr = savedRptr;
		return -1;
	}

	if (len < size) size = len;
	memcpy(buf, mbuf + rptr, size);

	rptr += len;
	return len; 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %r13
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
callq 0x3810
testl %eax, %eax
js 0x36a2
movq 0x8(%rbx), %rsi
movl 0xc(%rsp), %r14d
leaq (%rsi,%r14), %rax
cmpq 0x10(%rbx), %rax
jle 0x36a8
pushq $-0x1
popq %r14
jmp 0x36c4
pushq $-0x1
popq %r14
jmp 0x36c8
cmpq %r15, %r14
cmovbq %r14, %r15
addq (%rbx), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x1090
movq 0x8(%rbx), %r13
addq %r14, %r13
movq %r13, 0x8(%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/MemoryBuffer.cpp
// Function: MemoryBuffer::writeString(char const*, unsigned long)
int MemoryBuffer::writeString(const char *buf, size_t size)
{
	if (buf == NULL) size = 0;
	else if (size == 0) size = strlen(buf) + 1;

	if (ensureCapacity(bsize + 4 + size) < 0)
		return -1;

	writeUint32((uint32_t)size);
	memcpy(mbuf + wptr, buf, size); 
	wptr += size;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3702
movq %rdx, %r15
testq %rdx, %rdx
jne 0x3705
movq %r14, %rdi
callq 0x1040
movq %rax, %r15
incq %r15
jmp 0x3705
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
leaq (%r15,%rax), %rsi
addq $0x4, %rsi
movq %rbx, %rdi
callq 0x385c
testl %eax, %eax
js 0x3742
movq %rbx, %rdi
movl %r15d, %esi
callq 0x32e2
movq (%rbx), %rdi
addq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1090
addq %r15, 0x10(%rbx)
xorl %eax, %eax
jmp 0x3745
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/MemoryBuffer.cpp
// Function: MemoryBuffer::resize(unsigned long)
int MemoryBuffer::resize(size_t added)
{
	size_t nsize = bsize + added, n = 1;
	if (nsize < bsize) return -1;	// overflow

	if (nsize >= (((size_t)1) << (8 * sizeof(size_t) - 1))) n = nsize;
	else while (n < nsize) n = n << 1;
	
	unsigned char *nbuf = new (std::nothrow)unsigned char[n];
	if (nbuf == NULL) return -1;

	if (mbuf != NULL) {
		// copy old data, release it when need 
		memcpy(nbuf, mbuf, wptr);
		if (autoDelete) delete[] mbuf;
	}

	mbuf = nbuf;
	bsize = n;
	autoDelete = true;
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $-0x1
popq %rbp
addq 0x18(%rdi), %rsi
jb 0x37be
movq %rdi, %rbx
js 0x3772
pushq $0x1
popq %rax
movq %rax, %r14
addq %rax, %rax
cmpq %rsi, %r14
jb 0x3765
jmp 0x3775
movq %rsi, %r14
movq 0x2844(%rip), %rsi      # 0x5fc0
movq %r14, %rdi
callq 0x1130
testq %rax, %rax
je 0x37be
movq %rax, %r15
movq (%rbx), %r12
testq %r12, %r12
je 0x37b1
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1090
cmpb $0x1, 0x20(%rbx)
jne 0x37b1
movq %r12, %rdi
callq 0x1110
movq %r15, (%rbx)
movq %r14, 0x18(%rbx)
movb $0x1, 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/common/src/MemoryBuffer.cpp
// Function: MemoryBuffer::data(unsigned char*, unsigned long, bool)
unsigned char *MemoryBuffer::data(unsigned char *_buf, size_t _size, bool _autoDelete)
{
	if (mbuf != NULL && autoDelete) delete[] mbuf;

	mbuf = _buf;
	bsize = _size;
	autoDelete = _autoDelete;

	return mbuf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x37f2
cmpb $0x1, 0x20(%r12)
jne 0x37f2
callq 0x1110
movq %r14, (%r12)
movq %r15, 0x18(%r12)
movb %bl, 0x20(%r12)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/CumNormalInv.cpp
// Function: CumNormalInv(double)
FTYPE CumNormalInv( FTYPE u )
{
  // Returns the inverse of cumulative normal distribution function.
  // Reference: Moro, B., 1995, "The Full Monte," RISK (February), 57-58.
  FTYPE x, r;

  x = u - 0.5;
  if( fabs (x) < 0.42 )
  { 
    r = x * x;
    r = x * ((( a[3]*r + a[2]) * r + a[1]) * r + a[0])/
      ((((b[3] * r+ b[2]) * r + b[1]) * r + b[0]) * r + 1.0);
    return (r);
  }

  r = u;
  if( x > 0.0 ) r = 1.0 - u;
  r = log(-log(r));
  r = c[0] + r * (c[1] + r * 
      (c[2] + r * (c[3] + r * 
                   (c[4] + r * (c[5] + r * (c[6] + r * (c[7] + r*c[8])))))));
  if( x < 0.0 ) r = -r;

  return (r);
}

// Assembly:
movsd 0x1d54(%rip), %xmm3     # 0x3008
addsd %xmm0, %xmm3
movapd 0x1df0(%rip), %xmm1     # 0x30b0
andpd %xmm3, %xmm1
movsd 0x1d44(%rip), %xmm2     # 0x3010
ucomisd %xmm1, %xmm2
jbe 0x1347
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
movsd 0x1d86(%rip), %xmm0     # 0x3068
mulsd %xmm1, %xmm0
addsd 0x1d82(%rip), %xmm0     # 0x3070
mulsd %xmm1, %xmm0
addsd 0x1d7e(%rip), %xmm0     # 0x3078
mulsd %xmm1, %xmm0
addsd 0x1d7a(%rip), %xmm0     # 0x3080
movsd 0x1d7a(%rip), %xmm2     # 0x3088
mulsd %xmm1, %xmm2
addsd 0x1d76(%rip), %xmm2     # 0x3090
mulsd %xmm1, %xmm2
addsd 0x1d72(%rip), %xmm2     # 0x3098
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm2
addsd 0x1d6a(%rip), %xmm2     # 0x30a0
mulsd %xmm1, %xmm2
addsd 0x1cd6(%rip), %xmm2     # 0x3018
divsd %xmm2, %xmm0
retq
subq $0x18, %rsp
movsd 0x1cc5(%rip), %xmm2     # 0x3018
subsd %xmm0, %xmm2
xorpd %xmm1, %xmm1
cmpltsd %xmm3, %xmm1
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
movapd %xmm1, %xmm0
movapd %xmm3, (%rsp)
callq 0x1090
xorpd 0x1d3e(%rip), %xmm0     # 0x30c0
callq 0x1090
movsd 0x1c91(%rip), %xmm1     # 0x3020
mulsd %xmm0, %xmm1
addsd 0x1c8d(%rip), %xmm1     # 0x3028
mulsd %xmm0, %xmm1
addsd 0x1c89(%rip), %xmm1     # 0x3030
mulsd %xmm0, %xmm1
addsd 0x1c85(%rip), %xmm1     # 0x3038
mulsd %xmm0, %xmm1
addsd 0x1c81(%rip), %xmm1     # 0x3040
mulsd %xmm0, %xmm1
addsd 0x1c7d(%rip), %xmm1     # 0x3048
mulsd %xmm0, %xmm1
addsd 0x1c79(%rip), %xmm1     # 0x3050
mulsd %xmm0, %xmm1
addsd 0x1c75(%rip), %xmm1     # 0x3058
mulsd %xmm0, %xmm1
addsd 0x1c71(%rip), %xmm1     # 0x3060
movapd 0x1cc9(%rip), %xmm3     # 0x30c0
xorpd %xmm1, %xmm3
movapd (%rsp), %xmm2
cmpltsd 0x1c9f(%rip), %xmm2     # 0x30a8
movapd %xmm2, %xmm0
andnpd %xmm1, %xmm0
andpd %xmm3, %xmm2
orpd %xmm0, %xmm2
movapd %xmm2, %xmm0
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/RanUnif.cpp
// Function: RanUnif(long*)
FTYPE RanUnif( long *s )
{
  // uniform random number generator
  long   ix, k1;
  FTYPE dRes;
  
  ix = *s;
  *s = ix+1;
  ix *= 1513517L;
	ix %= 2147483647L;
  k1 = ix/127773L;
  ix = 16807L*( ix - k1*127773L ) - k1 * 2836L;
  if (ix < 0) ix = ix + 2147483647L;
  //*s   = ix;
  dRes = (ix * 4.656612875e-10);
  return (dRes);
  
}

// Assembly:
movq (%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rdi)
imulq $0x17182d, %rax, %rax   # imm = 0x17182D
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cqto
idivq %rsi
movq %rdx, %rcx
movl $0x1f31d, %edi          # imm = 0x1F31D
movl %ecx, %eax
cltd
idivl %edi
cltq
imulq $-0x1f31d, %rax, %rdx   # imm = 0xFFFE0CE3
addq %rcx, %rdx
imulq $0x41a7, %rdx, %rcx     # imm = 0x41A7
imulq $-0xb14, %rax, %rax     # imm = 0xF4EC
addq %rcx, %rax
addq %rax, %rsi
testq %rax, %rax
cmovnsq %rax, %rsi
cvtsi2sd %rsi, %xmm0
mulsd 0x1c48(%rip), %xmm0     # 0x30d0
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/nr_routines.c
// Function: nrerror(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void nrerror(std::string error_text )
{
  fprintf(stderr,"Numerical Recipes run-time error...\n");
  fprintf(stderr,"%s\n",error_text.c_str());
  fprintf(stderr,"...now exiting to system...\n");
  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3b3d(%rip), %r15      # 0x4fd8
movq (%r15), %rcx
leaq 0x1c33(%rip), %rdi      # 0x30d8
pushq $0x24
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x1170
movq (%r15), %rdi
movq (%rbx), %rdx
leaq 0x1c3c(%rip), %rsi      # 0x30fd
xorl %eax, %eax
callq 0x1110
movq (%r15), %rcx
leaq 0x1c2f(%rip), %rdi      # 0x3101
pushq $0x1c
popq %rsi
movq %r14, %rdx
callq 0x1170
pushq $0x1
popq %rdi
callq 0x10e0
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/HJM_SimPath_Forward_Blocking.cpp
// Function: serialB(double*, double*, int, int, int)
void serialB(FTYPE *pdZ, FTYPE *randZ, int BLOCKSIZE, int iN, int iFactors)
{
  for(int l = 0; l < iFactors; l++){
    for(int b = 0; b < BLOCKSIZE; b++){
      for (int j = 1; j < iN; j++){
        pdZ[l * iN * BLOCKSIZE + BLOCKSIZE*j + b]= CumNormalInv(randZ[l * iN * BLOCKSIZE + BLOCKSIZE * j + b]);  /* 18% of the total executition time */
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %edx
cmovgl %ebp, %edx
movl %edx, 0x1c(%rsp)
movslq %ecx, %rbx
testl %r8d, %r8d
cmovlel %eax, %r8d
movl %r8d, 0x14(%rsp)
movl %ebx, %ecx
imull %ebp, %ecx
movl %ecx, 0x10(%rsp)
movl %ebp, 0xc(%rsp)
cmpl 0x14(%rsp), %eax
je 0x16ee
xorl %ecx, %ecx
movl 0xc(%rsp), %edx
movl %eax, 0x18(%rsp)
cmpl 0x1c(%rsp), %ecx
je 0x16de
movl %ecx, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %edx, %r12d
pushq $0x1
popq %r13
cmpq %rbx, %r13
jge 0x16cc
movslq %r12d, %r12
movsd (%r14,%r12,8), %xmm0
callq 0x12ac
movsd %xmm0, (%r15,%r12,8)
incq %r13
addl %ebp, %r12d
jmp 0x16ab
movl 0x24(%rsp), %ecx
incl %ecx
movl 0x20(%rsp), %edx
incl %edx
movl 0x18(%rsp), %eax
jmp 0x1696
incl %eax
movl 0xc(%rsp), %ecx
addl 0x10(%rsp), %ecx
movl %ecx, 0xc(%rsp)
jmp 0x1686
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/HJM.cpp
// Function: HJM_Yield_to_Forward(double*, int, double*)
int HJM_Yield_to_Forward (FTYPE *pdForward,	//Forward curve to be outputted
    int iN,				//Number of time-steps
    FTYPE *pdYield)		//Input yield curve 
{
  int i;
  pdForward[0] = pdYield[0];
  for(i = 1; i < iN; i++) pdForward[i] = (i + 1) * pdYield[i] - i * pdYield[i - 1];

  return 1;
}

// Assembly:
movsd (%rdx), %xmm0
movsd %xmm0, (%rdi)
movslq %esi, %rax
pushq $0x1
popq %rcx
cmpq %rax, %rcx
jge 0x19f5
leaq 0x1(%rcx), %rsi
cvtsi2sd %esi, %xmm0
leal -0x1(%rsi), %r8d
cvtsi2sd %r8d, %xmm1
mulsd -0x8(%rdx,%rcx,8), %xmm1
mulsd (%rdx,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rdi,%rcx,8)
movq %rsi, %rcx
jmp 0x19c6
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/HJM.cpp
// Function: HJM_Drifts(double*, double*, int, int, double, double*)
int HJM_Drifts(FTYPE *pdTotalDrift,	//Output vector that stores the total drift correction for each maturity
    FTYPE *ppdDrifts,		//Output matrix that stores drift correction for each factor for each maturity
    int iN, 
    int iFactors,
    FTYPE dYears,
    FTYPE *ppdFactors)		//Input factor volatilities
{
  //This function computes drift corrections required for each factor for each maturity based on given factor volatilities

  int i, j, l;
  FTYPE ddelt = (FTYPE)(dYears/iN);
  FTYPE dSumVol;

  //computation of factor drifts for shortest maturity
  for (i = 0; i < iFactors; i++)
    ppdDrifts[i * (iN - 1)] = 0.5 * ddelt * (ppdFactors[i * (iN - 1)]) * (ppdFactors[i * (iN - 1)]);

  //computation of factor drifts for other maturities
  for (i = 0; i < iFactors;i++)
    for (j = 1; j < iN - 1; j++)
    {
      ppdDrifts[i * (iN - 1) + j] = 0;
      for(l = 0; l < j; l++) ppdDrifts[i * (iN - 1) + j] -= ppdDrifts[i * (iN - 1) + l];

      dSumVol=0;
      for(l = 0; l <= j; l++) dSumVol += ppdFactors[i * (iN - 1) + l];

      ppdDrifts[i * (iN - 1) + j] += 0.5 * ddelt * dSumVol * dSumVol;
    }

  //computation of total drifts for all maturities
  for(i = 0; i < iN - 1; i++)
  {
    pdTotalDrift[i]=0;
    for(j = 0; j < iFactors; j++) pdTotalDrift[i] += ppdDrifts[j * (iN - 1) + i];
  }

  return 1;
}

// Assembly:
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
mulsd 0x177f(%rip), %xmm0     # 0x3188
decl %edx
movslq %edx, %r9
xorl %r10d, %r10d
testl %ecx, %ecx
cmovlel %r10d, %ecx
leaq (,%r9,8), %rax
movq %rcx, %r11
subq $0x1, %r11
jb 0x1a45
movsd (%r8,%r10), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, (%rsi,%r10)
addq %rax, %r10
jmp 0x1a22
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %r10d, %r10d
movabsq $0x2, %r11
movabsq $0x1, %rbx
movq %rsi, %r14
cmpq %rcx, %r10
je 0x1ae4
movq %r10, %r15
imulq %r9, %r15
leaq (%rsi,%r15,8), %r15
movq %rbx, %r12
movq %r11, %r13
cmpq %r9, %r12
jge 0x1ad9
andq $0x0, (%r15,%r12,8)
xorpd %xmm1, %xmm1
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x1aa5
subsd (%r14,%rbp,8), %xmm1
movsd %xmm1, (%r15,%r12,8)
incq %rbp
jmp 0x1a8f
xorpd %xmm2, %xmm2
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x1abb
addsd (%r8,%rbp,8), %xmm2
incq %rbp
jmp 0x1aab
movapd %xmm0, %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, (%r15,%r12,8)
incq %r12
incq %r13
jmp 0x1a7f
incq %r10
addq %rax, %r14
addq %rax, %r8
jmp 0x1a69
xorl %r8d, %r8d
testl %edx, %edx
cmovlel %r8d, %edx
cmpq %rdx, %r8
je 0x1b20
andq $0x0, (%rdi,%r8,8)
xorpd %xmm0, %xmm0
movq %rsi, %r9
movq %rcx, %r10
subq $0x1, %r10
jb 0x1b17
addsd (%r9), %xmm0
movsd %xmm0, (%rdi,%r8,8)
addq %rax, %r9
jmp 0x1b01
incq %r8
addq $0x8, %rsi
jmp 0x1aed
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/HJM.cpp
// Function: Discount_Factors_Blocking(double*, int, double, double*, int, double*)
int Discount_Factors_Blocking(FTYPE *pdDiscountFactors, 
    int iN, 
    FTYPE dYears, 
    FTYPE *pdRatePath,
    int BLOCKSIZE,
		FTYPE *pdexpRes) {
  int i, j, b;
  FTYPE ddelt = (FTYPE)(dYears/iN); //HJM time-step length

  //precompute the exponientials
  for (j = 0; j < (iN - 1) * BLOCKSIZE; j++) pdexpRes[j] = -pdRatePath[j] * ddelt;
  for (j = 0; j < (iN - 1) * BLOCKSIZE; j++) pdexpRes[j] = exp(pdexpRes[j]);

  //initializing the discount factor vector
  for (i = 0; i < iN * BLOCKSIZE; i++) pdDiscountFactors[i] = 1.0;

  for (i = 1; i < iN; i++){
    for (b = 0; b < BLOCKSIZE; b++){
      for (j = 0; j < i; j++){
        pdDiscountFactors[i * BLOCKSIZE + b] *= pdexpRes[j * BLOCKSIZE + b];
      }
    }
  } 

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r14d
movl %esi, %r12d
movq %rdi, %r15
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
leal -0x1(%r12), %r13d
imull %ecx, %r13d
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
movapd 0x1557(%rip), %xmm1     # 0x30c0
cmpq %rax, %r13
je 0x1b85
movsd (%rdx,%rax,8), %xmm2
xorpd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, (%rbx,%rax,8)
incq %rax
jmp 0x1b69
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x1ba0
movsd (%rbx,%rbp,8), %xmm0
callq 0x1150
movsd %xmm0, (%rbx,%rbp,8)
incq %rbp
jmp 0x1b87
movl %r14d, %eax
imull %r12d, %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
cmpq %rcx, %rax
je 0x1bc6
movq %rdx, (%r15,%rcx,8)
incq %rcx
jmp 0x1bb8
movslq %r14d, %rax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %r14d
movslq %r12d, %rcx
leaq (,%rax,8), %rdx
pushq $0x1
popq %rsi
cmpq %rcx, %rsi
jge 0x1c2a
movq %rsi, %rdi
imulq %rax, %rdi
leaq (%r15,%rdi,8), %rdi
movq %rbx, %r8
xorl %r9d, %r9d
cmpq %r14, %r9
je 0x1c25
movsd (%rdi,%r9,8), %xmm0
movq %r8, %r10
movq %rsi, %r11
subq $0x1, %r11
jb 0x1c1c
mulsd (%r10), %xmm0
movsd %xmm0, (%rdi,%r9,8)
addq %rdx, %r10
jmp 0x1c06
incq %r9
addq $0x8, %r8
jmp 0x1bf5
incq %rsi
jmp 0x1bdf
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jc-kim[P]swaptions/HJM_Securities.cpp
// Function: parseOpt(int, char**)
void parseOpt(int argc, char** argv) {
  if(argc == 1)
  {
    fprintf(stderr," usage: \n\t-ns [number of swaptions (should be > number of threads]\n\t-sm [number of simulations]\n\t-nt [number of threads]\n"); 
    exit(1);
  }

  for (int j=1; j<argc; j++) {
    if (!strcmp("-sm", argv[j])) {NUM_TRIALS = atol(argv[++j]);}
    else if (!strcmp("-nt", argv[j])) {nThreads = atoi(argv[++j]);} 
    else if (!strcmp("-ns", argv[j])) {nSwaptions = atoi(argv[++j]);} 
    else if (!strcmp("-md", argv[j])) {MAX_DEV = atoi(argv[++j]);}
    else {
      fprintf(stderr," usage: \n\t-ns [number of swaptions (should be > number of threads]\n\t-sm [number of simulations]\n\t-nt [number of threads]\n"); 
    }
  }

  if(nSwaptions < nThreads) {
    nSwaptions = nThreads; 
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x25a2
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x1
popq %r12
leaq 0xe61(%rip), %r14       # 0x3310
cmpl %ebp, %r12d
jge 0x257f
movslq %r12d, %r15
movq (%rbx,%r15,8), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x251c
leaq 0xe3f(%rip), %rdi       # 0x3314
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x2531
leaq 0xe30(%rip), %rdi       # 0x3318
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x2546
leaq 0xe21(%rip), %rdi       # 0x331c
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
jne 0x2561
incl %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x2bd2(%rip)      # 0x50ec
jmp 0x2559
incl %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x10d0
movl %eax, 0x2ba1(%rip)      # 0x50d0
jmp 0x2559
incl %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x2b90(%rip)      # 0x50d4
jmp 0x2559
incl %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x2b7f(%rip)      # 0x50d8
incl %r12d
jmp 0x24af
movq 0x2a70(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
leaq 0xd24(%rip), %rdi       # 0x3296
pushq $0x79
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
jmp 0x2559
movl 0x2b4f(%rip), %eax      # 0x50d4
cmpl %eax, 0x2b4d(%rip)      # 0x50d8
jge 0x2593
movl %eax, 0x2b45(%rip)      # 0x50d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2a2f(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
leaq 0xce3(%rip), %rdi       # 0x3296
pushq $0x79
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
pushq $0x1
popq %rdi
callq 0x10e0