#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 geraMatrizNumerosNaoAleatorios(int n) {
  int i, j;
  printf("%d %d\n", n, n);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++)
      printf("%.1lf ", 1.0 * (i + 1) * (j + 1));
    printf("\n");
  }
  return 1;
}


x86 assembly (clang, -O0):
<geraMatrizNumerosNaoAleatorios>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11b1 <geraMatrizNumerosNaoAleatorios+0xa1>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1195 <geraMatrizNumerosNaoAleatorios+0x85>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe99(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <geraMatrizNumerosNaoAleatorios+0x39>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <geraMatrizNumerosNaoAleatorios+0x26>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraMatrizNumerosNaoAleatorios>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edi,%r14d
lea    0xeca(%rip),%rdi
xor    %r15d,%r15d
mov    %r14d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    11b8 <geraMatrizNumerosNaoAleatorios+0x98>
mov    %r14d,%ebp
neg    %ebp
lea    0xeb0(%rip),%r12
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x8(%rsp),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1180 <geraMatrizNumerosNaoAleatorios+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    %r14d,%r15d
jne    1160 <geraMatrizNumerosNaoAleatorios+0x40>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [7 x i8] c"%.1lf \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @geraMatrizNumerosNaoAleatorios(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
store i32 0, i32* %3
br label %8
8: ; preds = %32, %1
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %35
12: ; preds = %8
store i32 0, i32* %4
br label %13
13: ; preds = %27, %12
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %30
17: ; preds = %13
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
%20 = sitofp i32 %19 to double
%21 = fmul double 1.000000e+00, %20
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
%24 = sitofp i32 %23 to double
%25 = fmul double %21, %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %25)
br label %27
27: ; preds = %17
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %13
30: ; preds = %13
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %8
35: ; preds = %8
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [7 x i8] c"%.1lf \00"
define i32 @geraMatrizNumerosNaoAleatorios(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %0)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %18
4: ; preds = %1, %15
%5 = phi i32 [ %6, %15 ], [ 0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = sitofp i32 %6 to double
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ 0, %4 ], [ %10, %8 ]
%10 = add nuw nsw i32 %9, 1
%11 = sitofp i32 %10 to double
%12 = fmul double %7, %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %12)
%14 = icmp eq i32 %10, %0
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = tail call i32 @putchar(i32 10)
%17 = icmp eq i32 %6, %0
br i1 %17, label %18, label %4
18: ; preds = %15, %1
ret i32 1
}