// File: /workspace/github_cpp_makefile_star2_O3/adamiaonr[P]rid-analytics/src/graph.cpp
// Function: get_edge_str(char*, Node*, int, Node*, int, int, double)
void get_edge_str(
    char * edge_str,
    Node * prev_node, int prev_depth, 
    Node * next_node, int next_depth,
    int breadth,
    double prob_val) {

    std::string output;

    int prev_node_type_int = get_node_type_int(prev_node);
    //int next_node_type_int = get_node_type_int(next_node);

    // initial part of edge
    // output = NODE_CHARS[get_node_type_int(prev_node)] + std::to_string(prev_depth) + std::to_string((breadth / 1)) + " -> " 
    //     + NODE_CHARS[next_node_type_int] + std::to_string(next_depth) + std::to_string((breadth * 3 + next_node_type_int)); 
    if (prev_node_type_int == ORI_NODE_INT) {

        output = NODE_CHARS[prev_node_type_int] + std::to_string(prev_depth) + std::to_string((breadth / 1)) + " -> ";

    } else {

        output = prev_node->get_uid() + " -> ";
    }
    
    output += next_node->get_uid();

    // printf("Graph::get_edge_str(): adding edge for %s(%d, %d) -> %s(%d, %d). edge_str = %s\n",
    //     NODE_CHARS[get_node_type_int(prev_node)], prev_depth, breadth,
    //     NODE_CHARS[get_node_type_int(next_node)], next_depth, (breadth * 3 + next_node_type_int),
    //     output.c_str());

    // appropriately format probability value
    char prob_val_str[MAX_STRING_SIZE];
    snprintf(prob_val_str, MAX_STRING_SIZE, "%-.5E", prob_val);
    // add probability value as 'label' and 'weight'
    output += "[label =\"" + std::string(prob_val_str) + "\", weight=\"" + std::string(prob_val_str) + "\"];\n";

    snprintf(edge_str, MAX_STRING_SIZE, "%s", output.c_str());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movsd %xmm0, (%rsp)
movl %r9d, %r15d
movq %rcx, %r14
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, 0xc8(%rsp)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsi, %rdi
callq 0x1a28d
cmpl $0x5, %eax
jne 0x1afda
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x1b0aa
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1b0a1
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x1b0a7
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1b0aa
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1af98
addl $-0x3, %r13d
jmp 0x1b0aa
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1bdb4
leaq 0x154b1(%rip), %rsi     # 0x304b0
leaq 0x8(%rsp), %rdi
callq 0x4760
leaq 0x100(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b03a
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x1b042
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x4460
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1b089
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b373
movq 0x18(%rsp), %rsi
jmp 0x1b36b
addl $-0x2, %r13d
jmp 0x1b0aa
decl %r13d
movq 0x243b7(%rip), %rbx     # 0x3f468
shrl $0x1f, %r12d
leal (%r12,%r13), %esi
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x4430
movl %r12d, %edi
leaq 0x48(%rsp), %r12
addq (%r12), %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x1bd47
movq %rbx, %rdi
callq 0x41b0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %rax, %r8
callq 0x43f0
leaq 0x38(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b12b
movq %rsi, %rbx
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1b134
movups (%rcx), %xmm0
movq %rsi, %rbx
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x1b1a9
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1b1a0
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x1b1a6
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1b1a9
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1b16d
addl $-0x3, %r12d
jmp 0x1b1a9
addl $-0x2, %r12d
jmp 0x1b1a9
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x68(%rsp), %rdi
movl $0x2d, %edx
callq 0x4430
movl %r15d, %edi
addq 0x68(%rsp), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x1bd47
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
movq %rbx, %r12
cmpq %rbx, %rcx
je 0x1b200
movq 0x38(%rsp), %rdi
movq 0x68(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1b21e
movl $0xf, %edi
cmpq %r13, %rsi
je 0x1b219
movq 0x78(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1b22a
leaq 0x28(%rsp), %rdi
callq 0x4150
jmp 0x1b238
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43f0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1b25c
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1b262
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1522a(%rip), %rsi     # 0x304b0
leaq 0x8(%rsp), %rdi
callq 0x4760
leaq 0x100(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b2c0
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x1b2c7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x4460
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1b30e
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b329
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b340
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b357
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b373
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x100(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x1bdb4
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0x4150
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b3d1
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x150dd(%rip), %rdx     # 0x304b5
leaq 0xf0(%rsp), %rbx
movl $0x80, %esi
movq %rbx, %rdi
movsd (%rsp), %xmm0
movb $0x1, %al
callq 0x4620
leaq 0xe0(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rbx, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0xf0, %rdx
leaq 0xd0(%rsp), %rdi
movq %rbx, %rsi
callq 0x18bc0
leaq 0x15091(%rip), %rcx     # 0x304bb
leaq 0xd0(%rsp), %rdi
movl $0x9, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x43f0
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b468
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x1b46f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x15033(%rip), %rsi     # 0x304c5
callq 0x4760
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b4bf
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x1b4c7
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0xf0, %rdx
leaq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0x18bc0
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x1b53b
movq 0x58(%rsp), %rdi
movq 0xa8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1b55f
movl $0xf, %edi
cmpq %r13, %rsi
je 0x1b55a
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1b56b
leaq 0x48(%rsp), %rdi
callq 0x4150
jmp 0x1b57c
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43f0
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1b5a0
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1b5a6
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x14f07(%rip), %rsi     # 0x304d1
leaq 0x28(%rsp), %rdi
callq 0x4760
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b5fb
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1b602
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0x4150
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1b648
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b663
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b680
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b697
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b6ae
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b6cb
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x88(%rsp), %rcx
leaq 0x14dd3(%rip), %rdx     # 0x304ad
movl $0x80, %esi
movq 0xc8(%rsp), %rdi
xorl %eax, %eax
callq 0x4620
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1b713
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x43a0
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rbx
movq %rax, (%rsp)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b750
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b750
movq %r12, %rbx
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b76d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b76d
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1b78a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b78a
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1b8ac
movq 0x58(%rsp), %rsi
jmp 0x1b881
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b8ac
movq 0x18(%rsp), %rsi
jmp 0x1b881
jmp 0x1b8a8
jmp 0x1b8a8
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1b7ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b7ee
movq %rax, (%rsp)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b80f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b80f
movq %rax, (%rsp)
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b832
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b832
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b84f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b84f
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b86c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b86c
movq %rax, (%rsp)
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b8ac
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1b8ac
jmp 0x1b8a8
movq %rax, (%rsp)
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b8ac
movq 0x100(%rsp), %rsi
jmp 0x1b881
movq %rax, (%rsp)
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1b8d1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x43a0
movq (%rsp), %rdi
callq 0x4700