// File: acliusBackHome[P]kamaya/dist/ParseTree.cpp
// Function: ParseTree::print_node(unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>&, unsigned long, bool, bool*) const
void ParseTree::print_node(size_t node_id, vector<size_t> &has_next_children,
                           size_t depth, bool last_child, bool *vis) const {
    if (node_id != 0) {
        if (last_child) {
            printf(" |_");
        } else {
            printf(" |-");
        }
    }
    try {
        printf("%zu:%s\n", node_id, nodes[node_id].get_node_info().c_str());
    } catch (ParseException &ext) {
        printf("!ExceptionNode %zu:%s\n", node_id, ParseNode::get_node_type_name(nodes[node_id].type).c_str());
    }
    vis[node_id] = true;
    string pre_fix;
    for (size_t i = 1; i < depth; ++i) {
        pre_fix.append("  ");
    }
    for (auto each : has_next_children) {
        pre_fix[1 + 2 * (each - 1)] = '|';
    }
    for (size_t i = 0; i < node_children[node_id].size(); ++i) {
        size_t next_node = node_children[node_id][i];
        printf("%s", pre_fix.c_str());
        if (has_next_children.empty() || has_next_children[has_next_children.size() - 1] < depth) {
            has_next_children.push_back(depth);
        }
        if (i == node_children[node_id].size() - 1) {
            auto it = find(has_next_children.begin(), has_next_children.end(), depth);
            if (it != has_next_children.end()) {
                has_next_children.erase(it);
            }
            print_node(next_node, has_next_children, depth + 1, true, vis);
        } else {
            print_node(next_node, has_next_children, depth + 1, false, vis);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3225f
testb $0x1, -0x21(%rbp)
je 0x3224f
leaq 0x5d471(%rip), %rdi     # 0x8f6b7
movb $0x0, %al
callq 0x4080
jmp 0x3225d
leaq 0x5d465(%rip), %rdi     # 0x8f6bb
movb $0x0, %al
callq 0x4080
jmp 0x3225f
movq -0x118(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq %rsi, -0x120(%rbp)
callq 0x34220
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x3c390
movq -0x128(%rbp), %rdi
callq 0x4180
movq -0x120(%rbp), %rsi
movq %rax, %rdx
leaq 0x5d428(%rip), %rdi     # 0x8f6ce
xorl %eax, %eax
callq 0x4080
jmp 0x322af
leaq -0x50(%rbp), %rdi
callq 0x4688
jmp 0x32353
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4688
movl -0x5c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x326ed
movq -0x58(%rbp), %rdi
callq 0x4170
movq -0x118(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x130(%rbp)
callq 0x34220
movl 0x18(%rax), %esi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3bcf0
movq -0x138(%rbp), %rdi
callq 0x4180
movq -0x130(%rbp), %rsi
movq %rax, %rdx
leaq 0x5d386(%rip), %rdi     # 0x8f6bf
xorl %eax, %eax
callq 0x4080
jmp 0x32342
leaq -0x88(%rbp), %rdi
callq 0x4688
callq 0x4570
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x1, (%rax,%rcx)
leaq -0xa8(%rbp), %rdi
callq 0x4460
movq $0x1, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x323ef
leaq 0x5d34c(%rip), %rsi     # 0x8f6d6
leaq -0xa8(%rbp), %rdi
callq 0x4630
jmp 0x32398
jmp 0x3239a
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x32376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4688
callq 0x4570
jmp 0x323cd
jmp 0x326ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4688
jmp 0x326ed
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x34240
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x34270
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x342a0
testb $0x1, %al
jne 0x32439
jmp 0x32488
leaq -0xc0(%rbp), %rdi
callq 0x342e0
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
leaq -0x1(%rax,%rax), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x4670
movq %rax, -0x140(%rbp)
jmp 0x32470
movq -0x140(%rbp), %rax
movb $0x7c, (%rax)
leaq -0xc0(%rbp), %rdi
callq 0x34300
jmp 0x32420
movq $0x0, -0xd8(%rbp)
movq -0x118(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq %rax, -0x148(%rbp)
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
callq 0x34320
movq %rax, %rdi
callq 0x16570
movq %rax, %rcx
movq -0x148(%rbp), %rax
cmpq %rcx, %rax
jae 0x326d8
movq -0x118(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
callq 0x34320
movq %rax, %rdi
movq -0xd8(%rbp), %rsi
callq 0x165e0
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x5e53e(%rip), %rdi     # 0x90a51
xorl %eax, %eax
callq 0x4080
jmp 0x3251c
movq -0x18(%rbp), %rdi
callq 0x167a0
testb $0x1, %al
jne 0x32559
movq -0x18(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x18(%rbp), %rdi
callq 0x16570
movq -0x150(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x34060
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x3256a
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x340c0
jmp 0x32568
jmp 0x3256a
movq -0x118(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq %rax, -0x158(%rbp)
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
callq 0x34320
movq %rax, %rdi
callq 0x16570
movq %rax, %rcx
movq -0x158(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x32696
movq -0x18(%rbp), %rdi
callq 0x34240
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x34270
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x34340
movq %rax, -0x160(%rbp)
jmp 0x325eb
movq -0x160(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x34270
movq %rax, -0x100(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x342a0
testb $0x1, %al
jne 0x32622
jmp 0x3266a
movq -0x18(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x34400
movq -0x170(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x34390
movq %rax, -0x168(%rbp)
jmp 0x3265c
movq -0x168(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x118(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
incq %rcx
movq -0x30(%rbp), %r9
movl $0x1, %r8d
callq 0x32200
jmp 0x32694
jmp 0x326bf
movq -0x118(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
incq %rcx
movq -0x30(%rbp), %r9
xorl %r8d, %r8d
callq 0x32200
jmp 0x326bd
jmp 0x326bf
jmp 0x326c1
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x32493
leaq -0xa8(%rbp), %rdi
callq 0x4688
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x45e0
movq %rax, %rdi
callq 0x16180
nop