// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/to_tac.cpp
// Function: AST_print::to_tac(Tac*)
void AST_print::to_tac(Tac* t){
    for (vector<AST_expression*>::iterator it = list.begin(); it != list.end(); ++ it) {
        if ( (*it)->type == BOOLEAN){
            (*it)->to_tac(t);
            t->backpatch( (*it)->truelist, t->next_instruction() );
            t->backpatch( (*it)->falselist, t->next_instruction() + 2 );
            t->append_quad(inst::WRITE, new opd(true), 0, 0, "imprimir bool true a salida estándar");
            t->append_quad(inst::GOTO, 0, 0, new opd(t->next_instruction() + 2, O_LABEL), "impreso bool true a salida estándar");
            t->append_quad(inst::WRITE, new opd(false), 0, 0, "imprimir bool false a salida estándar");
        } else {
            t->append_quad(inst::WRITE, (*it)->to_tac(t), 0, 0, "imprimir a salida estándar");
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq 0x78(%rdi), %r14
leaq 0x78(%rsp), %r12
movq 0x8(%rsp), %rax
cmpq 0x80(%rax), %r14
je 0x10915
movq %r12, %rbp
movq (%r14), %rdi
movl 0x10(%rdi), %r12d
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
cmpl $0x6, %r12d
movq %r14, 0x10(%rsp)
jne 0x108ca
movq (%r14), %r15
addq $0x18, %r15
movq %rbx, %rdi
callq 0x2138a
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x21394
movq (%r14), %r15
addq $0x30, %r15
movq %rbx, %rdi
callq 0x2138a
leal 0x2(%rax), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21394
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
pushq $0x1
popq %rsi
callq 0x1837e
movq %rbp, %r12
movq %rbp, %rdi
leaq 0x147f2(%rip), %rsi     # 0x24ff2
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
pushq $0xa
popq %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x212de
movq %r12, %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rbx, %rdi
callq 0x2138a
addl $0x2, %eax
movq %r15, %rdi
movl %eax, %esi
pushq $0x6
popq %rdx
callq 0x1815e
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
leaq 0x147be(%rip), %rsi     # 0x25018
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
pushq $0x16
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movq %rbp, %r9
callq 0x212de
movq %rbp, %rdi
callq 0x65c8
pushq $0x18
popq %rdi
callq 0x62d0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x1837e
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
leaq 0x14798(%rip), %rsi     # 0x2503d
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbx, %rdi
pushq $0xa
popq %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0x212de
movq %rbp, %rdi
jmp 0x10902
movq %rax, %r13
leaq 0x18(%rsp), %r15
movq %r15, %rdi
leaq 0x14788(%rip), %rsi     # 0x25064
leaq 0x7(%rsp), %rdx
callq 0x6d6c
movq %rbp, %r12
movq %rbx, %rdi
pushq $0xa
popq %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
callq 0x212de
movq %r15, %rdi
callq 0x65c8
movq 0x10(%rsp), %r14
addq $0x8, %r14
jmp 0x10770
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1094d
jmp 0x10963
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x1095c
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x1095c
jmp 0x1094d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x1095c
jmp 0x1094d
movq %rax, %rbx
jmp 0x10971
jmp 0x10963
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x65c8
jmp 0x10971
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x62e0
movq %rbx, %rdi
callq 0x6530
nop