// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/to_tac.cpp
// Function: AST_parameters_list::to_tac(Tac*)
void AST_parameters_list::to_tac(Tac* t){
    vector<opd*> params;
    for (vector< AST_expression* >::iterator it = elem.begin();
         it != elem.end(); ++ it)
    {
        opd *v = (*it)->to_tac(t), *o = new opd();
        if ((*it)->type == BOOLEAN) {
            t->backpatch((*it)->truelist, t->next_instruction() );
            t->append_quad(inst::CP, o, new opd(true), 0,
                                    "argumento de función booleano (true)");
            t->append_quad(inst::GOTO, 0, 0,
                            new opd(t->next_instruction() + 2, O_LABEL),
                                "salto después de asignar el valor booleano");

            t->backpatch( (*it)->falselist, t->next_instruction() );
            t->append_quad(inst::CP, o, new opd(false), 0,
                                    "argumento de función booleano (false)");
        } else {
            t->append_quad(inst::CP, o, v, 0,
                                    "argumento de función no booleano");
        }
        params.push_back(o);
    }
    for (vector< opd* >::iterator it = params.begin();
         it != params.end(); ++ it)
    {
        t->append_quad(inst::PARAM, *it, 0, 0,"argumento de función");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rdi, 0x30(%rsp)
movq 0x10(%rdi), %r14
leaq 0xb8(%rsp), %r12
movq 0x30(%rsp), %rax
cmpq 0x18(%rax), %r14
je 0xf0fa
movq (%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rax, %rbp
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
callq 0x18148
movq %r15, 0x8(%rsp)
movq (%r14), %r13
cmpl $0x6, 0x10(%r13)
jne 0xf0ab
movq %rbx, %rdi
callq 0x2138a
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x21394
movq 0x8(%rsp), %rbp
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
pushq $0x1
popq %rsi
callq 0x1837e
movq %r12, %r13
movq %r12, %rdi
leaq 0x15aef(%rip), %rsi     # 0x24aaf
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x212de
movq %r13, %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %rbp
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
movq %rbp, %rdi
movl %eax, %esi
pushq $0x6
popq %rdx
callq 0x1815e
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0x14ff4(%rip), %rsi     # 0x24011
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
pushq $0x16
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbp, %r8
movq %r15, %r9
callq 0x212de
movq %r15, %rdi
callq 0x65c8
movq (%r14), %r15
movq %rbx, %rdi
callq 0x2138a
addq $0x30, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq 0x8(%rsp), %rbp
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x78(%rsp), %r13
movq %r13, %rdi
leaq 0x15a4c(%rip), %rsi     # 0x24ad5
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x212de
jmp 0xf0da
leaq 0x58(%rsp), %r13
movq %r13, %rdi
leaq 0x15a42(%rip), %rsi     # 0x24afc
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x212de
movq %r13, %rdi
callq 0x65c8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x124e6
addq $0x8, %r14
jmp 0xef3b
movq 0x10(%rsp), %r14
leaq 0x38(%rsp), %r15
leaq 0x8(%rsp), %r12
pushq $0x2
popq %rbp
cmpq 0x18(%rsp), %r14
je 0xf14b
movq (%r14), %r13
movq %r15, %rdi
leaq 0x159fe(%rip), %rsi     # 0x24b1e
movq %r12, %rdx
callq 0x6d6c
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
callq 0x212de
movq %r15, %rdi
callq 0x65c8
addq $0x8, %r14
jmp 0xf10c
leaq 0x10(%rsp), %rdi
callq 0x12b94
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf1cf
jmp 0xf1bf
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0xf1ab
jmp 0xf1cf
jmp 0xf1bf
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0xf1ab
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0xf1ab
jmp 0xf1cf
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0xf1ab
jmp 0xf1cf
jmp 0xf1cf
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x65c8
jmp 0xf1d2
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %rbp, %rdi
jmp 0xf1c8
jmp 0xf1cf
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x62e0
jmp 0xf1d2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x12b94
movq %rbx, %rdi
callq 0x6530