#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int getchar_unlocked();
int fastRead() {
  register int c = getchar_unlocked();
  int x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar_unlocked())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar_unlocked();
  }
  for (; c > 47 && c < 58; c = getchar_unlocked()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg)
    x = -x;
  return x;
}


x86 assembly (clang, -O0):
<fastRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar_unlocked@plt>
mov    %eax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1149 <fastRead+0x39>
xor    %eax,%eax
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jle    1153 <fastRead+0x43>
cmpl   $0x2d,-0x4(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1163 <fastRead+0x53>
jmp    1177 <fastRead+0x67>
jmp    1168 <fastRead+0x58>
mov    $0x0,%al
call   1030 <getchar_unlocked@plt>
mov    %eax,-0x4(%rbp)
jmp    1130 <fastRead+0x20>
cmpl   $0x2d,-0x4(%rbp)
jne    1192 <fastRead+0x82>
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getchar_unlocked@plt>
mov    %eax,-0x4(%rbp)
jmp    1197 <fastRead+0x87>
xor    %eax,%eax
cmpl   $0x2f,-0x4(%rbp)
mov    %al,-0xe(%rbp)
jle    11b0 <fastRead+0xa0>
cmpl   $0x3a,-0x4(%rbp)
setl   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    11c0 <fastRead+0xb0>
jmp    11e6 <fastRead+0xd6>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
add    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getchar_unlocked@plt>
mov    %eax,-0x4(%rbp)
jmp    1197 <fastRead+0x87>
cmpl   $0x0,-0xc(%rbp)
je     11f8 <fastRead+0xe8>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastRead>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <getchar_unlocked@plt>
mov    %eax,%ebp
cmp    $0x2d,%eax
je     1148 <fastRead+0x38>
mov    %ebp,%eax
add    $0xffffffc6,%eax
cmp    $0xfffffff5,%eax
ja     1148 <fastRead+0x38>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar_unlocked@plt>
mov    %eax,%ebp
cmp    $0x2d,%eax
je     1148 <fastRead+0x38>
mov    %ebp,%eax
add    $0xffffffc6,%eax
cmp    $0xfffffff6,%eax
jb     1130 <fastRead+0x20>
mov    %ebp,%eax
cmp    $0x2d,%ebp
jne    1156 <fastRead+0x46>
xor    %eax,%eax
call   1030 <getchar_unlocked@plt>
lea    -0x30(%rax),%ecx
xor    %ebx,%ebx
cmp    $0x9,%ecx
ja     118a <fastRead+0x7a>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%rbx,4),%ecx
lea    (%rax,%rcx,2),%ebx
add    $0xffffffd0,%ebx
xor    %eax,%eax
call   1030 <getchar_unlocked@plt>
mov    %eax,%ecx
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jb     1170 <fastRead+0x60>
mov    %ebx,%eax
neg    %eax
cmp    $0x2d,%ebp
cmovne %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fastRead() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @getchar_unlocked()
store i32 %4, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 48
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %14
11: ; preds = %8, %5
%12 = load i32, i32* %1
%13 = icmp ne i32 %12, 45
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br i1 %15, label %16, label %19
16: ; preds = %14
br label %17
17: ; preds = %16
%18 = call i32 (...) @getchar_unlocked()
store i32 %18, i32* %1
br label %5
19: ; preds = %14
%20 = load i32, i32* %1
%21 = icmp eq i32 %20, 45
br i1 %21, label %22, label %24
22: ; preds = %19
store i32 1, i32* %3
%23 = call i32 (...) @getchar_unlocked()
store i32 %23, i32* %1
br label %24
24: ; preds = %22, %19
br label %25
25: ; preds = %42, %24
%26 = load i32, i32* %1
%27 = icmp sgt i32 %26, 47
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i32, i32* %1
%30 = icmp slt i32 %29, 58
br label %31
31: ; preds = %28, %25
%32 = phi i1 [ false, %25 ], [ %30, %28 ]
br i1 %32, label %33, label %44
33: ; preds = %31
%34 = load i32, i32* %2
%35 = shl i32 %34, 1
%36 = load i32, i32* %2
%37 = shl i32 %36, 3
%38 = add nsw i32 %35, %37
%39 = load i32, i32* %1
%40 = add nsw i32 %38, %39
%41 = sub nsw i32 %40, 48
store i32 %41, i32* %2
br label %42
42: ; preds = %33
%43 = call i32 (...) @getchar_unlocked()
store i32 %43, i32* %1
br label %25
44: ; preds = %31
%45 = load i32, i32* %3
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* %2
%49 = sub nsw i32 0, %48
store i32 %49, i32* %2
br label %50
50: ; preds = %47, %44
%51 = load i32, i32* %2
ret i32 %51
}

LLVM IR (-O2):
define i32 @fastRead() {
%1 = tail call i32 (...) @getchar_unlocked()
%2 = add i32 %1, -58
%3 = icmp ult i32 %2, -10
%4 = icmp ne i32 %1, 45
%5 = and i1 %4, %3
br i1 %5, label %6, label %12
6: ; preds = %0, %6
%7 = tail call i32 (...) @getchar_unlocked()
%8 = add i32 %7, -58
%9 = icmp ult i32 %8, -10
%10 = icmp ne i32 %7, 45
%11 = and i1 %10, %9
br i1 %11, label %6, label %12
12: ; preds = %6, %0
%13 = phi i32 [ %1, %0 ], [ %7, %6 ]
%14 = icmp eq i32 %13, 45
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 (...) @getchar_unlocked()
br label %17
17: ; preds = %15, %12
%18 = phi i32 [ %16, %15 ], [ %13, %12 ]
%19 = add i32 %18, -48
%20 = icmp ult i32 %19, 10
br i1 %20, label %21, label %30
21: ; preds = %17, %21
%22 = phi i32 [ %26, %21 ], [ 0, %17 ]
%23 = phi i32 [ %27, %21 ], [ %18, %17 ]
%24 = mul i32 %22, 10
%25 = add nsw i32 %23, -48
%26 = add i32 %25, %24
%27 = tail call i32 (...) @getchar_unlocked()
%28 = add i32 %27, -48
%29 = icmp ult i32 %28, 10
br i1 %29, label %21, label %30
30: ; preds = %21, %17
%31 = phi i32 [ 0, %17 ], [ %26, %21 ]
%32 = sub nsw i32 0, %31
%33 = select i1 %14, i32 %32, i32 %31
ret i32 %33
}