// File: /workspace/github_cpp_makefile_star2_O2/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 0x14368
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r15
movq 0x28(%r14), %rax
movq (%rax), %rsi
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x70ae
leaq 0x411e(%rip), %rsi      # 0x1841a
movq %r15, %rdi
callq 0x5460
pushq $0x14
popq %rdi
callq 0x5040
movq %rax, %r12
cvtss2sd 0x24(%r14), %xmm0
leaq 0x4103(%rip), %rsi      # 0x1841f
movq %rax, %rdi
movb $0x1, %al
callq 0x5080
movq %r15, %rdi
movq %r12, %rsi
callq 0x5460
movq 0x10(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0xe61c
movq %rax, %r13
pushq $0x10
popq %rdi
callq 0x5260
movq %rax, %r12
movq (%r15), %rsi
movq %rax, %rdi
callq 0xe1b2
movq %r13, %rdi
movq %r12, %rsi
callq 0xd750
movb $0x1, 0x30(%r14)
movq 0x10(%rbx), %rax
movq (%rax), %rdi
pushq $0x2
popq %rsi
callq 0xe61c
movq %rax, %r15
movq 0x10(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0xe61c
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 0x14440
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
leaq 0x405b(%rip), %rsi      # 0x18414
movq %rax, %rdi
callq 0xdf60
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r13
movq %rax, %rdi
callq 0xe234
pushq $0x10
popq %rdi
callq 0x5260
movq %rax, %rbp
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xe1b2
movq %r13, %rdi
movq %rbp, %rsi
callq 0xe288
pushq $0x10
popq %rdi
callq 0x5260
movq %rax, %rbp
movq 0x20(%rbx), %rdi
callq 0xfa1e
movq %rbp, %rdi
movq %rax, %rsi
callq 0xe1b2
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 0xd750
movl 0x38(%rbx), %eax
cmpl $0x2, %eax
jne 0x144df
pushq $0x28
popq %rdi
callq 0x5260
movq %rax, %r12
leaq 0x3fca(%rip), %rsi      # 0x18425
movq %rax, %rdi
callq 0xdf60
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r13
movq %rax, %rdi
callq 0xe234
pushq $0x10
popq %rdi
callq 0x5260
movq %rax, %rbp
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xe1b2
movq %r13, %rdi
movq %rbp, %rsi
callq 0xe288
pushq $0x10
popq %rdi
callq 0x5260
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0xfa1e
movq %r14, %rdi
movq %rax, %rsi
callq 0xe1b2
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 0xd750
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14529
jmp 0x144f6
jmp 0x14501
jmp 0x14529
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r13, %rdi
jmp 0x14532
movq %rax, %rbx
pushq $0x28
jmp 0x1450d
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r12, %rdi
jmp 0x14532
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r15, %rdi
jmp 0x14532
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
jmp 0x14532
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %rbp, %rdi
callq 0x5270
movq %rbx, %rdi
callq 0x5420
nop