#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 */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
scalar_t__ gets(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stdout;
char *strtok(char *, char *);
int main() {
  char po[100000] = "";
  while (gets(po)) {
    strtok(po, " ");
    char *pi = strtok(NULL, " ");
    int16_t out = atoi(pi);
    fwrite(&out, sizeof(int16_t), 1, stdout);
    memset(po, 0, 100000);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x186b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x186a0,%edx
call   1030 <memset@plt>
lea    -0x186b0(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     11fe <main+0xae>
lea    -0x186b0(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1050 <strtok@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe57(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x186b8(%rbp)
mov    -0x186b8(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x186bc(%rbp)
mov    0x2e12(%rip),%rax
mov    (%rax),%ecx
lea    -0x186bc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <fwrite@plt>
lea    -0x186b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x186a0,%edx
call   1030 <memset@plt>
jmp    1175 <main+0x25>
mov    $0x1,%eax
add    $0x186c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x186b8,%rsp
lea    0x10(%rsp),%rbx
mov    $0x186a0,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     11f3 <main+0xa3>
lea    0xe7a(%rip),%r14
lea    0x10(%rsp),%rbx
mov    0x2e4e(%rip),%r12
lea    0xc(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strtok@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   1050 <strtok@plt>
mov    %rax,%rdi
call   1060 <atoi@plt>
mov    %eax,0xc(%rsp)
mov    (%r12),%ecx
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x186a0,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
jne    11a0 <main+0x50>
mov    $0x1,%eax
add    $0x186b8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [100000 x i8]
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [100000 x i8]* %2 to i8*
br label %6
6: ; preds = %10, %0
%7 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%8 = call i64 @gets(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%12 = call i8* @strtok(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %4
%16 = load i32, i32* @stdout
%17 = call i32 @fwrite(i32* %4, i32 4, i32 1, i32 %16)
%18 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%19 = call i32 @memset(i8* %18, i32 0, i32 100000)
br label %6
20: ; preds = %6
ret i32 1
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca [100000 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [100000 x i8], [100000 x i8]* %1, i64 0, i64 0
%4 = call i64 @gets(i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %0
%7 = bitcast i32* %2 to i8*
br label %8
8: ; preds = %6, %8
%9 = call i8* @strtok(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %2
%12 = load i32, i32* @stdout
%13 = call i32 @fwrite(i32* %2, i32 4, i32 1, i32 %12)
%14 = call i32 @memset(i8* %3, i32 0, i32 100000)
%15 = call i64 @gets(i8* %3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %0
ret i32 1
}