// File: /workspace/github_cpp_makefile_star2_O1/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 0x3550
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %rbx
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x36e4
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3722
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3844
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x34cb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x68(%rsp), %rdi
callq 0x38a4
testb %al, %al
je 0x3596
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
xorl %edx, %edx
callq 0x38f8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x5ad9(%rip), %rdi      # 0x8fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3549
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
xorl %ebx, %ebx
jmp 0x3607
movq 0x5a81(%rip), %r14      # 0x8fd8
leaq 0x2aa6(%rip), %rsi      # 0x6004
movl $0x7, %edx
movq %r14, %rdi
callq 0x2150
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x3632
movq %rbx, %rdi
callq 0x2090
movq 0x5a52(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x364a
movq 0x5a3b(%rip), %rdi      # 0x8fd8
leaq 0x2a7a(%rip), %rsi      # 0x601e
movl $0x1, %edx
callq 0x2150
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x5a19(%rip), %rdi      # 0x8fd8
callq 0x2150
movq %rax, %rbx
leaq 0x2a52(%rip), %rsi      # 0x6020
movl $0x12, %edx
movq %rax, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x20c0
leaq 0x68(%rsp), %rdi
callq 0x3888
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x362c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
testl %ebx, %ebx
je 0x3662
jmp 0x3664
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x21c0
movq 0x5987(%rip), %rdi      # 0x8fd8
leaq 0x29b4(%rip), %rsi      # 0x600c
movl $0x11, %edx
callq 0x2150
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
jmp 0x36b4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x36c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x36c1
movq %rax, %rbx
jmp 0x36c1
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x36b7
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3888
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36dc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x21d0