#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 main() {
  char letter = 'a';
  for (int i = 0; i < 26; i++) {
    printf("this char is %c\n ", ('a' + i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    1157 <main+0x47>
mov    -0xc(%rbp),%eax
add    $0x61,%eax
lea    0xebf(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <main+0x1a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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