#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*/ LC_ALL;
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "Portuguese");
  int linha = 10;
  int coluna = 10;
  int vetorbi[linha][coluna];
  int i;
  int x;
  int maior = 0;
  for (i = 0; i < linha; i++) {
    for (x = 0; x < coluna; x++) {
      printf("Informe o valor da Matriz[%d][%d]= ", i, x);
      scanf("%d", &vetorbi[i][x]);
    }
  }
  int z;
  int y;
  for (z = 0; z < linha; z++) {
    printf("\n");
    for (y = 0; y < coluna; y++) {
      if (vetorbi[z][y] > maior) {
        maior = vetorbi[z][y];
      }
    }
  }
  printf("O maior valor é %d", maior);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1040 <setlocale@plt>
movl   $0xa,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
mov    %rax,-0x50(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x48(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    123d <main+0xfd>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    122a <main+0xea>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x50(%rbp),%rcx
mov    -0x48(%rbp),%rsi
movslq -0x2c(%rbp),%rax
imul   %rcx,%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x30(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe2b(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11ce <main+0x8e>
jmp    122f <main+0xef>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11bb <main+0x7b>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12df <main+0x19f>
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12cc <main+0x18c>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rdx
movslq -0x38(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x34(%rbp),%eax
jle    12b9 <main+0x179>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rdx
movslq -0x38(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
jmp    12be <main+0x17e>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1265 <main+0x125>
jmp    12d1 <main+0x191>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1244 <main+0x104>
mov    -0x34(%rbp),%esi
lea    0xd48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x190,%rsp
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1050 <setlocale@plt>
lea    0xe90(%rip),%r14
lea    0xebe(%rip),%r15
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%rsp,%rbx,1),%r12
mov    %r14,%rdi
mov    %ebp,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x4,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x8,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0xc,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x10,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x14,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x18,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x1c,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x20,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x9,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x24,%rsi
mov    %r15,%rdi
call   1060 <scanf@plt>
add    $0x1,%ebp
add    $0x28,%rbx
cmp    $0x190,%rbx
jne    1190 <main+0x40>
xor    %ebx,%ebx
mov    $0x24,%ebp
jmp    130d <main+0x1bd>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x28,%rbp
cmp    $0x1b4,%rbp
je     137c <main+0x22c>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x24(%rsp,%rbp,1),%eax
cmp    %ebx,%eax
jg     1321 <main+0x1d1>
mov    %ebx,%eax
mov    -0x20(%rsp,%rbp,1),%ecx
cmp    %eax,%ecx
jg     132b <main+0x1db>
mov    %eax,%ecx
mov    -0x1c(%rsp,%rbp,1),%eax
cmp    %ecx,%eax
jg     1335 <main+0x1e5>
mov    %ecx,%eax
mov    -0x18(%rsp,%rbp,1),%ecx
cmp    %eax,%ecx
jg     133f <main+0x1ef>
mov    %eax,%ecx
mov    -0x14(%rsp,%rbp,1),%eax
cmp    %ecx,%eax
jg     1349 <main+0x1f9>
mov    %ecx,%eax
mov    -0x10(%rsp,%rbp,1),%ecx
cmp    %eax,%ecx
jg     1353 <main+0x203>
mov    %eax,%ecx
mov    -0xc(%rsp,%rbp,1),%eax
cmp    %ecx,%eax
jg     135d <main+0x20d>
mov    %ecx,%eax
mov    -0x8(%rsp,%rbp,1),%ecx
cmp    %eax,%ecx
jg     1367 <main+0x217>
mov    %eax,%ecx
mov    -0x4(%rsp,%rbp,1),%eax
cmp    %ecx,%eax
jg     1371 <main+0x221>
mov    %ecx,%eax
mov    (%rsp,%rbp,1),%ebx
cmp    %eax,%ebx
jg     1300 <main+0x1b0>
mov    %eax,%ebx
jmp    1300 <main+0x1b0>
lea    0xcac(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <getch@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [36 x i8] c"Informe o valor da Matriz[%d][%d]= \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [20 x i8] c"O maior valor \C3\A9 %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = load i32, i32* @LC_ALL
%13 = call i32 @setlocale(i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 10, i32* %2
store i32 10, i32* %3
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %4
%19 = mul nuw i64 %15, %17
%20 = alloca i32, i64 %19
store i64 %15, i64* %5
store i64 %17, i64* %6
store i32 0, i32* %9
store i32 0, i32* %7
br label %21
21: ; preds = %46, %0
%22 = load i32, i32* %7
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %49
25: ; preds = %21
store i32 0, i32* %8
br label %26
26: ; preds = %42, %25
%27 = load i32, i32* %8
%28 = load i32, i32* %3
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %45
30: ; preds = %26
%31 = load i32, i32* %7
%32 = load i32, i32* %8
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %31, i32 %32)
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = mul nsw i64 %35, %17
%37 = getelementptr inbounds i32, i32* %20, i64 %36
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %40)
br label %42
42: ; preds = %30
%43 = load i32, i32* %8
%44 = add nsw i32 %43, 1
store i32 %44, i32* %8
br label %26
45: ; preds = %26
br label %46
46: ; preds = %45
%47 = load i32, i32* %7
%48 = add nsw i32 %47, 1
store i32 %48, i32* %7
br label %21
49: ; preds = %21
store i32 0, i32* %10
br label %50
50: ; preds = %85, %49
%51 = load i32, i32* %10
%52 = load i32, i32* %2
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %88
54: ; preds = %50
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %11
br label %56
56: ; preds = %81, %54
%57 = load i32, i32* %11
%58 = load i32, i32* %3
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %84
60: ; preds = %56
%61 = load i32, i32* %10
%62 = sext i32 %61 to i64
%63 = mul nsw i64 %62, %17
%64 = getelementptr inbounds i32, i32* %20, i64 %63
%65 = load i32, i32* %11
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %64, i64 %66
%68 = load i32, i32* %67
%69 = load i32, i32* %9
%70 = icmp sgt i32 %68, %69
br i1 %70, label %71, label %80
71: ; preds = %60
%72 = load i32, i32* %10
%73 = sext i32 %72 to i64
%74 = mul nsw i64 %73, %17
%75 = getelementptr inbounds i32, i32* %20, i64 %74
%76 = load i32, i32* %11
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i32, i32* %75, i64 %77
%79 = load i32, i32* %78
store i32 %79, i32* %9
br label %80
80: ; preds = %71, %60
br label %81
81: ; preds = %80
%82 = load i32, i32* %11
%83 = add nsw i32 %82, 1
store i32 %83, i32* %11
br label %56
84: ; preds = %56
br label %85
85: ; preds = %84
%86 = load i32, i32* %10
%87 = add nsw i32 %86, 1
store i32 %87, i32* %10
br label %50
88: ; preds = %50
%89 = load i32, i32* %9
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %89)
%91 = call i32 (...) @getch()
%92 = load i8*, i8** %4
%93 = load i32, i32* %1
ret i32 %93
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [36 x i8] c"Informe o valor da Matriz[%d][%d]= \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.4 = [20 x i8] c"O maior valor \C3\A9 %d\00"
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = alloca [100 x i32]
br label %4
4: ; preds = %0, %4
%5 = phi i64 [ 0, %0 ], [ %38, %4 ]
%6 = mul nuw nsw i64 %5, 10
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %6
%8 = trunc i64 %5 to i32
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 0)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 1)
%12 = getelementptr inbounds i32, i32* %7, i64 1
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 2)
%15 = getelementptr inbounds i32, i32* %7, i64 2
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %15)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 3)
%18 = getelementptr inbounds i32, i32* %7, i64 3
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %18)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 4)
%21 = getelementptr inbounds i32, i32* %7, i64 4
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 5)
%24 = getelementptr inbounds i32, i32* %7, i64 5
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 6)
%27 = getelementptr inbounds i32, i32* %7, i64 6
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %27)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 7)
%30 = getelementptr inbounds i32, i32* %7, i64 7
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %30)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 8)
%33 = getelementptr inbounds i32, i32* %7, i64 8
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %33)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 9)
%36 = getelementptr inbounds i32, i32* %7, i64 9
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %36)
%38 = add nuw nsw i64 %5, 1
%39 = icmp eq i64 %38, 10
br i1 %39, label %40, label %4
40: ; preds = %4, %40
%41 = phi i64 [ %85, %40 ], [ 0, %4 ]
%42 = phi i32 [ %84, %40 ], [ 0, %4 ]
%43 = call i32 @putchar(i32 10)
%44 = mul nuw nsw i64 %41, 10
%45 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = icmp sgt i32 %46, %42
%48 = select i1 %47, i32 %46, i32 %42
%49 = getelementptr inbounds i32, i32* %45, i64 1
%50 = load i32, i32* %49
%51 = icmp sgt i32 %50, %48
%52 = select i1 %51, i32 %50, i32 %48
%53 = getelementptr inbounds i32, i32* %45, i64 2
%54 = load i32, i32* %53
%55 = icmp sgt i32 %54, %52
%56 = select i1 %55, i32 %54, i32 %52
%57 = getelementptr inbounds i32, i32* %45, i64 3
%58 = load i32, i32* %57
%59 = icmp sgt i32 %58, %56
%60 = select i1 %59, i32 %58, i32 %56
%61 = getelementptr inbounds i32, i32* %45, i64 4
%62 = load i32, i32* %61
%63 = icmp sgt i32 %62, %60
%64 = select i1 %63, i32 %62, i32 %60
%65 = getelementptr inbounds i32, i32* %45, i64 5
%66 = load i32, i32* %65
%67 = icmp sgt i32 %66, %64
%68 = select i1 %67, i32 %66, i32 %64
%69 = getelementptr inbounds i32, i32* %45, i64 6
%70 = load i32, i32* %69
%71 = icmp sgt i32 %70, %68
%72 = select i1 %71, i32 %70, i32 %68
%73 = getelementptr inbounds i32, i32* %45, i64 7
%74 = load i32, i32* %73
%75 = icmp sgt i32 %74, %72
%76 = select i1 %75, i32 %74, i32 %72
%77 = getelementptr inbounds i32, i32* %45, i64 8
%78 = load i32, i32* %77
%79 = icmp sgt i32 %78, %76
%80 = select i1 %79, i32 %78, i32 %76
%81 = getelementptr inbounds i32, i32* %45, i64 9
%82 = load i32, i32* %81
%83 = icmp sgt i32 %82, %80
%84 = select i1 %83, i32 %82, i32 %80
%85 = add nuw nsw i64 %41, 1
%86 = icmp eq i64 %85, 10
br i1 %86, label %87, label %40
87: ; preds = %40
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %84)
%89 = call i32 (...) @getch()
ret i32 0
}