#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_v3() {
  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_v3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jg     11a3 <multiTable_v3+0x93>
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     1187 <multiTable_v3+0x77>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1159 <multiTable_v3+0x49>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1174 <multiTable_v3+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_v3+0x69>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <multiTable_v3+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_v3+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiTable_v3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed4(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeae(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2,%r14d
mov    $0x10,%r12d
mov    $0x8,%ebx
mov    $0x4,%r13d
mov    $0x12,%eax
movl   $0xe,(%rsp)
movl   $0xc,0x4(%rsp)
movl   $0x6,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,0x10(%rsp)
mov    %ebp,0xc(%rsp)
mov    %r15,%rbp
lea    0xe07(%rip),%r15
mov    %r15,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    $0x2,%edx
mov    %r13d,0x14(%rsp)
mov    %r13d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x10,%r12d
jne    1250 <multiTable_v3+0x130>
mov    %rbp,%r15
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1273 <multiTable_v3+0x153>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14d,%esi
mov    $0x3,%edx
mov    0x8(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%r14d
mov    %rbp,%r15
ja     1300 <multiTable_v3+0x1e0>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%ebp
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
add    $0x8,%r12d
add    $0x4,%ebx
mov    0x14(%rsp),%r13d
add    $0x2,%r13d
mov    0x10(%rsp),%eax
add    $0x9,%eax
addl   $0x7,(%rsp)
addl   $0x6,0x4(%rsp)
add    $0x5,%ebp
addl   $0x3,0x8(%rsp)
cmp    $0x50,%r12d
jne    11f0 <multiTable_v3+0xd0>
jmp    13d1 <multiTable_v3+0x2b1>
nopl   0x0(%rax,%rax,1)
lea    0xd02(%rip),%rdi
mov    %r14d,%esi
mov    $0x4,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x20,%r12d
mov    0xc(%rsp),%ebp
je     1281 <multiTable_v3+0x161>
lea    0xcdc(%rip),%rdi
mov    %r14d,%esi
mov    $0x5,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%r14d
jbe    128b <multiTable_v3+0x16b>
lea    0xcba(%rip),%rdi
mov    %r14d,%esi
mov    $0x6,%edx
mov    0x4(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x30,%r12d
je     1295 <multiTable_v3+0x175>
lea    0xc96(%rip),%rdi
mov    %r14d,%esi
mov    $0x7,%edx
mov    (%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x7,%r14d
jbe    129f <multiTable_v3+0x17f>
lea    0xc73(%rip),%rdi
mov    %r14d,%esi
mov    $0x8,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x40,%r12d
je     12a9 <multiTable_v3+0x189>
lea    0xc50(%rip),%rdi
mov    %r14d,%esi
mov    $0x9,%edx
mov    0x10(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12b3 <multiTable_v3+0x193>
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_v3() {
%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 sgt 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_v3() {
%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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
br label %11
11: ; preds = %0, %58
%12 = phi i32 [ 2, %0 ], [ %60, %58 ]
%13 = 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 1, i32 %12)
%14 = shl nuw nsw i32 %12, 1
%15 = 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 %14)
%16 = icmp eq i32 %12, 2
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %23
19: ; preds = %11
%20 = mul nuw nsw i32 %12, 3
%21 = 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 %20)
%22 = icmp ult i32 %12, 4
br i1 %22, label %23, label %25
23: ; preds = %19, %17
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %29
25: ; preds = %19
%26 = shl nuw nsw i32 %12, 2
%27 = 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 %26)
%28 = icmp eq i32 %12, 4
br i1 %28, label %29, label %31
29: ; preds = %25, %23
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %35
31: ; preds = %25
%32 = mul nuw nsw i32 %12, 5
%33 = 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 %32)
%34 = icmp ult i32 %12, 6
br i1 %34, label %35, label %37
35: ; preds = %31, %29
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %41
37: ; preds = %31
%38 = mul nuw nsw i32 %12, 6
%39 = 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 %38)
%40 = icmp eq i32 %12, 6
br i1 %40, label %41, label %43
41: ; preds = %37, %35
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %47
43: ; preds = %37
%44 = mul nuw nsw i32 %12, 7
%45 = 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 %44)
%46 = icmp ult i32 %12, 8
br i1 %46, label %47, label %49
47: ; preds = %43, %41
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %56
49: ; preds = %43
%50 = shl nuw nsw i32 %12, 3
%51 = 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 %50)
%52 = icmp eq i32 %12, 8
br i1 %52, label %56, label %53
53: ; preds = %49
%54 = mul nuw nsw i32 %12, 9
%55 = 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 %54)
br label %58
56: ; preds = %47, %49
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
%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 = %58
ret void
}