#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);
int main(void) {
  int mat[5][5], i, j, lmenor, menor;
  menor = mat[0][0];
  for (j = 0; j <= 4; j++) {
    for (i = 0; i <= 4; i++) {
      if (mat[i][j] < menor) {
        menor = mat[i][j];
        lmenor = i;
      }
    }
  }
  printf("Linha que contém o menor número: %d\n", lmenor);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x80(%rbp)
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jg     11ae <main+0x9e>
movl   $0x0,-0x74(%rbp)
cmpl   $0x4,-0x74(%rbp)
jg     119b <main+0x8b>
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x80(%rbp),%eax
jge    1188 <main+0x78>
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x80(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    118d <main+0x7d>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1140 <main+0x30>
jmp    11a0 <main+0x90>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    112f <main+0x1f>
mov    -0x7c(%rbp),%esi
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Linha que cont\C3\A9m o menor n\C3\BAmero: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [5 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%9 = load i32, i32* %8
store i32 %9, i32* %6
store i32 0, i32* %4
br label %10
10: ; preds = %41, %0
%11 = load i32, i32* %4
%12 = icmp sle i32 %11, 4
br i1 %12, label %13, label %44
13: ; preds = %10
store i32 0, i32* %3
br label %14
14: ; preds = %37, %13
%15 = load i32, i32* %3
%16 = icmp sle i32 %15, 4
br i1 %16, label %17, label %40
17: ; preds = %14
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %19
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %20, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %36
27: ; preds = %17
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %29
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [5 x i32], [5 x i32]* %30, i64 0, i64 %32
%34 = load i32, i32* %33
store i32 %34, i32* %6
%35 = load i32, i32* %3
store i32 %35, i32* %5
br label %36
36: ; preds = %27, %17
br label %37
37: ; preds = %36
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %14
40: ; preds = %14
br label %41
41: ; preds = %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %10
44: ; preds = %10
%45 = load i32, i32* %5
%46 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Linha que cont\C3\A9m o menor n\C3\BAmero: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}