#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(void) {
  int i = 1;
  int j = 1;
  while (j <= 12) {
    printf("%d", i * j);
    i++;
    while (i <= 12) {
      if ((i * j) >= 10)
        printf("  ");
      else if ((i * j) >= 100)
        printf(" ");
      else
        printf("   ");
      printf("%d", i * j);
      i++;
    }
    printf("\n");
    i = 1;
    j++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jg     11fe <main+0xee>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jg     11db <main+0xcb>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    $0xa,%eax
jl     1182 <main+0x72>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <main+0xa8>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    $0x64,%eax
jl     11a5 <main+0x95>
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b3 <main+0xa3>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <main+0xa8>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x45>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x1,%eax
movl   $0x8,0x28(%rsp)
movl   $0x4,0x24(%rsp)
mov    $0x2,%ebx
movl   $0xc,0x20(%rsp)
movl   $0xb,0x1c(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0x9,0x14(%rsp)
movl   $0x7,0x10(%rsp)
movl   $0x6,0xc(%rsp)
mov    $0x5,%r15d
mov    $0x3,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,0x8(%rsp)
lea    0xe65(%rip),%rbp
mov    %rbp,%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x5,0x8(%rsp)
lea    0xe4e(%rip),%r13
mov    %r13,%rdi
lea    0xe45(%rip),%r12
cmovae %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,0x30(%rsp)
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xa,%r14d
mov    %r14d,0x34(%rsp)
mov    %r13,%rdi
cmovae %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x3,0x8(%rsp)
mov    %r13,%rdi
mov    %r12,%r14
cmovae %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    0x24(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xa,%r15d
mov    %r15d,0x2c(%rsp)
mov    %r13,%rdi
cmovae %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%r12d
cmp    $0xa,%r12d
mov    %r13,%rdi
cmovae %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%r12d
cmp    $0xa,%r12d
mov    %r13,%rdi
cmovae %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x2,0x8(%rsp)
mov    %r13,%rdi
cmovae %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    0x28(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%r15d
cmp    $0xa,%r15d
cmovae %r14,%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    0x18(%rsp),%r13d
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    0x1c(%rsp),%r14d
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcf0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    0x20(%rsp),%ebp
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%eax
add    $0x1,%eax
add    $0x8,%ebx
mov    %ebx,0x28(%rsp)
addl   $0x4,0x24(%rsp)
mov    0x30(%rsp),%ebx
add    $0x2,%ebx
add    $0xc,%ebp
mov    %ebp,0x20(%rsp)
add    $0xb,%r14d
mov    %r14d,0x1c(%rsp)
add    $0xa,%r13d
mov    %r13d,0x18(%rsp)
add    $0x9,%r15d
mov    %r15d,0x14(%rsp)
add    $0x7,%r12d
mov    %r12d,0x10(%rsp)
addl   $0x6,0xc(%rsp)
mov    0x2c(%rsp),%r15d
add    $0x5,%r15d
mov    0x34(%rsp),%r14d
add    $0x3,%r14d
cmp    $0xd,%eax
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c" \00"
@.str.3 = [4 x i8] c" \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %54, %1 ]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = shl nuw nsw i32 %2, 1
%5 = icmp ugt i32 %2, 4
%6 = select i1 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%9 = mul nuw nsw i32 %2, 3
%10 = icmp ugt i32 %9, 9
%11 = select i1 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%14 = shl nuw nsw i32 %2, 2
%15 = icmp ugt i32 %2, 2
%16 = select i1 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %16)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
%19 = mul nuw nsw i32 %2, 5
%20 = icmp ugt i32 %19, 9
%21 = select i1 %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %21)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
%24 = mul nuw nsw i32 %2, 6
%25 = icmp ugt i32 %24, 9
%26 = select i1 %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %26)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %24)
%29 = mul nuw nsw i32 %2, 7
%30 = icmp ugt i32 %29, 9
%31 = select i1 %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %31)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
%34 = shl nuw nsw i32 %2, 3
%35 = icmp ugt i32 %2, 1
%36 = select i1 %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %36)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %34)
%39 = mul nuw nsw i32 %2, 9
%40 = icmp ugt i32 %39, 9
%41 = select i1 %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %41)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %39)
%44 = mul nuw nsw i32 %2, 10
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %44)
%47 = mul nuw nsw i32 %2, 11
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %47)
%50 = mul nuw nsw i32 %2, 12
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %50)
%53 = tail call i32 @putchar(i32 10)
%54 = add nuw nsw i32 %2, 1
%55 = icmp eq i32 %54, 13
br i1 %55, label %56, label %1
56: ; preds = %1
ret i32 0
}