#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() {
  char c = 'A';
  while (c <= 'Z') {
    printf("%c", c);
    c++;
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%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    $0x41,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x47,%edi
call   1030 <putchar@plt>
mov    $0x48,%edi
call   1030 <putchar@plt>
mov    $0x49,%edi
call   1030 <putchar@plt>
mov    $0x4a,%edi
call   1030 <putchar@plt>
mov    $0x4b,%edi
call   1030 <putchar@plt>
mov    $0x4c,%edi
call   1030 <putchar@plt>
mov    $0x4d,%edi
call   1030 <putchar@plt>
mov    $0x4e,%edi
call   1030 <putchar@plt>
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x50,%edi
call   1030 <putchar@plt>
mov    $0x51,%edi
call   1030 <putchar@plt>
mov    $0x52,%edi
call   1030 <putchar@plt>
mov    $0x53,%edi
call   1030 <putchar@plt>
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    $0x55,%edi
call   1030 <putchar@plt>
mov    $0x56,%edi
call   1030 <putchar@plt>
mov    $0x57,%edi
call   1030 <putchar@plt>
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x59,%edi
call   1030 <putchar@plt>
mov    $0x5a,%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 65, i8* %2
br label %3
3: ; preds = %7, %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 90
br i1 %6, label %7, label %13
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)
%11 = load i8, i8* %2
%12 = add i8 %11, 1
store i8 %12, i8* %2
br label %3
13: ; preds = %3
%14 = 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 65)
%2 = tail call i32 @putchar(i32 66)
%3 = tail call i32 @putchar(i32 67)
%4 = tail call i32 @putchar(i32 68)
%5 = tail call i32 @putchar(i32 69)
%6 = tail call i32 @putchar(i32 70)
%7 = tail call i32 @putchar(i32 71)
%8 = tail call i32 @putchar(i32 72)
%9 = tail call i32 @putchar(i32 73)
%10 = tail call i32 @putchar(i32 74)
%11 = tail call i32 @putchar(i32 75)
%12 = tail call i32 @putchar(i32 76)
%13 = tail call i32 @putchar(i32 77)
%14 = tail call i32 @putchar(i32 78)
%15 = tail call i32 @putchar(i32 79)
%16 = tail call i32 @putchar(i32 80)
%17 = tail call i32 @putchar(i32 81)
%18 = tail call i32 @putchar(i32 82)
%19 = tail call i32 @putchar(i32 83)
%20 = tail call i32 @putchar(i32 84)
%21 = tail call i32 @putchar(i32 85)
%22 = tail call i32 @putchar(i32 86)
%23 = tail call i32 @putchar(i32 87)
%24 = tail call i32 @putchar(i32 88)
%25 = tail call i32 @putchar(i32 89)
%26 = tail call i32 @putchar(i32 90)
%27 = tail call i32 @putchar(i32 10)
ret i32 0
}