#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*/ puts(char *);
int main() {
  int i = 0;
  while (i < 5) {
    printf("%d\n", i);
    i++;
  }
  char letter = 'a';
  while (letter <= 'z') {
    printf("%c", letter);
    letter++;
  }
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1160 <main+0x40>
mov    -0x8(%rbp),%eax
lea    0xeb6(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
movb   $0x61,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x7a,%eax
jg     118e <main+0x6e>
lea    0xe8c(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <printf@plt>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1164 <main+0x44>
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
lea    0xe97(%rip),%rbx
mov    %rbx,%rdi
mov    $0x61,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x62,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x65,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x66,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x68,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x69,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6a,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6b,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6c,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6d,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6e,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6f,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x71,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x72,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x73,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x74,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x75,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x76,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x77,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x78,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x79,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7a,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = trunc i32 %8 to i8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
store i8 97, i8* %3
br label %14
14: ; preds = %18, %13
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = load i8, i8* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %19)
%21 = load i8, i8* %3
%22 = add i8 %21, 1
store i8 %22, i8* %3
br label %14
23: ; preds = %14
%24 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 97)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 98)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 99)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 101)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 102)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 103)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 104)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 105)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 106)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 107)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 108)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 109)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 110)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 111)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 112)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 113)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 114)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 115)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 116)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 117)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 118)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 119)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 120)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 121)
%31 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 122)
%32 = tail call i32 @putchar(i32 10)
ret i32 0
}