// File: /workspace/github_cpp_makefile_star2_O3/thuydx55[P]C-Number-to-Word/main.cpp
// Function: main
int main(int argc, char const *argv[])
{
    if ( argc != 2 ) // argc should be 2 for correct execution
        // We print argv[0] assuming it is the program name
        cout << "usage: "<< argv[0] <<" <number string>\n";
    else {
        string numStr = argv[1];

        Number num(numStr);
        if (!num.isValid()) {
            cout << "'" << numStr << "' is not a number!" << endl;
            return 1;
        }

        cout << num.getTextRepresentation() << endl;
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x3554
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %rbx
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x36e6
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3724
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3850
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x34cb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x68(%rsp), %rdi
callq 0x38b0
movl %eax, %ebx
testb %al, %al
je 0x359a
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
xorl %edx, %edx
callq 0x38f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x5ad7(%rip), %rdi      # 0x8fd8
callq 0x2150
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3606
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3606
movq 0x5a7d(%rip), %r14      # 0x8fd8
leaq 0x2aa2(%rip), %rsi      # 0x6004
movl $0x7, %edx
movq %r14, %rdi
callq 0x2150
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x3636
movq %rbx, %rdi
callq 0x2090
movq 0x5a4e(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x364e
movq 0x5a37(%rip), %rdi      # 0x8fd8
leaq 0x2a76(%rip), %rsi      # 0x601e
movl $0x1, %edx
callq 0x2150
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x5a15(%rip), %rdi      # 0x8fd8
callq 0x2150
movq %rax, %r14
leaq 0x2a4e(%rip), %rsi      # 0x6020
movl $0x12, %edx
movq %rax, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x68(%rsp), %rdi
callq 0x3894
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x362b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
movl $0x1, %eax
testb %bl, %bl
jne 0x3666
jmp 0x3668
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21c0
movq 0x5983(%rip), %rdi      # 0x8fd8
leaq 0x29b0(%rip), %rsi      # 0x600c
movl $0x11, %edx
callq 0x2150
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
jmp 0x36b6
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x36c3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x36c3
movq %rax, %rbx
jmp 0x36c3
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x36b9
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3894
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36de
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x21d0