#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__ islower(char);
int /*<<< orphan*/ printf(char *, char);
char toupper(char);
int main(int argc, char *argv[]) {
  char inital;
  for (int i = 1; i < argc; i++) {
    inital = argv[i][0];
    if (islower(inital)) {
      inital = toupper(inital);
    }
    printf("%c", inital);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a7 <main+0x77>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1189 <main+0x59>
movsbl -0x11(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,-0x11(%rbp)
lea    0xe70(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1050 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1198 <main+0x68>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebp
lea    0xeae(%rip),%r14
jmp    1174 <main+0x44>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %bl,%esi
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
je     1198 <main+0x68>
mov    (%r15,%rbp,8),%rax
movzbl (%rax),%ebx
movsbl %bl,%r13d
mov    %r13d,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1160 <main+0x30>
mov    %r13d,%edi
call   1040 <toupper@plt>
mov    %eax,%ebx
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %16, %2
ret i32 0
7: ; preds = %4, %16
%8 = phi i64 [ 1, %4 ], [ %19, %16 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = tail call i64 @islower(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %7
%15 = tail call signext i8 @toupper(i8 signext %11)
br label %16
16: ; preds = %14, %7
%17 = phi i8 [ %15, %14 ], [ %11, %7 ]
%18 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %17)
%19 = add nuw nsw i64 %8, 1
%20 = icmp eq i64 %19, %5
br i1 %20, label %6, label %7
}