#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 num1;
  int num2;
  int mult;
  printf("\nTabuada de mult \n");
  printf("\nEntre com um numero para mult:");
  for (num1 = 1; num1 <= 10; num1++) {
    printf("\n______________");
    printf("\nTabuada de mult %d", num1);
    for (num2 = 1; num2 <= 10; num2++) {
      mult = num1 * num2;
      printf("\n %d x %d = %d", num1, num2, mult);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     11be <main+0xae>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     11ab <main+0x9b>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1172 <main+0x62>
jmp    11b0 <main+0xa0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <main+0x32>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r13d
movl   $0x8,0xc(%rsp)
movl   $0x4,0x18(%rsp)
movl   $0x2,0x14(%rsp)
movl   $0xa,0x1c(%rsp)
movl   $0x9,0x10(%rsp)
mov    $0x7,%ebp
mov    $0x6,%ebx
mov    $0x5,%r12d
mov    $0x3,%r14d
nopl   0x0(%rax)
mov    %ebx,0x24(%rsp)
lea    0xe85(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe87(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8a(%rip),%r15
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x1,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x2,%edx
mov    0x14(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x3,%edx
mov    %r14d,0x20(%rsp)
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x4,%edx
mov    0x18(%rsp),%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x5,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x6,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x7,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r15,%rbx
mov    %r13d,%esi
mov    $0x8,%edx
mov    0xc(%rsp),%r15d
mov    %r15d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    $0x9,%edx
mov    0x10(%rsp),%r14d
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    $0xa,%edx
mov    0x1c(%rsp),%ebx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13d
add    $0x8,%r15d
addl   $0x4,0x18(%rsp)
addl   $0x2,0x14(%rsp)
add    $0xa,%ebx
mov    %ebx,0x1c(%rsp)
mov    0x24(%rsp),%ebx
add    $0x9,%r14d
mov    %r14d,0x10(%rsp)
add    $0x7,%ebp
add    $0x6,%ebx
add    $0x5,%r12d
mov    0x20(%rsp),%r14d
add    $0x3,%r14d
mov    %r15d,0xc(%rsp)
cmp    $0x58,%r15d
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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