#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() {
  const int ROWS = 6;
  const int CHARS = 6;
  int row;
  char ch;
  for (row = 0; row < ROWS; row++) {
    for (ch = ('A' + row); ch < ('A' + CHARS); ch++)
      printf("%c", ch);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    118f <main+0x7f>
mov    -0x10(%rbp),%eax
add    $0x41,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x47,%eax
jge    1173 <main+0x63>
movsbl -0x11(%rbp),%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1147 <main+0x37>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%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    $0xa,%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    $0xa,%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    $0xa,%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    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%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 i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 0, i32* %1
store i32 6, i32* %2
store i32 6, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %26, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 6
br i1 %8, label %9, label %29
9: ; preds = %6
%10 = load i32, i32* %4
%11 = add nsw i32 65, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %5
br label %13
13: ; preds = %21, %9
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp slt i32 %15, 71
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %17
%22 = load i8, i8* %5
%23 = add i8 %22, 1
store i8 %23, i8* %5
br label %13
24: ; preds = %13
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %6
29: ; preds = %6
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 10)
%8 = tail call i32 @putchar(i32 66)
%9 = tail call i32 @putchar(i32 67)
%10 = tail call i32 @putchar(i32 68)
%11 = tail call i32 @putchar(i32 69)
%12 = tail call i32 @putchar(i32 70)
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 @putchar(i32 67)
%15 = tail call i32 @putchar(i32 68)
%16 = tail call i32 @putchar(i32 69)
%17 = tail call i32 @putchar(i32 70)
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @putchar(i32 68)
%20 = tail call i32 @putchar(i32 69)
%21 = tail call i32 @putchar(i32 70)
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @putchar(i32 69)
%24 = tail call i32 @putchar(i32 70)
%25 = tail call i32 @putchar(i32 10)
%26 = tail call i32 @putchar(i32 70)
%27 = tail call i32 @putchar(i32 10)
ret i32 0
}