// File: /workspace/github_cpp_makefile_star2_O3/quiath[P]fast-atoi/main.cpp
// Function: unit_test()
void unit_test()
{
    std::vector<myint (*)(const char *)> v = { atoisimple, fastatoi, fastatoiadd, fastatoiaddunr };
    std::vector<std::string> sv = { "0", " 1", " 2", "\t 3", "4x", "5%", 
                                    "  10  ", " 99.", "100", "12345", "999999",
                                    "-1", " -2x", "   +123456+", " -345", "\n\v8I",
                                    " fake", "values", " +", "    zero  "};
    for (auto pf : v)
    {
       for (const auto s: sv)
       {
           assert((*pf)(s.c_str()) == atoi(s.c_str()));
       }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
vmovups 0x5710(%rip), %ymm0     # 0x7d78
leaq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movl $0x4, %edx
vmovups %ymm0, (%rsi)
vzeroupper
callq 0x3b78
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x50(%rsp), %rbx
leaq 0x29b1(%rip), %rsi      # 0x504e
leaq 0x29ab(%rip), %rdx      # 0x504f
movq %rbx, %rdi
callq 0x44cc
leaq 0x80(%rsp), %rax
leaq 0x70(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x296c(%rip), %rsi      # 0x5030
leaq 0x2967(%rip), %rdx      # 0x5032
movq %r14, %rdi
callq 0x44cc
leaq 0xa0(%rsp), %rax
leaq 0x90(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2945(%rip), %rsi      # 0x5033
leaq 0x2940(%rip), %rdx      # 0x5035
movq %r14, %rdi
callq 0x44cc
leaq 0xc0(%rsp), %rax
leaq 0xb0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x291e(%rip), %rsi      # 0x5036
leaq 0x291a(%rip), %rdx      # 0x5039
movq %r14, %rdi
callq 0x44cc
leaq 0xe0(%rsp), %rax
leaq 0xd0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x28f8(%rip), %rsi      # 0x503a
leaq 0x28f3(%rip), %rdx      # 0x503c
movq %r14, %rdi
callq 0x44cc
leaq 0x100(%rsp), %rax
leaq 0xf0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x28d1(%rip), %rsi      # 0x503d
leaq 0x28cc(%rip), %rdx      # 0x503f
movq %r14, %rdi
callq 0x44cc
leaq 0x120(%rsp), %rax
leaq 0x110(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x28aa(%rip), %rsi      # 0x5040
leaq 0x28a9(%rip), %rdx      # 0x5046
movq %r14, %rdi
callq 0x44cc
leaq 0x140(%rsp), %rax
leaq 0x130(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2887(%rip), %rsi      # 0x5047
leaq 0x2884(%rip), %rdx      # 0x504b
movq %r14, %rdi
callq 0x44cc
leaq 0x160(%rsp), %rax
leaq 0x150(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2862(%rip), %rsi      # 0x504c
leaq 0x285e(%rip), %rdx      # 0x504f
movq %r14, %rdi
callq 0x44cc
leaq 0x180(%rsp), %rax
leaq 0x170(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x283c(%rip), %rsi      # 0x5050
leaq 0x283a(%rip), %rdx      # 0x5055
movq %r14, %rdi
callq 0x44cc
leaq 0x1a0(%rsp), %rax
leaq 0x190(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2818(%rip), %rsi      # 0x5056
leaq 0x2817(%rip), %rdx      # 0x505c
movq %r14, %rdi
callq 0x44cc
leaq 0x1c0(%rsp), %rax
leaq 0x1b0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x27f5(%rip), %rsi      # 0x505d
leaq 0x27f0(%rip), %rdx      # 0x505f
movq %r14, %rdi
callq 0x44cc
leaq 0x1e0(%rsp), %rax
leaq 0x1d0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x27ce(%rip), %rsi      # 0x5060
leaq 0x27cb(%rip), %rdx      # 0x5064
movq %r14, %rdi
callq 0x44cc
leaq 0x200(%rsp), %rax
leaq 0x1f0(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x27a9(%rip), %rsi      # 0x5065
leaq 0x27ad(%rip), %rdx      # 0x5070
movq %r14, %rdi
callq 0x44cc
leaq 0x220(%rsp), %rax
leaq 0x210(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x278b(%rip), %rsi      # 0x5071
leaq 0x2789(%rip), %rdx      # 0x5076
movq %r14, %rdi
callq 0x44cc
leaq 0x240(%rsp), %rax
leaq 0x230(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2767(%rip), %rsi      # 0x5077
leaq 0x2764(%rip), %rdx      # 0x507b
movq %r14, %rdi
callq 0x44cc
leaq 0x260(%rsp), %rax
leaq 0x250(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2742(%rip), %rsi      # 0x507c
leaq 0x2740(%rip), %rdx      # 0x5081
movq %r14, %rdi
callq 0x44cc
leaq 0x280(%rsp), %rax
leaq 0x270(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x271e(%rip), %rsi      # 0x5082
leaq 0x271d(%rip), %rdx      # 0x5088
movq %r14, %rdi
callq 0x44cc
leaq 0x2a0(%rsp), %rax
leaq 0x290(%rsp), %r14
movq %rax, -0x10(%rax)
leaq 0x2751(%rip), %rsi      # 0x50df
leaq 0x274c(%rip), %rdx      # 0x50e1
movq %r14, %rdi
callq 0x44cc
leaq 0x2c0(%rsp), %r12
leaq 0x2b0(%rsp), %r14
movq %r12, -0x10(%r12)
leaq 0x26d0(%rip), %rsi      # 0x5089
leaq 0x26d3(%rip), %rdx      # 0x5093
movq %r14, %rdi
callq 0x44cc
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x14, %edx
callq 0x3bb8
leaq 0x2c0(%rsp), %rbx
xorl %r14d, %r14d
movq 0x2b0(%rsp,%r14), %rdi
leaq (%rbx,%r14), %rax
cmpq %rdi, %rax
je 0x2a02
callq 0x21f0
addq $-0x20, %r14
cmpq $-0x280, %r14           # imm = 0xFD80
jne 0x29ec
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
cmpq %rcx, %rax
je 0x2ab1
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %r12
cmpq %r12, %rbp
je 0x2a98
movq 0x10(%rsp), %rax
movq (%rax), %r13
movq %r15, 0x50(%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x439c
movq 0x50(%rsp), %rdi
movq %r15, %rbx
callq *%r13
movq 0x50(%rsp), %r14
movq %rax, %r15
movq %r14, %rdi
callq 0x2320
cltq
cmpq %rax, %r15
jne 0x2adc
movq %rbx, %r15
cmpq %rbx, %r14
je 0x2a8f
movq %r14, %rdi
callq 0x21f0
addq $0x20, %rbp
cmpq %r12, %rbp
jne 0x2a43
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
cmpq 0x18(%rsp), %rax
jne 0x2a2c
leaq 0x20(%rsp), %rdi
callq 0x3bfc
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2aca
callq 0x21f0
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25b1(%rip), %rdi      # 0x5094
leaq 0x25ce(%rip), %rsi      # 0x50b8
leaq 0x25d0(%rip), %rcx      # 0x50c1
movl $0xfc, %edx
callq 0x2130
movq $-0x280, %rbx           # imm = 0xFD80
movq %rax, %r15
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2b14
callq 0x21f0
addq $-0x20, %r12
addq $0x20, %rbx
jne 0x2b05
jmp 0x2b91
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
jmp 0x2b44
addq $-0x10, %r14
movq %rax, %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2b59
callq 0x21f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x2b4b
jmp 0x2b91
movq %rax, %r15
jmp 0x2b91
movq 0x50(%rsp), %rdi
movq %rax, %r15
cmpq %rbx, %rdi
je 0x2b87
callq 0x21f0
jmp 0x2b87
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x3bfc
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2ba0
callq 0x21f0
movq %r15, %rdi
callq 0x22d0