#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, int, int);
int main() {
  int i, j, k;
  for (i = 'A'; i <= 'Z'; i++)
    for (j = 'A'; j <= 'Z'; j++)
      for (k = 'A'; k <= 'Z'; k++)
        printf("%c%c%c ", i, j, k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jg     119b <main+0x8b>
movl   $0x41,-0xc(%rbp)
cmpl   $0x5a,-0xc(%rbp)
jg     1188 <main+0x78>
movl   $0x41,-0x10(%rbp)
cmpl   $0x5a,-0x10(%rbp)
jg     1175 <main+0x65>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    117a <main+0x6a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    118d <main+0x7d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x41,%r15d
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x41,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x41,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1150 <main+0x40>
add    $0x1,%ebp
cmp    $0x5b,%ebp
jne    1140 <main+0x30>
add    $0x1,%r15d
cmp    $0x5b,%r15d
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%c%c%c \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 65, i32* %2
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %32
8: ; preds = %5
store i32 65, i32* %3
br label %9
9: ; preds = %25, %8
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 90
br i1 %11, label %12, label %28
12: ; preds = %9
store i32 65, i32* %4
br label %13
13: ; preds = %21, %12
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 90
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %16
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %13
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %9
28: ; preds = %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %5
32: ; preds = %5
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [8 x i8] c"%c%c%c \00"
define i32 @main() {
br label %1
1: ; preds = %0, %13
%2 = phi i32 [ 65, %0 ], [ %14, %13 ]
br label %3
3: ; preds = %1, %10
%4 = phi i32 [ 65, %1 ], [ %11, %10 ]
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 65, %3 ], [ %8, %5 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, 91
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = add nuw nsw i32 %4, 1
%12 = icmp eq i32 %11, 91
br i1 %12, label %13, label %3
13: ; preds = %10
%14 = add nuw nsw i32 %2, 1
%15 = icmp eq i32 %14, 91
br i1 %15, label %16, label %1
16: ; preds = %13
ret i32 0
}