#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 getchar();
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char b[3][10], c;
  int i;
  for (i = 0; i < 2; i++)
    scanf("%s", b[i]);
  i = 0;
  while ((c = getchar()) != '\n')
    b[2][i++] = c;
  b[2][i] = '\0';
  printf("%s%s%s\n", b[0], b[1], b[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x2,-0x38(%rbp)
jge    1179 <main+0x49>
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1146 <main+0x16>
movl   $0x0,-0x38(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x31(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     11af <main+0x7f>
mov    -0x31(%rbp),%cl
mov    -0x38(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x38(%rbp)
cltq
mov    %cl,-0x1c(%rbp,%rax,1)
jmp    1180 <main+0x50>
movslq -0x38(%rbp),%rax
movb   $0x0,-0x1c(%rbp,%rax,1)
lea    -0x30(%rbp),%rsi
lea    -0x30(%rbp),%rdx
add    $0xa,%rdx
lea    -0x30(%rbp),%rcx
add    $0x14,%rcx
lea    0xe30(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xec2(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xa(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
je     1185 <main+0x55>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %al,0x14(%rsp,%rbx,1)
add    $0x1,%rbx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    1170 <main+0x40>
mov    %ebx,%ebx
lea    0x14(%rsp),%rcx
movb   $0x0,0x14(%rsp,%rbx,1)
lea    0xe6d(%rip),%rdi
mov    %rsp,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"%s%s%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [10 x i8]]
%3 = alloca i8
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 %10
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %8
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %5
17: ; preds = %5
store i32 0, i32* %4
br label %18
18: ; preds = %22, %17
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 10
br i1 %21, label %22, label %29
22: ; preds = %18
%23 = load i8, i8* %3
%24 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 2
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [10 x i8], [10 x i8]* %24, i64 0, i64 %27
store i8 %23, i8* %28
br label %18
29: ; preds = %18
%30 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 2
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %30, i64 0, i64 %32
store i8 0, i8* %33
%34 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 0
%35 = getelementptr inbounds [10 x i8], [10 x i8]* %34, i64 0, i64 0
%36 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 1
%37 = getelementptr inbounds [10 x i8], [10 x i8]* %36, i64 0, i64 0
%38 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %2, i64 0, i64 2
%39 = getelementptr inbounds [10 x i8], [10 x i8]* %38, i64 0, i64 0
%40 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %35, i8* %37, i8* %39)
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"%s%s%s\0A\00"
define i32 @main() {
%1 = alloca [3 x [10 x i8]]
%2 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %1, i64 0, i64 1, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call signext i8 (...) @getchar()
%7 = icmp eq i8 %6, 10
br i1 %7, label %17, label %8
8: ; preds = %0, %8
%9 = phi i64 [ %11, %8 ], [ 0, %0 ]
%10 = phi i8 [ %13, %8 ], [ %6, %0 ]
%11 = add nuw i64 %9, 1
%12 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %1, i64 0, i64 2, i64 %9
store i8 %10, i8* %12
%13 = call signext i8 (...) @getchar()
%14 = icmp eq i8 %13, 10
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = and i64 %11, 4294967295
br label %17
17: ; preds = %15, %0
%18 = phi i64 [ 0, %0 ], [ %16, %15 ]
%19 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %1, i64 0, i64 2, i64 %18
store i8 0, i8* %19
%20 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %1, i64 0, i64 2, i64 0
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %4, i8* %20)
ret i32 0
}