#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() {
  int x = 1;
  char a;
  while (x < 10) {
    a = 'A';
    while (a < 'J') {
      printf("%d%c\t", x, a);
      a++;
    }
    putchar('\n');
    x++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1189 <main+0x69>
movb   $0x41,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x4a,%eax
jge    1171 <main+0x51>
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
movsbl -0x9(%rbp),%edx
call   1040 <printf@plt>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1144 <main+0x24>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%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    %r14,%rdi
mov    %ebx,%esi
mov    $0x49,%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 = [6 x i8] c"%d%c\09\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %18, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %22
7: ; preds = %4
store i8 65, i8* %3
br label %8
8: ; preds = %12, %7
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp slt i32 %10, 74
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i32, i32* %2
%14 = load i8, i8* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13, i8 signext %14)
%16 = load i8, i8* %3
%17 = add i8 %16, 1
store i8 %17, i8* %3
br label %8
18: ; preds = %8
%19 = call i32 @putchar(i8 signext 10)
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %4
ret i32 0
}

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