#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 *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char letters[200];
  int i, j;
  for (i = 0; i <= 200; i++) {
    scanf("%s", letters);
    if (letters[0] == 'S' && letters[1] == 'T' && letters[2] == 'O' &&
        letters[3] == 'P') {
      break;
    }
    for (j = 0; j <= 200; j++) {
      if (letters[j] >= 'a' && letters[j] <= 'z') {
        letters[j] = letters[j] - 32;
      }
    }
    printf("%s\n", letters);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xd4(%rbp)
cmpl   $0xc8,-0xd4(%rbp)
jg     1250 <main+0x130>
lea    -0xd0(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0xd0(%rbp),%eax
cmp    $0x53,%eax
jne    11a4 <main+0x84>
movsbl -0xcf(%rbp),%eax
cmp    $0x54,%eax
jne    11a4 <main+0x84>
movsbl -0xce(%rbp),%eax
cmp    $0x4f,%eax
jne    11a4 <main+0x84>
movsbl -0xcd(%rbp),%eax
cmp    $0x50,%eax
jne    11a4 <main+0x84>
jmp    1250 <main+0x130>
movl   $0x0,-0xd8(%rbp)
cmpl   $0xc8,-0xd8(%rbp)
jg     1229 <main+0x109>
movslq -0xd8(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
jl     1210 <main+0xf0>
movslq -0xd8(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     1210 <main+0xf0>
movslq -0xd8(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
sub    $0x20,%eax
mov    %al,%cl
movslq -0xd8(%rbp),%rax
mov    %cl,-0xd0(%rbp,%rax,1)
jmp    1215 <main+0xf5>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    11ae <main+0x8e>
lea    -0xd0(%rbp),%rsi
lea    0xdcc(%rip),%rdi
call   1030 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xc8,%rsp
xor    %ebp,%ebp
lea    0xeca(%rip),%r14
mov    %rsp,%rbx
lea    0xec3(%rip),%r15
jmp    1166 <main+0x46>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0xc9,%ebp
je     11c5 <main+0xa5>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movdqa (%rsp),%xmm0
movd   %xmm0,%ecx
cmp    $0x504f5453,%ecx
je     11c5 <main+0xa5>
mov    $0x2,%eax
jmp    1198 <main+0x78>
nopl   0x0(%rax)
movzbl (%rsp,%rax,1),%ecx
add    $0x2,%rax
lea    -0x61(%rcx),%edx
cmp    $0x19,%dl
ja     11a7 <main+0x87>
add    $0xe0,%cl
mov    %cl,-0x2(%rsp,%rax,1)
cmp    $0xca,%rax
je     1150 <main+0x30>
movzbl -0x1(%rsp,%rax,1),%ecx
lea    -0x61(%rcx),%edx
cmp    $0x19,%dl
ja     1190 <main+0x70>
add    $0xe0,%cl
mov    %cl,-0x1(%rsp,%rax,1)
jmp    1190 <main+0x70>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %5
5: ; preds = %67, %0
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 200
br i1 %7, label %8, label %70
8: ; preds = %5
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 83
br i1 %14, label %15, label %31
15: ; preds = %8
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 84
br i1 %19, label %20, label %31
20: ; preds = %15
%21 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 2
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 79
br i1 %24, label %25, label %31
25: ; preds = %20
%26 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 80
br i1 %29, label %30, label %31
30: ; preds = %25
br label %70
31: ; preds = %25, %20, %15, %8
store i32 0, i32* %4
br label %32
32: ; preds = %61, %31
%33 = load i32, i32* %4
%34 = icmp sle i32 %33, 200
br i1 %34, label %35, label %64
35: ; preds = %32
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp sge i32 %40, 97
br i1 %41, label %42, label %60
42: ; preds = %35
%43 = load i32, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp sle i32 %47, 122
br i1 %48, label %49, label %60
49: ; preds = %42
%50 = load i32, i32* %4
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = sub nsw i32 %54, 32
%56 = trunc i32 %55 to i8
%57 = load i32, i32* %4
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %58
store i8 %56, i8* %59
br label %60
60: ; preds = %49, %42, %35
br label %61
61: ; preds = %60
%62 = load i32, i32* %4
%63 = add nsw i32 %62, 1
store i32 %63, i32* %4
br label %32
64: ; preds = %32
%65 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%66 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %65)
br label %67
67: ; preds = %64
%68 = load i32, i32* %3
%69 = add nsw i32 %68, 1
store i32 %69, i32* %3
br label %5
70: ; preds = %30, %5
ret i32 0
}

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