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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x74(%rbp)
movsbl -0x70(%rbp),%eax
cmp    $0x53,%eax
jne    11a4 <main+0x74>
movsbl -0x6f(%rbp),%eax
cmp    $0x54,%eax
jne    11a4 <main+0x74>
movsbl -0x6e(%rbp),%eax
cmp    $0x4f,%eax
jne    11a4 <main+0x74>
movsbl -0x6d(%rbp),%eax
cmp    $0x50,%eax
jne    11a4 <main+0x74>
movsbl -0x6c(%rbp),%eax
cmp    $0x0,%eax
jne    11a4 <main+0x74>
jmp    1213 <main+0xe3>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    11fe <main+0xce>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     11eb <main+0xbb>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     11eb <main+0xbb>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
sub    $0x20,%ecx
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11f0 <main+0xc0>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11ab <main+0x7b>
lea    -0x70(%rbp),%rsi
lea    0xdf7(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%r14
mov    %rsp,%rbx
jmp    115b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movdqa (%rsp),%xmm0
movd   %xmm0,%ecx
cmp    $0x504f5453,%ecx
jne    1186 <main+0x56>
cmpb   $0x0,0x4(%rsp)
je     11bf <main+0x8f>
test   %eax,%eax
jle    1150 <main+0x20>
mov    %eax,%eax
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x61(%rcx),%esi
cmp    $0x19,%sil
ja     11b0 <main+0x80>
add    $0xe0,%cl
mov    %cl,-0x1(%rsp,%rdx,1)
cmp    %rdx,%rax
je     1150 <main+0x20>
movzbl (%rsp,%rdx,1),%ecx
add    $0x1,%rdx
jmp    11a0 <main+0x70>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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