// File: quiath[P]fast-atoi/main.cpp
// Function: generate_add(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int, int, bool)
void generate_add(std::vector<std::string>& v, int count, int length, bool digits_only)
{
    for (unsigned i = 0; i < count; ++i)
    {
        std::string s;
        for (unsigned j = 0; j < length; ++j)
        {
            s += '0' + (i + j * 7) % 10;
        }

        int mode = digits_only ? 0 : (i % 5);


        switch (mode)
        {
          case 0:
             v.push_back(s);
             break;
          case 1:
             v.push_back('-' + s);
             break;
          case 2:
              v.push_back('+' + s);
             break;
          case 3:
             v.push_back("    -" + s + ")))");
             break;
          case 4:
             v.push_back("    +" + s + ".12");
             break;
        }

    }
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movb %cl, %al
movq %rdi, 0x140(%rsp)
movl %esi, 0x13c(%rsp)
movl %edx, 0x138(%rsp)
andb $0x1, %al
movb %al, 0x137(%rsp)
movl $0x0, 0x130(%rsp)
movl 0x130(%rsp), %eax
cmpl 0x13c(%rsp), %eax
jae 0x3cf4
leaq 0x110(%rsp), %rdi
callq 0x22a0
movl $0x0, 0x10c(%rsp)
movl 0x10c(%rsp), %eax
cmpl 0x138(%rsp), %eax
jae 0x3a00
movl 0x130(%rsp), %esi
movl 0x10c(%rsp), %ecx
movl %ecx, %eax
shll $0x3, %eax
subl %ecx, %eax
addl %eax, %esi
movl %esi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rcx, %rax
shrq $0x23, %rax
movl %eax, %ecx
addl %ecx, %ecx
movl %ecx, %eax
leal (%rax,%rax,4), %eax
subl %eax, %esi
orl $0x30, %esi
leaq 0x110(%rsp), %rdi
callq 0x2160
jmp 0x39d2
jmp 0x39d4
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x397f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x3ce5
testb $0x1, 0x137(%rsp)
je 0x3a12
xorl %edx, %edx
movl %edx, 0x34(%rsp)
jmp 0x3a26
movl 0x130(%rsp), %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0xf8(%rsp)
movl 0xf8(%rsp), %eax
movq %rax, 0x28(%rsp)
subq $0x4, %rax
ja 0x3cc2
movq 0x28(%rsp), %rax
leaq 0x65b1(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x140(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x56f0
jmp 0x3a73
jmp 0x3cc2
movq 0x140(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0xd8(%rsp), %rdi
movl $0x2d, %esi
leaq 0x110(%rsp), %rdx
callq 0x5790
jmp 0x3aa1
movq 0x20(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x5760
jmp 0x3ab5
leaq 0xd8(%rsp), %rdi
callq 0x2150
jmp 0x3cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x2150
jmp 0x3ce5
movq 0x140(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xb8(%rsp), %rdi
movl $0x2b, %esi
leaq 0x110(%rsp), %rdx
callq 0x5790
jmp 0x3b16
movq 0x18(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x5760
jmp 0x3b2a
leaq 0xb8(%rsp), %rdi
callq 0x2150
jmp 0x3cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x2150
jmp 0x3ce5
movq 0x140(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x6545(%rip), %rsi      # 0xa0bb
leaq 0x78(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0x5900
jmp 0x3b8a
leaq 0x6530(%rip), %rdx      # 0xa0c1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x58b0
jmp 0x3ba5
movq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x5760
jmp 0x3bb9
leaq 0x98(%rsp), %rdi
callq 0x2150
leaq 0x78(%rsp), %rdi
callq 0x2150
jmp 0x3cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x3c0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x2150
leaq 0x78(%rsp), %rdi
callq 0x2150
jmp 0x3ce5
movq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x6496(%rip), %rsi      # 0xa0c5
leaq 0x38(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0x5900
jmp 0x3c43
leaq 0x6481(%rip), %rdx      # 0xa0cb
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x58b0
jmp 0x3c5b
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5760
jmp 0x3c6c
leaq 0x58(%rsp), %rdi
callq 0x2150
leaq 0x38(%rsp), %rdi
callq 0x2150
jmp 0x3cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x3cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x2150
leaq 0x38(%rsp), %rdi
callq 0x2150
jmp 0x3ce5
leaq 0x110(%rsp), %rdi
callq 0x2150
movl 0x130(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x130(%rsp)
jmp 0x3953
leaq 0x110(%rsp), %rdi
callq 0x2150
jmp 0x3cfc
addq $0x148, %rsp            # imm = 0x148
retq
movq 0x100(%rsp), %rdi
callq 0x2340
nopl (%rax)