// File: navrajsaini[P]PL_Compiler_design_project/scanner.cpp
// Function: Scanner::numericVAl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Scanner::numericVAl(string s)
{
   //cout<<s<<", "<<s.size()<<endl;
   int sSize = s.size()-1;
   int total = 0;
   int inc = 0;
   for(int i = sSize; 0 <= i; i--)
   {
      //cout<<inc<<", "<<sSize;
      char a = s[i];
      switch(a)
      {
	 case '1':
	    total = total + (1 * pow(10, inc));
	    break;
	 case '2':
	    total = total + (2 * pow(10, inc));
	    break;
	 case '3':
	    total = total + (3 * pow(10, inc));
	    break;	    
	 case '4':
	    total = total + (4 * pow(10, inc));
	    break;			 
	 case '5':
	    total = total + (5 * pow(10, inc));
	    break;	    
	 case '6':
	    total = total + (6 * pow(10, inc));
	    break;			 
	 case '7':
	    total = total + (7 * pow(10, inc));
	    break;	    
	 case '8':
	    total = total + (8 * pow(10, inc));
	    break;	    
	 case '9':
	    total = total + (9 * pow(10, inc));
	    break;	    
	 case '0':
	    total=total;	    
	 default:
	    break;
      }
      //cout<<", "<<total<<endl; 
      inc++;
   }
   //cout<<total<<endl;
   return total;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %rax
movq -0x38(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x2150
subq $0x1, %rax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl -0x20(%rbp), %eax
jg 0x14839
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x2390
movb (%rax), %al
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
addl $-0x30, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x9, %eax
ja 0x14820
movq -0x40(%rbp), %rax
leaq 0xafd8(%rip), %rcx      # 0x1f608
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x48(%rbp), %xmm1
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x50(%rbp), %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x58(%rbp), %xmm1
movsd 0xafa7(%rip), %xmm2     # 0x1f660
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x60(%rbp), %xmm1
movsd 0xaf67(%rip), %xmm2     # 0x1f658
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x68(%rbp), %xmm1
movsd 0xaf27(%rip), %xmm2     # 0x1f650
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x70(%rbp), %xmm1
movsd 0xaee7(%rip), %xmm2     # 0x1f648
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x78(%rbp), %xmm1
movsd 0xaea7(%rip), %xmm2     # 0x1f640
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x80(%rbp), %xmm1
movsd 0xae6a(%rip), %xmm2     # 0x1f638
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
cvtsi2sdl -0x18(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movl -0x1c(%rbp), %esi
movl $0xa, %edi
callq 0x14850
movsd -0x88(%rbp), %xmm1
movsd 0xae27(%rip), %xmm2     # 0x1f630
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
movl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x14822
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x145f2
movl -0x18(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop