// File: kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/to_tac.cpp
// Function: AST_function_call::to_tac(Tac*)
opd *AST_function_call::to_tac(Tac* t){
    params->to_tac(t);
    if (returns_value) {
        opd *o = new opd();
        t->append_quad(inst::CALL, o, new opd(sym), 0, "llamada de función guardada en el primer argumento");
        return o;
    }
    t->append_quad(inst::EXEC, new opd(sym), 0, 0, "llamada de función guardada en el primer argumento");
    return 0;
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x80(%rax), %rdi
movq 0xb0(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x40(%rsp), %rax
testb $0x1, 0x78(%rax)
je 0x18d98
movl $0x18, %edi
callq 0x6390
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x38(%rsp)
callq 0x37ff0
jmp 0x18c44
movq 0x38(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, %rdi
movq 0x40(%rsp), %rax
movq %rdi, %rcx
movq %rcx, 0x30(%rsp)
movq 0x70(%rax), %rsi
callq 0x37fd0
jmp 0x18c90
leaq 0x77(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x66c0
movq 0x18(%rsp), %rdx
leaq 0x3adbc(%rip), %rsi     # 0x53a67
leaq 0x78(%rsp), %rdi
callq 0x7500
jmp 0x18cb7
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %esi
leaq 0x78(%rsp), %r9
callq 0x4de80
jmp 0x18cdc
leaq 0x78(%rsp), %rdi
callq 0x6778
leaq 0x77(%rsp), %rdi
callq 0x6400
movq 0xa8(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0x18e99
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x18ea9
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x18ea9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x18d89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x6778
leaq 0x77(%rsp), %rdi
callq 0x6400
jmp 0x18ea9
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, %rdi
movq 0x40(%rsp), %rax
movq %rdi, %rcx
movq %rcx, 0x10(%rsp)
movq 0x70(%rax), %rsi
callq 0x37fd0
jmp 0x18dca
leaq 0x4f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x66c0
movq (%rsp), %rdx
leaq 0x3ac84(%rip), %rsi     # 0x53a67
leaq 0x50(%rsp), %rdi
callq 0x7500
jmp 0x18def
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movl $0x8, %esi
leaq 0x50(%rsp), %r9
movq %r8, %rcx
callq 0x4de80
jmp 0x18e12
leaq 0x50(%rsp), %rdi
callq 0x6778
leaq 0x4f(%rsp), %rdi
callq 0x6400
movq $0x0, 0xc0(%rsp)
jmp 0x18e99
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x18ea9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x18e8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6778
leaq 0x4f(%rsp), %rdi
callq 0x6400
jmp 0x18ea9
movq 0xc0(%rsp), %rax
addq $0xc8, %rsp
retq
movq 0xa0(%rsp), %rdi
callq 0x66b0
nopw %cs:(%rax,%rax)