// File: /workspace/github_cpp_makefile_star2_O1/Merulo[P]CompilerJFTT/src/Register/RegisterBlock.cpp
// Function: RegisterBlock::generateNumberFrom(unsigned long long&, unsigned long long, Register&)
std::vector<Line> RegisterBlock::generateNumberFrom(unsigned long long& firstNumber, unsigned long long second, Register& usedRegister)
{
    if (firstNumber > second)
    {
        if (firstNumber - second < 15)
        {
            std::vector<Line> lines;
            while(firstNumber > second)
            {
                lines.push_back({"DEC", "A"});
                firstNumber--;
            }
            return lines;
        }
        else
        {            
            firstNumber = second;
            return NumberGenerator::generateConstFrom(second, {{"A", 0}});     
        }
    }
    else if (firstNumber < second )
    {
        if (second - firstNumber < 15)
        {
            std::vector<Line> lines;
            while( firstNumber < second)
            {
                lines.push_back({"INC", "A"});
                firstNumber++;
            }
            return lines;
        }
        else
        {         
            firstNumber = second;
            return NumberGenerator::generateConstFrom(second, {{"A", 0}});   
        }
    }
    return {{}};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, 0x10(%rsp)
movq (%rdx), %rax
movq %rax, %rcx
subq %rbx, %rcx
jbe 0x67a2
cmpq $0xe, %rcx
ja 0x695f
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rbx, 0x140(%rsp)
cmpq %rbx, (%r15)
jbe 0x6ad1
leaq 0x120(%rsp), %rbp
leaq 0x100(%rsp), %r12
leaq 0x31ab5(%rip), %r13     # 0x380e3
leaq 0xe0(%rsp), %rbx
leaq 0x18(%rsp), %r14
leaq 0x130(%rsp), %rax
movq %rax, 0x120(%rsp)
movq %rbp, %rdi
leaq 0x31a45(%rip), %rsi     # 0x3809a
leaq 0x31a41(%rip), %rdx     # 0x3809d
callq 0x54fc
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
movq %r12, %rdi
leaq 0x31a19(%rip), %rsi     # 0x38094
leaq 0x31a13(%rip), %rdx     # 0x38095
callq 0x54fc
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x54fc
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xbe58
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xcf0e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x66df
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x66fb
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6717
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x673c
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x6761
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x6786
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%r15), %rax
decq %rax
movq %rax, (%r15)
cmpq 0x140(%rsp), %rax
ja 0x663b
jmp 0x6ad1
jae 0x69c9
movq %rbx, %rcx
subq %rax, %rcx
cmpq $0xe, %rcx
ja 0x6a50
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
cmpq %rbx, (%r15)
jae 0x6ad1
movq %rbx, %r14
leaq 0xc0(%rsp), %r12
leaq 0x318fd(%rip), %r13     # 0x380e3
leaq 0xa0(%rsp), %rbp
leaq 0x18(%rsp), %rbx
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x3188c(%rip), %rsi     # 0x3809e
leaq 0x31888(%rip), %rdx     # 0x380a1
callq 0x54fc
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %r12, %rdi
leaq 0x3185c(%rip), %rsi     # 0x38094
leaq 0x31856(%rip), %rdx     # 0x38095
callq 0x54fc
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x54fc
movq %rbx, %rdi
leaq 0x80(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xbe58
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xcf0e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x68a1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x68bd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x68d9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x68fe
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6923
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x6948
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%r15), %rax
incq %rax
movq %rax, (%r15)
cmpq %r14, %rax
jb 0x67f3
jmp 0x6ad1
movq %rbx, (%r15)
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x31722(%rip), %rsi     # 0x38094
leaq 0x3171c(%rip), %rdx     # 0x38095
leaq 0x18(%rsp), %rdi
callq 0x54fc
leaq 0x18(%rsp), %rsi
movq $0x0, 0x20(%rsi)
leaq 0x160(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0xc182
leaq 0x160(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x187fc
leaq 0x160(%rsp), %rdi
jmp 0x6ab5
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x18(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
movq 0x10(%rsp), %rdi
callq 0xc13a
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x6a2a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x6a41
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x6ac4
jmp 0x6ad1
movq %rbx, (%r15)
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x31631(%rip), %rsi     # 0x38094
leaq 0x3162b(%rip), %rdx     # 0x38095
leaq 0x18(%rsp), %rdi
callq 0x54fc
leaq 0x18(%rsp), %rsi
movq $0x0, 0x20(%rsi)
leaq 0x148(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0xc182
leaq 0x148(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x187fc
leaq 0x148(%rsp), %rdi
callq 0xc1cc
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x6ad1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x10(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
jmp 0x6b04
jmp 0x6b0b
jmp 0x6b40
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0xc1cc
jmp 0x6b0e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x6c76
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x6c76
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xbf10
jmp 0x6c76
movq %rax, %rbx
jmp 0x6c76
jmp 0x6bd9
movq %rax, %rbx
jmp 0x6bb3
movq %rax, %rbx
jmp 0x6b8e
movq %rax, %rbx
jmp 0x6b69
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xbf10
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x6b8e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6bb3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x6c6c
movq 0x90(%rsp), %rsi
jmp 0x6c64
movq %rax, %rbx
jmp 0x6c6c
movq %rax, %rbx
jmp 0x6c47
movq %rax, %rbx
jmp 0x6c22
movq %rax, %rbx
jmp 0x6bfd
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xbf10
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x6c22
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x6c47
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x6c6c
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x10(%rsp), %rdi
callq 0xbf5e
movq %rbx, %rdi
callq 0x44c0