// File: /workspace/github_cpp_makefile_star2_O3/taurheim[P]AgNES/./util/astUtil.h
// Function: printNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, ASTNode*)
static void printNode(std::string indent, bool last, ASTNode * node) {
    std::string nodeString;
    switch(node->nodeType) {
        case AST_IDENTIFIER: {
            IdentifierNode * identifier = static_cast<IdentifierNode*>(node);
            nodeString = "Identifier: ";
            nodeString.append(identifier->name);
            break;
        }
        case AST_TYPE: {
            TypeNode * type = static_cast<TypeNode*>(node);
            nodeString = "Type: ";
            auto search = varTypeToString.find(type->varType);
            if (search != varTypeToString.end()) {
                nodeString.append(search->second);
            } else {
                nodeString.append("ASTUTIL::TYPE_NOT_FOUND");
            }
            break;
        }
        case AST_OPERATOR: {
            OpNode * op = static_cast<OpNode*>(node);
            nodeString = "Operator: ";
            nodeString.append(op->operation);
            break;
        }
        case AST_STATEMENT: {
            StatementNode * statement = static_cast<StatementNode*>(node);
            nodeString = "Statement (type: ";
            nodeString.append(statementTypeToString[statement->type]);
            nodeString.append(")");
            break;
        }
        case AST_NUMBER: {
            NumberNode * number = static_cast<NumberNode*>(node);
            nodeString = "Number: ";
            nodeString.append(std::to_string(number->value));
            break;
        }
        case AST_CHAR: {
            CharNode * charNode = static_cast<CharNode*>(node);
            nodeString = "Char: ";
            nodeString.append(std::string(1,charNode->value));
            break;
        }
        default: {
            auto search = nodeTypeToString.find(node->nodeType);
            if (search != nodeTypeToString.end()) {
                nodeString = search->second;
            } else {
                nodeString = "NOTFOUND";
            }
        }
    }

    std::cout << indent;

    if (last) {
        std::cout << "\\-";
        indent.append(" ");
    } else {
        std::cout << "|-";
        indent.append("| ");
    }

    std::cout << nodeString << std::endl;

    for(auto it = node->children.begin(); it != node->children.end(); ++it ){
        bool isLast = std::next(it) == node->children.end();
        printNode(indent, isLast, *it);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, -0x58(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rdx, -0x30(%rbp)
movl (%rdx), %eax
leal -0x4(%rax), %ecx
cmpl $0xe, %ecx
ja 0xa041
leaq 0x83ec(%rip), %rdx      # 0x12320
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x8591(%rip), %rcx      # 0x124d5
leaq -0x50(%rbp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
jmp 0xa228
leaq 0x856a(%rip), %rcx      # 0x124e2
leaq -0x50(%rbp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq 0xe40e(%rip), %rdx      # 0x183a0
testq %rdx, %rdx
je 0x9fd1
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
leaq 0xe3f3(%rip), %rax      # 0x18398
xorl %esi, %esi
cmpl %ecx, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rax
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x9fa5
leaq 0xe3d5(%rip), %rdx      # 0x18398
cmpq %rdx, %rax
je 0x9fd1
cmpl 0x20(%rax), %ecx
jge 0xa1bd
leaq 0x8511(%rip), %rsi      # 0x124e9
leaq -0x50(%rbp), %rdi
callq 0x3460
jmp 0xa228
leaq 0x853a(%rip), %rcx      # 0x12527
leaq -0x50(%rbp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq -0x30(%rbp), %rax
movsbl 0x20(%rax), %edx
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0x78(%rbp), %rdi
movl $0x1, %esi
callq 0x32e0
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
jne 0xa223
jmp 0xa228
movq 0xe3b8(%rip), %rcx      # 0x18400
testq %rcx, %rcx
je 0xa07f
leaq 0xe3a4(%rip), %rsi      # 0x183f8
xorl %edx, %edx
cmpl %eax, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rsi
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0xa054
leaq 0xe387(%rip), %rcx      # 0x183f8
cmpq %rcx, %rsi
je 0xa07f
cmpl 0x20(%rsi), %eax
jge 0xa1ae
leaq 0x83d7(%rip), %rcx      # 0x1245d
leaq -0x50(%rbp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
jmp 0xa228
leaq 0x8479(%rip), %rcx      # 0x1251e
leaq -0x50(%rbp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq -0x30(%rbp), %rax
movl 0x20(%rax), %r12d
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %r15d
cmpl $0xa, %r13d
jb 0xa1d9
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r13d, %ecx
cmpl $0x63, %ecx
jbe 0xa1d0
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xa1d6
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xa1d9
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xa0e8
addl $-0x3, %r15d
jmp 0xa1d9
leaq 0x83db(%rip), %rcx      # 0x1250c
leaq -0x50(%rbp), %rdi
movl $0x11, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq -0x30(%rbp), %rax
leaq 0x20(%rax), %rsi
leaq 0xe2cd(%rip), %rdi      # 0x18420
callq 0xa5fc
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
leaq 0x8192(%rip), %rsi      # 0x12301
leaq -0x50(%rbp), %rdi
callq 0x3460
jmp 0xa228
leaq 0x837d(%rip), %rcx      # 0x12501
leaq -0x50(%rbp), %rdi
movl $0xa, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
jmp 0xa228
addq $0x28, %rsi
leaq -0x50(%rbp), %rdi
callq 0x3180
jmp 0xa228
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
jmp 0xa228
addl $-0x2, %r15d
jmp 0xa1d9
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
leaq -0x78(%rbp), %rdi
movl $0x2d, %edx
callq 0x32e0
addq -0x78(%rbp), %r12
movq %r12, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0xa88a
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30f0
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0xa228
callq 0x3250
movq -0x58(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0xdd96(%rip), %rdi      # 0x17fd0
callq 0x32d0
testb %bl, %bl
je 0xa264
movq 0xdd86(%rip), %rdi      # 0x17fd0
leaq 0x82dd(%rip), %rsi      # 0x1252e
movl $0x2, %edx
callq 0x32d0
leaq 0x85f0(%rip), %rsi      # 0x12852
jmp 0xa283
movq 0xdd65(%rip), %rdi      # 0x17fd0
leaq 0x82bf(%rip), %rsi      # 0x12531
movl $0x2, %edx
callq 0x32d0
leaq 0x82b1(%rip), %rsi      # 0x12534
movq -0x58(%rbp), %rdi
callq 0x3460
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0xdd35(%rip), %rdi      # 0x17fd0
callq 0x32d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r14
movq 0x10(%rax), %r13
cmpq %r13, %r14
je 0xa33f
leaq -0x88(%rbp), %r12
leaq -0x98(%rbp), %r15
movq %r12, -0x98(%rbp)
movq -0x58(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6906
leaq 0x8(%r14), %rbx
xorl %esi, %esi
cmpq %r13, %rbx
sete %sil
movq (%r14), %rdx
movq %r15, %rdi
callq 0x9ef1
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0xa32f
callq 0x3250
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r13
movq %rbx, %r14
cmpq %r13, %rbx
jne 0xa2e9
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa351
callq 0x3250
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
jne 0xa3a6
jmp 0xa3ab
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
jne 0xa3a6
jmp 0xa3ab
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
jmp 0xa392
movq %rax, %rbx
jmp 0xa3ab
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0xa3ab
callq 0x3250
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa3bd
callq 0x3250
movq %rbx, %rdi
callq 0x3420
nop