// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/to_tac.cpp
// Function: AST_conversion::to_tac(Tac*)
opd *AST_conversion::to_tac(Tac* t){
    opd *v = expr->to_tac(t);
    if (0 == v) {
        v = new opd();
    } else if (O_TEMP != v->type) {
        opd *o = new opd();
        t->append_quad(inst::CP, o, v, 0, "la conversión de tipos requiere a juro un temporal");
        v = o;
    }
    if (BOOLEAN == expr->type) {
        t->backpatch(expr->truelist, t->next_instruction() );
        t->append_quad(inst::CP, v, new opd(true), 0, "asignación de valor booleano (true) obtenido al lvalue");
        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( expr->falselist, t->next_instruction() );
        t->append_quad(inst::CP, v, new opd(false), 0, "asignación de valor booleano (false) obtenido al lvalue");
    }
    t->append_quad(inst::CONV, v, v, 0, string("conversión de tipo ") + PRINT_TYPE(original_type) + " a " + PRINT_TYPE(type));
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %r15
movq 0x50(%rdi), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testq %rax, %rax
je 0x1169d
movq %rax, %r12
cmpb $0x1, 0x10(%rax)
jne 0x116b4
movq %r12, %rbx
jmp 0x11726
movl $0x18, %edi
callq 0x62e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x1cfb4
jmp 0x11726
movl $0x18, %edi
callq 0x62e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x1cfb4
leaq 0xf8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1c2a4(%rip), %rsi     # 0x2d980
leaq 0x1c2d0(%rip), %rdx     # 0x2d9b3
leaq 0xe8(%rsp), %r13
movq %r13, %rdi
callq 0x6fec
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x2ae24
movq 0xe8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11726
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x50(%r15), %r12
cmpl $0x6, 0x10(%r12)
jne 0x118dc
addq $0x18, %r12
movq %r14, %rdi
callq 0x2af04
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x2af0e
movl $0x18, %edi
callq 0x62e0
movq %rax, %r12
movq %rax, %rdi
movl $0x1, %esi
callq 0x1d36e
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1c238(%rip), %rsi     # 0x2d9b4
leaq 0x1c268(%rip), %rdx     # 0x2d9eb
leaq 0xc8(%rsp), %r13
movq %r13, %rdi
callq 0x6fec
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x2ae24
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x117c6
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x62f0
movl $0x18, %edi
callq 0x62e0
movq %rax, %r12
movq %r14, %rdi
callq 0x2af04
addl $0x2, %eax
movq %r12, %rdi
movl %eax, %esi
movl $0x6, %edx
callq 0x1cfca
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1b811(%rip), %rsi     # 0x2d011
leaq 0x1b835(%rip), %rdx     # 0x2d03c
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
callq 0x6fec
movq %r14, %rdi
movl $0x16, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
movq %r13, %r9
callq 0x2ae24
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1184b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x50(%r15), %r12
addq $0x30, %r12
movq %r14, %rdi
callq 0x2af04
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x2af0e
movl $0x18, %edi
callq 0x62e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x1d36e
leaq 0x98(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1c15a(%rip), %rsi     # 0x2d9ec
leaq 0x1c18b(%rip), %rdx     # 0x2da24
leaq 0x88(%rsp), %r13
movq %r13, %rdi
callq 0x6fec
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x2ae24
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x118dc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1c138(%rip), %rsi     # 0x2da25
leaq 0x1c145(%rip), %rdx     # 0x2da39
leaq 0x68(%rsp), %rdi
callq 0x6fec
movl 0x48(%r15), %eax
cmpq $0x7, %rax
jae 0x11915
leaq 0x2c249(%rip), %rcx     # 0x3db58
movq (%rcx,%rax,8), %rsi
jmp 0x1192a
cmpl $0x7, %eax
leaq 0x1c149(%rip), %rax     # 0x2da68
leaq 0x1c149(%rip), %rsi     # 0x2da6f
cmoveq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x65a0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1195b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x11963
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1c0f1(%rip), %rsi     # 0x2da77
callq 0x65a0
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x119b2
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x119b9
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x10(%r15), %eax
cmpq $0x7, %rax
jae 0x119e8
leaq 0x2c176(%rip), %rcx     # 0x3db58
movq (%rcx,%rax,8), %rsi
jmp 0x119fd
cmpl $0x7, %eax
leaq 0x1c076(%rip), %rax     # 0x2da68
leaq 0x1c076(%rip), %rsi     # 0x2da6f
cmoveq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x65a0
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11a2e
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x11a35
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r9
movq %rdx, 0x8(%r9)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movl $0x6, %esi
movq %rbx, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x2ae24
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x11a7e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11a95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x11aac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x11ac3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x62f0
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11bf2
movq 0xf8(%rsp), %rsi
jmp 0x11bd8
jmp 0x11afb
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
jmp 0x11bed
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11bf2
movq 0x98(%rsp), %rsi
jmp 0x11bd8
jmp 0x11be2
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11bf2
movq 0xb8(%rsp), %rsi
jmp 0x11bd8
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11bf2
movq 0xd8(%rsp), %rsi
jmp 0x11bd8
jmp 0x11be2
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x11b91
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x11b91
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11bad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x11bad
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x11bc9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x11bc9
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x11bf2
movq 0x78(%rsp), %rsi
incq %rsi
jmp 0x11bed
movq %rax, %r14
jmp 0x11bf2
movq %rax, %r14
movl $0x18, %esi
movq %r12, %rdi
callq 0x62f0
movq %r14, %rdi
callq 0x6550