#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);
int main() {
  char sim;
  int num;
  for (sim = 97; sim <= 122; sim++) {
    num = sim;
    printf("%c - %d\n", sim, num);
    if (sim == 122) {
      sim = 64;
    } else {
      if (sim == 90) {
        sim = 48;
      } else {
        if (sim == 57) {
          break;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     11a6 <main+0x96>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
lea    0xebc(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    1162 <main+0x52>
movb   $0x40,-0x5(%rbp)
jmp    1194 <main+0x84>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jne    1178 <main+0x68>
movb   $0x30,-0x5(%rbp)
jmp    118f <main+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jne    118a <main+0x7a>
jmp    11a6 <main+0x96>
jmp    118f <main+0x7f>
jmp    1194 <main+0x84>
jmp    1199 <main+0x89>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1123 <main+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x61,%bl
lea    0xee3(%rip),%r14
jmp    1129 <main+0x19>
nop
mov    $0x30,%al
lea    0x1(%rax),%ebx
cmp    $0x7a,%al
jge    114e <main+0x3e>
movsbl %bl,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
cmp    $0x5a,%bpl
je     1120 <main+0x10>
mov    $0x40,%al
cmp    $0x7a,%bl
je     1122 <main+0x12>
cmp    $0x39,%bl
je     114e <main+0x3e>
mov    %ebx,%eax
jmp    1122 <main+0x12>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i8 97, i8* %2
br label %4
4: ; preds = %31, %0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %34
8: ; preds = %4
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
store i32 %10, i32* %3
%11 = load i8, i8* %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %11, i32 %12)
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 122
br i1 %16, label %17, label %18
17: ; preds = %8
store i8 64, i8* %2
br label %30
18: ; preds = %8
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 90
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 48, i8* %2
br label %29
23: ; preds = %18
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 57
br i1 %26, label %27, label %28
27: ; preds = %23
br label %34
28: ; preds = %23
br label %29
29: ; preds = %28, %22
br label %30
30: ; preds = %29, %17
br label %31
31: ; preds = %30
%32 = load i8, i8* %2
%33 = add i8 %32, 1
store i8 %33, i8* %2
br label %4
34: ; preds = %27, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i8 [ 97, %0 ], [ %9, %7 ]
%3 = sext i8 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %2, i32 %3)
switch i8 %2, label %6 [
i8 122, label %7
i8 90, label %5
i8 57, label %11
]
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5
%8 = phi i8 [ 48, %5 ], [ 64, %1 ], [ %2, %6 ]
%9 = add nsw i8 %8, 1
%10 = icmp slt i8 %8, 122
br i1 %10, label %1, label %11
11: ; preds = %1, %7
ret i32 0
}