#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(int argc, char const *argv[]) {
  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)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x6,-0x14(%rbp)
movl   $0x6,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    1196 <main+0x86>
mov    -0x1c(%rbp),%eax
add    $0x41,%eax
mov    %al,-0x1d(%rbp)
movsbl -0x1d(%rbp),%eax
cmp    $0x47,%eax
jge    117a <main+0x6a>
movsbl -0x1d(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1d(%rbp),%al
add    $0x1,%al
mov    %al,-0x1d(%rbp)
jmp    114e <main+0x3e>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113b <main+0x2b>
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(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 6, i32* %6
store i32 6, i32* %7
store i32 0, i32* %8
br label %10
10: ; preds = %30, %2
%11 = load i32, i32* %8
%12 = icmp slt i32 %11, 6
br i1 %12, label %13, label %33
13: ; preds = %10
%14 = load i32, i32* %8
%15 = add nsw i32 65, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
br label %17
17: ; preds = %25, %13
%18 = load i8, i8* %9
%19 = sext i8 %18 to i32
%20 = icmp slt i32 %19, 71
br i1 %20, label %21, label %28
21: ; preds = %17
%22 = load i8, i8* %9
%23 = sext i8 %22 to i32
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %21
%26 = load i8, i8* %9
%27 = add i8 %26, 1
store i8 %27, i8* %9
br label %17
28: ; preds = %17
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %10
33: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @putchar(i32 65)
%4 = tail call i32 @putchar(i32 66)
%5 = tail call i32 @putchar(i32 67)
%6 = tail call i32 @putchar(i32 68)
%7 = tail call i32 @putchar(i32 69)
%8 = tail call i32 @putchar(i32 70)
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @putchar(i32 66)
%11 = tail call i32 @putchar(i32 67)
%12 = tail call i32 @putchar(i32 68)
%13 = tail call i32 @putchar(i32 69)
%14 = tail call i32 @putchar(i32 70)
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @putchar(i32 67)
%17 = tail call i32 @putchar(i32 68)
%18 = tail call i32 @putchar(i32 69)
%19 = tail call i32 @putchar(i32 70)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @putchar(i32 68)
%22 = tail call i32 @putchar(i32 69)
%23 = tail call i32 @putchar(i32 70)
%24 = tail call i32 @putchar(i32 10)
%25 = tail call i32 @putchar(i32 69)
%26 = tail call i32 @putchar(i32 70)
%27 = tail call i32 @putchar(i32 10)
%28 = tail call i32 @putchar(i32 70)
%29 = tail call i32 @putchar(i32 10)
ret i32 0
}