// File: /workspace/github_cpp_makefile_star2_O3/Merulo[P]CompilerJFTT/src/Calculators/NumberGenerator.cpp
// Function: NumberGenerator::generateWithIncAndAdd(unsigned long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void NumberGenerator::generateWithIncAndAdd(unsigned long long target, std::string name)
{
    while (target > 10)
    {
        if (target % 2 == 0)
        {
            _result.push_back({"ADD", name, name});
            target = target / 2;
        }
        else
        {
            _result.push_back({"INC", name});
            target--;
        }
    }
    for(size_t i = 0; i < target; i++)
    {
        _result.push_back({"INC", name});
    }
    _result.push_back({"SUB", name, name});
    std::reverse(_result.begin(), _result.end());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0xb, %rdi
jb 0x197a4
leaq 0x168(%rsp), %r13
movq %rsp, %r12
leaq 0x148(%rsp), %rbp
testb $0x1, %r14b
jne 0x19635
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0x1dbb9(%rip), %rsi     # 0x370a2
leaq 0x1dbb5(%rip), %rdx     # 0x370a5
callq 0x53cc
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0xc7aa
leaq 0x178(%rsp), %rax
movq %rax, 0x168(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %r15
movq %r13, %rdi
callq 0xc7aa
movq %r12, %rdi
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
movq %r15, %rcx
callq 0xbbea
leaq 0x2bda5(%rip), %rdi     # 0x45308
movq %r12, %rsi
callq 0xccac
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x19587
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x195a3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x195be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x195e3
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x19608
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1962d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42a0
shrq %r14
jmp 0x19798
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x1da4a(%rip), %rsi     # 0x3709e
leaq 0x1da46(%rip), %rdx     # 0x370a1
callq 0x53cc
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xc7aa
leaq 0x158(%rsp), %rax
movq %rax, 0x148(%rsp)
movq %rbp, %rdi
leaq 0x1da42(%rip), %rdx     # 0x370e3
movq %rdx, %rsi
callq 0x53cc
movq %r12, %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbp, %rcx
callq 0xbbea
leaq 0x2bc3d(%rip), %rdi     # 0x45308
movq %r12, %rsi
callq 0xccac
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x196ef
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1970b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x19726
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x1974b
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x19770
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x19795
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
decq %r14
cmpq $0xa, %r14
ja 0x194c0
jmp 0x197ad
testq %r14, %r14
je 0x1990d
leaq 0x128(%rsp), %rbp
leaq 0x1d927(%rip), %r15     # 0x370e3
leaq 0x108(%rsp), %r12
movq %rsp, %r13
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x1d8c1(%rip), %rsi     # 0x3709e
leaq 0x1d8bd(%rip), %rdx     # 0x370a1
callq 0x53cc
leaq 0x138(%rsp), %rax
movq %rax, 0x128(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xc7aa
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x53cc
movq %r13, %rdi
leaq 0x68(%rsp), %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0xbbea
leaq 0x2bac5(%rip), %rdi     # 0x45308
movq %r13, %rsi
callq 0xccac
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x19867
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x19883
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1989e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x198c3
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x198e8
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x19904
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
decq %r14
jne 0x197c7
leaq 0x1d8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d776(%rip), %rsi     # 0x37096
leaq 0x1d772(%rip), %rdx     # 0x37099
leaq 0x1c8(%rsp), %rdi
callq 0x53cc
leaq 0x1b8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0xc7aa
leaq 0x198(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x188(%rsp), %rdi
callq 0xc7aa
movq %rsp, %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
leaq 0x188(%rsp), %rcx
callq 0xbbea
leaq 0x2b966(%rip), %rdi     # 0x45308
movq %rsp, %rsi
callq 0xccac
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x199c6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x199e1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x199fc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x188(%rsp), %rdi
cmpq %r12, %rdi
je 0x19a19
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x1a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x19a36
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x1c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x19a53
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x2b8ae(%rip), %rbx     # 0x45308
movq 0x2b8af(%rip), %r14     # 0x45310
cmpq %r14, %rbx
setne %al
addq $-0x68, %r14
cmpq %rbx, %r14
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x19a90
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19f3d
addq $0x68, %rbx
addq $-0x68, %r14
cmpq %r14, %rbx
jb 0x19a78
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbca2
jmp 0x19ab2
movq %rax, %rbx
movq 0x188(%rsp), %rdi
cmpq %r12, %rdi
je 0x19ad4
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x19ad4
movq %rax, %rbx
movq 0x1a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x19af6
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x19af6
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x19cc5
movq 0x1d8(%rsp), %rsi
jmp 0x19cbd
jmp 0x19c3d
jmp 0x19c3d
movq %rax, %rbx
jmp 0x19b6d
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbca2
jmp 0x19b48
movq %rax, %rbx
jmp 0x19c17
movq %rax, %rbx
jmp 0x19bcd
movq %rax, %rbx
jmp 0x19b92
movq %rax, %rbx
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x19b6d
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x19b92
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x19cc5
movq 0xb8(%rsp), %rsi
jmp 0x19cbd
jmp 0x19c3d
movq %rax, %rbx
jmp 0x19bf2
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbca2
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x19bf2
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x19c17
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x19cc5
movq 0xf8(%rsp), %rsi
jmp 0x19cbd
movq %rax, %rbx
jmp 0x19cc5
movq %rax, %rbx
jmp 0x19ca9
movq %rax, %rbx
jmp 0x19c84
movq %rax, %rbx
jmp 0x19c5f
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbca2
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x19c84
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x19ca9
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x19cc5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x44c0
nop