// File: /workspace/github_cpp_makefile_star2_O3/Merulo[P]CompilerJFTT/src/Register/RegisterBlock.cpp
// Function: RegisterBlock::generateNumber(unsigned long long&, unsigned long long, Register&)
std::vector<Line> RegisterBlock::generateNumber(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
        {         
            return generateNumberShift(firstNumber - second, usedRegister, "SUB");     
        }
    }
    else if (firstNumber < second )
    {
        if (second - firstNumber < 15)
        {
            std::vector<Line> lines;
            while( firstNumber < second)
            {
                lines.push_back({"INC", "A"});
                firstNumber++;
            }
            return lines;
        }
        else
        {         
            return generateNumberShift(second - firstNumber, usedRegister, "ADD"); 
        }
    }
    return {{}};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r8, %rbx
movq %rdx, %r15
movq %rdi, 0x8(%rsp)
movq (%rdx), %rax
movq %rax, %r14
movq %rcx, 0x18(%rsp)
subq %rcx, %r14
jbe 0x913f
cmpq $0xe, %r14
ja 0x92ec
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x108(%rsp), %rbp
leaq 0xe8(%rsp), %r13
leaq 0x2e115(%rip), %rbx     # 0x370e3
leaq 0xc8(%rsp), %r12
leaq 0x20(%rsp), %r14
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq %rbp, %rdi
leaq 0x2e0a5(%rip), %rsi     # 0x3709a
leaq 0x2e0a1(%rip), %rdx     # 0x3709d
callq 0x53cc
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq %r13, %rdi
leaq 0x2e079(%rip), %rsi     # 0x37094
leaq 0x2e073(%rip), %rdx     # 0x37095
callq 0x53cc
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x53cc
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0xbbea
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xccac
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x907f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x909b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x90b7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x90dc
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x9101
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x9126
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%r15), %rax
decq %rax
movq %rax, (%r15)
cmpq 0x18(%rsp), %rax
ja 0x8fdb
jmp 0x942c
jae 0x9348
movq 0x18(%rsp), %r14
subq %rax, %r14
cmpq $0xe, %r14
ja 0x93d1
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x138(%rsp), %r14
leaq 0xa8(%rsp), %r13
leaq 0x2df62(%rip), %r12     # 0x370e3
leaq 0x128(%rsp), %rbx
leaq 0x20(%rsp), %rbp
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x2def1(%rip), %rsi     # 0x3709e
leaq 0x2deed(%rip), %rdx     # 0x370a1
callq 0x53cc
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq %r13, %rdi
leaq 0x2dec1(%rip), %rsi     # 0x37094
leaq 0x2debb(%rip), %rdx     # 0x37095
callq 0x53cc
movq %r14, 0x128(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x53cc
movq %rbp, %rdi
leaq 0x88(%rsp), %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xbbea
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xccac
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x9234
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x9250
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x926c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x9289
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x92ae
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x92d3
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%r15), %rax
incq %rax
movq %rax, (%r15)
cmpq 0x18(%rsp), %rax
jb 0x918e
jmp 0x942c
leaq 0x178(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2dd96(%rip), %rsi     # 0x37096
leaq 0x2dd92(%rip), %rdx     # 0x37099
leaq 0x168(%rsp), %r15
movq %r15, %rdi
callq 0x53cc
movq 0x8(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x95ca
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x942c
movq 0x178(%rsp), %rsi
jmp 0x9424
leaq 0x30(%rsp), %rbx
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x20(%rsp), %rsi
leaq 0x17(%rsp), %rcx
movl $0x1, %edx
movq 0x8(%rsp), %rdi
callq 0xbecc
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x93a9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x93c0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x942c
movq 0x30(%rsp), %rsi
jmp 0x9424
leaq 0x158(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2dcbd(%rip), %rsi     # 0x370a2
leaq 0x2dcb9(%rip), %rdx     # 0x370a5
leaq 0x148(%rsp), %r15
movq %r15, %rdi
callq 0x53cc
movq 0x8(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x95ca
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0x942c
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x8(%rsp), %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0x95c2
movq 0x158(%rsp), %rsi
jmp 0x948f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbca2
jmp 0x95c2
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x95c2
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x95c2
jmp 0x9525
movq %rax, %rbx
jmp 0x94ff
movq %rax, %rbx
jmp 0x94da
movq %rax, %rbx
jmp 0x94bd
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbca2
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0x94da
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x94ff
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x95b8
movq 0x98(%rsp), %rsi
jmp 0x95b0
movq %rax, %rbx
jmp 0x95b8
movq %rax, %rbx
jmp 0x9593
movq %rax, %rbx
jmp 0x956e
movq %rax, %rbx
jmp 0x9549
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbca2
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x956e
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x9593
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x95b8
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x8(%rsp), %rdi
callq 0xbcf0
movq %rbx, %rdi
callq 0x44c0