#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 result;
  for (size_t i = 1; i <= 10; i++) {
    printf("\033[32m*************************\033[37m\n");
    for (size_t j = 1; j <= 10; j++) {
      result = i * j;
      printf("\033[32m*\033[37m\t%d x %d = %d\t\033[32m*\033[37m\n", i, j,
             result);
    }
    printf("\033[32m*************************\033[37m\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0xa,-0x10(%rbp)
ja     11a8 <main+0x98>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x1,-0x18(%rbp)
cmpq   $0xa,-0x18(%rbp)
ja     1189 <main+0x79>
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%ecx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1148 <main+0x38>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>
xor    %eax,%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,%ebx
movl   $0xa,0x14(%rsp)
movl   $0x9,0x10(%rsp)
movl   $0x8,0xc(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x6,0x4(%rsp)
mov    $0x5,%r13d
mov    $0x4,%r12d
mov    $0x3,%r14d
mov    $0x2,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe9f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edx
lea    0xe68(%rip),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,0x24(%rsp)
mov    %r15d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,0x20(%rsp)
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x4,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12d,0x1c(%rsp)
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x5,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13d,0x18(%rsp)
mov    %r13d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0x4(%rsp),%r13d
mov    %r13d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x7,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0x8(%rsp),%r12d
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0xc(%rsp),%r15d
mov    %r15d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %rbx,%r14
mov    0x10(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edx
mov    %rbp,%rdi
mov    %r14,%rsi
mov    0x14(%rsp),%ebp
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd8f(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%r14
add    $0xa,%ebp
mov    %ebp,0x14(%rsp)
add    $0x9,%ebx
mov    %ebx,0x10(%rsp)
mov    %r14,%rbx
add    $0x8,%r15d
mov    %r15d,0xc(%rsp)
add    $0x7,%r12d
mov    %r12d,0x8(%rsp)
add    $0x6,%r13d
mov    %r13d,0x4(%rsp)
mov    0x18(%rsp),%r13d
add    $0x5,%r13d
mov    0x1c(%rsp),%r12d
add    $0x4,%r12d
mov    0x20(%rsp),%r14d
add    $0x3,%r14d
mov    0x24(%rsp),%r15d
add    $0x2,%r15d
cmp    $0xb,%rbx
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 = [37 x i8] c"\1B[32m*************************\1B[37m\0A\00"
@.str.1 = [38 x i8] c"\1B[32m*\1B[37m\09%d x %d = %d\09\1B[32m*\1B[37m\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %3
br label %5
5: ; preds = %27, %0
%6 = load i64, i64* %3
%7 = icmp ule i64 %6, 10
br i1 %7, label %8, label %30
8: ; preds = %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i64 1, i64* %4
br label %10
10: ; preds = %22, %8
%11 = load i64, i64* %4
%12 = icmp ule i64 %11, 10
br i1 %12, label %13, label %25
13: ; preds = %10
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = mul i64 %14, %15
%17 = trunc i64 %16 to i32
store i32 %17, i32* %2
%18 = load i64, i64* %3
%19 = load i64, i64* %4
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i64 %18, i64 %19, i32 %20)
br label %22
22: ; preds = %13
%23 = load i64, i64* %4
%24 = add i64 %23, 1
store i64 %24, i64* %4
br label %10
25: ; preds = %10
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25
%28 = load i64, i64* %3
%29 = add i64 %28, 1
store i64 %29, i64* %3
br label %5
30: ; preds = %5
ret i32 0
}

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