#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*/ a;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int /*<<< orphan*/ two2upper(char **, int);
int main() {
  char a[5][64];
  int i = 0;
  int size = sizeof(a) / sizeof(a[0]);
  for (i = 0; i < size; i++) {
    fgets(a[i], sizeof(a[i]), stdin);
    a[i][strlen(a[i]) - 1] = 0;
  }
  two2upper(a, size);
  for (i = 0; i < size; i++) {
    puts(a[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x154(%rbp)
movl   $0x5,-0x158(%rbp)
movl   $0x0,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x158(%rbp),%eax
jge    1207 <main+0xc7>
movslq -0x154(%rbp),%rax
lea    -0x150(%rbp),%rdi
shl    $0x6,%rax
add    %rax,%rdi
mov    0x2e4a(%rip),%rax
mov    (%rax),%edx
mov    $0x40,%esi
call   1060 <fgets@plt>
movslq -0x154(%rbp),%rcx
lea    -0x150(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
mov    %rax,-0x160(%rbp)
movslq -0x154(%rbp),%rax
lea    -0x150(%rbp),%rdi
shl    $0x6,%rax
add    %rax,%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x160(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    1170 <main+0x30>
lea    -0x150(%rbp),%rdi
mov    -0x158(%rbp),%esi
call   1030 <two2upper@plt>
movl   $0x0,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x158(%rbp),%eax
jge    1263 <main+0x123>
movslq -0x154(%rbp),%rax
lea    -0x150(%rbp),%rdi
shl    $0x6,%rax
add    %rax,%rdi
call   1040 <puts@plt>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    1223 <main+0xe3>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    0x2e90(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0x40(%rsp),%r14
mov    0x0(%rbp),%edx
mov    %r14,%rdi
mov    $0x40,%esi
call   1060 <fgets@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,0x3f(%rax,%rbx,1)
lea    0x80(%rsp),%r15
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    $0x40,%esi
call   1060 <fgets@plt>
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,0x7f(%rax,%rbx,1)
lea    0xc0(%rsp),%r12
mov    0x0(%rbp),%edx
mov    %r12,%rdi
mov    $0x40,%esi
call   1060 <fgets@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,0xbf(%rax,%rbx,1)
lea    0x100(%rsp),%r13
mov    0x0(%rbp),%edx
mov    %r13,%rdi
mov    $0x40,%esi
call   1060 <fgets@plt>
mov    %r13,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,0xff(%rax,%rbx,1)
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <two2upper@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [64 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 5, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %27, %0
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %30
9: ; preds = %5
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %2, i64 0, i64 %11
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %12, i64 0, i64 0
%14 = load i32, i32* @stdin
%15 = call i32 @fgets(i8* %13, i32 64, i32 %14)
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %2, i64 0, i64 %17
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %2, i64 0, i64 %20
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%23 = call i32 @strlen(i8* %22)
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %18, i64 0, i64 %25
store i8 0, i8* %26
br label %27
27: ; preds = %9
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %5
30: ; preds = %5
%31 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %2, i64 0, i64 0
%32 = bitcast [64 x i8]* %31 to i8**
%33 = load i32, i32* %4
%34 = call i32 @two2upper(i8** %32, i32 %33)
store i32 0, i32* %3
br label %35
35: ; preds = %45, %30
%36 = load i32, i32* %3
%37 = load i32, i32* %4
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %48
39: ; preds = %35
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %2, i64 0, i64 %41
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %42, i64 0, i64 0
%44 = call i32 @puts(i8* %43)
br label %45
45: ; preds = %39
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %35
48: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [5 x [64 x i8]]
%2 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 64, i32 %3)
%5 = call i32 @strlen(i8* %2)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 0, i64 %7
store i8 0, i8* %8
%9 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 1, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 64, i32 %10)
%12 = call i32 @strlen(i8* %9)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 1, i64 %14
store i8 0, i8* %15
%16 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 2, i64 0
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %16, i32 64, i32 %17)
%19 = call i32 @strlen(i8* %16)
%20 = add nsw i32 %19, -1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 2, i64 %21
store i8 0, i8* %22
%23 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 3, i64 0
%24 = load i32, i32* @stdin
%25 = call i32 @fgets(i8* %23, i32 64, i32 %24)
%26 = call i32 @strlen(i8* %23)
%27 = add nsw i32 %26, -1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 3, i64 %28
store i8 0, i8* %29
%30 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 4, i64 0
%31 = load i32, i32* @stdin
%32 = call i32 @fgets(i8* %30, i32 64, i32 %31)
%33 = call i32 @strlen(i8* %30)
%34 = add nsw i32 %33, -1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [5 x [64 x i8]], [5 x [64 x i8]]* %1, i64 0, i64 4, i64 %35
store i8 0, i8* %36
%37 = bitcast [5 x [64 x i8]]* %1 to i8**
%38 = call i32 @two2upper(i8** %37, i32 5)
%39 = call i32 @puts(i8* %2)
%40 = call i32 @puts(i8* %9)
%41 = call i32 @puts(i8* %16)
%42 = call i32 @puts(i8* %23)
%43 = call i32 @puts(i8* %30)
ret i32 0
}