// File: 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:
subq $0x218, %rsp            # imm = 0x218
movq %rdi, 0x210(%rsp)
movq %rsi, 0x208(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x20b20
movq 0xe0(%rsp), %rdi
addq $0x10, %rdi
callq 0x20070
movq %rax, 0x1e8(%rsp)
movq 0xe0(%rsp), %rdi
addq $0x10, %rdi
callq 0x200e0
movq %rax, 0x1e0(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x200a0
testb $0x1, %al
jne 0x19154
jmp 0x19761
leaq 0x1e8(%rsp), %rdi
callq 0x20110
movq (%rax), %rdi
movq 0x208(%rsp), %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movq %rax, 0xd8(%rsp)
jmp 0x1917f
movq 0xd8(%rsp), %rax
movq %rax, 0x1d8(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, 0xd0(%rsp)
jmp 0x191a3
movq 0xd0(%rsp), %rdi
callq 0x37ff0
jmp 0x191b2
movq 0xd0(%rsp), %rax
movq %rax, 0x1c0(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x20110
movq (%rax), %rax
cmpl $0x6, 0x10(%rax)
jne 0x1965a
movq 0x208(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x20110
movq (%rax), %rax
addq $0x18, %rax
movq %rax, 0xc0(%rsp)
movq 0x208(%rsp), %rdi
callq 0x4dfb0
movl %eax, 0xcc(%rsp)
jmp 0x1921e
movl 0xcc(%rsp), %edx
movq 0xc0(%rsp), %rsi
movq 0xb8(%rsp), %rdi
callq 0x4dfc0
jmp 0x1923c
movq 0x208(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x1c0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, 0xb0(%rsp)
jmp 0x19270
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
callq 0x38470
jmp 0x19284
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x66c0
movq 0x98(%rsp), %rdx
leaq 0x3a7f3(%rip), %rsi     # 0x53a9b
leaq 0x1a0(%rsp), %rdi
callq 0x7500
jmp 0x192b7
movq 0xb0(%rsp), %rcx
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
movl %esi, %r8d
leaq 0x1a0(%rsp), %r9
callq 0x4de80
jmp 0x192e3
leaq 0x1a0(%rsp), %rdi
callq 0x6778
leaq 0x19f(%rsp), %rdi
callq 0x6400
movq 0x208(%rsp), %rax
movq %rax, 0x88(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, 0x90(%rsp)
jmp 0x19321
movq 0x208(%rsp), %rdi
callq 0x4dfb0
movl %eax, 0x84(%rsp)
jmp 0x19337
movq 0x90(%rsp), %rdi
movl 0x84(%rsp), %esi
addl $0x2, %esi
movl $0x6, %edx
callq 0x38010
jmp 0x19355
leaq 0x177(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x66c0
movq 0x78(%rsp), %rdx
leaq 0x39c8a(%rip), %rsi     # 0x52ffd
leaq 0x178(%rsp), %rdi
callq 0x7500
jmp 0x19382
movq 0x90(%rsp), %r8
movq 0x88(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x16, %esi
leaq 0x178(%rsp), %r9
movq %rcx, %rdx
callq 0x4de80
jmp 0x193ad
leaq 0x178(%rsp), %rdi
callq 0x6778
leaq 0x177(%rsp), %rdi
callq 0x6400
movq 0x208(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x20110
movq (%rax), %rax
addq $0x30, %rax
movq %rax, 0x68(%rsp)
movq 0x208(%rsp), %rdi
callq 0x4dfb0
movl %eax, 0x74(%rsp)
jmp 0x19400
movl 0x74(%rsp), %edx
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdi
callq 0x4dfc0
jmp 0x19415
movq 0x208(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x1c0(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x18, %edi
callq 0x6390
movq %rax, 0x58(%rsp)
jmp 0x19440
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x38470
jmp 0x1944e
leaq 0x14f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x66c0
movq 0x40(%rsp), %rdx
leaq 0x3a655(%rip), %rsi     # 0x53ac1
leaq 0x150(%rsp), %rdi
callq 0x7500
jmp 0x1947b
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movl %esi, %r8d
leaq 0x150(%rsp), %r9
callq 0x4de80
jmp 0x1949e
leaq 0x150(%rsp), %rdi
callq 0x6778
leaq 0x14f(%rsp), %rdi
callq 0x6400
jmp 0x19736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x198a5
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x198a5
movq 0xb0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x198a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x19563
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x6778
leaq 0x19f(%rsp), %rdi
callq 0x6400
jmp 0x198a5
movq 0x90(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x198a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x195d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x6778
leaq 0x177(%rsp), %rdi
callq 0x6400
jmp 0x198a5
movq 0x58(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
movl $0x18, %esi
callq 0x63a0
jmp 0x198a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x19648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x6778
leaq 0x14f(%rsp), %rdi
callq 0x6400
jmp 0x198a5
movq 0x208(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x1c0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x127(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x66c0
movq 0x38(%rsp), %rdx
leaq 0x3a449(%rip), %rsi     # 0x53ae8
leaq 0x128(%rsp), %rdi
callq 0x7500
jmp 0x196ae
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl %esi, %r8d
leaq 0x128(%rsp), %r9
callq 0x4de80
jmp 0x196d1
leaq 0x128(%rsp), %rdi
callq 0x6778
leaq 0x127(%rsp), %rdi
callq 0x6400
jmp 0x19736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x19724
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x6778
leaq 0x127(%rsp), %rdi
callq 0x6400
jmp 0x198a5
leaq 0x1f0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x20b30
jmp 0x1974d
jmp 0x1974f
leaq 0x1e8(%rsp), %rdi
callq 0x20120
jmp 0x1911d
leaq 0x1f0(%rsp), %rdi
callq 0x20ba0
movq %rax, 0x118(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x20c10
movq %rax, 0x110(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x20bd0
testb $0x1, %al
jne 0x197a9
jmp 0x19890
movq 0x208(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x20c40
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x66c0
movq 0x18(%rsp), %rdx
leaq 0x3a321(%rip), %rsi     # 0x53b0a
leaq 0xf0(%rsp), %rdi
callq 0x7500
jmp 0x197f8
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movl $0x2, %esi
leaq 0xf0(%rsp), %r9
movq %r8, %rcx
callq 0x4de80
jmp 0x1981e
leaq 0xf0(%rsp), %rdi
callq 0x6778
leaq 0xef(%rsp), %rdi
callq 0x6400
leaq 0x118(%rsp), %rdi
callq 0x20c50
jmp 0x19776
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x19881
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x6778
leaq 0xef(%rsp), %rdi
callq 0x6400
jmp 0x198a5
leaq 0x1f0(%rsp), %rdi
callq 0x20c70
addq $0x218, %rsp            # imm = 0x218
retq
leaq 0x1f0(%rsp), %rdi
callq 0x20c70
movq 0x1d0(%rsp), %rdi
callq 0x66b0
nop