#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 atoi(char *);
int /*<<< orphan*/ avaliacao(char *, int const);
scalar_t__ calloc(int const, int);
int /*<<< orphan*/ inicializacao();
scalar_t__ malloc(int const);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printMatrix(float *, int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
int /*<<< orphan*/ srand(int);
int main(int argc, char **argv) {
  int num_thds = 1;
  int width = 1024;
  int block = 16;
  char str[20];
  if (argc == 4) {
    width = atoi(argv[1]);
    block = atoi(argv[2]);
    num_thds = atoi(argv[3]);
  } else {
    printf("usage: <width> <block> <num_thds>\n");
    return (0);
  }
  printf("Inicializando Matriz: %dx%d\n", width, width);
  printf("Tamanho do bloco: %d\n", block);
  int i, j, k;
  int ii, jj, kk;
  float *a, *b, *c;
  const int size = width * width;
  a = (float *)malloc(size * sizeof(float));
  b = (float *)malloc(size * sizeof(float));
  c = (float *)calloc(size, sizeof(float));
  srand(424242);
  for (i = 0; i < size; ++i) {
    a[i] = (rand() % 10000) / 100.0f;
    b[i] = (rand() % 10000) / 100.0f;
  }
  printMatrix(a, width);
  ;
  printMatrix(b, width);
  ;
  omp_set_num_threads(num_thds);
  inicializacao();
#pragma omp parallel for default(none)                                         \
    shared(a, b, c) private(ii, jj, kk, i, j, k) firstprivate(block, width)
  for (ii = 0; ii < width; ii += block) {
    for (kk = 0; kk < width; kk += block) {
      for (jj = 0; jj < width; jj += block) {
        for (i = ii; i < ii + block; i++) {
          const int isz = i * width;
          for (k = kk; k < kk + block; k++) {
            const int ksz = k * width;
            for (j = jj; j < jj + block; j++) {
              c[isz + j] = c[isz + j] + a[isz + k] * b[ksz + j];
            }
          }
        }
      }
    }
  }
  sprintf(str, "%d; %d; %d", width, block, num_thds);
  avaliacao(str, size);
  printMatrix(c, width);
  ;
  volatile float ajsaks = c[0];
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x400,-0x18(%rbp)
movl   $0x10,-0x1c(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    121a <main+0x6a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1234 <main+0x84>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d9 <main+0x329>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
movslq -0x64(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x64(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x64(%rbp),%edi
mov    $0x4,%esi
call   1060 <calloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x67932,%edi
call   1050 <srand@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    131d <main+0x16d>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x2710,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xd2e(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x2710,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xd02(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ab <main+0xfb>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1070 <printMatrix@plt>
mov    -0x58(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1070 <printMatrix@plt>
mov    -0x14(%rbp),%edi
call   1090 <omp_set_num_threads@plt>
mov    $0x0,%al
call   10c0 <inicializacao@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1493 <main+0x2e3>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1480 <main+0x2d0>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    146d <main+0x2bd>
mov    -0x40(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x40(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    145a <main+0x2aa>
mov    -0x34(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x48(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    1447 <main+0x297>
mov    -0x3c(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x44(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    1434 <main+0x284>
mov    -0x60(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x6c(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13c5 <main+0x215>
jmp    1439 <main+0x289>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13a4 <main+0x1f4>
jmp    144c <main+0x29c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1383 <main+0x1d3>
jmp    145f <main+0x2af>
mov    -0x1c(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    1371 <main+0x1c1>
jmp    1472 <main+0x2c2>
mov    -0x1c(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    135e <main+0x1ae>
jmp    1485 <main+0x2d5>
mov    -0x1c(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    134b <main+0x19b>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xbb2(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x64(%rbp),%esi
call   1030 <avaliacao@plt>
mov    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1070 <printMatrix@plt>
mov    -0x60(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x70(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c8,%rsp
cmp    $0x4,%edi
jne    1914 <main+0x754>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   10b0 <atoi@plt>
mov    %eax,%r15d
mov    0x10(%rbx),%rdi
call   10b0 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   10b0 <atoi@plt>
mov    %eax,0x2c(%rsp)
lea    0xdfc(%rip),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe05(%rip),%rdi
mov    %ebp,0x1c(%rsp)
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%r13d
imul   %r13d,%r13d
lea    0x0(,%r13,4),%ebx
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,%rbp
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    %r13d,%edi
mov    $0x4,%esi
call   1070 <calloc@plt>
mov    %rax,0x30(%rsp)
mov    $0x67932,%edi
call   1060 <srand@plt>
test   %r13d,%r13d
je     1305 <main+0x145>
mov    %r13d,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xd4c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,0x0(%rbp,%rbx,4)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xd0e(%rip),%xmm0
movss  %xmm0,(%r12,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1280 <main+0xc0>
mov    %r13,0xb0(%rsp)
mov    %rbp,%rdi
mov    %r15d,%esi
call   1080 <printMatrix@plt>
mov    %r12,%rdi
mov    %r15d,%esi
call   1080 <printMatrix@plt>
mov    0x2c(%rsp),%edi
call   10a0 <omp_set_num_threads@plt>
xor    %eax,%eax
call   10d0 <inicializacao@plt>
mov    %r15d,0x28(%rsp)
test   %r15d,%r15d
jle    1922 <main+0x762>
mov    %r12,%r11
movslq 0x1c(%rsp),%rbx
mov    0x28(%rsp),%eax
mov    %rbx,%rdx
imul   %rax,%rdx
lea    0x10(%r12),%rsi
mov    %rsi,0xb8(%rsp)
mov    %rdx,0x38(%rsp)
lea    0x0(,%rdx,4),%rdx
mov    %rdx,0x48(%rsp)
lea    0x0(,%rbx,4),%rdx
mov    %rdx,0xf0(%rsp)
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,4),%rax
mov    %rax,0xa0(%rsp)
mov    0x30(%rsp),%rax
lea    0x10(%rax),%rdx
mov    %rdx,0x40(%rsp)
xor    %edx,%edx
mov    %rax,0x50(%rsp)
xor    %eax,%eax
mov    %rbx,0x60(%rsp)
jmp    13f1 <main+0x231>
cs nopw 0x0(%rax,%rax,1)
mov    0xc0(%rsp),%rdx
add    $0x1,%rdx
mov    0x48(%rsp),%rax
add    %rax,0x40(%rsp)
add    %rax,0x50(%rsp)
mov    0x80(%rsp),%rsi
mov    %rsi,%rax
cmp    0x20(%rsp),%rsi
jge    1922 <main+0x762>
mov    0x38(%rsp),%rsi
mov    %rdx,0xc0(%rsp)
imul   %rdx,%rsi
mov    %rsi,0x58(%rsp)
lea    0x1(%rsi),%rdx
mov    %rdx,0xc8(%rsp)
mov    %rax,0xe0(%rsp)
add    %rbx,%rax
mov    %rax,0x80(%rsp)
mov    %r11,0x88(%rsp)
mov    0xb8(%rsp),%rdx
xor    %esi,%esi
xor    %r10d,%r10d
jmp    147a <main+0x2ba>
nopl   (%rax)
mov    0xd0(%rsp),%rsi
add    $0x1,%rsi
mov    0x48(%rsp),%rax
mov    0xd8(%rsp),%rdx
add    %rax,%rdx
add    %rax,0x88(%rsp)
mov    0x98(%rsp),%rax
mov    %rax,%r10
cmp    0x20(%rsp),%rax
jge    13c0 <main+0x200>
mov    0x58(%rsp),%rax
add    %r10,%rax
mov    %rax,0x110(%rsp)
mov    0xc8(%rsp),%rax
add    %r10,%rax
mov    %rax,0x108(%rsp)
mov    0x38(%rsp),%rax
mov    %rsi,0xd0(%rsp)
imul   %rsi,%rax
mov    %rax,0xe8(%rsp)
lea    (%r10,%rbx,1),%rax
mov    %rax,0x98(%rsp)
mov    $0x1,%eax
movq   $0xfffffffffffffffc,0x78(%rsp)
ff ff
mov    %rbx,%rcx
mov    0x40(%rsp),%rsi
mov    %rsi,0x70(%rsp)
mov    %rdx,0xd8(%rsp)
mov    %rdx,0x90(%rsp)
xor    %edx,%edx
mov    %rdx,0x68(%rsp)
xor    %edx,%edx
mov    %rdx,0x10(%rsp)
mov    %r10,0x118(%rsp)
jmp    155e <main+0x39e>
cs nopw 0x0(%rax,%rax,1)
nop
addq   $0x1,0x68(%rsp)
mov    0xf0(%rsp),%rax
add    %rax,0x90(%rsp)
add    %rax,0x70(%rsp)
mov    0x60(%rsp),%rbx
mov    0xf8(%rsp),%rcx
add    %rbx,%rcx
mov    0x100(%rsp),%rax
add    %rbx,%rax
sub    %rbx,0x78(%rsp)
mov    %rsi,%rdx
mov    %rsi,0x10(%rsp)
cmp    0x20(%rsp),%rsi
jge    1440 <main+0x280>
cmp    %rax,%rcx
mov    %rax,0x100(%rsp)
mov    %rcx,0xf8(%rsp)
cmovg  %rcx,%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rbx,1),%rsi
add    $0x1,%rcx
cmp    %rcx,%rsi
cmovg  %rsi,%rcx
cmpl   $0x0,0x1c(%rsp)
jle    1510 <main+0x350>
add    0x78(%rsp),%rax
shr    $0x2,%rax
add    $0x1,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x140(%rsp)
mov    0x68(%rsp),%rax
imul   0x60(%rsp),%rax
mov    %rcx,%rdx
sub    %rax,%rdx
neg    %rax
add    %rcx,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x160(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %rax,0x158(%rsp)
mov    0x58(%rsp),%rax
mov    0x10(%rsp),%rdi
lea    (%rax,%rdi,1),%rbx
mov    %rbx,0x128(%rsp)
add    %rcx,%rax
mov    %rax,0x120(%rsp)
mov    0xe8(%rsp),%rax
lea    (%rax,%rdi,1),%rbx
mov    %rbx,0x168(%rsp)
add    %rax,%rcx
mov    %rcx,0x170(%rsp)
mov    %rdx,0xa8(%rsp)
and    $0xfffffffffffffffc,%rdx
mov    %rdx,0x150(%rsp)
lea    (%rdi,%rdx,1),%rax
mov    %rax,0x148(%rsp)
mov    0x50(%rsp),%rbx
mov    0x70(%rsp),%r15
xor    %ecx,%ecx
mov    0xe0(%rsp),%rdi
jmp    169c <main+0x4dc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x130(%rsp),%rdi
add    $0x1,%rdi
mov    0x138(%rsp),%rcx
add    $0x1,%rcx
mov    0xa0(%rsp),%rax
add    %rax,%r15
add    %rax,%rbx
cmp    0x80(%rsp),%rdi
mov    0x118(%rsp),%r10
jge    1510 <main+0x350>
mov    %rcx,0x138(%rsp)
mov    0x20(%rsp),%r8
imul   %r8,%rcx
mov    0x128(%rsp),%rax
add    %rcx,%rax
mov    0x30(%rsp),%rdx
lea    (%rdx,%rax,4),%rax
mov    %rax,0x188(%rsp)
mov    0x120(%rsp),%rax
add    %rcx,%rax
lea    (%rdx,%rax,4),%rax
mov    %rax,0x180(%rsp)
mov    0x110(%rsp),%rax
add    %rcx,%rax
mov    %rax,0x178(%rsp)
add    0x108(%rsp),%rcx
mov    %rcx,0x190(%rsp)
mov    %rdi,0x130(%rsp)
mov    %rdi,%rax
imul   %r8,%rax
mov    0x88(%rsp),%r8
mov    0x90(%rsp),%r14
xor    %r13d,%r13d
mov    %r10,%rdi
mov    %rax,%r10
jmp    1754 <main+0x594>
nopl   (%rax)
add    $0x1,%rdi
add    $0x1,%r13
mov    0xa0(%rsp),%rax
add    %rax,%r14
add    %rax,%r8
cmp    0x98(%rsp),%rdi
jge    1660 <main+0x4a0>
lea    (%rdi,%r10,1),%rax
mov    0x10(%rsp),%rdx
cmpq   $0x4,0xa8(%rsp)
jb     18f0 <main+0x730>
mov    %r13,%rdx
imul   0x20(%rsp),%rdx
mov    0x170(%rsp),%rcx
add    %rdx,%rcx
lea    (%r11,%rcx,4),%rcx
mov    %rcx,0x1a0(%rsp)
add    0x168(%rsp),%rdx
lea    (%r11,%rdx,4),%rcx
mov    %rcx,0x198(%rsp)
mov    0x190(%rsp),%rcx
add    %r13,%rcx
lea    0x0(%rbp,%rcx,4),%r9
mov    0x178(%rsp),%rcx
lea    (%rcx,%r13,1),%rdx
mov    %r10,%r12
lea    0x0(,%rdx,4),%r10
add    %rbp,%r10
mov    0x188(%rsp),%rcx
cmp    %r9,%rcx
setb   0xf(%rsp)
mov    0x180(%rsp),%rdx
cmp    %rdx,%r10
mov    %r12,%r10
setb   %r9b
cmp    0x1a0(%rsp),%rcx
setb   %r12b
cmp    %rdx,0x198(%rsp)
setb   %cl
mov    0x10(%rsp),%rdx
test   %r9b,0xf(%rsp)
jne    18f0 <main+0x730>
mov    0x10(%rsp),%rdx
and    %cl,%r12b
jne    18f0 <main+0x730>
cmpq   $0x4,0x160(%rsp)
jae    1831 <main+0x671>
xor    %r12d,%r12d
jmp    1887 <main+0x6c7>
movss  0x0(%rbp,%rax,4),%xmm0
shufps $0x0,%xmm0,%xmm0
mov    0x140(%rsp),%rdx
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
movups -0x10(%r14,%r12,4),%xmm1
mulps  %xmm0,%xmm1
movups -0x10(%r15,%r12,4),%xmm2
addps  %xmm1,%xmm2
movups (%r15,%r12,4),%xmm1
movups %xmm2,-0x10(%r15,%r12,4)
movups (%r14,%r12,4),%xmm2
mulps  %xmm0,%xmm2
addps  %xmm1,%xmm2
movups %xmm2,(%r15,%r12,4)
add    $0x8,%r12
add    $0xfffffffffffffffe,%rdx
jne    1850 <main+0x690>
testb  $0x1,0x158(%rsp)
01
je     18ca <main+0x70a>
mov    %rdi,%rcx
imul   0x20(%rsp),%rcx
add    0x10(%rsp),%r12
lea    (%r12,%r10,1),%r9
mov    0x30(%rsp),%rdx
movups (%rdx,%r9,4),%xmm0
movss  0x0(%rbp,%rax,4),%xmm1
shufps $0x0,%xmm1,%xmm1
add    %rcx,%r12
movups (%r11,%r12,4),%xmm2
mulps  %xmm1,%xmm2
addps  %xmm0,%xmm2
movups %xmm2,(%rdx,%r9,4)
mov    0x148(%rsp),%rdx
mov    0x150(%rsp),%rcx
cmp    %rcx,0xa8(%rsp)
je     1730 <main+0x570>
nopl   0x0(%rax,%rax,1)
movss  0x0(%rbp,%rax,4),%xmm0
mulss  (%r8,%rdx,4),%xmm0
addss  (%rbx,%rdx,4),%xmm0
movss  %xmm0,(%rbx,%rdx,4)
add    $0x1,%rdx
cmp    %rsi,%rdx
jl     18f0 <main+0x730>
jmp    1730 <main+0x570>
lea    0x727(%rip),%rdi
call   1040 <puts@plt>
jmp    1975 <main+0x7b5>
lea    0x70e(%rip),%rsi
lea    0x1b0(%rsp),%rbp
mov    %rbp,%rdi
mov    0x28(%rsp),%ebx
mov    %ebx,%edx
mov    0x1c(%rsp),%ecx
mov    0x2c(%rsp),%r8d
call   10c0 <sprintf@plt>
mov    %rbp,%rdi
mov    0xb0(%rsp),%rsi
call   1030 <avaliacao@plt>
mov    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %ebx,%esi
call   1080 <printMatrix@plt>
movss  0x0(%rbp),%xmm0
movss  %xmm0,0x1ac(%rsp)
xor    %eax,%eax
add    $0x1c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"usage: <width> <block> <num_thds>\0A\00"
@.str.1 = [29 x i8] c"Inicializando Matriz: %dx%d\0A\00"
@.str.2 = [22 x i8] c"Tamanho do bloco: %d\0A\00"
@.str.3 = [11 x i8] c"%d; %d; %d\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
%9 = alloca [20 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca float*
%17 = alloca float*
%18 = alloca float*
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 1024, i32* %7
store i32 16, i32* %8
%23 = load i32, i32* %4
%24 = icmp eq i32 %23, 4
br i1 %24, label %25, label %38
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %7
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %8
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %6
br label %40
38: ; preds = %2
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %213
40: ; preds = %25
%41 = load i32, i32* %7
%42 = load i32, i32* %7
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %41, i32 %42)
%44 = load i32, i32* %8
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %7
%47 = load i32, i32* %7
%48 = mul nsw i32 %46, %47
store i32 %48, i32* %19
%49 = load i32, i32* %19
%50 = sext i32 %49 to i64
%51 = mul i64 %50, 4
%52 = trunc i64 %51 to i32
%53 = call i64 @malloc(i32 %52)
%54 = inttoptr i64 %53 to float*
store float* %54, float** %16
%55 = load i32, i32* %19
%56 = sext i32 %55 to i64
%57 = mul i64 %56, 4
%58 = trunc i64 %57 to i32
%59 = call i64 @malloc(i32 %58)
%60 = inttoptr i64 %59 to float*
store float* %60, float** %17
%61 = load i32, i32* %19
%62 = call i64 @calloc(i32 %61, i32 4)
%63 = inttoptr i64 %62 to float*
store float* %63, float** %18
%64 = call i32 @srand(i32 424242)
store i32 0, i32* %10
br label %65
65: ; preds = %86, %40
%66 = load i32, i32* %10
%67 = load i32, i32* %19
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %89
69: ; preds = %65
%70 = call i32 (...) @rand()
%71 = srem i32 %70, 10000
%72 = sitofp i32 %71 to float
%73 = fdiv float %72, 1.000000e+02
%74 = load float*, float** %16
%75 = load i32, i32* %10
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds float, float* %74, i64 %76
store float %73, float* %77
%78 = call i32 (...) @rand()
%79 = srem i32 %78, 10000
%80 = sitofp i32 %79 to float
%81 = fdiv float %80, 1.000000e+02
%82 = load float*, float** %17
%83 = load i32, i32* %10
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds float, float* %82, i64 %84
store float %81, float* %85
br label %86
86: ; preds = %69
%87 = load i32, i32* %10
%88 = add nsw i32 %87, 1
store i32 %88, i32* %10
br label %65
89: ; preds = %65
%90 = load float*, float** %16
%91 = load i32, i32* %7
%92 = call i32 @printMatrix(float* %90, i32 %91)
%93 = load float*, float** %17
%94 = load i32, i32* %7
%95 = call i32 @printMatrix(float* %93, i32 %94)
%96 = load i32, i32* %6
%97 = call i32 @omp_set_num_threads(i32 %96)
%98 = call i32 (...) @inicializacao()
store i32 0, i32* %13
br label %99
99: ; preds = %194, %89
%100 = load i32, i32* %13
%101 = load i32, i32* %7
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %198
103: ; preds = %99
store i32 0, i32* %15
br label %104
104: ; preds = %189, %103
%105 = load i32, i32* %15
%106 = load i32, i32* %7
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %193
108: ; preds = %104
store i32 0, i32* %14
br label %109
109: ; preds = %184, %108
%110 = load i32, i32* %14
%111 = load i32, i32* %7
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %188
113: ; preds = %109
%114 = load i32, i32* %13
store i32 %114, i32* %10
br label %115
115: ; preds = %180, %113
%116 = load i32, i32* %10
%117 = load i32, i32* %13
%118 = load i32, i32* %8
%119 = add nsw i32 %117, %118
%120 = icmp slt i32 %116, %119
br i1 %120, label %121, label %183
121: ; preds = %115
%122 = load i32, i32* %10
%123 = load i32, i32* %7
%124 = mul nsw i32 %122, %123
store i32 %124, i32* %20
%125 = load i32, i32* %15
store i32 %125, i32* %12
br label %126
126: ; preds = %176, %121
%127 = load i32, i32* %12
%128 = load i32, i32* %15
%129 = load i32, i32* %8
%130 = add nsw i32 %128, %129
%131 = icmp slt i32 %127, %130
br i1 %131, label %132, label %179
132: ; preds = %126
%133 = load i32, i32* %12
%134 = load i32, i32* %7
%135 = mul nsw i32 %133, %134
store i32 %135, i32* %21
%136 = load i32, i32* %14
store i32 %136, i32* %11
br label %137
137: ; preds = %172, %132
%138 = load i32, i32* %11
%139 = load i32, i32* %14
%140 = load i32, i32* %8
%141 = add nsw i32 %139, %140
%142 = icmp slt i32 %138, %141
br i1 %142, label %143, label %175
143: ; preds = %137
%144 = load float*, float** %18
%145 = load i32, i32* %20
%146 = load i32, i32* %11
%147 = add nsw i32 %145, %146
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds float, float* %144, i64 %148
%150 = load float, float* %149
%151 = load float*, float** %16
%152 = load i32, i32* %20
%153 = load i32, i32* %12
%154 = add nsw i32 %152, %153
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds float, float* %151, i64 %155
%157 = load float, float* %156
%158 = load float*, float** %17
%159 = load i32, i32* %21
%160 = load i32, i32* %11
%161 = add nsw i32 %159, %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds float, float* %158, i64 %162
%164 = load float, float* %163
%165 = call float @llvm.fmuladd.f32(float %157, float %164, float %150)
%166 = load float*, float** %18
%167 = load i32, i32* %20
%168 = load i32, i32* %11
%169 = add nsw i32 %167, %168
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds float, float* %166, i64 %170
store float %165, float* %171
br label %172
172: ; preds = %143
%173 = load i32, i32* %11
%174 = add nsw i32 %173, 1
store i32 %174, i32* %11
br label %137
175: ; preds = %137
br label %176
176: ; preds = %175
%177 = load i32, i32* %12
%178 = add nsw i32 %177, 1
store i32 %178, i32* %12
br label %126
179: ; preds = %126
br label %180
180: ; preds = %179
%181 = load i32, i32* %10
%182 = add nsw i32 %181, 1
store i32 %182, i32* %10
br label %115
183: ; preds = %115
br label %184
184: ; preds = %183
%185 = load i32, i32* %8
%186 = load i32, i32* %14
%187 = add nsw i32 %186, %185
store i32 %187, i32* %14
br label %109
188: ; preds = %109
br label %189
189: ; preds = %188
%190 = load i32, i32* %8
%191 = load i32, i32* %15
%192 = add nsw i32 %191, %190
store i32 %192, i32* %15
br label %104
193: ; preds = %104
br label %194
194: ; preds = %193
%195 = load i32, i32* %8
%196 = load i32, i32* %13
%197 = add nsw i32 %196, %195
store i32 %197, i32* %13
br label %99
198: ; preds = %99
%199 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%200 = load i32, i32* %7
%201 = load i32, i32* %8
%202 = load i32, i32* %6
%203 = call i32 @sprintf(i8* %199, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %200, i32 %201, i32 %202)
%204 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%205 = load i32, i32* %19
%206 = call i32 @avaliacao(i8* %204, i32 %205)
%207 = load float*, float** %18
%208 = load i32, i32* %7
%209 = call i32 @printMatrix(float* %207, i32 %208)
%210 = load float*, float** %18
%211 = getelementptr inbounds float, float* %210, i64 0
%212 = load float, float* %211
store volatile float %212, float* %22
store i32 0, i32* %3
br label %213
213: ; preds = %198, %38
%214 = load i32, i32* %3
ret i32 %214
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"Inicializando Matriz: %dx%d\0A\00"
@.str.2 = [22 x i8] c"Tamanho do bloco: %d\0A\00"
@.str.3 = [11 x i8] c"%d; %d; %d\00"
@str = [34 x i8] c"usage: <width> <block> <num_thds>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [20 x i8]
%4 = alloca float
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%6 = icmp eq i32 %0, 4
br i1 %6, label %7, label %31
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 3
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %10)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%19 = mul nsw i32 %10, %10
%20 = shl i32 %19, 2
%21 = tail call i64 @malloc(i32 %20)
%22 = inttoptr i64 %21 to float*
%23 = tail call i64 @malloc(i32 %20)
%24 = inttoptr i64 %23 to float*
%25 = tail call i64 @calloc(i32 %19, i32 4)
%26 = inttoptr i64 %25 to float*
%27 = tail call i32 @srand(i32 424242)
%28 = icmp eq i32 %19, 0
br i1 %28, label %47, label %29
29: ; preds = %7
%30 = zext i32 %19 to i64
br label %33
31: ; preds = %2
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
br label %231
33: ; preds = %29, %33
%34 = phi i64 [ 0, %29 ], [ %45, %33 ]
%35 = tail call i32 (...) @rand()
%36 = srem i32 %35, 10000
%37 = sitofp i32 %36 to float
%38 = fdiv float %37, 1.000000e+02
%39 = getelementptr inbounds float, float* %22, i64 %34
store float %38, float* %39
%40 = tail call i32 (...) @rand()
%41 = srem i32 %40, 10000
%42 = sitofp i32 %41 to float
%43 = fdiv float %42, 1.000000e+02
%44 = getelementptr inbounds float, float* %24, i64 %34
store float %43, float* %44
%45 = add nuw nsw i64 %34, 1
%46 = icmp eq i64 %45, %30
br i1 %46, label %47, label %33
47: ; preds = %33, %7
%48 = tail call i32 @printMatrix(float* %22, i32 %10)
%49 = tail call i32 @printMatrix(float* %24, i32 %10)
%50 = tail call i32 @omp_set_num_threads(i32 %16)
%51 = tail call i32 (...) @inicializacao()
%52 = icmp sgt i32 %10, 0
br i1 %52, label %53, label %225
53: ; preds = %47
%54 = sext i32 %13 to i64
%55 = zext i32 %10 to i64
%56 = icmp sgt i32 %13, 0
%57 = mul nsw i64 %54, %55
%58 = mul nsw i64 %54, %55
br label %59
59: ; preds = %222, %53
%60 = phi i64 [ %224, %222 ], [ 0, %53 ]
%61 = phi i64 [ %64, %222 ], [ 0, %53 ]
%62 = mul i64 %57, %60
%63 = add i64 %62, 1
%64 = add i64 %61, %54
br label %65
65: ; preds = %219, %59
%66 = phi i64 [ %221, %219 ], [ 0, %59 ]
%67 = phi i64 [ %71, %219 ], [ 0, %59 ]
%68 = add i64 %62, %67
%69 = add i64 %63, %67
%70 = mul i64 %58, %66
%71 = add i64 %67, %54
br label %72
72: ; preds = %65, %216
%73 = phi i64 [ 0, %65 ], [ %218, %216 ]
%74 = phi i64 [ 0, %65 ], [ %95, %216 ]
%75 = add i64 %74, %54
%76 = add i64 %74, 1
%77 = call i64 @llvm.smax.i64(i64 %75, i64 %76)
%78 = mul i64 %73, %54
%79 = sub i64 %77, %78
%80 = add i64 %79, -4
%81 = lshr i64 %80, 2
%82 = add nuw nsw i64 %81, 1
%83 = add i64 %74, %54
%84 = add i64 %74, 1
%85 = call i64 @llvm.smax.i64(i64 %83, i64 %84)
%86 = mul i64 %73, %54
%87 = sub i64 %85, %86
%88 = add i64 %62, %74
%89 = add i64 %74, %54
%90 = add i64 %74, 1
%91 = call i64 @llvm.smax.i64(i64 %89, i64 %90)
%92 = add i64 %62, %91
%93 = add i64 %70, %74
%94 = add i64 %70, %91
%95 = add i64 %74, %54
br i1 %56, label %96, label %216
96: ; preds = %72
%97 = icmp ult i64 %87, 4
%98 = and i64 %87, -4
%99 = add i64 %74, %98
%100 = and i64 %82, 1
%101 = icmp ult i64 %80, 4
%102 = and i64 %82, 9223372036854775806
%103 = icmp eq i64 %100, 0
%104 = icmp eq i64 %87, %98
br label %105
105: ; preds = %96, %212
%106 = phi i64 [ %215, %212 ], [ 0, %96 ]
%107 = phi i64 [ %213, %212 ], [ %61, %96 ]
%108 = mul i64 %106, %55
%109 = add i64 %88, %108
%110 = getelementptr float, float* %26, i64 %109
%111 = add i64 %92, %108
%112 = getelementptr float, float* %26, i64 %111
%113 = add i64 %68, %108
%114 = add i64 %69, %108
%115 = mul nsw i64 %107, %55
br label %116
116: ; preds = %208, %105
%117 = phi i64 [ %211, %208 ], [ 0, %105 ]
%118 = phi i64 [ %209, %208 ], [ %67, %105 ]
%119 = mul i64 %117, %55
%120 = mul nsw i64 %118, %55
%121 = add nsw i64 %118, %115
%122 = getelementptr inbounds float, float* %22, i64 %121
br i1 %97, label %194, label %123
123: ; preds = %116
%124 = add i64 %94, %119
%125 = getelementptr float, float* %24, i64 %124
%126 = add i64 %93, %119
%127 = getelementptr float, float* %24, i64 %126
%128 = add i64 %114, %117
%129 = getelementptr float, float* %22, i64 %128
%130 = add i64 %113, %117
%131 = getelementptr float, float* %22, i64 %130
%132 = icmp ult float* %110, %129
%133 = icmp ult float* %131, %112
%134 = and i1 %132, %133
%135 = icmp ult float* %110, %125
%136 = icmp ult float* %127, %112
%137 = and i1 %135, %136
%138 = or i1 %134, %137
br i1 %138, label %194, label %139
139: ; preds = %123
br i1 %101, label %176, label %140
140: ; preds = %139
%141 = load float, float* %122
%142 = insertelement <4 x float> poison, float %141, i64 0
%143 = shufflevector <4 x float> %142, <4 x float> poison, <4 x i32> zeroinitializer
%144 = load float, float* %122
%145 = insertelement <4 x float> poison, float %144, i64 0
%146 = shufflevector <4 x float> %145, <4 x float> poison, <4 x i32> zeroinitializer
br label %147
147: ; preds = %147, %140
%148 = phi i64 [ 0, %140 ], [ %173, %147 ]
%149 = phi i64 [ 0, %140 ], [ %174, %147 ]
%150 = add i64 %74, %148
%151 = add nsw i64 %150, %115
%152 = getelementptr inbounds float, float* %26, i64 %151
%153 = bitcast float* %152 to <4 x float>*
%154 = load <4 x float>, <4 x float>* %153
%155 = add nsw i64 %150, %120
%156 = getelementptr inbounds float, float* %24, i64 %155
%157 = bitcast float* %156 to <4 x float>*
%158 = load <4 x float>, <4 x float>* %157
%159 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %143, <4 x float> %158, <4 x float> %154)
%160 = bitcast float* %152 to <4 x float>*
store <4 x float> %159, <4 x float>* %160
%161 = or i64 %148, 4
%162 = add i64 %74, %161
%163 = add nsw i64 %162, %115
%164 = getelementptr inbounds float, float* %26, i64 %163
%165 = bitcast float* %164 to <4 x float>*
%166 = load <4 x float>, <4 x float>* %165
%167 = add nsw i64 %162, %120
%168 = getelementptr inbounds float, float* %24, i64 %167
%169 = bitcast float* %168 to <4 x float>*
%170 = load <4 x float>, <4 x float>* %169
%171 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %146, <4 x float> %170, <4 x float> %166)
%172 = bitcast float* %164 to <4 x float>*
store <4 x float> %171, <4 x float>* %172
%173 = add nuw i64 %148, 8
%174 = add i64 %149, 2
%175 = icmp eq i64 %174, %102
br i1 %175, label %176, label %147
176: ; preds = %147, %139
%177 = phi i64 [ 0, %139 ], [ %173, %147 ]
br i1 %103, label %193, label %178
178: ; preds = %176
%179 = add i64 %74, %177
%180 = add nsw i64 %179, %115
%181 = getelementptr inbounds float, float* %26, i64 %180
%182 = bitcast float* %181 to <4 x float>*
%183 = load <4 x float>, <4 x float>* %182
%184 = load float, float* %122
%185 = insertelement <4 x float> poison, float %184, i64 0
%186 = shufflevector <4 x float> %185, <4 x float> poison, <4 x i32> zeroinitializer
%187 = add nsw i64 %179, %120
%188 = getelementptr inbounds float, float* %24, i64 %187
%189 = bitcast float* %188 to <4 x float>*
%190 = load <4 x float>, <4 x float>* %189
%191 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %186, <4 x float> %190, <4 x float> %183)
%192 = bitcast float* %181 to <4 x float>*
store <4 x float> %191, <4 x float>* %192
br label %193
193: ; preds = %176, %178
br i1 %104, label %208, label %194
194: ; preds = %123, %116, %193
%195 = phi i64 [ %74, %123 ], [ %74, %116 ], [ %99, %193 ]
br label %196
196: ; preds = %194, %196
%197 = phi i64 [ %206, %196 ], [ %195, %194 ]
%198 = add nsw i64 %197, %115
%199 = getelementptr inbounds float, float* %26, i64 %198
%200 = load float, float* %199
%201 = load float, float* %122
%202 = add nsw i64 %197, %120
%203 = getelementptr inbounds float, float* %24, i64 %202
%204 = load float, float* %203
%205 = tail call float @llvm.fmuladd.f32(float %201, float %204, float %200)
store float %205, float* %199
%206 = add nsw i64 %197, 1
%207 = icmp slt i64 %206, %95
br i1 %207, label %196, label %208
208: ; preds = %196, %193
%209 = add nsw i64 %118, 1
%210 = icmp slt i64 %209, %71
%211 = add i64 %117, 1
br i1 %210, label %116, label %212
212: ; preds = %208
%213 = add nsw i64 %107, 1
%214 = icmp slt i64 %213, %64
%215 = add i64 %106, 1
br i1 %214, label %105, label %216
216: ; preds = %212, %72
%217 = icmp slt i64 %95, %55
%218 = add i64 %73, 1
br i1 %217, label %72, label %219
219: ; preds = %216
%220 = icmp slt i64 %71, %55
%221 = add i64 %66, 1
br i1 %220, label %65, label %222
222: ; preds = %219
%223 = icmp slt i64 %64, %55
%224 = add i64 %60, 1
br i1 %223, label %59, label %225
225: ; preds = %222, %47
%226 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %10, i32 %13, i32 %16)
%227 = call i32 @avaliacao(i8* %5, i32 %19)
%228 = call i32 @printMatrix(float* %26, i32 %10)
%229 = bitcast float* %4 to i8*
%230 = load float, float* %26
store volatile float %230, float* %4
br label %231
231: ; preds = %225, %31
ret i32 0
}