#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 */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int x, y;
  char a[3][5];
  for (y = 0; y < 3; y++)
    for (x = 0; x < 5; x++)
      scanf(" %c", &a[y][x]);
  for (y = 0; y < 3; y++, printf("\n"))
    for (x = 0; x < 5; x++)
      printf("%c ", a[y][x] + 32);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1194 <main+0x74>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1181 <main+0x61>
movslq -0xc(%rbp),%rax
lea    -0x1b(%rbp),%rsi
imul   $0x5,%rax,%rax
add    %rax,%rsi
movslq -0x8(%rbp),%rax
add    %rax,%rsi
lea    0xe92(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <main+0x27>
jmp    1186 <main+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    120d <main+0xed>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11ec <main+0xcc>
movslq -0xc(%rbp),%rcx
lea    -0x1b(%rbp),%rax
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
add    $0x20,%esi
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ac <main+0x8c>
jmp    11f1 <main+0xd1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119b <main+0x7b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0x1(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x2(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x3(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x5(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x6(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x7(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x9(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xa(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xb(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xd(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movsbl 0x1(%rsp),%esi
add    $0x20,%esi
lea    0xdf6(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x2(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x3(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x4(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x6(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x8(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x9(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xa(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0xb(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xc(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xd(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xe(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xf(%rsp),%esi
add    $0x20,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" %c\00"
@.str.1 = [4 x i8] c"%c \00"
define i32 @main() {
%1 = alloca [3 x [5 x i8]]
%2 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 0, i64 1
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 0, i64 2
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 0, i64 3
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 0, i64 4
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 1, i64 0
%13 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 1, i64 1
%15 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 1, i64 2
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 1, i64 3
%19 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 1, i64 4
%21 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 2, i64 0
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 2, i64 1
%25 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 2, i64 2
%27 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 2, i64 3
%29 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [3 x [5 x i8]], [3 x [5 x i8]]* %1, i64 0, i64 2, i64 4
%31 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = load i8, i8* %2
%33 = sext i8 %32 to i32
%34 = add nsw i32 %33, 32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = load i8, i8* %4
%37 = sext i8 %36 to i32
%38 = add nsw i32 %37, 32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = load i8, i8* %6
%41 = sext i8 %40 to i32
%42 = add nsw i32 %41, 32
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %42)
%44 = load i8, i8* %8
%45 = sext i8 %44 to i32
%46 = add nsw i32 %45, 32
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = load i8, i8* %10
%49 = sext i8 %48 to i32
%50 = add nsw i32 %49, 32
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %50)
%52 = call i32 @putchar(i32 10)
%53 = load i8, i8* %12
%54 = sext i8 %53 to i32
%55 = add nsw i32 %54, 32
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %55)
%57 = load i8, i8* %14
%58 = sext i8 %57 to i32
%59 = add nsw i32 %58, 32
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %59)
%61 = load i8, i8* %16
%62 = sext i8 %61 to i32
%63 = add nsw i32 %62, 32
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %63)
%65 = load i8, i8* %18
%66 = sext i8 %65 to i32
%67 = add nsw i32 %66, 32
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %67)
%69 = load i8, i8* %20
%70 = sext i8 %69 to i32
%71 = add nsw i32 %70, 32
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %71)
%73 = call i32 @putchar(i32 10)
%74 = load i8, i8* %22
%75 = sext i8 %74 to i32
%76 = add nsw i32 %75, 32
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %76)
%78 = load i8, i8* %24
%79 = sext i8 %78 to i32
%80 = add nsw i32 %79, 32
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %80)
%82 = load i8, i8* %26
%83 = sext i8 %82 to i32
%84 = add nsw i32 %83, 32
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %84)
%86 = load i8, i8* %28
%87 = sext i8 %86 to i32
%88 = add nsw i32 %87, 32
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %88)
%90 = load i8, i8* %30
%91 = sext i8 %90 to i32
%92 = add nsw i32 %91, 32
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %92)
%94 = call i32 @putchar(i32 10)
ret i32 0
}