#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() {
  char word[100];
  do {
    scanf("%s", word);
    if (word[0] == 'S' && word[1] == 'T' && word[2] == 'O' && word[3] == 'P') {
      break;
    } else {
      int e = 0;
      for (; e < 100; e++) {
        if (word[e] >= 'a' && word[e] <= 'z') {
          word[e] -= 32;
        }
      }
      printf("%s", word);
      printf("\n");
    }
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x70(%rbp),%eax
cmp    $0x53,%eax
jne    117b <main+0x5b>
movsbl -0x6f(%rbp),%eax
cmp    $0x54,%eax
jne    117b <main+0x5b>
movsbl -0x6e(%rbp),%eax
cmp    $0x4f,%eax
jne    117b <main+0x5b>
movsbl -0x6d(%rbp),%eax
cmp    $0x50,%eax
jne    117b <main+0x5b>
jmp    1207 <main+0xe7>
movl   $0x0,-0x74(%rbp)
cmpl   $0x64,-0x74(%rbp)
jge    11d3 <main+0xb3>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     11c0 <main+0xa0>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     11c0 <main+0xa0>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
sub    $0x20,%ecx
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11c5 <main+0xa5>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1182 <main+0x62>
lea    -0x70(%rbp),%rsi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f8 <main+0xd8>
mov    $0x1,%al
test   $0x1,%al
jne    1132 <main+0x12>
jmp    1207 <main+0xe7>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xec2(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x504f5453,%eax
je     11d2 <main+0xa2>
lea    0xea0(%rip),%r14
lea    0x10(%rsp),%rbx
xor    %ecx,%ecx
jmp    117f <main+0x4f>
nopl   0x0(%rax)
add    $0x1,%rcx
cmp    $0x64,%rcx
je     1190 <main+0x60>
movzbl 0x10(%rsp,%rcx,1),%eax
lea    -0x61(%rax),%edx
cmp    $0x19,%dl
ja     1170 <main+0x40>
add    $0xe0,%al
mov    %al,0x10(%rsp,%rcx,1)
jmp    1170 <main+0x40>
nop
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%edx
movdqa %xmm0,(%rsp)
movzbl (%rsp),%eax
mov    $0x0,%ecx
cmp    $0x504f5453,%edx
jne    117f <main+0x4f>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

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

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