#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, char);
int /*<<< orphan*/ putchar(char);
int main() {
  char a;
  int x;
  for (x = 1; x < 10; x = x + 1) {
    for (a = 'A'; a < 'I'; a = a + 1) {
      printf("%d%c   ", x, a);
    }
    putchar('\n');
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    118b <main+0x6b>
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x49,%eax
jge    1173 <main+0x53>
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
movsbl -0x5(%rbp),%edx
call   1040 <printf@plt>
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x5(%rbp)
jmp    1144 <main+0x24>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x41,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x42,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x43,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x44,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x45,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x46,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x47,%edx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x48,%edx
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0xa,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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