#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char buf[128];
  while (NULL != fgets(buf, sizeof(buf), stdin)) {
    char output[128];
    for (char i = 0; i < sizeof(buf); ++i) {
      if (*(buf + i) >= 96 && *(buf + i) <= 122) {
        *(output + i) = *(buf + i) - 48;
      } else {
        *(output + i) = *(buf + i);
      }
    }
    printf("%s", output);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    $0x80,%esi
call   1040 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1224 <main+0x104>
movb   $0x0,-0x111(%rbp)
movsbq -0x111(%rbp),%rax
ff
cmp    $0x80,%rax
jae    120c <main+0xec>
movsbl -0x111(%rbp),%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x60,%eax
jl     11d4 <main+0xb4>
movsbl -0x111(%rbp),%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     11d4 <main+0xb4>
movsbl -0x111(%rbp),%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
sub    $0x30,%eax
mov    %al,%cl
movsbl -0x111(%rbp),%eax
cltq
mov    %cl,-0x110(%rbp,%rax,1)
jmp    11f4 <main+0xd4>
movsbl -0x111(%rbp),%eax
cltq
mov    -0x90(%rbp,%rax,1),%cl
movsbl -0x111(%rbp),%eax
cltq
mov    %cl,-0x110(%rbp,%rax,1)
jmp    11f9 <main+0xd9>
mov    -0x111(%rbp),%al
add    $0x1,%al
mov    %al,-0x111(%rbp)
jmp    1161 <main+0x41>
lea    -0x110(%rbp),%rsi
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    0x2eb3(%rip),%r12
mov    (%r12),%edx
mov    %rsp,%rdi
mov    $0x80,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1376 <main+0x256>
lea    0xeda(%rip),%r14
lea    0x80(%rsp),%r15
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqa (%rsp),%xmm2
movdqa 0x10(%rsp),%xmm3
movdqa 0x20(%rsp),%xmm0
movdqa 0x30(%rsp),%xmm1
movdqa %xmm2,%xmm4
movdqa 0xe6d(%rip),%xmm7
paddb  %xmm7,%xmm4
movdqa %xmm3,%xmm5
paddb  %xmm7,%xmm5
movdqa %xmm4,%xmm6
movdqa 0xe64(%rip),%xmm8
pminub %xmm8,%xmm6
pcmpeqb %xmm4,%xmm6
movdqa %xmm5,%xmm4
pminub %xmm8,%xmm4
pcmpeqb %xmm5,%xmm4
movdqa %xmm6,%xmm5
pandn  %xmm2,%xmm5
movdqa 0xe4d(%rip),%xmm9
paddb  %xmm9,%xmm2
pand   %xmm6,%xmm2
por    %xmm5,%xmm2
movdqa %xmm4,%xmm5
pandn  %xmm3,%xmm5
paddb  %xmm9,%xmm3
pand   %xmm4,%xmm3
por    %xmm5,%xmm3
movdqa %xmm2,0x80(%rsp)
movdqa %xmm3,0x90(%rsp)
movdqa %xmm0,%xmm2
paddb  %xmm7,%xmm2
movdqa %xmm1,%xmm3
paddb  %xmm7,%xmm3
movdqa %xmm2,%xmm4
pminub %xmm8,%xmm4
pcmpeqb %xmm2,%xmm4
movdqa %xmm3,%xmm2
pminub %xmm8,%xmm2
pcmpeqb %xmm3,%xmm2
movdqa %xmm4,%xmm3
pandn  %xmm0,%xmm3
paddb  %xmm9,%xmm0
pand   %xmm4,%xmm0
por    %xmm3,%xmm0
movdqa %xmm2,%xmm3
pandn  %xmm1,%xmm3
paddb  %xmm9,%xmm1
pand   %xmm2,%xmm1
por    %xmm3,%xmm1
movdqa %xmm0,0xa0(%rsp)
movdqa %xmm1,0xb0(%rsp)
movdqa 0x40(%rsp),%xmm0
movdqa 0x50(%rsp),%xmm1
movdqa %xmm0,%xmm2
paddb  %xmm7,%xmm2
movdqa %xmm1,%xmm3
paddb  %xmm7,%xmm3
movdqa %xmm2,%xmm4
pminub %xmm8,%xmm4
pcmpeqb %xmm2,%xmm4
movdqa %xmm3,%xmm2
pminub %xmm8,%xmm2
pcmpeqb %xmm3,%xmm2
movdqa %xmm4,%xmm3
pandn  %xmm0,%xmm3
paddb  %xmm9,%xmm0
pand   %xmm4,%xmm0
por    %xmm3,%xmm0
movdqa %xmm2,%xmm3
pandn  %xmm1,%xmm3
paddb  %xmm9,%xmm1
pand   %xmm2,%xmm1
por    %xmm3,%xmm1
movdqa %xmm0,0xc0(%rsp)
movdqa %xmm1,0xd0(%rsp)
movdqa 0x60(%rsp),%xmm0
movdqa 0x70(%rsp),%xmm1
movdqa %xmm0,%xmm2
paddb  %xmm7,%xmm2
movdqa %xmm1,%xmm3
paddb  %xmm7,%xmm3
movdqa %xmm2,%xmm4
pminub %xmm8,%xmm4
pcmpeqb %xmm2,%xmm4
movdqa %xmm3,%xmm2
pminub %xmm8,%xmm2
pcmpeqb %xmm3,%xmm2
movdqa %xmm4,%xmm3
pandn  %xmm0,%xmm3
paddb  %xmm9,%xmm0
pand   %xmm4,%xmm0
por    %xmm3,%xmm0
movdqa %xmm2,%xmm3
pandn  %xmm1,%xmm3
paddb  %xmm9,%xmm1
pand   %xmm2,%xmm1
por    %xmm3,%xmm1
movdqa %xmm0,0xe0(%rsp)
movdqa %xmm1,0xf0(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <fgets@plt>
test   %rax,%rax
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32* @fgets(i8* %3, i32 128, i32 %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %84, label %7
7: ; preds = %0
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%9 = bitcast [128 x i8]* %1 to <16 x i8>*
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 16
%11 = bitcast i8* %10 to <16 x i8>*
%12 = bitcast [128 x i8]* %2 to <16 x i8>*
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 16
%14 = bitcast i8* %13 to <16 x i8>*
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 32
%16 = bitcast i8* %15 to <16 x i8>*
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 48
%18 = bitcast i8* %17 to <16 x i8>*
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 32
%20 = bitcast i8* %19 to <16 x i8>*
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 48
%22 = bitcast i8* %21 to <16 x i8>*
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 64
%24 = bitcast i8* %23 to <16 x i8>*
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 80
%26 = bitcast i8* %25 to <16 x i8>*
%27 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 64
%28 = bitcast i8* %27 to <16 x i8>*
%29 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 80
%30 = bitcast i8* %29 to <16 x i8>*
%31 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 96
%32 = bitcast i8* %31 to <16 x i8>*
%33 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 112
%34 = bitcast i8* %33 to <16 x i8>*
%35 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 96
%36 = bitcast i8* %35 to <16 x i8>*
%37 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 112
%38 = bitcast i8* %37 to <16 x i8>*
br label %39
39: ; preds = %7, %39
%40 = load <16 x i8>, <16 x i8>* %9
%41 = load <16 x i8>, <16 x i8>* %11
%42 = add <16 x i8> %40, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%43 = add <16 x i8> %41, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%44 = icmp ult <16 x i8> %42, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%45 = icmp ult <16 x i8> %43, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%46 = add nsw <16 x i8> %40, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%47 = add nsw <16 x i8> %41, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%48 = select <16 x i1> %44, <16 x i8> %46, <16 x i8> %40
%49 = select <16 x i1> %45, <16 x i8> %47, <16 x i8> %41
store <16 x i8> %48, <16 x i8>* %12
store <16 x i8> %49, <16 x i8>* %14
%50 = load <16 x i8>, <16 x i8>* %16
%51 = load <16 x i8>, <16 x i8>* %18
%52 = add <16 x i8> %50, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%53 = add <16 x i8> %51, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%54 = icmp ult <16 x i8> %52, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%55 = icmp ult <16 x i8> %53, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%56 = add nsw <16 x i8> %50, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%57 = add nsw <16 x i8> %51, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%58 = select <16 x i1> %54, <16 x i8> %56, <16 x i8> %50
%59 = select <16 x i1> %55, <16 x i8> %57, <16 x i8> %51
store <16 x i8> %58, <16 x i8>* %20
store <16 x i8> %59, <16 x i8>* %22
%60 = load <16 x i8>, <16 x i8>* %24
%61 = load <16 x i8>, <16 x i8>* %26
%62 = add <16 x i8> %60, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%63 = add <16 x i8> %61, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%64 = icmp ult <16 x i8> %62, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%65 = icmp ult <16 x i8> %63, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%66 = add nsw <16 x i8> %60, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%67 = add nsw <16 x i8> %61, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%68 = select <16 x i1> %64, <16 x i8> %66, <16 x i8> %60
%69 = select <16 x i1> %65, <16 x i8> %67, <16 x i8> %61
store <16 x i8> %68, <16 x i8>* %28
store <16 x i8> %69, <16 x i8>* %30
%70 = load <16 x i8>, <16 x i8>* %32
%71 = load <16 x i8>, <16 x i8>* %34
%72 = add <16 x i8> %70, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%73 = add <16 x i8> %71, <i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96, i8 -96>
%74 = icmp ult <16 x i8> %72, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%75 = icmp ult <16 x i8> %73, <i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27, i8 27>
%76 = add nsw <16 x i8> %70, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%77 = add nsw <16 x i8> %71, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
%78 = select <16 x i1> %74, <16 x i8> %76, <16 x i8> %70
%79 = select <16 x i1> %75, <16 x i8> %77, <16 x i8> %71
store <16 x i8> %78, <16 x i8>* %36
store <16 x i8> %79, <16 x i8>* %38
%80 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%81 = load i32, i32* @stdin
%82 = call i32* @fgets(i8* %3, i32 128, i32 %81)
%83 = icmp eq i32* %82, null
br i1 %83, label %84, label %39
84: ; preds = %39, %0
ret i32 0
}