// File: /workspace/github_cpp_makefile_star2_O1/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 0x56e8(%rip), %ymm0     # 0x7d78
leaq 0x50(%rsp), %rsi
vmovups %ymm0, (%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movl $0x4, %edx
vzeroupper
callq 0x3b8c
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x298e(%rip), %rsi      # 0x504e
leaq 0x2988(%rip), %rdx      # 0x504f
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x44da
leaq 0x70(%rsp), %r14
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2944(%rip), %rsi      # 0x5030
leaq 0x293f(%rip), %rdx      # 0x5032
movq %r14, %rdi
callq 0x44da
leaq 0x90(%rsp), %r14
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x291d(%rip), %rsi      # 0x5033
leaq 0x2918(%rip), %rdx      # 0x5035
movq %r14, %rdi
callq 0x44da
leaq 0xb0(%rsp), %r14
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28f6(%rip), %rsi      # 0x5036
leaq 0x28f2(%rip), %rdx      # 0x5039
movq %r14, %rdi
callq 0x44da
leaq 0xd0(%rsp), %r14
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28d0(%rip), %rsi      # 0x503a
leaq 0x28cb(%rip), %rdx      # 0x503c
movq %r14, %rdi
callq 0x44da
leaq 0xf0(%rsp), %r14
leaq 0x100(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28a9(%rip), %rsi      # 0x503d
leaq 0x28a4(%rip), %rdx      # 0x503f
movq %r14, %rdi
callq 0x44da
leaq 0x110(%rsp), %r14
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2882(%rip), %rsi      # 0x5040
leaq 0x2881(%rip), %rdx      # 0x5046
movq %r14, %rdi
callq 0x44da
leaq 0x130(%rsp), %r14
leaq 0x140(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x285f(%rip), %rsi      # 0x5047
leaq 0x285c(%rip), %rdx      # 0x504b
movq %r14, %rdi
callq 0x44da
leaq 0x150(%rsp), %r14
leaq 0x160(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x283a(%rip), %rsi      # 0x504c
leaq 0x2836(%rip), %rdx      # 0x504f
movq %r14, %rdi
callq 0x44da
leaq 0x170(%rsp), %r14
leaq 0x180(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2814(%rip), %rsi      # 0x5050
leaq 0x2812(%rip), %rdx      # 0x5055
movq %r14, %rdi
callq 0x44da
leaq 0x190(%rsp), %r14
leaq 0x1a0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x27f0(%rip), %rsi      # 0x5056
leaq 0x27ef(%rip), %rdx      # 0x505c
movq %r14, %rdi
callq 0x44da
leaq 0x1b0(%rsp), %r14
leaq 0x1c0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x27cd(%rip), %rsi      # 0x505d
leaq 0x27c8(%rip), %rdx      # 0x505f
movq %r14, %rdi
callq 0x44da
leaq 0x1d0(%rsp), %r14
leaq 0x1e0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x27a6(%rip), %rsi      # 0x5060
leaq 0x27a3(%rip), %rdx      # 0x5064
movq %r14, %rdi
callq 0x44da
leaq 0x1f0(%rsp), %r14
leaq 0x200(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2781(%rip), %rsi      # 0x5065
leaq 0x2785(%rip), %rdx      # 0x5070
movq %r14, %rdi
callq 0x44da
leaq 0x210(%rsp), %r14
leaq 0x220(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2763(%rip), %rsi      # 0x5071
leaq 0x2761(%rip), %rdx      # 0x5076
movq %r14, %rdi
callq 0x44da
leaq 0x230(%rsp), %r14
leaq 0x240(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x273f(%rip), %rsi      # 0x5077
leaq 0x273c(%rip), %rdx      # 0x507b
movq %r14, %rdi
callq 0x44da
leaq 0x250(%rsp), %r14
leaq 0x260(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x271a(%rip), %rsi      # 0x507c
leaq 0x2718(%rip), %rdx      # 0x5081
movq %r14, %rdi
callq 0x44da
leaq 0x270(%rsp), %r14
leaq 0x280(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26f6(%rip), %rsi      # 0x5082
leaq 0x26f5(%rip), %rdx      # 0x5088
movq %r14, %rdi
callq 0x44da
leaq 0x290(%rsp), %r14
leaq 0x2a0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2729(%rip), %rsi      # 0x50df
leaq 0x2724(%rip), %rdx      # 0x50e1
movq %r14, %rdi
callq 0x44da
leaq 0x2b0(%rsp), %r14
leaq 0x2c0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x26a8(%rip), %rsi      # 0x5089
leaq 0x26ab(%rip), %rdx      # 0x5093
movq %r14, %rdi
callq 0x44da
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x14, %edx
callq 0x3bcc
leaq 0x2c0(%rsp), %rbx
xorl %r14d, %r14d
movq 0x2b0(%rsp,%r14), %rdi
leaq (%rbx,%r14), %rax
cmpq %rdi, %rax
je 0x2a2a
callq 0x21f0
addq $-0x20, %r14
cmpq $-0x280, %r14           # imm = 0xFD80
jne 0x2a14
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
cmpq %rcx, %rax
je 0x2ad9
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %r12
cmpq %r12, %rbp
je 0x2ac0
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 0x43aa
movq %r15, %rbx
movq 0x50(%rsp), %rdi
callq *%r13
movq %rax, %r15
movq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x2320
cltq
cmpq %rax, %r15
jne 0x2b04
movq %rbx, %r15
cmpq %rbx, %r14
je 0x2ab7
movq %r14, %rdi
callq 0x21f0
addq $0x20, %rbp
cmpq %r12, %rbp
jne 0x2a6b
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
cmpq 0x18(%rsp), %rax
jne 0x2a54
leaq 0x20(%rsp), %rdi
callq 0x3c10
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2af2
callq 0x21f0
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2589(%rip), %rdi      # 0x5094
leaq 0x25a6(%rip), %rsi      # 0x50b8
leaq 0x25a8(%rip), %rcx      # 0x50c1
movl $0xfc, %edx
callq 0x2130
movq %rax, %r15
movq $-0x280, %r13           # imm = 0xFD80
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2b3c
callq 0x21f0
addq $-0x20, %r12
addq $0x20, %r13
jne 0x2b2d
movb $0x1, %al
jmp 0x2b73
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
jmp 0x2b6e
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x2bd1
addq $-0x10, %r14
leaq 0x50(%rsp), %rbx
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2b94
callq 0x21f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x2b86
jmp 0x2bd1
movq %rax, %r15
xorl %eax, %eax
movq %rbx, %r14
jmp 0x2b73
movq %rax, %r15
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2bc7
callq 0x21f0
jmp 0x2bc7
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x3c10
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2be0
callq 0x21f0
movq %r15, %rdi
callq 0x22d0