LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6de8
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
je 0x669f
xorl %r14d, %r14d
xorps %xmm2, %xmm2
movq %r14, %r15
movslq (%rax,%r14,4), %r12
incq %r14
movq 0x18(%rbx), %rdx
movq 0x18(%rdx), %rcx
movl 0x4(%rcx,%r15,4), %eax
cmpl %eax, %r12d
jge 0x6680
movq (%rdx), %rdx
subl (%rcx,%r15,4), %eax
movslq (%rdx,%r12,4), %r13
movl 0x4(%rcx,%r13,4), %edx
subl (%rcx,%r13,4), %edx
imull %eax, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
ucomiss %xmm2, %xmm0
jb 0x6609
sqrtss %xmm0, %xmm0
jmp 0x6611
callq 0x3380
xorps %xmm2, %xmm2
movslq 0x20(%rbx), %rax
testq %rax, %rax
jle 0x6668
movss 0x1a12(%rip), %xmm1     # 0x8034
divss %xmm0, %xmm1
imulq %rax, %r13
movq 0x8(%rbx), %rcx
shlq $0x2, %r13
addq (%rcx), %r13
movq 0x10(%rbx), %rdx
movl %r15d, %ecx
imull %eax, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq (%rdx), %rcx
xorl %edx, %edx
movss (%r13,%rdx,4), %xmm0
mulss %xmm1, %xmm0
addss (%rcx,%rdx,4), %xmm0
movss %xmm0, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x664b
incq %r12
movq 0x18(%rbx), %rdx
movq 0x18(%rdx), %rcx
movslq (%rcx,%r14,4), %rax
cmpq %rax, %r12
jl 0x65e0
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
cmpq %r14, %rcx
ja 0x65c0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6e10
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
je 0x67ba
xorl %r14d, %r14d
xorps %xmm2, %xmm2
movq %r14, %r15
movslq (%rax,%r14,4), %r12
incq %r14
movq 0x18(%rbx), %rdx
movq 0x18(%rdx), %rcx
movl 0x4(%rcx,%r15,4), %eax
cmpl %eax, %r12d
jge 0x679b
movq (%rdx), %rdx
subl (%rcx,%r15,4), %eax
movslq (%rdx,%r12,4), %r13
movl 0x4(%rcx,%r13,4), %edx
subl (%rcx,%r13,4), %edx
imull %eax, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
ucomiss %xmm2, %xmm0
jb 0x6727
sqrtss %xmm0, %xmm0
jmp 0x672f
callq 0x3380
xorps %xmm2, %xmm2
movslq 0x20(%rbx), %rax
testq %rax, %rax
jle 0x6783
movss 0x18f4(%rip), %xmm1     # 0x8034
movq 0x8(%rbx), %rdx
imulq %rax, %r13
shlq $0x2, %r13
addq (%rdx), %r13
divss %xmm0, %xmm1
movl %r15d, %ecx
imull %eax, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq 0x18(%rdx), %rcx
xorl %edx, %edx
movss (%r13,%rdx,4), %xmm0
mulss %xmm1, %xmm0
addss (%rcx,%rdx,4), %xmm0
movss %xmm0, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x6766
incq %r12
movq 0x18(%rbx), %rdx
movq 0x18(%rdx), %rcx
movslq (%rcx,%r14,4), %rax
cmpq %rax, %r12
jl 0x66fe
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
cmpq %r14, %rcx
ja 0x66de
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
je 0x6af2
sarq $0x2, %rcx
movq 0x10(%rdi), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edi, %edi
xorps %xmm0, %xmm0
movss (%rax,%rdi,4), %xmm1
testb %sil, %sil
je 0x6ade
ucomiss %xmm0, %xmm1
seta (%rdx,%rdi)
ucomiss %xmm0, %xmm1
ja 0x6aea
movl $0x0, (%rax,%rdi,4)
incq %rdi
cmpq %rdi, %rcx
jne 0x6acd
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x51a7(%rip), %rax      # 0xbce0
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movss %xmm0, 0x18(%rdi)
movq 0x18(%rsi), %rax
cmpq 0x20(%rsi), %rax
je 0x6b68
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
jmp 0x6b6a
xorl %eax, %eax
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c5f
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x6c57
movss 0x18(%rbx), %xmm0
movss 0x1609(%rip), %xmm1     # 0x81ec
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ebp
movss 0x1441(%rip), %xmm2     # 0x8034
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
divss %xmm1, %xmm2
movss %xmm2, 0xc(%rsp)
xorl %r14d, %r14d
callq 0x6f5c
movss 0xc(%rsp), %xmm0
cmpl %ebp, %eax
jge 0x6c19
xorps %xmm0, %xmm0
movq 0x8(%rbx), %rcx
movq (%rcx), %rcx
mulss (%rcx,%r14,4), %xmm0
movss %xmm0, (%rcx,%r14,4)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x6c40
xorl %edx, %edx
cmpl %ebp, %eax
setge %dl
movl %edx, (%rcx,%r14,4)
incq %r14
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
ja 0x6c07
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6cba
movq 0x8(%rdi), %rdx
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
je 0x6cba
movss 0x13b6(%rip), %xmm0     # 0x8034
movaps %xmm0, %xmm1
subss 0x18(%rdi), %xmm1
divss %xmm1, %xmm0
sarq $0x2, %rcx
movq 0x18(%rdx), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
cmpl $0x0, (%rax,%rsi,4)
xorps %xmm1, %xmm1
je 0x6ca8
movaps %xmm0, %xmm1
mulss (%rdx,%rsi,4), %xmm1
movss %xmm1, (%rdx,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x6c9c
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f9e
testl %eax, %eax
je 0x6f9e
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 0x12b0(%rip), %rdi      # 0x8255
leaq 0x12b0(%rip), %rsi      # 0x825c
leaq 0x12b6(%rip), %rcx      # 0x8269
movl $0x11, %edx
callq 0x3170
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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
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
cmpq %r13, %r12
je 0x70e0
movq %rdi, %rbx
addq $0x18, %rbx
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movups (%r12), %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7368
addq $0x10, %r12
cmpq %r13, %r12
jne 0x70c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x471c
movq %r14, %rdi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x4(%rsp)
movss 0x8(%rdi), %xmm0
cvtsi2ss %eax, %xmm1
callq 0x32f0
movaps %xmm0, %xmm1
movss 0xefc(%rip), %xmm0      # 0x8034
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x714a
sqrtss %xmm0, %xmm0
jmp 0x714f
callq 0x3380
movss %xmm0, (%rsp)
movss 0x4(%rbx), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl 0x14(%rbx), %xmm1
callq 0x32f0
movq 0x18(%rbx), %r14
movq 0x20(%rbx), %r15
cmpq %r15, %r14
movss 0x4(%rsp), %xmm4
je 0x72d9
mulss (%rsp), %xmm4
movss 0xeaa(%rip), %xmm1      # 0x8034
subss %xmm0, %xmm1
divss %xmm1, %xmm4
movsd 0x1106(%rip), %xmm5     # 0x82a0
xorps %xmm6, %xmm6
movss %xmm4, 0x4(%rsp)
movq (%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x72cc
xorl %r12d, %r12d
movq 0x8(%r14), %rcx
movq (%rcx), %rcx
movss (%rcx,%r12,4), %xmm0
cmpb $0x1, 0x40(%r14)
jne 0x71e2
movss 0x10(%rbx), %xmm1
mulss (%rax,%r12,4), %xmm1
addss %xmm1, %xmm0
movss 0x4(%rbx), %xmm1
movq 0x10(%r14), %rax
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
mulss (%rax,%r12,4), %xmm1
cvtss2sd %xmm1, %xmm1
movapd %xmm5, %xmm3
subsd %xmm2, %xmm3
cvtss2sd %xmm0, %xmm0
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
xorps %xmm1, %xmm1
cvtsd2ss %xmm3, %xmm1
movss %xmm1, (%rax,%r12,4)
movss 0x8(%rbx), %xmm1
movq 0x28(%r14), %rcx
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
mulss (%rcx,%r12,4), %xmm1
cvtss2sd %xmm1, %xmm1
movapd %xmm5, %xmm3
subsd %xmm2, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
xorps %xmm0, %xmm0
cvtsd2ss %xmm3, %xmm0
movss %xmm0, (%rcx,%r12,4)
movss (%rax,%r12,4), %xmm1
mulss %xmm4, %xmm1
ucomiss %xmm6, %xmm0
jb 0x726d
sqrtss %xmm0, %xmm0
jmp 0x728d
movss %xmm1, (%rsp)
callq 0x3380
movss (%rsp), %xmm1
xorps %xmm6, %xmm6
movsd 0x1019(%rip), %xmm5     # 0x82a0
movss 0x4(%rsp), %xmm4
addss 0xc(%rbx), %xmm0
divss %xmm0, %xmm1
movq (%r14), %rax
movq (%rax), %rax
movss (%rax,%r12,4), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%rax,%r12,4)
incq %r12
movq (%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r12
jl 0x71bf
addq $0x48, %r14
cmpq %r15, %r14
jne 0x71a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x820, %rsp            # imm = 0x820
movq %rsi, %rbx
movl %edi, %ebp
movq 0x4909(%rip), %rax      # 0xbfb0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x3290
cmpl $0x1, %ebp
jg 0x7702
movq 0x4913(%rip), %rbx      # 0xbfd0
leaq 0xbe8(%rip), %rsi       # 0x82ac
movl $0x13, %edx
movq %rbx, %rdi
callq 0x3220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movl $0x1, %eax
jmp 0x783f
leaq 0x68(%rsp), %rdi
callq 0x369c
leaq 0x90(%rsp), %rdi
movl $0xa8, %edx
xorl %esi, %esi
callq 0x3140
movq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x1f8(%rsp), %rdx
callq 0x7906
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x7a0c
leaq 0x1f8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x50fc
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x778c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x1f8(%rsp), %rdi
callq 0x5b82
testb %al, %al
je 0x784b
movl 0x88(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x68(%rsp), %xmm0
movups 0x78(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x36bc
leaq 0x138(%rsp), %rdi
callq 0x4198
leaq 0x138(%rsp), %rdi
callq 0x3d1a
leaq 0x608(%rsp), %rdi
callq 0x30a0
leaq 0x400(%rsp), %rdi
callq 0x30a0
leaq 0x1f8(%rsp), %rdi
callq 0x30a0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7830
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x90(%rsp), %rdi
callq 0x796a
xorl %eax, %eax
addq $0x820, %rsp            # imm = 0x820
popq %rbx
popq %r14
popq %rbp
retq
movq 0x479e(%rip), %rdi      # 0xbff0
leaq 0xa67(%rip), %rsi       # 0x82c0
movl $0x13, %edx
callq 0x3220
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x477c(%rip), %rdi      # 0xbff0
callq 0x3220
movq %rax, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x3230
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x3d1a
jmp 0x78c8
jmp 0x78c5
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x78d5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x78d5
movq %rax, %rbx
jmp 0x78d5
movq %rax, %rbx
jmp 0x78f0
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
callq 0x7944
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x78f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x90(%rsp), %rdi
callq 0x796a
movq %rbx, %rdi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %r12
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
callq 0x483c
testl %eax, %eax
js 0x46e5
movq 0x8(%rbx), %rsi
movl 0xc(%rsp), %r13d
leaq (%rsi,%r13), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x10(%rbx), %rcx
jg 0x46df
cmpq %r14, %r13
cmovbq %r13, %r14
addq (%rbx), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x10a0
movq 0x8(%rbx), %r12
addq %r13, %r12
movl %r13d, %eax
movq %r12, 0x8(%rbx)
jmp 0x46ea
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4720
movq %rdx, %r15
testq %rdx, %rdx
jne 0x4723
movq %r14, %rdi
callq 0x1050
movq %rax, %r15
incq %r15
jmp 0x4723
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
leaq (%r15,%rax), %rcx
addq $0x4, %rcx
cmpq %rcx, %rax
jae 0x4744
leaq 0x4(%r15), %rsi
movq %rbx, %rdi
callq 0x4774
testl %eax, %eax
js 0x476d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x43fa
movq (%rbx), %rdi
addq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10a0
addq %r15, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4767
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
addq 0x18(%rdi), %rsi
jb 0x47ea
movq %rdi, %rbx
js 0x479e
movl $0x1, %eax
movq %rax, %r14
addq %rax, %rax
cmpq %rsi, %r14
jb 0x4791
jmp 0x47a1
movq %rsi, %r14
movq 0x2818(%rip), %rsi      # 0x6fc0
movq %r14, %rdi
callq 0x1140
testq %rax, %rax
je 0x47ea
movq %rax, %r15
movq (%rbx), %r12
testq %r12, %r12
je 0x47dd
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x10a0
cmpb $0x1, 0x20(%rbx)
jne 0x47dd
movq %r12, %rdi
callq 0x1120
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_O1/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 0x481e
cmpb $0x1, 0x20(%r12)
jne 0x481e
callq 0x1120
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_O1/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 0x1c94(%rip), %xmm3     # 0x3008
addsd %xmm0, %xmm3
movapd 0x1d30(%rip), %xmm1     # 0x30b0
andpd %xmm3, %xmm1
movsd 0x1c84(%rip), %xmm2     # 0x3010
ucomisd %xmm1, %xmm2
jbe 0x1407
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
movsd 0x1cc6(%rip), %xmm0     # 0x3068
mulsd %xmm1, %xmm0
addsd 0x1cc2(%rip), %xmm0     # 0x3070
mulsd %xmm1, %xmm0
addsd 0x1cbe(%rip), %xmm0     # 0x3078
mulsd %xmm1, %xmm0
addsd 0x1cba(%rip), %xmm0     # 0x3080
movsd 0x1cba(%rip), %xmm2     # 0x3088
mulsd %xmm1, %xmm2
addsd 0x1cb6(%rip), %xmm2     # 0x3090
mulsd %xmm1, %xmm2
addsd 0x1cb2(%rip), %xmm2     # 0x3098
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm2
addsd 0x1caa(%rip), %xmm2     # 0x30a0
mulsd %xmm1, %xmm2
addsd 0x1c16(%rip), %xmm2     # 0x3018
divsd %xmm2, %xmm0
retq
subq $0x18, %rsp
movsd 0x1c05(%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 0x1c7e(%rip), %xmm0     # 0x30c0
callq 0x1090
movsd 0x1bd1(%rip), %xmm1     # 0x3020
mulsd %xmm0, %xmm1
addsd 0x1bcd(%rip), %xmm1     # 0x3028
mulsd %xmm0, %xmm1
addsd 0x1bc9(%rip), %xmm1     # 0x3030
mulsd %xmm0, %xmm1
addsd 0x1bc5(%rip), %xmm1     # 0x3038
mulsd %xmm0, %xmm1
addsd 0x1bc1(%rip), %xmm1     # 0x3040
mulsd %xmm0, %xmm1
addsd 0x1bbd(%rip), %xmm1     # 0x3048
mulsd %xmm0, %xmm1
addsd 0x1bb9(%rip), %xmm1     # 0x3050
mulsd %xmm0, %xmm1
addsd 0x1bb5(%rip), %xmm1     # 0x3058
mulsd %xmm0, %xmm1
addsd 0x1bb1(%rip), %xmm1     # 0x3060
movapd 0x1c09(%rip), %xmm3     # 0x30c0
xorpd %xmm1, %xmm3
movapd (%rsp), %xmm2
cmpltsd 0x1bdf(%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_O1/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), %r8
imulq $0x17182d, %r8, %rcx    # imm = 0x17182D
movabsq $-0x7ffffffefffffffd, %rdx # imm = 0x8000000100000003
movq %rcx, %rax
imulq %rdx
movq %rdx, %rsi
addq %rcx, %rsi
movq %rsi, %rax
shrq $0x3f, %rax
sarq $0x1e, %rsi
addq %rax, %rsi
movq %rsi, %rax
shlq $0x1f, %rax
subq %rax, %rsi
addq %rcx, %rsi
movabsq $0x41a705af1fe3fb79, %rcx # imm = 0x41A705AF1FE3FB79
movq %rsi, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $-0x1f31d, %rdx, %rax   # imm = 0xFFFE0CE3
addq %rsi, %rax
imulq $0x41a7, %rax, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rax,%rcx), %rdx
addq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
addq %rcx, %rax
cmovnsq %rax, %rdx
leaq 0x1(%r8), %rax
cvtsi2sd %rdx, %xmm0
movq %rax, (%rdi)
mulsd 0x1b4d(%rip), %xmm0     # 0x30d0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3a46(%rip), %r14      # 0x4fd8
movq (%r14), %rcx
leaq 0x1b3c(%rip), %rdi      # 0x30d8
movl $0x24, %esi
movl $0x1, %edx
callq 0x1170
movq (%r14), %rdi
movq (%rbx), %rdx
leaq 0x1b45(%rip), %rsi      # 0x30fd
xorl %eax, %eax
callq 0x1110
movq (%r14), %rcx
leaq 0x1b38(%rip), %rdi      # 0x3101
movl $0x1c, %esi
movl $0x1, %edx
callq 0x1170
movl $0x1, %edi
callq 0x10e0
// File: /workspace/github_cpp_makefile_star2_O1/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 %ecx, 0x4(%rsp)
testl %r8d, %r8d
jle 0x17bb
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %r8d, %eax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
imull %edx, %eax
movl %eax, 0x8(%rsp)
decq %rcx
movq %rcx, 0x20(%rsp)
xorl %eax, %eax
movl %edx, (%rsp)
movq %rax, 0x18(%rsp)
testl %ebp, %ebp
jle 0x17a2
xorl %eax, %eax
movl (%rsp), %ebx
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %r13
movl %ebx, %r12d
cmpl $0x2, 0x4(%rsp)
jl 0x1796
movslq %r12d, %r12
movsd (%r14,%r12,8), %xmm0
callq 0x136c
movsd %xmm0, (%r15,%r12,8)
addl %ebp, %r12d
decq %r13
jne 0x177a
movl 0xc(%rsp), %eax
incl %eax
incl %ebx
cmpl %ebp, %eax
jne 0x1767
movq 0x18(%rsp), %rax
incq %rax
movl (%rsp), %ecx
addl 0x8(%rsp), %ecx
movl %ecx, (%rsp)
cmpq 0x10(%rsp), %rax
jne 0x1759
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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)
cmpl $0x2, %esi
jl 0x1b2d
movl %esi, %eax
movl $0x1, %esi
movl $0x2, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
mulsd -0x8(%rdx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rdi,%rsi,8)
leaq 0x1(%rsi), %r8
incl %ecx
movq %r8, %rsi
cmpq %r8, %rax
jne 0x1afd
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
movslq %edx, %r9
movl %ecx, %eax
testl %ecx, %ecx
jle 0x1b88
movsd 0x1632(%rip), %xmm1     # 0x3188
mulsd %xmm0, %xmm1
leaq -0x8(,%r9,8), %r10
xorl %r11d, %r11d
movq %rax, %rbx
movsd (%r8,%r11), %xmm2
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm3
movsd %xmm3, (%rsi,%r11)
addq %r10, %r11
decq %rbx
jne 0x1b68
movq %r9, -0x8(%rsp)
testl %ecx, %ecx
jle 0x1c3a
leal -0x1(%rdx), %r10d
mulsd 0x15e7(%rip), %xmm0     # 0x3188
movslq %r10d, %r11
leaq (,%r11,8), %rbx
xorl %r14d, %r14d
movq %rsi, %r15
cmpl $0x3, %edx
jl 0x1c28
movq %r14, %r9
imulq %r11, %r9
leaq (%rsi,%r9,8), %r12
movl $0x2, %r13d
movl $0x1, %ebp
movq $0x0, (%r12,%rbp,8)
xorpd %xmm1, %xmm1
xorl %r9d, %r9d
subsd (%r15,%r9,8), %xmm1
movsd %xmm1, (%r12,%rbp,8)
incq %r9
cmpq %r9, %rbp
jne 0x1bdc
xorpd %xmm1, %xmm1
xorl %r9d, %r9d
addsd (%r8,%r9,8), %xmm1
incq %r9
cmpq %r9, %r13
jne 0x1bf7
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
addsd (%r12,%rbp,8), %xmm2
movsd %xmm2, (%r12,%rbp,8)
incq %rbp
incq %r13
cmpq %r10, %rbp
jne 0x1bcd
incq %r14
addq %rbx, %r15
addq %rbx, %r8
cmpq %rax, %r14
jne 0x1bb2
cmpl $0x2, %edx
jl 0x1c88
decl %edx
movq -0x8(%rsp), %r8
leaq -0x8(,%r8,8), %r8
xorl %r9d, %r9d
movq $0x0, (%rdi,%r9,8)
testl %ecx, %ecx
jle 0x1c7c
movsd (%rdi,%r9,8), %xmm0
movq %rax, %r10
movq %rsi, %r11
addsd (%r11), %xmm0
movsd %xmm0, (%rdi,%r9,8)
addq %r8, %r11
decq %r10
jne 0x1c69
incq %r9
addq $0x8, %rsi
cmpq %rdx, %r9
jne 0x1c51
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %ebp
movl %esi, %r15d
movq %rdi, %r14
leal -0x1(%r15), %eax
imull %ecx, %eax
movl %eax, %r12d
testl %eax, %eax
jle 0x1ce9
cvtsi2sd %r15d, %xmm1
divsd %xmm1, %xmm0
xorl %ecx, %ecx
movapd 0x13f1(%rip), %xmm1     # 0x30c0
movsd (%rdx,%rcx,8), %xmm2
xorpd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x1ccf
testl %eax, %eax
jle 0x1d09
xorl %r13d, %r13d
movsd (%rbx,%r13,8), %xmm0
callq 0x1150
movsd %xmm0, (%rbx,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x1cf0
movl %ebp, %eax
imull %r15d, %eax
testl %eax, %eax
jle 0x1d2d
movl %eax, %eax
xorl %ecx, %ecx
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x1d21
cmpl $0x2, %r15d
jl 0x1d8d
movl %ebp, %eax
movl %r15d, %ecx
leaq (,%rax,8), %rdx
movl $0x1, %esi
testl %ebp, %ebp
jle 0x1d85
movq %rsi, %rdi
imulq %rax, %rdi
leaq (%r14,%rdi,8), %rdi
movq %rbx, %r8
xorl %r9d, %r9d
movsd (%rdi,%r9,8), %xmm0
movq %rsi, %r10
movq %r8, %r11
mulsd (%r11), %xmm0
movsd %xmm0, (%rdi,%r9,8)
addq %rdx, %r11
decq %r10
jne 0x1d66
incq %r9
addq $0x8, %r8
cmpq %rax, %r9
jne 0x1d5a
incq %rsi
cmpq %rcx, %rsi
jne 0x1d45
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2743
jle 0x2720
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %r12d
leaq 0xbea(%rip), %r14       # 0x3250
movslq %r12d, %r15
movq (%rbx,%r15,8), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x26cb
leaq 0xbd1(%rip), %rdi       # 0x3254
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x26e1
leaq 0xbc2(%rip), %rdi       # 0x3258
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
je 0x26f7
leaq 0xbb3(%rip), %rdi       # 0x325c
movq %r13, %rsi
callq 0x1100
testl %eax, %eax
jne 0x2719
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x2a23(%rip)      # 0x50ec
jmp 0x270b
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x10d0
movl %eax, 0x29f1(%rip)      # 0x50d0
jmp 0x270b
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x29df(%rip)      # 0x50d4
jmp 0x270b
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1130
movl %eax, 0x29cd(%rip)      # 0x50d8
incl %r12d
cmpl %ebp, %r12d
jl 0x2666
jmp 0x2720
callq 0x1190
jmp 0x270b
movl 0x29ae(%rip), %eax      # 0x50d4
cmpl %eax, 0x29ac(%rip)      # 0x50d8
jge 0x2734
movl %eax, 0x29a4(%rip)      # 0x50d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11ac
// File: /workspace/github_cpp_makefile_star2_O1/jc-kim[P]swaptions/timers.c
// Function: timer_init()
void timer_init() {
  int i;
  for (i = 0; i < NUM_TIMERS; i++) {
    t_start[i] = 0.0;
    t_elapsed[i] = 0.0;
    t_count[i] = 0;
  }
}

// Assembly:
pushq %rax
leaq 0x2564(%rip), %rdi      # 0x5110
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1040
leaq 0x2751(%rip), %rdi      # 0x5310
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1040
leaq 0x293e(%rip), %rdi      # 0x5510
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
popq %rax
jmp 0x1040
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::child_proc_watcher_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, run_process(char const**, dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, subproc_buffer&)::sp_watcher_t>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        loop_access::get_base_lock(loop).unlock();

        auto rearm_type = static_cast<Derived *>(this)->status_change(loop, this->watch_pid, this->child_status);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {

            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            loop_access::process_child_watch_rearm(loop, this, rearm_type);

            // rearm_type = loop.process??;
            post_dispatch(loop, this, rearm_type);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x34(%rdi), %rax
movb $0x1, 0x3c(%rdi)
movq %rax, 0x40(%rdi)
andb $-0x2, 0xc(%rdi)
movq %rsi, %r14
leaq 0x20(%rdi), %rsi
leaq 0x28(%r14), %rdi
callq 0x608c
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4f6a
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x20(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::timer_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, dasynq::v2::dprivate::timer<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>* dasynq::v2::dprivate::timer<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::add_timer<do_system_shutdown(shutdown_type_t)::$_0>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, dasynq::clock_type, bool, timespec const&, timespec const&, do_system_shutdown(shutdown_type_t)::$_0)::lambda_timer>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        loop_access::get_base_lock(loop).unlock();

        auto intervals_report = this->intervals;
        this->intervals = 0;
        auto rearm_type = static_cast<Derived *>(this)->timer_expiry(loop, intervals_report);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {

            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            loop_access::process_timer_rearm(loop, this, rearm_type);

            post_dispatch(loop, this, rearm_type);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x48(%rdi)
movq 0x50(%rdi), %rax
movb $0x1, (%rax)
andb $-0x2, 0xc(%rdi)
movq %rsi, %r14
leaq 0x20(%rdi), %rsi
movl 0x4c(%rdi), %edx
movq %r14, %rdi
callq 0x6faa
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4f6a
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x20(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/dinit-client.h
// Function: wait_for_reply(cpbuffer<1024u>&, int)
inline void wait_for_reply(cpbuffer_t &rbuffer, int fd)
{
    fill_buffer_to(rbuffer, fd, 1);

    while (rbuffer[0] >= 100) {
        // Information packet; discard.
        fill_buffer_to(rbuffer, fd, 2);
        int pktlen = (unsigned char) rbuffer[1];

        rbuffer.consume(1);  // Consume one byte so we'll read one byte of the next packet
        fill_buffer_to(rbuffer, fd, pktlen);
        rbuffer.consume(pktlen - 1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %ebp
cmpl $0x0, 0x404(%r14)
je 0x4781
cmpl $-0x1, %ebp
je 0x4798
testl %ebp, %ebp
jne 0x47a6
jmp 0x48cf
movq %r14, %rdi
movl %ebx, %esi
callq 0x4a9e
testl %eax, %eax
cmovlel %eax, %r15d
movl %r15d, %ebp
jg 0x4764
jmp 0x4773
callq 0x3040
cmpl $0x4, (%rax)
jne 0x48e1
cmpl $-0x1, %ebp
je 0x4764
movl 0x400(%r14), %eax
leal -0x400(%rax), %ecx
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %ecx
cmpb $0x64, (%r14,%rcx)
jl 0x48c0
movl $0x400, %ebp            # imm = 0x400
movl $0x1, %r13d
cmpl $0x1, 0x404(%r14)
ja 0x47f5
movq %r14, %rdi
movl %ebx, %esi
callq 0x4a9e
testl %eax, %eax
cmovlel %eax, %r15d
movl %r15d, %r13d
jg 0x47d0
cmpl $-0x1, %r13d
je 0x4805
testl %r13d, %r13d
jne 0x4813
jmp 0x48cf
callq 0x3040
cmpl $0x4, (%rax)
jne 0x48e1
cmpl $-0x1, %r13d
je 0x47d0
movl 0x400(%r14), %eax
leal 0x1(%rax), %ecx
addl $0xfffffc01, %eax       # imm = 0xFFFFFC01
cmpl $0x400, %ecx            # imm = 0x400
cmovbl %ecx, %eax
movzbl (%r14,%rax), %r13d
movl %eax, 0x400(%r14)
decl 0x404(%r14)
movl $0x1, %r12d
cmpl %r13d, 0x404(%r14)
jae 0x4868
movq %r14, %rdi
movl %ebx, %esi
callq 0x4a9e
testl %eax, %eax
cmovlel %eax, %r15d
movl %r15d, %r12d
jg 0x4844
cmpl $-0x1, %r12d
je 0x4875
testl %r12d, %r12d
jne 0x487f
jmp 0x48cf
callq 0x3040
cmpl $0x4, (%rax)
jne 0x48e1
cmpl $-0x1, %r12d
je 0x4844
decl %r13d
movl 0x400(%r14), %eax
addl %r13d, %eax
movl $0xfffffc00, %edx       # imm = 0xFFFFFC00
leal (%rax,%rdx), %ecx
cmpl %ebp, %eax
cmovbl %eax, %ecx
movl %ecx, 0x400(%r14)
subl %r13d, 0x404(%r14)
leal (%rcx,%rdx), %eax
cmpl %ebp, %ecx
cmovbl %ecx, %eax
cmpb $0x63, (%r14,%rax)
jg 0x47d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x3130
movl $0x0, (%rax)
jmp 0x48f3
movq %rax, %r15
movl $0x4, %edi
callq 0x3130
movl (%r15), %ecx
movl %ecx, (%rax)
leaq 0x9126(%rip), %rsi      # 0xda20
movq %rax, %rdi
xorl %edx, %edx
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/shutdown.cc
// Function: subproc_buffer::append(char const*)
void append(const char *msg)
    {
        out_watch->set_enabled(loop, true);
        unsigned len = strlen(msg);
        if (subproc_bufsize - get_length() >= len) {
            base::append(msg, len);
        }
        else {
            mark_overflow();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1018(%rdi), %rsi
movq 0x1020(%rdi), %rdi
movl $0x1, %edx
callq 0x549e
movq %rbx, %rdi
callq 0x30f0
movq %rax, %r15
movl 0x1004(%r14), %eax
movl $0x1000, %ebp           # imm = 0x1000
movl $0x1000, %ecx           # imm = 0x1000
subl %eax, %ecx
cmpl %r15d, %ecx
jae 0x496a
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5538
movl 0x1000(%r14), %ecx
leal (%rcx,%rax), %edx
cmpl %ebp, %edx
leal -0x1000(%rcx,%rax), %edi
cmovbl %edx, %edi
addl %r15d, %eax
movl %eax, 0x1004(%r14)
subl %edi, %ebp
addq %r14, %rdi
cmpl %r15d, %ebp
movl %r15d, %edx
cmovbl %ebp, %edx
movq %rbx, %rsi
callq 0x31f0
subl %ebp, %r15d
jbe 0x49c2
movl %ebp, %eax
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::run(int)
void run(int limit = -1) noexcept
    {
        // Poll the mechanism first, in case high-priority events are pending:
        waitqueue_node<T_Mutex> qnode;
        get_pollwait_lock(qnode);
        loop_mech.pull_events(false);
        release_lock(qnode);

        while (! process_events(limit)) {
            // Pull events from the AEN mechanism and insert them in our internal queue:
            get_pollwait_lock(qnode);
            loop_mech.pull_events(true);
            release_lock(qnode);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xf(%rsp), %rsi
callq 0x772a
movq %r14, %rdi
xorl %esi, %esi
callq 0x776a
leaq 0xf(%rsp), %rsi
movq %r14, %rdi
callq 0x592c
movq %r14, %rdi
movl %ebx, %esi
callq 0x77ca
testb %al, %al
jne 0x4a41
leaq 0xf(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x772a
movq %r14, %rdi
movl $0x1, %esi
callq 0x776a
movq %r14, %rdi
movq %r15, %rsi
callq 0x592c
movq %r14, %rdi
movl %ebx, %esi
callq 0x77ca
testb %al, %al
je 0x4a10
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4a4d
movq %rax, %rdi
callq 0x4904
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::poll(int)
void poll(int limit = -1) noexcept
    {
        waitqueue_node<T_Mutex> qnode;
        if (poll_attn_lock(qnode)) {
            loop_mech.pull_events(false);
            release_lock(qnode);
        }

        process_events(limit);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x7(%rsp), %rsi
callq 0x8038
testb %al, %al
je 0x4a84
movq %r14, %rdi
xorl %esi, %esi
callq 0x776a
leaq 0x7(%rsp), %rsi
movq %r14, %rdi
callq 0x592c
movq %r14, %rdi
movl %ebx, %esi
callq 0x77ca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x4904
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/cpbuffer.h
// Function: cpbuffer<1024u>::fill(int)
int fill(int fd) noexcept
    {
        unsigned pos = cur_idx + length;
        if (pos >= SIZE) pos -= SIZE;
        unsigned max_count = std::min(SIZE - pos, SIZE - length);
        ssize_t r = bp_sys::read(fd, buf + pos, max_count);
        if (r >= 0) {
            length += r;
        }
        return r;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x400(%rdi), %eax
movl 0x404(%rdi), %ecx
leal (%rcx,%rax), %edi
movl $0x400, %edx            # imm = 0x400
cmpl %edx, %edi
leal -0x400(%rcx,%rax), %eax
cmovbl %edi, %eax
movl %esi, %edi
movl $0x400, %esi            # imm = 0x400
subl %eax, %esi
subl %ecx, %edx
cmpl %esi, %edx
cmovael %esi, %edx
addq %rbx, %rax
movq %rax, %rsi
callq 0x33a0
testq %rax, %rax
js 0x4ae8
addl %eax, 0x404(%rbx)
popq %rbx
retq
movq %rax, %rdi
callq 0x4904
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>* dasynq::v2::dprivate::fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::add_watch<subproc_buffer::subproc_buffer(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int)::'lambda'(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int)>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int, subproc_buffer::subproc_buffer(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int)::'lambda'(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int, int))
static fd_watcher<EventLoop> *add_watch(event_loop_t &eloop, int fd, int flags, T watchHndlr)
    {
        class lambda_fd_watcher : public fd_watcher_impl<event_loop_t, lambda_fd_watcher>
        {
            private:
            T watchHndlr;

            public:
            lambda_fd_watcher(T watchHandlr_a) : watchHndlr(watchHandlr_a)
            {
                //
            }

            rearm fd_event(event_loop_t &eloop, int fd, int flags)
            {
                return watchHndlr(eloop, fd, flags);
            }

            void watch_removed() noexcept override
            {
                delete this;
            }
        };
        
        lambda_fd_watcher * lfd = new lambda_fd_watcher(watchHndlr);
        lfd->add_watch(eloop, fd, flags);
        return lfd;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x30, %edi
callq 0x32a0
movq %rax, %r12
movl $0x1, 0x8(%rax)
leaq 0x9050(%rip), %rax      # 0xdb70
movq %rax, (%r12)
movq %rbx, 0x28(%r12)
andb $-0x20, 0xc(%r12)
movl $0x32, 0x18(%r12)
movl %r14d, 0x1c(%r12)
movl %ebp, 0x20(%r12)
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x5150
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq