// File: kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/dump.cpp
// Function: AST_function::dump(std::ostream&, int)
void AST_function::dump(ostream &strm, int indentation){
    strm << setw(3) << line << ": ";
    dump_indentation(strm, indentation);
    
    strm << "Declaration of Function " 
         << func->getName()
         << " -> "
         << types.types[func->getType()]->name
         << endl;
    
    strm << setw(3)
         << (formal_parameters->args.size() ? formal_parameters->line : line)
         << ":     (" << endl;
    dump_indentation(strm, indentation);
    
    formal_parameters->dump(strm, indentation+1);

    strm << setw(3)
         << (formal_parameters->args.size() ?
            formal_parameters->args.back()->getLine() : line)
         << ":     )" << endl;
    
    instructions->dump(strm, indentation+1);
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movl %edx, 0xb4(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x3, %edi
callq 0x1fc70
movq 0x50(%rsp), %rdi
movl %eax, 0xb0(%rsp)
movl 0xb0(%rsp), %esi
callq 0x6450
movq %rax, %rdi
movq 0x58(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x6690
movq %rax, %rdi
leaq 0x4a95f(%rip), %rsi     # 0x526a3
callq 0x6370
movq 0xb8(%rsp), %rdi
movl 0xb4(%rsp), %esi
callq 0x78a0
movq 0xb8(%rsp), %rdi
leaq 0x4a74c(%rip), %rsi     # 0x524b8
callq 0x6370
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x60(%rsp)
movq 0x98(%rax), %rsi
leaq 0x90(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x295b0
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x6340
movq %rax, 0x70(%rsp)
jmp 0x7dad
movq 0x70(%rsp), %rdi
leaq 0x4a718(%rip), %rsi     # 0x524d1
callq 0x6370
movq %rax, 0x48(%rsp)
jmp 0x7dc5
movq 0x58(%rsp), %rax
movq 0x98(%rax), %rdi
callq 0x295f0
movl %eax, 0x44(%rsp)
jmp 0x7ddc
movl 0x44(%rsp), %eax
movslq %eax, %rsi
leaq 0x666f6(%rip), %rdi     # 0x6e4e0
callq 0x1fc90
movq 0x48(%rsp), %rdi
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x6340
movq %rax, 0x38(%rsp)
jmp 0x7e07
movq 0x38(%rsp), %rdi
movq 0x66185(%rip), %rsi     # 0x6df98
callq 0x63d0
jmp 0x7e1a
leaq 0x90(%rsp), %rdi
callq 0x6778
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x3, %edi
callq 0x1fc70
movq 0x28(%rsp), %rdi
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %esi
callq 0x6450
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x30(%rsp)
movq 0xa0(%rax), %rdi
addq $0x10, %rdi
callq 0x1fcb0
cmpq $0x0, %rax
je 0x7e8e
movq 0x58(%rsp), %rax
movq 0xa0(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x7e9a
movq 0x58(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x6690
movq %rax, %rdi
leaq 0x4a624(%rip), %rsi     # 0x524d6
callq 0x6370
movq %rax, %rdi
movq 0x660d7(%rip), %rsi     # 0x6df98
callq 0x63d0
movq 0xb8(%rsp), %rdi
movl 0xb4(%rsp), %esi
callq 0x78a0
movq 0x58(%rsp), %rax
movq 0xa0(%rax), %rdi
movq 0xb8(%rsp), %rsi
movl 0xb4(%rsp), %edx
addl $0x1, %edx
movq (%rdi), %rax
callq *(%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x3, %edi
callq 0x1fc70
movq 0x10(%rsp), %rdi
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %esi
callq 0x6450
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq 0xa0(%rax), %rdi
addq $0x10, %rdi
callq 0x1fcb0
cmpq $0x0, %rax
je 0x7f6c
movq 0x58(%rsp), %rax
movq 0xa0(%rax), %rdi
addq $0x10, %rdi
callq 0x1fcd0
movq (%rax), %rdi
callq 0x29600
movl %eax, 0xc(%rsp)
jmp 0x7f78
movq 0x58(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x6690
movq %rax, %rdi
leaq 0x4a54e(%rip), %rsi     # 0x524de
callq 0x6370
movq %rax, %rdi
movq 0x65ff9(%rip), %rsi     # 0x6df98
callq 0x63d0
movq 0x58(%rsp), %rax
movq 0xa8(%rax), %rdi
movq 0xb8(%rsp), %rsi
movl 0xb4(%rsp), %edx
addl $0x1, %edx
movq (%rdi), %rax
callq *(%rax)
addq $0xc8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6778
movq 0x88(%rsp), %rdi
callq 0x66b0
nopl (%rax)