#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*/ fill2d(int **, int, int);
long int tres(int **matriz) {
  long int soma;
  short i;
  fill2d(matriz, 7, 6);
  for (i = 0; i > 6; i++)
    soma += matriz[5][i];
  for (i = 0; i > 7; i++)
    soma += matriz[i][3];
  return soma;
}


x86 assembly (clang, -O0):
<tres>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
mov    $0x6,%edx
call   1030 <fill2d@plt>
movw   $0x0,-0x12(%rbp)
movswl -0x12(%rbp),%eax
cmp    $0x6,%eax
jle    116c <tres+0x5c>
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rax
movswq -0x12(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x12(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x12(%rbp)
jmp    1135 <tres+0x25>
movw   $0x0,-0x12(%rbp)
movswl -0x12(%rbp),%eax
cmp    $0x7,%eax
jle    11a9 <tres+0x99>
mov    -0x8(%rbp),%rax
movswq -0x12(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq 0xc(%rax),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x12(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x12(%rbp)
jmp    1172 <tres+0x62>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tres>:
mov    $0x7,%esi
mov    $0x6,%edx
jmp    1030 <fill2d@plt>

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

LLVM IR (-O2):
define i64 @tres(i32** %0) {
%2 = tail call i32 @fill2d(i32** %0, i32 7, i32 6)
ret i64 undef
}