#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 *, ...);
int main(void) {
  char alp;
  for (alp = 'a'; alp <= 'z'; alp++) {
    printf("%c", alp);
  }
  printf("\n");
  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     114f <main+0x3f>
movsbl -0x5(%rbp),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1123 <main+0x13>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x62,%edi
call   1030 <putchar@plt>
mov    $0x63,%edi
call   1030 <putchar@plt>
mov    $0x64,%edi
call   1030 <putchar@plt>
mov    $0x65,%edi
call   1030 <putchar@plt>
mov    $0x66,%edi
call   1030 <putchar@plt>
mov    $0x67,%edi
call   1030 <putchar@plt>
mov    $0x68,%edi
call   1030 <putchar@plt>
mov    $0x69,%edi
call   1030 <putchar@plt>
mov    $0x6a,%edi
call   1030 <putchar@plt>
mov    $0x6b,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x6d,%edi
call   1030 <putchar@plt>
mov    $0x6e,%edi
call   1030 <putchar@plt>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    $0x70,%edi
call   1030 <putchar@plt>
mov    $0x71,%edi
call   1030 <putchar@plt>
mov    $0x72,%edi
call   1030 <putchar@plt>
mov    $0x73,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1030 <putchar@plt>
mov    $0x75,%edi
call   1030 <putchar@plt>
mov    $0x76,%edi
call   1030 <putchar@plt>
mov    $0x77,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x79,%edi
call   1030 <putchar@plt>
mov    $0x7a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 97)
%2 = tail call i32 @putchar(i32 98)
%3 = tail call i32 @putchar(i32 99)
%4 = tail call i32 @putchar(i32 100)
%5 = tail call i32 @putchar(i32 101)
%6 = tail call i32 @putchar(i32 102)
%7 = tail call i32 @putchar(i32 103)
%8 = tail call i32 @putchar(i32 104)
%9 = tail call i32 @putchar(i32 105)
%10 = tail call i32 @putchar(i32 106)
%11 = tail call i32 @putchar(i32 107)
%12 = tail call i32 @putchar(i32 108)
%13 = tail call i32 @putchar(i32 109)
%14 = tail call i32 @putchar(i32 110)
%15 = tail call i32 @putchar(i32 111)
%16 = tail call i32 @putchar(i32 112)
%17 = tail call i32 @putchar(i32 113)
%18 = tail call i32 @putchar(i32 114)
%19 = tail call i32 @putchar(i32 115)
%20 = tail call i32 @putchar(i32 116)
%21 = tail call i32 @putchar(i32 117)
%22 = tail call i32 @putchar(i32 118)
%23 = tail call i32 @putchar(i32 119)
%24 = tail call i32 @putchar(i32 120)
%25 = tail call i32 @putchar(i32 121)
%26 = tail call i32 @putchar(i32 122)
%27 = tail call i32 @putchar(i32 10)
ret i32 0
}