#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 */
char getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  char c;
  do {
    printf("bukva");
    c = getchar();
  } while (c < 'a' || c > 'z');
  if (c == 'a')
    printf("z");
  if (c == 'b')
    printf("y");
  if (c == 'c')
    printf("x");
  if (c == 'd')
    printf("w");
  if (c == 'e')
    printf("v");
  if (c == 'f')
    printf("u");
  if (c == 'g')
    printf("t");
  if (c == 'h')
    printf("s");
  if (c == 'i')
    printf("r");
  if (c == 'j')
    printf("q");
  if (c == 'k')
    printf("p");
  if (c == 'l')
    printf("o");
  if (c == 'm')
    printf("n");
  if (c == 'n')
    printf("m");
  if (c == 'o')
    printf("l");
  if (c == 'p')
    printf("k");
  if (c == 'q')
    printf("j");
  if (c == 'r')
    printf("i");
  if (c == 's')
    printf("h");
  if (c == 't')
    printf("g");
  if (c == 'u')
    printf("f");
  if (c == 'v')
    printf("e");
  if (c == 'w')
    printf("d");
  if (c == 'x')
    printf("c");
  if (c == 'y')
    printf("b");
  if (c == 'z')
    printf("a");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x6(%rbp)
jl     1164 <main+0x44>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
setg   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jne    1188 <main+0x68>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    11a1 <main+0x81>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
jne    11ba <main+0x9a>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
jne    11d3 <main+0xb3>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
jne    11ec <main+0xcc>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jne    1205 <main+0xe5>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x67,%eax
jne    121e <main+0xfe>
lea    0xdf9(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x68,%eax
jne    1237 <main+0x117>
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
jne    1250 <main+0x130>
lea    0xdcb(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6a,%eax
jne    1269 <main+0x149>
lea    0xdb4(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6b,%eax
jne    1282 <main+0x162>
lea    0xd9d(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6c,%eax
jne    129b <main+0x17b>
lea    0xd86(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6d,%eax
jne    12b4 <main+0x194>
lea    0xd6f(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6e,%eax
jne    12cd <main+0x1ad>
lea    0xd58(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
jne    12e6 <main+0x1c6>
lea    0xd41(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x70,%eax
jne    12ff <main+0x1df>
lea    0xd2a(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jne    1318 <main+0x1f8>
lea    0xd13(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x72,%eax
jne    1331 <main+0x211>
lea    0xcfc(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x73,%eax
jne    134a <main+0x22a>
lea    0xce5(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x74,%eax
jne    1363 <main+0x243>
lea    0xcce(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    137c <main+0x25c>
lea    0xcb7(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x76,%eax
jne    1395 <main+0x275>
lea    0xca0(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x77,%eax
jne    13ae <main+0x28e>
lea    0xc89(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x78,%eax
jne    13c7 <main+0x2a7>
lea    0xc72(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    13e0 <main+0x2c0>
lea    0xc5b(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    13f9 <main+0x2d9>
lea    0xc10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    -0x7b(%rax),%ecx
cmp    $0xe6,%cl
jb     1140 <main+0x10>
add    $0x9f,%al
cmp    $0x19,%al
ja     116c <main+0x3c>
movzbl %al,%eax
mov    $0x7a,%edi
sub    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"bukva\00"
@.str.1 = [2 x i8] c"z\00"
@.str.2 = [2 x i8] c"y\00"
@.str.3 = [2 x i8] c"x\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [2 x i8] c"v\00"
@.str.6 = [2 x i8] c"u\00"
@.str.7 = [2 x i8] c"t\00"
@.str.8 = [2 x i8] c"s\00"
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [2 x i8] c"q\00"
@.str.11 = [2 x i8] c"p\00"
@.str.12 = [2 x i8] c"o\00"
@.str.13 = [2 x i8] c"n\00"
@.str.14 = [2 x i8] c"m\00"
@.str.15 = [2 x i8] c"l\00"
@.str.16 = [2 x i8] c"k\00"
@.str.17 = [2 x i8] c"j\00"
@.str.18 = [2 x i8] c"i\00"
@.str.19 = [2 x i8] c"h\00"
@.str.20 = [2 x i8] c"g\00"
@.str.21 = [2 x i8] c"f\00"
@.str.22 = [2 x i8] c"e\00"
@.str.23 = [2 x i8] c"d\00"
@.str.24 = [2 x i8] c"c\00"
@.str.25 = [2 x i8] c"b\00"
@.str.26 = [2 x i8] c"a\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %14, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
br label %6
6: ; preds = %3
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %8, 97
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sgt i32 %12, 122
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
br i1 %15, label %3, label %16
16: ; preds = %14
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 97
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 98
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 99
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %34
34: ; preds = %32, %28
%35 = load i8, i8* %2
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 100
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %38, %34
%41 = load i8, i8* %2
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 101
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %46
46: ; preds = %44, %40
%47 = load i8, i8* %2
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 102
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %52
52: ; preds = %50, %46
%53 = load i8, i8* %2
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 103
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %58
58: ; preds = %56, %52
%59 = load i8, i8* %2
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 104
br i1 %61, label %62, label %64
62: ; preds = %58
%63 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %64
64: ; preds = %62, %58
%65 = load i8, i8* %2
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 105
br i1 %67, label %68, label %70
68: ; preds = %64
%69 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %70
70: ; preds = %68, %64
%71 = load i8, i8* %2
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 106
br i1 %73, label %74, label %76
74: ; preds = %70
%75 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %76
76: ; preds = %74, %70
%77 = load i8, i8* %2
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 107
br i1 %79, label %80, label %82
80: ; preds = %76
%81 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %82
82: ; preds = %80, %76
%83 = load i8, i8* %2
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 108
br i1 %85, label %86, label %88
86: ; preds = %82
%87 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %88
88: ; preds = %86, %82
%89 = load i8, i8* %2
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 109
br i1 %91, label %92, label %94
92: ; preds = %88
%93 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %94
94: ; preds = %92, %88
%95 = load i8, i8* %2
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %96, 110
br i1 %97, label %98, label %100
98: ; preds = %94
%99 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %100
100: ; preds = %98, %94
%101 = load i8, i8* %2
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %102, 111
br i1 %103, label %104, label %106
104: ; preds = %100
%105 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %106
106: ; preds = %104, %100
%107 = load i8, i8* %2
%108 = sext i8 %107 to i32
%109 = icmp eq i32 %108, 112
br i1 %109, label %110, label %112
110: ; preds = %106
%111 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %112
112: ; preds = %110, %106
%113 = load i8, i8* %2
%114 = sext i8 %113 to i32
%115 = icmp eq i32 %114, 113
br i1 %115, label %116, label %118
116: ; preds = %112
%117 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %118
118: ; preds = %116, %112
%119 = load i8, i8* %2
%120 = sext i8 %119 to i32
%121 = icmp eq i32 %120, 114
br i1 %121, label %122, label %124
122: ; preds = %118
%123 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
br label %124
124: ; preds = %122, %118
%125 = load i8, i8* %2
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 115
br i1 %127, label %128, label %130
128: ; preds = %124
%129 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
br label %130
130: ; preds = %128, %124
%131 = load i8, i8* %2
%132 = sext i8 %131 to i32
%133 = icmp eq i32 %132, 116
br i1 %133, label %134, label %136
134: ; preds = %130
%135 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %136
136: ; preds = %134, %130
%137 = load i8, i8* %2
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 117
br i1 %139, label %140, label %142
140: ; preds = %136
%141 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
br label %142
142: ; preds = %140, %136
%143 = load i8, i8* %2
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 118
br i1 %145, label %146, label %148
146: ; preds = %142
%147 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
br label %148
148: ; preds = %146, %142
%149 = load i8, i8* %2
%150 = sext i8 %149 to i32
%151 = icmp eq i32 %150, 119
br i1 %151, label %152, label %154
152: ; preds = %148
%153 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
br label %154
154: ; preds = %152, %148
%155 = load i8, i8* %2
%156 = sext i8 %155 to i32
%157 = icmp eq i32 %156, 120
br i1 %157, label %158, label %160
158: ; preds = %154
%159 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
br label %160
160: ; preds = %158, %154
%161 = load i8, i8* %2
%162 = sext i8 %161 to i32
%163 = icmp eq i32 %162, 121
br i1 %163, label %164, label %166
164: ; preds = %160
%165 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
br label %166
166: ; preds = %164, %160
%167 = load i8, i8* %2
%168 = sext i8 %167 to i32
%169 = icmp eq i32 %168, 122
br i1 %169, label %170, label %172
170: ; preds = %166
%171 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
br label %172
172: ; preds = %170, %166
%173 = load i32, i32* %1
ret i32 %173
}

LLVM IR (-O2):
@.str = [6 x i8] c"bukva\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call signext i8 (...) @getchar()
%4 = add i8 %3, -123
%5 = icmp ult i8 %4, -26
br i1 %5, label %1, label %6
6: ; preds = %1
%7 = add i8 %3, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = zext i8 %7 to i32
%11 = sub nsw i32 122, %10
%12 = tail call i32 @putchar(i32 %11)
br label %13
13: ; preds = %6, %9
ret i32 0
}