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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x1a,-0x24(%rbp)
jge    114e <main+0x3e>
mov    -0x24(%rbp),%eax
add    $0x41,%eax
mov    %al,%cl
movslq -0x24(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1126 <main+0x16>
movslq -0x24(%rbp),%rax
movb   $0x0,-0x20(%rbp,%rax,1)
lea    -0x20(%rbp),%rsi
lea    0xe9e(%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
movaps %xmm0,(%rsp)
movabs $0x5857565554535251,%rax
56 57 58
mov    %rax,0x10(%rsp)
movw   $0x5a59,0x18(%rsp)
movb   $0x0,0x1a(%rsp)
lea    0xecf(%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 [27 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 26
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 65, %8
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 %12
store i8 %10, i8* %13
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 %19
store i8 0, i8* %20
%21 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 0
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"'%s' created\0A\00"
define i32 @main() {
%1 = alloca [27 x i8]
%2 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%3 = bitcast [27 x i8]* %1 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>* %3
%4 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 16
store i8 81, i8* %4
%5 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 17
store i8 82, i8* %5
%6 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 18
store i8 83, i8* %6
%7 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 19
store i8 84, i8* %7
%8 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 20
store i8 85, i8* %8
%9 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 21
store i8 86, i8* %9
%10 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 22
store i8 87, i8* %10
%11 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 23
store i8 88, i8* %11
%12 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 24
store i8 89, i8* %12
%13 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 25
store i8 90, i8* %13
%14 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 26
store i8 0, 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
}