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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x70(%rbp),%eax
cmp    $0x53,%eax
jne    1181 <main+0x61>
movsbl -0x6f(%rbp),%eax
cmp    $0x54,%eax
jne    1181 <main+0x61>
movsbl -0x6e(%rbp),%eax
cmp    $0x4f,%eax
jne    1181 <main+0x61>
movsbl -0x6d(%rbp),%eax
cmp    $0x50,%eax
jne    1181 <main+0x61>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret
movl   $0x0,-0x74(%rbp)
cmpl   $0x64,-0x74(%rbp)
jge    11df <main+0xbf>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     11cc <main+0xac>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     11cc <main+0xac>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
sub    $0x20,%eax
mov    %al,%cl
movslq -0x74(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11d1 <main+0xb1>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1188 <main+0x68>
lea    -0x70(%rbp),%rsi
lea    0xe16(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
lea    0xece(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%ecx
cmp    $0x504f5453,%ecx
je     11c6 <main+0xa6>
xor    %eax,%eax
lea    0xea8(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe9d(%rip),%r15
jmp    117f <main+0x5f>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    $0x64,%rax
je     1190 <main+0x70>
movzbl 0x10(%rsp,%rax,1),%ecx
lea    -0x61(%rcx),%edx
cmp    $0x19,%dl
ja     1170 <main+0x50>
add    $0xe0,%cl
mov    %cl,0x10(%rsp,%rax,1)
jmp    1170 <main+0x50>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%edx
movdqa %xmm0,(%rsp)
movzbl (%rsp),%ecx
mov    $0x0,%eax
cmp    $0x504f5453,%edx
jne    117f <main+0x5f>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\0A%s\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 = %0, %60
%5 = bitcast [100 x i8]* %2 to i8**
%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
ret i32 0
27: ; preds = %21, %16, %11, %4
store i32 0, i32* %3
br label %28
28: ; preds = %57, %27
%29 = load i32, i32* %3
%30 = icmp slt i32 %29, 100
br i1 %30, label %31, label %60
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 %56
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 %56
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
%53 = load i32, i32* %3
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %54
store i8 %52, i8* %55
br label %56
56: ; preds = %45, %38, %31
br label %57
57: ; preds = %56
%58 = load i32, i32* %3
%59 = add nsw i32 %58, 1
store i32 %59, i32* %3
br label %28
60: ; preds = %28
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %61)
br label %4
}

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