// File: /workspace/github_cpp_makefile_star2_O3/Davidc2525[P]Leaf/compiler/backend/x86_64_linux/generator.cpp
// Function: x86_64_linux_generator_visitor::visit2(LEAF::AST::FloatConst*)
void x86_64_linux_generator_visitor::visit2(FloatConst *number)
{
    UPDATE_STATICS
    if (!number->in_data)
    {
        string *label_data = new string(number->adr_label->c_str());
        label_data->append(" dq ");
        char *chars_val = new char[20];
        sprintf(chars_val, "%.7lf", number->value);
        label_data->append(chars_val);
        assembly->get_program()->section(Sections::data)->add(new RegisterOperand(label_data->c_str()));
        number->in_data = true;
    }

    Section *st = assembly->get_program()->section(Sections::text);
    Section *dt = assembly->get_program()->section(Sections::data);
    Register *current_reg = this->reg;
    this->reg = this->rp->reserve_by_size(128);
    if (this->ax == Load)
    {
        DInstruccion *i = new DInstruccion("movss");
        MemoryOperand *ops = new MemoryOperand();
        RegisterOperand *adr_label = new RegisterOperand(number->adr_label->c_str());
        ops->add_operand(adr_label);
        RegisterOperand *opd = new RegisterOperand(this->reg->getName());
        i->add_operand(opd);
        i->add_operand(ops);
        st->add(i);
    }

    if (this->ax == op_types::Plus)
    {
        DInstruccion *i = new DInstruccion("addss");
        MemoryOperand *ops = new MemoryOperand();
        RegisterOperand *adr_label = new RegisterOperand(number->adr_label->c_str());
        ops->add_operand(adr_label);
        RegisterOperand *opd = new RegisterOperand(this->reg->getName());
        i->add_operand(opd);
        i->add_operand(ops);
        st->add(i);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x8(%rdi)
movq %rsi, %r14
cmpb $0x0, 0x30(%rsi)
jne 0x16c98
movl $0x20, %edi
callq 0x5290
movq %rax, %r15
movq 0x28(%r14), %rax
movq (%rax), %rsi
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0xeba0
leaq 0x47d2(%rip), %rsi      # 0x1b3fa
movq %r15, %rdi
callq 0x54b0
movl $0x14, %edi
callq 0x5040
movq %rax, %r12
cvtss2sd 0x24(%r14), %xmm0
leaq 0x47b5(%rip), %rsi      # 0x1b3ff
movq %rax, %rdi
movb $0x1, %al
callq 0x5090
movq %r15, %rdi
movq %r12, %rsi
callq 0x54b0
movq 0x10(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x10346
movq %rax, %r13
movl $0x10, %edi
callq 0x5290
movq %rax, %r12
movq (%r15), %rsi
movq %rax, %rdi
callq 0xfe82
movq %r13, %rdi
movq %r12, %rsi
callq 0xf294
movb $0x1, 0x30(%r14)
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movl $0x2, %esi
callq 0x10346
movq %rax, %r15
movq 0x10(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x10346
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movl $0x80, %esi
callq *0x78(%rax)
movq %rax, 0x20(%rbx)
movl 0x38(%rbx), %eax
cmpl $0x1, %eax
jne 0x16d7a
movl $0x28, %edi
callq 0x5290
movq %rax, %r12
leaq 0x4707(%rip), %rsi      # 0x1b3f4
movq %rax, %rdi
callq 0xfc44
movl $0x20, %edi
callq 0x5290
movq %rax, %r13
movq %rax, %rdi
callq 0xff08
movl $0x10, %edi
callq 0x5290
movq %rax, %rbp
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xfe82
movq %r13, %rdi
movq %rbp, %rsi
callq 0xff60
movl $0x10, %edi
callq 0x5290
movq %rax, %rbp
movq 0x20(%rbx), %rdi
callq 0x118ec
movq %rbp, %rdi
movq %rax, %rsi
callq 0xfe82
movq (%r12), %rax
movq %r12, %rdi
movq %rbp, %rsi
callq *0x20(%rax)
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
callq *0x20(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0xf294
movl 0x38(%rbx), %eax
cmpl $0x2, %eax
jne 0x16e21
movl $0x28, %edi
callq 0x5290
movq %rax, %r12
leaq 0x466e(%rip), %rsi      # 0x1b405
movq %rax, %rdi
callq 0xfc44
movl $0x20, %edi
callq 0x5290
movq %rax, %r13
movq %rax, %rdi
callq 0xff08
movl $0x10, %edi
callq 0x5290
movq %rax, %rbp
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xfe82
movq %r13, %rdi
movq %rbp, %rsi
callq 0xff60
movl $0x10, %edi
callq 0x5290
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x118ec
movq %r14, %rdi
movq %rax, %rsi
callq 0xfe82
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x20(%rax)
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
callq *0x20(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0xf294
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16e76
jmp 0x16e38
jmp 0x16e45
jmp 0x16e76
movq %rax, %rbx
movl $0x20, %esi
movq %r13, %rdi
jmp 0x16e81
movq %rax, %rbx
movl $0x28, %esi
jmp 0x16e57
movq %rax, %rbx
movl $0x10, %esi
movq %r12, %rdi
jmp 0x16e81
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
jmp 0x16e81
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
jmp 0x16e81
movq %rax, %rbx
movl $0x10, %esi
movq %rbp, %rdi
callq 0x52a0
movq %rbx, %rdi
callq 0x5470