#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 *, ...);
void multiTable_v2() {
  int i;
  int j;
  for (i = 1; i <= 9; i++) {
    for (j = 1; j <= 9; j++) {
      if (j < i) {
        printf("        ");
      } else {
        printf("%d*%d=%2d\t", i, j, i * j);
      }
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<multiTable_v2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jg     11a3 <multiTable_v2+0x93>
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     1187 <multiTable_v2+0x77>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1159 <multiTable_v2+0x49>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1174 <multiTable_v2+0x64>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1179 <multiTable_v2+0x69>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <multiTable_v2+0x20>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <multiTable_v2+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiTable_v2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%r12d
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x6,0x4(%rsp)
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x8,0x8(%rsp)
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%ebx
mov    $0x1,%esi
mov    $0x9,%edx
mov    $0x9,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xa,0xc(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x10,%r14d
mov    $0x12,%ebp
mov    $0xe,%r13d
movl   $0xc,0x10(%rsp)
lea    0xd9d(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x10,%r14d
mov    %ebx,0x14(%rsp)
jne    12b0 <multiTable_v2+0x190>
lea    0xd7e(%rip),%rdi
mov    %r12d,%esi
mov    $0x2,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1360 <multiTable_v2+0x240>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%r12d
jbe    1360 <multiTable_v2+0x240>
lea    0xd35(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x20,%r14d
lea    0xd2c(%rip),%rbx
je     137d <multiTable_v2+0x25d>
lea    0xd16(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%r12d
jbe    1393 <multiTable_v2+0x273>
lea    0xcfe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x30,%r14d
je     13a9 <multiTable_v2+0x289>
lea    0xce6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x7,%r12d
jbe    13bf <multiTable_v2+0x29f>
lea    0xcce(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x40,%r14d
je     13d4 <multiTable_v2+0x2b4>
lea    0xcb6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    13e9 <multiTable_v2+0x2c9>
cs nopw 0x0(%rax,%rax,1)
lea    0xca2(%rip),%rbx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x3,%edx
mov    0x4(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x4,%edx
mov    0x8(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x5,%edx
mov    0xc(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x6,%edx
mov    0x10(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x7,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x8,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x9,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
add    $0x8,%r14d
addl   $0x4,0x8(%rsp)
mov    0x14(%rsp),%ebx
add    $0x2,%ebx
add    $0x9,%ebp
add    $0x7,%r13d
addl   $0x6,0x10(%rsp)
addl   $0x5,0xc(%rsp)
addl   $0x3,0x4(%rsp)
cmp    $0x50,%r14d
lea    0xbc4(%rip),%r15
jne    1270 <multiTable_v2+0x150>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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