// File: /workspace/github_cpp_makefile_star2_O3/danishansari[P]NumberToText/test/testConvertor.cpp
// Function: main
int main(int argc, char*argv[])
{
    if (argc < 2)
    {
        cout << "usage: " << endl;
        cout << argv[0] << "-l <language(def=english)>\t e.g. " << argv[0] << " -l english 123" << endl;
        cout << argv[0] << "-r <range(any number)>    \t e.g  " << argv[0] << " -r 99" << endl;
        cout << argv[0] << "1 2 3 4 ...               \t e.g. " << argv[0] << " 1 99 156"<< endl;

        return -1;
    }

    vector<string> numbersVec;

    string lang = "english";

    int range = 0;
    
    for (int i = 1; i < argc; i++)
    {
        if (strcmp(argv[i], "-l") == 0)
            lang = argv[++i];
        if (strcmp(argv[i], "-r") == 0)
            range = atoi(argv[++i]);
        else
            numbersVec.push_back(string(argv[i]));
    }

    if (range)
    {
        numbersVec.clear();

        for (int i = 0; i < range; i++)
        {
            stringstream ss;
            ss << i;

            numbersVec.push_back(ss.str());
        }
    }

    NumToText* convertor = NumToText::getConvertor(lang);

    if (convertor)
    {
        for (int i = 0; i < numbersVec.size(); i++)
            cout << numbersVec[i] << ": " << convertor->convert(numbersVec[i]) << endl;
    }
    else
        cout << "could not convert!!" << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r12
cmpl $0x1, %edi
jg 0x33c6
movq 0x3c79(%rip), %r14      # 0x6fd8
leaq 0x1c9e(%rip), %rsi      # 0x5004
movl $0x7, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r12), %r15
testq %r15, %r15
je 0x3723
movq %r15, %rdi
callq 0x2090
movq 0x3c22(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x373b
movl %edi, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1cac(%rip), %rsi      # 0x5093
leaq 0x1cac(%rip), %rdx      # 0x509a
leaq -0x70(%rbp), %rdi
callq 0x3c50
movq $0x0, -0x30(%rbp)
movl $0x1, %r14d
leaq -0x260(%rbp), %r13
movslq %r14d, %rbx
movq (%r12,%rbx,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x3470
cmpb $0x6c, 0x1(%rsi)
jne 0x3464
cmpb $0x0, 0x2(%rsi)
jne 0x3464
movq 0x8(%r12,%rbx,8), %r14
movq -0x68(%rbp), %rax
movq %rax, -0x98(%rbp)
movq %r14, %rdi
callq 0x2090
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movq -0x98(%rbp), %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2180
leal 0x1(%rbx), %r14d
incq %rbx
movq (%r12,%rbx,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x3470
cmpb $0x72, 0x1(%rsi)
jne 0x3470
cmpb $0x0, 0x2(%rsi)
je 0x34bb
movq %r13, %rdi
leaq -0xb8(%rbp), %rdx
callq 0x3b06
leaq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0x3cee
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x34ad
movq -0x250(%rbp), %rsi
incq %rsi
callq 0x2140
incl %r14d
cmpl %r15d, %r14d
jl 0x340c
jmp 0x34d1
movslq %r14d, %rax
incl %r14d
movq 0x8(%r12,%rax,8), %rdi
callq 0x2190
movq %rax, -0x30(%rbp)
jmp 0x34ad
cmpl $0x0, -0x30(%rbp)
je 0x35ad
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r14
cmpq %rbx, %r14
je 0x3514
leaq 0x10(%rbx), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3500
movq (%r15), %rsi
incq %rsi
callq 0x2140
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x34ec
movq %rbx, -0x48(%rbp)
cmpl $0x0, -0x30(%rbp)
jle 0x35ad
xorl %r12d, %r12d
leaq -0x260(%rbp), %r13
leaq -0xb8(%rbp), %r14
leaq -0x50(%rbp), %rbx
movq 0x3a86(%rip), %r15      # 0x6fc0
movq %r13, %rdi
callq 0x20c0
leaq -0x250(%rbp), %rdi
movl %r12d, %esi
callq 0x21e0
movq %r14, %rdi
leaq -0x248(%rbp), %rsi
callq 0x21b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3cee
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x358d
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2140
movq %r13, %rdi
movq %r15, %rsi
callq 0x20e0
leaq -0x1e0(%rbp), %rdi
callq 0x2070
incl %r12d
cmpl %r12d, -0x30(%rbp)
jne 0x353a
leaq -0xc8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x3bb2
leaq -0xd8(%rbp), %rdi
callq 0x4854
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x35f9
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2140
testq %rbx, %rbx
je 0x3975
movq -0x50(%rbp), %rax
cmpq %rax, -0x48(%rbp)
je 0x39bb
movl $0x8, %r13d
xorl %r15d, %r15d
leaq -0x90(%rbp), %r12
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq 0x39a8(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x19c2(%rip), %rsi      # 0x5009
callq 0x2150
movq -0x50(%rbp), %rax
leaq -0x80(%rbp), %rcx
movq %rcx, -0x90(%rbp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x3bb2
movq (%rbx), %rax
leaq -0x260(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq *(%rax)
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdx
movq %r14, %rdi
callq 0x2150
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x36e3
movq -0x250(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x36ff
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
incq %r15
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %r15, %rcx
ja 0x3620
jmp 0x39bb
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
movq 0x3896(%rip), %r14      # 0x6fd8
leaq 0x18c3(%rip), %rsi      # 0x500c
movl $0x21, %edx
movq %r14, %rdi
callq 0x2150
movq (%r12), %r15
testq %r15, %r15
je 0x377b
movq %r15, %rdi
callq 0x2090
movq 0x386a(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x3793
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
leaq 0x1894(%rip), %rsi      # 0x502e
movl $0xf, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r12), %r15
testq %r15, %r15
je 0x37f3
movq %r15, %rdi
callq 0x2090
movq 0x37f2(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x380b
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
movq 0x37c6(%rip), %r14      # 0x6fd8
leaq 0x1825(%rip), %rsi      # 0x503e
movl $0x21, %edx
movq %r14, %rdi
callq 0x2150
movq (%r12), %r15
testq %r15, %r15
je 0x384b
movq %r15, %rdi
callq 0x2090
movq 0x379a(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x3863
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
leaq 0x17f6(%rip), %rsi      # 0x5060
movl $0x6, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r12), %r15
testq %r15, %r15
je 0x38c3
movq %r15, %rdi
callq 0x2090
movq 0x3722(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x38db
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
movq 0x36f6(%rip), %r14      # 0x6fd8
leaq 0x177e(%rip), %rsi      # 0x5067
movl $0x21, %edx
movq %r14, %rdi
callq 0x2150
movq (%r12), %rbx
testq %rbx, %rbx
je 0x391b
movq %rbx, %rdi
callq 0x2090
movq 0x36ca(%rip), %rdi      # 0x6fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x3933
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21d0
leaq 0x174f(%rip), %rsi      # 0x5089
movl $0x9, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x39df
movq 0x365c(%rip), %rbx      # 0x6fd8
leaq 0x1718(%rip), %rsi      # 0x509b
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq 0x362a(%rip), %rdi      # 0x6fd8
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x39d4
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x50(%rbp), %rdi
callq 0x3b44
xorl %eax, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x3adc
movq -0xc8(%rbp), %rsi
jmp 0x3ad4
movq %rax, %rbx
jmp 0x3af5
jmp 0x3a96
jmp 0x3a96
jmp 0x3a96
movq %rax, %rbx
jmp 0x3ac0
jmp 0x3a96
jmp 0x3a2a
movq %rax, %rbx
jmp 0x3a54
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x3a54
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2140
movq 0x3565(%rip), %rsi      # 0x6fc0
leaq -0x260(%rbp), %rdi
callq 0x20e0
leaq -0x1e0(%rbp), %rdi
callq 0x2070
jmp 0x3adc
jmp 0x3a96
movq %rax, %rbx
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x3adc
movq -0x250(%rbp), %rsi
jmp 0x3ad4
movq %rax, %rbx
jmp 0x3adc
movq %rax, %rbx
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x3ac0
movq -0x250(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x3adc
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3af5
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x50(%rbp), %rdi
callq 0x3b44
movq %rbx, %rdi
callq 0x21f0