#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;
  for (i = 1; i <= 9; i++)
    for (j = 1; j <= 9; j++) {
      if (i == j) {
        printf("%d x %d = %d\n", j, i, i * j);
        break;
      } else {
        printf("%d x %d = %d\n", j, i, i * j);
      }
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     11aa <main+0x9a>
movl   $0x1,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     1197 <main+0x87>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    116b <main+0x5b>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x87>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1189 <main+0x79>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    119c <main+0x8c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
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    $0x18,%rsp
mov    $0x1,%ebx
mov    $0x8,%ebp
movl   $0x4,0xc(%rsp)
mov    $0x2,%r15d
mov    $0x9,%eax
mov    $0x7,%ecx
mov    $0x6,%r12d
mov    $0x5,%r14d
mov    $0x3,%r13d
lea    0xea7(%rip),%rdi
nopl   0x0(%rax)
mov    %ecx,0x14(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x1,%esi
cmp    $0x8,%ebp
je     12c0 <main+0x1b0>
lea    0xe83(%rip),%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x2,%esi
cmp    $0x10,%ebp
je     12c0 <main+0x1b0>
lea    0xe59(%rip),%rdi
mov    $0x2,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
call   1030 <printf@plt>
lea    0xe43(%rip),%rdi
mov    $0x3,%esi
cmp    $0x18,%ebp
je     12c0 <main+0x1b0>
lea    0xe2e(%rip),%rdi
mov    $0x3,%esi
mov    %ebx,%edx
mov    %r13d,%ecx
call   1030 <printf@plt>
lea    0xe18(%rip),%rdi
mov    $0x4,%esi
cmp    $0x20,%ebp
je     12c0 <main+0x1b0>
lea    0xe03(%rip),%rdi
mov    $0x4,%esi
mov    %ebx,%edx
mov    0xc(%rsp),%ecx
call   1030 <printf@plt>
lea    0xdec(%rip),%rdi
mov    $0x5,%esi
cmp    $0x28,%ebp
je     12c0 <main+0x1b0>
lea    0xdd7(%rip),%rdi
mov    $0x5,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
lea    0xdc1(%rip),%rdi
mov    $0x6,%esi
cmp    $0x30,%ebp
je     12c0 <main+0x1b0>
lea    0xdb0(%rip),%rdi
mov    $0x6,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
call   1030 <printf@plt>
lea    0xd9a(%rip),%rdi
mov    $0x7,%esi
cmp    $0x38,%ebp
je     12c0 <main+0x1b0>
lea    0xd89(%rip),%rdi
mov    $0x7,%esi
mov    %ebx,%edx
mov    0x14(%rsp),%ecx
call   1030 <printf@plt>
lea    0xd72(%rip),%rdi
mov    $0x8,%esi
cmp    $0x40,%ebp
je     12c0 <main+0x1b0>
lea    0xd61(%rip),%rdi
mov    $0x8,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1030 <printf@plt>
lea    0xd4c(%rip),%rdi
mov    $0x9,%esi
cmp    $0x48,%ebp
jne    1307 <main+0x1f7>
xchg   %ax,%ax
mov    %esi,%ecx
imul   %ebx,%ecx
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
add    $0x8,%ebp
addl   $0x4,0xc(%rsp)
add    $0x2,%r15d
mov    0x10(%rsp),%eax
add    $0x9,%eax
mov    0x14(%rsp),%ecx
add    $0x7,%ecx
add    $0x6,%r12d
add    $0x5,%r14d
add    $0x3,%r13d
cmp    $0x50,%ebp
lea    0xd01(%rip),%rdi
jne    1160 <main+0x50>
jmp    1314 <main+0x204>
mov    $0x9,%esi
mov    %ebx,%edx
mov    0x10(%rsp),%ecx
jmp    12c7 <main+0x1b7>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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