#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 */
char EOF;
unsigned long long fparse_lluint();
char getc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned long long);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char c;
  while ((c = getc(stdin)) != EOF) {
    ungetc(c, stdin);
    long long unsigned int x = fparse_lluint();
    getc(stdin);
    printf("%llu\n", x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1060 <getc@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
mov    0x2e6f(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11be <main+0x7e>
mov    -0x11(%rbp),%al
mov    0x2e62(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1050 <ungetc@plt>
mov    $0x0,%al
call   1030 <fparse_lluint@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1060 <getc@plt>
mov    -0x20(%rbp),%rsi
lea    0xe4c(%rip),%rdi
call   1040 <printf@plt>
jmp    1156 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2e99(%rip),%r15
mov    (%r15),%edi
call   1060 <getc@plt>
mov    0x2e82(%rip),%r12
cmp    (%r12),%al
je     11a6 <main+0x66>
lea    0xe95(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15),%esi
movsbl %al,%edi
call   1050 <ungetc@plt>
xor    %eax,%eax
call   1030 <fparse_lluint@plt>
mov    %rax,%rbx
mov    (%r15),%edi
call   1060 <getc@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    (%r15),%edi
call   1060 <getc@plt>
cmp    (%r12),%al
jne    1170 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i8 0
@.str = [6 x i8] c"%llu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* @stdin
%10 = call signext i8 @getc(i32 %9)
store i8 %10, i8* %6
%11 = sext i8 %10 to i32
%12 = load i8, i8* @EOF
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %11, %13
br i1 %14, label %15, label %24
15: ; preds = %8
%16 = load i8, i8* %6
%17 = load i32, i32* @stdin
%18 = call i32 @ungetc(i8 signext %16, i32 %17)
%19 = call i64 (...) @fparse_lluint()
store i64 %19, i64* %7
%20 = load i32, i32* @stdin
%21 = call signext i8 @getc(i32 %20)
%22 = load i64, i64* %7
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %22)
br label %8
24: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i8 0
@.str = [6 x i8] c"%llu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call signext i8 @getc(i32 %3)
%5 = load i8, i8* @EOF
%6 = icmp eq i8 %4, %5
br i1 %6, label %19, label %7
7: ; preds = %2, %7
%8 = phi i8 [ %16, %7 ], [ %4, %2 ]
%9 = load i32, i32* @stdin
%10 = tail call i32 @ungetc(i8 signext %8, i32 %9)
%11 = tail call i64 (...) @fparse_lluint()
%12 = load i32, i32* @stdin
%13 = tail call signext i8 @getc(i32 %12)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %11)
%15 = load i32, i32* @stdin
%16 = tail call signext i8 @getc(i32 %15)
%17 = load i8, i8* @EOF
%18 = icmp eq i8 %16, %17
br i1 %18, label %19, label %7
19: ; preds = %7, %2
ret i32 0
}