#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() {
  int calc = 10;
  int totalTo = 10;
  int i = 1;
  int j = 1;
  int result;
  for (i = 1; i <= calc; i++) {
    printf("----------------------------------------- \n");
    printf("| Calculing the tab of the %d number \n \n", i);
    for (j = 1; j <= totalTo; j++) {
      result = (i * j);
      printf("| %d x %d = %d \n", i, j, result);
    }
    printf(" \n\n ");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11cb <main+0xbb>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11af <main+0x9f>
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1174 <main+0x64>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%r14d
movl   $0x8,0x8(%rsp)
movl   $0x4,0x14(%rsp)
movl   $0x2,0x10(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0x9,0xc(%rsp)
movl   $0x7,0x4(%rsp)
mov    $0x6,%ebx
mov    $0x5,%r12d
mov    $0x3,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,0x24(%rsp)
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xe69(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe81(%rip),%r13
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x2,%edx
mov    0x10(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x3,%edx
mov    %ebp,0x20(%rsp)
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x4,%edx
mov    0x14(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x5,%edx
mov    %r12d,%ecx
mov    %r12d,0x1c(%rsp)
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x6,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x7,%edx
mov    0x4(%rsp),%ebp
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x8,%edx
mov    0x8(%rsp),%r15d
mov    %r15d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0x9,%edx
mov    0xc(%rsp),%r12d
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    $0xa,%edx
mov    0x18(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xda0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
add    $0x8,%r15d
addl   $0x4,0x14(%rsp)
addl   $0x2,0x10(%rsp)
add    $0xa,%ebx
mov    %ebx,0x18(%rsp)
mov    0x24(%rsp),%ebx
add    $0x9,%r12d
mov    %r12d,0xc(%rsp)
add    $0x7,%ebp
mov    %ebp,0x4(%rsp)
add    $0x6,%ebx
mov    0x1c(%rsp),%r12d
add    $0x5,%r12d
mov    0x20(%rsp),%ebp
add    $0x3,%ebp
mov    %r15d,0x8(%rsp)
cmp    $0x58,%r15d
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [41 x i8] c"| Calculing the tab of the %d number \0A \0A\00"
@.str.2 = [17 x i8] c"| %d x %d = %d \0A\00"
@.str.3 = [5 x i8] c" \0A\0A \00"
@str = [43 x i8] c"----------------------------------------- \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %25, %1 ]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 1, i32 %2)
%6 = shl nuw nsw i32 %2, 1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 2, i32 %6)
%8 = mul nuw nsw i32 %2, 3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 3, i32 %8)
%10 = shl nuw nsw i32 %2, 2
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 4, i32 %10)
%12 = mul nuw nsw i32 %2, 5
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 5, i32 %12)
%14 = mul nuw nsw i32 %2, 6
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 6, i32 %14)
%16 = mul nuw nsw i32 %2, 7
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 7, i32 %16)
%18 = shl nuw nsw i32 %2, 3
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 8, i32 %18)
%20 = mul nuw nsw i32 %2, 9
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 9, i32 %20)
%22 = mul nuw nsw i32 %2, 10
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 10, i32 %22)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%25 = add nuw nsw i32 %2, 1
%26 = icmp eq i32 %25, 11
br i1 %26, label %27, label %1
27: ; preds = %1
ret i32 0
}