#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 rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void criar_matriz(float **mat) {
  int matriz[10][10], a;
  int linha, coluna;
  srand(time(NULL));
  for (linha = 0; linha < 10; linha++) {
    for (coluna = 0; coluna < 10; coluna++) {
      a = rand() % 150;
      if (a < 40) {
        matriz[linha][coluna] = 1;
      } else {
        matriz[linha][coluna] = 0;
      }
    }
  }
  matriz[0][0] = 0;
  matriz[9][9] = 0;
}


x86 assembly (clang, -O0):
<criar_matriz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x1a8(%rbp)
cmpl   $0xa,-0x1a8(%rbp)
jge    121c <criar_matriz+0xec>
movl   $0x0,-0x1ac(%rbp)
cmpl   $0xa,-0x1ac(%rbp)
jge    1203 <criar_matriz+0xd3>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x96,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1a4(%rbp)
cmpl   $0x28,-0x1a4(%rbp)
jge    11c7 <criar_matriz+0x97>
movslq -0x1a8(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
jmp    11ea <criar_matriz+0xba>
movslq -0x1a8(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ac(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    11ef <criar_matriz+0xbf>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1170 <criar_matriz+0x40>
jmp    1208 <criar_matriz+0xd8>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1159 <criar_matriz+0x29>
movl   $0x0,-0x1a0(%rbp)
movl   $0x0,-0x14(%rbp)
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<criar_matriz>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <rand@plt>

LLVM IR (-O0):
define void @criar_matriz(float** %0) {
%2 = alloca float**
%3 = alloca [10 x [10 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float** %0, float*** %2
%7 = call i32 @time(i32* null)
%8 = call i32 @srand(i32 %7)
store i32 0, i32* %5
br label %9
9: ; preds = %40, %1
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %43
12: ; preds = %9
store i32 0, i32* %6
br label %13
13: ; preds = %36, %12
%14 = load i32, i32* %6
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %39
16: ; preds = %13
%17 = call i32 (...) @rand()
%18 = srem i32 %17, 150
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 40
br i1 %20, label %21, label %28
21: ; preds = %16
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 %23
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %24, i64 0, i64 %26
store i32 1, i32* %27
br label %35
28: ; preds = %16
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 %30
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %31, i64 0, i64 %33
store i32 0, i32* %34
br label %35
35: ; preds = %28, %21
br label %36
36: ; preds = %35
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %13
39: ; preds = %13
br label %40
40: ; preds = %39
%41 = load i32, i32* %5
%42 = add nsw i32 %41, 1
store i32 %42, i32* %5
br label %9
43: ; preds = %9
%44 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 0
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %44, i64 0, i64 0
store i32 0, i32* %45
%46 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 9
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %46, i64 0, i64 9
store i32 0, i32* %47
ret void
}

LLVM IR (-O2):
define void @criar_matriz(float** nocapture readnone %0) {
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @rand()
%5 = tail call i32 (...) @rand()
%6 = tail call i32 (...) @rand()
%7 = tail call i32 (...) @rand()
%8 = tail call i32 (...) @rand()
%9 = tail call i32 (...) @rand()
%10 = tail call i32 (...) @rand()
%11 = tail call i32 (...) @rand()
%12 = tail call i32 (...) @rand()
%13 = tail call i32 (...) @rand()
%14 = tail call i32 (...) @rand()
%15 = tail call i32 (...) @rand()
%16 = tail call i32 (...) @rand()
%17 = tail call i32 (...) @rand()
%18 = tail call i32 (...) @rand()
%19 = tail call i32 (...) @rand()
%20 = tail call i32 (...) @rand()
%21 = tail call i32 (...) @rand()
%22 = tail call i32 (...) @rand()
%23 = tail call i32 (...) @rand()
%24 = tail call i32 (...) @rand()
%25 = tail call i32 (...) @rand()
%26 = tail call i32 (...) @rand()
%27 = tail call i32 (...) @rand()
%28 = tail call i32 (...) @rand()
%29 = tail call i32 (...) @rand()
%30 = tail call i32 (...) @rand()
%31 = tail call i32 (...) @rand()
%32 = tail call i32 (...) @rand()
%33 = tail call i32 (...) @rand()
%34 = tail call i32 (...) @rand()
%35 = tail call i32 (...) @rand()
%36 = tail call i32 (...) @rand()
%37 = tail call i32 (...) @rand()
%38 = tail call i32 (...) @rand()
%39 = tail call i32 (...) @rand()
%40 = tail call i32 (...) @rand()
%41 = tail call i32 (...) @rand()
%42 = tail call i32 (...) @rand()
%43 = tail call i32 (...) @rand()
%44 = tail call i32 (...) @rand()
%45 = tail call i32 (...) @rand()
%46 = tail call i32 (...) @rand()
%47 = tail call i32 (...) @rand()
%48 = tail call i32 (...) @rand()
%49 = tail call i32 (...) @rand()
%50 = tail call i32 (...) @rand()
%51 = tail call i32 (...) @rand()
%52 = tail call i32 (...) @rand()
%53 = tail call i32 (...) @rand()
%54 = tail call i32 (...) @rand()
%55 = tail call i32 (...) @rand()
%56 = tail call i32 (...) @rand()
%57 = tail call i32 (...) @rand()
%58 = tail call i32 (...) @rand()
%59 = tail call i32 (...) @rand()
%60 = tail call i32 (...) @rand()
%61 = tail call i32 (...) @rand()
%62 = tail call i32 (...) @rand()
%63 = tail call i32 (...) @rand()
%64 = tail call i32 (...) @rand()
%65 = tail call i32 (...) @rand()
%66 = tail call i32 (...) @rand()
%67 = tail call i32 (...) @rand()
%68 = tail call i32 (...) @rand()
%69 = tail call i32 (...) @rand()
%70 = tail call i32 (...) @rand()
%71 = tail call i32 (...) @rand()
%72 = tail call i32 (...) @rand()
%73 = tail call i32 (...) @rand()
%74 = tail call i32 (...) @rand()
%75 = tail call i32 (...) @rand()
%76 = tail call i32 (...) @rand()
%77 = tail call i32 (...) @rand()
%78 = tail call i32 (...) @rand()
%79 = tail call i32 (...) @rand()
%80 = tail call i32 (...) @rand()
%81 = tail call i32 (...) @rand()
%82 = tail call i32 (...) @rand()
%83 = tail call i32 (...) @rand()
%84 = tail call i32 (...) @rand()
%85 = tail call i32 (...) @rand()
%86 = tail call i32 (...) @rand()
%87 = tail call i32 (...) @rand()
%88 = tail call i32 (...) @rand()
%89 = tail call i32 (...) @rand()
%90 = tail call i32 (...) @rand()
%91 = tail call i32 (...) @rand()
%92 = tail call i32 (...) @rand()
%93 = tail call i32 (...) @rand()
%94 = tail call i32 (...) @rand()
%95 = tail call i32 (...) @rand()
%96 = tail call i32 (...) @rand()
%97 = tail call i32 (...) @rand()
%98 = tail call i32 (...) @rand()
%99 = tail call i32 (...) @rand()
%100 = tail call i32 (...) @rand()
%101 = tail call i32 (...) @rand()
%102 = tail call i32 (...) @rand()
%103 = tail call i32 (...) @rand()
ret void
}