// File: /workspace/github_cpp_makefile_star2_O2/adamiaonr[P]rid-analytics/src/graph.cpp
// Function: get_node_str(char*, Node*, int, int)
void get_node_str(char * node_str, Node * node, int depth, int breadth) {

    std::string output;

    int node_type_int = get_node_type_int(node);

    // varname
    output = NODE_CHARS[node_type_int] + std::to_string(depth) + std::to_string(3 * breadth + node_type_int);

    // FIXME: just to make it easier to add edges afterwards, use a unique 
    // id to identify each node and set it in the node directly...
    node->set_uid(output);

    // label
//    output += std::string("[label=\"") + NODE_CHARS[node_type_int] + std::to_string(depth) + std::to_string(breadth) + "\"";
//    output += std::string("[label=\"") + node->get_uid() + "\"";
    output += std::string("[label=\"") + NODE_CHARS[node_type_int] + "(" 
        + std::to_string(node->get_curr_tier()) + ":"
        + (node->get_next_tier() == END_OF_PATH ? "EOP" : std::to_string(node->get_next_tier())) 
        + ")" "\"";
    // color
    output += std::string(", color=") + GRAPHVIZ_COLORS[node_type_int];

    // wrap it up
    output += "];\n";

    snprintf(node_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
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x70(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsi, %rdi
callq 0x16e8e
movl %eax, %r13d
leaq 0x24557(%rip), %rbx     # 0x3b450
movq (%rbx,%r13,8), %r12
leaq 0x50(%rsp), %rdi
movl %ebp, %esi
callq 0x17947
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r12, %rsi
callq 0x178bc
leal (%r15,%r15,2), %esi
addl %r13d, %esi
leaq 0x78(%rsp), %rdi
callq 0x17947
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x178e0
leaq 0x98(%rsp), %r15
leaq 0x30(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x4460
movq %r12, %rdi
callq 0x41c0
leaq 0x78(%rsp), %rdi
callq 0x41c0
leaq 0x10(%rsp), %rdi
callq 0x41c0
leaq 0x50(%rsp), %rdi
callq 0x41c0
leaq 0x158(%rsp), %rdi
movq %r15, %rsi
callq 0x4510
leaq 0x28(%r14), %rdi
leaq 0x158(%rsp), %rsi
callq 0x4250
leaq 0x158(%rsp), %rdi
callq 0x41c0
leaq 0x136a1(%rip), %rsi     # 0x2a654
leaq 0xf8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x16c66
movq (%rbx,%r13,8), %rdx
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x179a0
leaq 0x14034(%rip), %rdx     # 0x2b019
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x179a0
movl (%r14), %esi
leaq 0xd8(%rsp), %rdi
callq 0x17947
leaq 0x78(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x178e0
leaq 0x13950(%rip), %rdx     # 0x2a97b
leaq 0x50(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x179a0
movl 0x4(%r14), %ebp
cmpl $-0x1, %ebp
je 0x17054
leaq 0xb8(%rsp), %rdi
movl %ebp, %esi
callq 0x17947
jmp 0x1706d
leaq 0x13602(%rip), %rsi     # 0x2a65d
leaq 0xb8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x16c66
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x178e0
leaq 0x135d6(%rip), %rdx     # 0x2a661
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x179a0
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4790
leaq 0x30(%rsp), %rdi
callq 0x41c0
leaq 0x10(%rsp), %rdi
callq 0x41c0
leaq 0xb8(%rsp), %rdi
callq 0x41c0
cmpl $-0x1, %ebp
leaq 0x50(%rsp), %rdi
callq 0x41c0
leaq 0x78(%rsp), %rdi
callq 0x41c0
leaq 0xd8(%rsp), %rdi
callq 0x41c0
leaq 0x138(%rsp), %rdi
callq 0x41c0
leaq 0x118(%rsp), %rdi
callq 0x41c0
leaq 0xf8(%rsp), %rdi
callq 0x41c0
leaq 0x13545(%rip), %rsi     # 0x2a664
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x16c66
leaq 0x242db(%rip), %rax     # 0x3b410
movq (%rax,%r13,8), %rdx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x179a0
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4790
leaq 0x30(%rsp), %rdi
callq 0x41c0
leaq 0x10(%rsp), %rdi
callq 0x41c0
leaq 0x1351d(%rip), %rsi     # 0x2a692
leaq 0x98(%rsp), %rdi
callq 0x4760
leaq 0x98(%rsp), %r14
movq (%r14), %rcx
leaq 0x134d9(%rip), %rdx     # 0x2a66d
movl $0x80, %esi
movq 0x70(%rsp), %rdi
xorl %eax, %eax
callq 0x4630
movq %r14, %rdi
callq 0x41c0
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x41c0
jmp 0x171d1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x172a9
jmp 0x172b2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x41c0
jmp 0x171f2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x41c0
jmp 0x17201
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x41c0
jmp 0x17213
movq %rax, %rbx
cmpl $-0x1, %ebp
leaq 0x50(%rsp), %rdi
callq 0x41c0
jmp 0x17225
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x41c0
leaq 0xd8(%rsp), %rdi
callq 0x41c0
leaq 0x138(%rsp), %rdi
callq 0x41c0
leaq 0x118(%rsp), %rdi
callq 0x41c0
leaq 0xf8(%rsp), %rdi
jmp 0x172a9
movq %rax, %rbx
jmp 0x1722f
movq %rax, %rbx
jmp 0x1723c
movq %rax, %rbx
jmp 0x17249
movq %rax, %rbx
jmp 0x17256
jmp 0x172b2
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
jmp 0x172a9
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x41c0
jmp 0x17295
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x41c0
jmp 0x172a4
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x41c0
jmp 0x172b5
jmp 0x172b2
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x41c0
movq %rbx, %rdi
callq 0x4700