#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*/ putchar(char);
void main(void) {
  char i;
  i = 'A';
  while (i < 'Z' + 1) {
    putchar(i);
    i = i + 1;
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x41,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x5b,%eax
jge    1141 <main+0x31>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    111c <main+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
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
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
store i8 65, i8* %1
br label %2
2: ; preds = %6, %0
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 91
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = load i8, i8* %1
%8 = call i32 @putchar(i8 signext %7)
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %1
br label %2
13: ; preds = %2
%14 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i8 signext 65)
%2 = tail call i32 @putchar(i8 signext 66)
%3 = tail call i32 @putchar(i8 signext 67)
%4 = tail call i32 @putchar(i8 signext 68)
%5 = tail call i32 @putchar(i8 signext 69)
%6 = tail call i32 @putchar(i8 signext 70)
%7 = tail call i32 @putchar(i8 signext 71)
%8 = tail call i32 @putchar(i8 signext 72)
%9 = tail call i32 @putchar(i8 signext 73)
%10 = tail call i32 @putchar(i8 signext 74)
%11 = tail call i32 @putchar(i8 signext 75)
%12 = tail call i32 @putchar(i8 signext 76)
%13 = tail call i32 @putchar(i8 signext 77)
%14 = tail call i32 @putchar(i8 signext 78)
%15 = tail call i32 @putchar(i8 signext 79)
%16 = tail call i32 @putchar(i8 signext 80)
%17 = tail call i32 @putchar(i8 signext 81)
%18 = tail call i32 @putchar(i8 signext 82)
%19 = tail call i32 @putchar(i8 signext 83)
%20 = tail call i32 @putchar(i8 signext 84)
%21 = tail call i32 @putchar(i8 signext 85)
%22 = tail call i32 @putchar(i8 signext 86)
%23 = tail call i32 @putchar(i8 signext 87)
%24 = tail call i32 @putchar(i8 signext 88)
%25 = tail call i32 @putchar(i8 signext 89)
%26 = tail call i32 @putchar(i8 signext 90)
%27 = tail call i32 @putchar(i8 signext 10)
ret void
}