// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x40(%rbp)
movq %rdx, %r14
movq %rdi, %r15
movq %rcx, -0x68(%rbp)
movq %rcx, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
testq %rsi, %rsi
je 0x17fc8
leaq 0x2d6e1(%rip), %rax     # 0x45694
leaq 0x2d6de(%rip), %rdi     # 0x45698
testb %r8b, %r8b
cmovneq %rax, %rdi
xorl %eax, %eax
callq 0x4070
movq -0x38(%rbp), %r12
movq %r12, %rsi
shlq $0x5, %rsi
addq (%r15), %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x1a894
movq (%rbx), %rdx
leaq 0x2d6b0(%rip), %rdi     # 0x4569c
movq %r12, %rsi
xorl %eax, %eax
callq 0x4070
movq (%rbx), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18007
callq 0x42b0
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x1, (%rax,%rcx)
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
cmpq $0x2, -0x68(%rbp)
jb 0x1804f
movl $0x1, %r13d
leaq 0x2d669(%rip), %r12     # 0x456a4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x45c0
incq %r13
cmpq -0x68(%rbp), %r13
jb 0x1803b
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x1806d
movq (%rax), %rdx
movq -0x60(%rbp), %rsi
movb $0x7c, -0x1(%rsi,%rdx,2)
addq $0x8, %rax
jmp 0x18056
movq 0x60(%r15), %rcx
movq -0x38(%rbp), %rax
leaq (%rax,%rax,2), %rbx
movq (%rcx,%rbx,8), %rax
cmpq %rax, 0x8(%rcx,%rbx,8)
je 0x18186
xorl %r12d, %r12d
movq (%rax,%r12,8), %r13
movq -0x60(%rbp), %rsi
leaq 0x2e839(%rip), %rdi     # 0x468d3
xorl %eax, %eax
callq 0x4070
movq 0x8(%r14), %rsi
cmpq %rsi, (%r14)
je 0x180b4
movq -0x8(%rsi), %rax
cmpq -0x30(%rbp), %rax
jae 0x180d7
cmpq 0x10(%r14), %rsi
je 0x180cb
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
jmp 0x180d7
movq %r14, %rdi
leaq -0x30(%rbp), %rdx
callq 0x19bda
movq 0x60(%r15), %rax
movq 0x8(%rax,%rbx,8), %rcx
subq (%rax,%rbx,8), %rcx
sarq $0x3, %rcx
decq %rcx
cmpq %rcx, %r12
jne 0x1814a
movq (%r14), %rdi
movq 0x8(%r14), %rsi
leaq -0x30(%rbp), %rdx
callq 0x19df1
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
je 0x18129
leaq 0x8(%rax), %rsi
cmpq %rdx, %rsi
je 0x18121
subq %rsi, %rdx
movq %rax, %rdi
callq 0x44f0
movq 0x8(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0x8(%r14)
movq -0x30(%rbp), %rcx
incq %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x1, %r8d
movq -0x40(%rbp), %r9
callq 0x17f80
jmp 0x18166
movq -0x30(%rbp), %rcx
incq %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
movq -0x40(%rbp), %r9
callq 0x17f80
incq %r12
movq 0x60(%r15), %rcx
movq (%rcx,%rbx,8), %rax
movq 0x8(%rcx,%rbx,8), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x1808b
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x18198
callq 0x42b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x181ab
jmp 0x181ab
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x181c0
callq 0x42b0
movq %rbx, %rdi
callq 0x4560