#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 buffer[26];
  char a;
  for (a = 'A'; a <= 'Z'; a++)
    buffer[a] = a;
  printf("'%s' created\n", buffer);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x5a,%eax
jg     1149 <main+0x39>
mov    -0x21(%rbp),%cl
movsbq -0x21(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
mov    -0x21(%rbp),%al
add    $0x1,%al
mov    %al,-0x21(%rbp)
jmp    1123 <main+0x13>
lea    -0x20(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movups %xmm0,0x41(%rsp)
movabs $0x5857565554535251,%rax
56 57 58
mov    %rax,0x51(%rsp)
movw   $0x5a59,0x59(%rsp)
lea    0xed3(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"'%s' created\0A\00"
define i32 @main() {
%1 = alloca [26 x i8]
%2 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 65
%4 = bitcast i8* %3 to <16 x i8>*
store <16 x i8> <i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79, i8 80>, <16 x i8>* %4
%5 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 81
store i8 81, i8* %5
%6 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 82
store i8 82, i8* %6
%7 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 83
store i8 83, i8* %7
%8 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 84
store i8 84, i8* %8
%9 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 85
store i8 85, i8* %9
%10 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 86
store i8 86, i8* %10
%11 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 87
store i8 87, i8* %11
%12 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 88
store i8 88, i8* %12
%13 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 89
store i8 89, i8* %13
%14 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 90
store i8 90, i8* %14
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}