// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf0(%rsp), %r13
leaq 0x1d8(%rsp), %rbp
leaq 0x1b8(%rsp), %r15
cmpq $0xa, %r14
jbe 0xf973
testb $0x1, %r14b
jne 0xf8f2
leaq 0xb0(%rsp), %rdi
leaq 0x1383e(%rip), %rsi     # 0x230a2
leaq 0xe(%rsp), %rdx
callq 0x4a54
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x4390
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4390
movq %r13, %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x90(%rsp), %rdx
movq %r12, %rcx
callq 0x816a
leaq 0x22a4d(%rip), %rdi     # 0x32300
movq %r13, %rsi
callq 0x8f90
movq %r13, %rdi
callq 0x81fe
leaq 0xd0(%rsp), %rdi
callq 0x4548
leaq 0x90(%rsp), %rdi
callq 0x4548
leaq 0xb0(%rsp), %rdi
callq 0x4548
shrq %r14
jmp 0xf841
leaq 0x70(%rsp), %rdi
leaq 0x137a0(%rip), %rsi     # 0x2309e
leaq 0xe(%rsp), %rdx
callq 0x4a54
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4390
movq %r15, %rdi
leaq 0x137c6(%rip), %rsi     # 0x230e3
leaq 0xf(%rsp), %rdx
callq 0x4a54
movq %r13, %rdi
leaq 0x70(%rsp), %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x816a
leaq 0x229bf(%rip), %rdi     # 0x32300
movq %r13, %rsi
callq 0x8f90
movq %r13, %rdi
callq 0x81fe
movq %r15, %rdi
callq 0x4548
movq %rbp, %rdi
callq 0x4548
leaq 0x70(%rsp), %rdi
callq 0x4548
decq %r14
jmp 0xf841
leaq 0x198(%rsp), %r12
leaq 0x178(%rsp), %rbp
leaq 0x158(%rsp), %r13
leaq 0xf0(%rsp), %r15
subq $0x1, %r14
jb 0xfa0e
movq %r12, %rdi
leaq 0x136fb(%rip), %rsi     # 0x2309e
leaq 0xe(%rsp), %rdx
callq 0x4a54
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4390
movq %r13, %rdi
leaq 0x13721(%rip), %rsi     # 0x230e3
leaq 0xf(%rsp), %rdx
callq 0x4a54
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x816a
leaq 0x2291c(%rip), %rdi     # 0x32300
movq %r15, %rsi
callq 0x8f90
movq %r15, %rdi
callq 0x81fe
movq %r13, %rdi
callq 0x4548
movq %rbp, %rdi
callq 0x4548
movq %r12, %rdi
callq 0x4548
jmp 0xf993
leaq 0x13681(%rip), %rsi     # 0x23096
leaq 0x50(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x4a54
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x4390
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x4390
leaq 0xf0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x816a
leaq 0x2289f(%rip), %rdi     # 0x32300
leaq 0xf0(%rsp), %rsi
callq 0x8f90
leaq 0xf0(%rsp), %rdi
callq 0x81fe
leaq 0x10(%rsp), %rdi
callq 0x4548
leaq 0x30(%rsp), %rdi
callq 0x4548
leaq 0x50(%rsp), %rdi
callq 0x4548
movq 0x22860(%rip), %rdi     # 0x32300
movq 0x22861(%rip), %rsi     # 0x32308
callq 0xfe07
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x81fe
jmp 0xfad3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4548
jmp 0xfae2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4548
jmp 0xfaf1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0xfbc8
jmp 0xfbcf
movq %rax, %rbx
jmp 0xfb5d
movq %rax, %rbx
jmp 0xfb1a
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x81fe
leaq 0x1b8(%rsp), %rdi
callq 0x4548
jmp 0xfb50
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x81fe
jmp 0xfb3e
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x4548
jmp 0xfb6c
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x4548
leaq 0x70(%rsp), %rdi
jmp 0xfbc8
movq %rax, %rbx
jmp 0xfb79
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x4548
leaq 0xb0(%rsp), %rdi
jmp 0xfbc8
jmp 0xfbcf
jmp 0xfbcf
movq %rax, %rbx
jmp 0xfbc0
movq %rax, %rbx
jmp 0xfbb3
movq %rax, %rbx
jmp 0xfba6
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x81fe
leaq 0x158(%rsp), %rdi
callq 0x4548
leaq 0x178(%rsp), %rdi
callq 0x4548
leaq 0x198(%rsp), %rdi
callq 0x4548
jmp 0xfbd2
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4490