#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 argc, const char *argv[]) {
  int i, j;
  int mult;
  for (i = 1; i <= 10; i++) {
    for (j = 1; j <= 10; j++) {
      mult = i * j;
      printf("%d * %d = %d ", i, j, i * j);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     1197 <main+0x87>
movl   $0x1,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jg     117b <main+0x6b>
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113e <main+0x2e>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
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,%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    0xe75(%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>
mov    $0xa,%edi
call   1030 <putchar@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 = [14 x i8] c"%d * %d = %d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %9
9: ; preds = %31, %2
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 10
br i1 %11, label %12, label %34
12: ; preds = %9
store i32 1, i32* %7
br label %13
13: ; preds = %26, %12
%14 = load i32, i32* %7
%15 = icmp sle i32 %14, 10
br i1 %15, label %16, label %29
16: ; preds = %13
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %8
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = mul nsw i32 %22, %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %24)
br label %26
26: ; preds = %16
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %13
29: ; preds = %13
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %9
34: ; preds = %9
ret i32 0
}

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