#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ scanf(char *, char *, char *);
int main() {
  char l1[5000], l2[5000];
  while (scanf("%s%s", l1, l2) != EOF) {
    printf("%s%s\n", l1, l2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2720,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1390(%rbp),%rsi
lea    -0x2720(%rbp),%rdx
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
mov    0x2e95(%rip),%rcx
cmp    (%rcx),%rax
je     117b <main+0x5b>
lea    -0x1390(%rbp),%rsi
lea    -0x2720(%rbp),%rdx
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2720,%rsp
lea    0xec9(%rip),%rdi
lea    0x1390(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2e9a(%rip),%r13
cmp    0x0(%r13),%rax
je     1192 <main+0x72>
lea    0xeaa(%rip),%r14
lea    0x1390(%rsp),%r15
mov    %rsp,%rbx
lea    0xe93(%rip),%r12
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"%s%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5000 x i8]
%3 = alloca [5000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %10, %0
%5 = getelementptr inbounds [5000 x i8], [5000 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5000 x i8], [5000 x i8]* %3, i64 0, i64 0
%7 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = getelementptr inbounds [5000 x i8], [5000 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [5000 x i8], [5000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"%s%s\0A\00"
define i32 @main() {
%1 = alloca [5000 x i8]
%2 = alloca [5000 x i8]
%3 = getelementptr inbounds [5000 x i8], [5000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5000 x i8], [5000 x i8]* %2, i64 0, i64 0
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %13, label %8
8: ; preds = %0, %8
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %4)
%10 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%11 = load i64, i64* @EOF
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %8
13: ; preds = %8, %0
ret i32 0
}