#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(int /*<<< orphan*/);
char getc_unlocked(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_unlocked(stdin)) != EOF) {
    ungetc(c, stdin);
    long long unsigned int x = fparse_lluint(stdin);
    getc_unlocked(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   1030 <getc_unlocked@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
mov    0x2e6f(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11c5 <main+0x85>
mov    -0x11(%rbp),%al
mov    0x2e62(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1060 <ungetc@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1040 <fparse_lluint@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
call   1030 <getc_unlocked@plt>
mov    -0x20(%rbp),%rsi
lea    0xe45(%rip),%rdi
call   1050 <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   1030 <getc_unlocked@plt>
mov    0x2e82(%rip),%r12
cmp    (%r12),%al
je     11a7 <main+0x67>
lea    0xe95(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15),%esi
movsbl %al,%edi
call   1060 <ungetc@plt>
mov    (%r15),%edi
call   1040 <fparse_lluint@plt>
mov    %rax,%rbx
mov    (%r15),%edi
call   1030 <getc_unlocked@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    (%r15),%edi
call   1030 <getc_unlocked@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_unlocked(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 %25
15: ; preds = %8
%16 = load i8, i8* %6
%17 = load i32, i32* @stdin
%18 = call i32 @ungetc(i8 signext %16, i32 %17)
%19 = load i32, i32* @stdin
%20 = call i64 @fparse_lluint(i32 %19)
store i64 %20, i64* %7
%21 = load i32, i32* @stdin
%22 = call signext i8 @getc_unlocked(i32 %21)
%23 = load i64, i64* %7
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %23)
br label %8
25: ; 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_unlocked(i32 %3)
%5 = load i8, i8* @EOF
%6 = icmp eq i8 %4, %5
br i1 %6, label %20, label %7
7: ; preds = %2, %7
%8 = phi i8 [ %17, %7 ], [ %4, %2 ]
%9 = load i32, i32* @stdin
%10 = tail call i32 @ungetc(i8 signext %8, i32 %9)
%11 = load i32, i32* @stdin
%12 = tail call i64 @fparse_lluint(i32 %11)
%13 = load i32, i32* @stdin
%14 = tail call signext i8 @getc_unlocked(i32 %13)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %12)
%16 = load i32, i32* @stdin
%17 = tail call signext i8 @getc_unlocked(i32 %16)
%18 = load i8, i8* @EOF
%19 = icmp eq i8 %17, %18
br i1 %19, label %20, label %7
20: ; preds = %7, %2
ret i32 0
}