#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 /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  char in[11];
  char *s;
  unsigned char c;
  unsigned int i, j;
  int idx_in;
  in[10] = 0;
  idx_in = 0;
  s = in;
  i = 0;
  c = in[idx_in];
  while (('0' <= c) && (c <= '9')) {
    j = c - '0';
    i = i * 10U + j;
    idx_in++;
    c = in[idx_in];
  }
  __VERIFIER_assert(i >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movl   $0x0,-0x28(%rbp)
lea    -0xf(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movslq -0x28(%rbp),%rax
mov    -0xf(%rbp,%rax,1),%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x29(%rbp)
jg     1167 <main+0x57>
movzbl -0x19(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    1177 <main+0x67>
jmp    11a4 <main+0x94>
movzbl -0x19(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x24(%rbp)
imul   $0xa,-0x20(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
movslq -0x28(%rbp),%rax
mov    -0xf(%rbp,%rax,1),%al
mov    %al,-0x19(%rbp)
jmp    1144 <main+0x34>
cmpl   $0x0,-0x20(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 10
store i8 0, i8* %8
store i32 0, i32* %7
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
store i8* %9, i8** %3
store i32 0, i32* %5
%10 = load i32, i32* %7
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %11
%13 = load i8, i8* %12
store i8 %13, i8* %4
br label %14
14: ; preds = %24, %0
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = icmp sle i32 48, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = icmp sle i32 %20, 57
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br i1 %23, label %24, label %38
24: ; preds = %22
%25 = load i8, i8* %4
%26 = zext i8 %25 to i32
%27 = sub nsw i32 %26, 48
store i32 %27, i32* %6
%28 = load i32, i32* %5
%29 = mul i32 %28, 10
%30 = load i32, i32* %6
%31 = add i32 %29, %30
store i32 %31, i32* %5
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %35
%37 = load i8, i8* %36
store i8 %37, i8* %4
br label %14
38: ; preds = %22
%39 = load i32, i32* %5
%40 = icmp uge i32 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @__VERIFIER_assert(i32 %41)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}