#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, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int M[3][4];
  int i, j, maior, p_i, p_j;
  for (i = 0; i <= 2; i++) {
    for (j = 0; j <= 3; j++) {
      printf("Insira M[%d,%d]: ", (i + 1), (j + 1));
      scanf("%d", &M[i][j]);
    }
  }
  maior = M[1][1];
  for (i = 0; i <= 2; i++) {
    for (j = 0; j <= 3; j++) {
      if (M[i][j] > maior) {
        maior = M[i][j];
        p_i = i;
        p_j = j;
      }
    }
  }
  printf("O meior numero está em M[%d,%d] = %d", (p_i + 1), (p_j + 1), maior);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x2,-0x44(%rbp)
jg     11b2 <main+0x92>
movl   $0x0,-0x48(%rbp)
cmpl   $0x3,-0x48(%rbp)
jg     119f <main+0x7f>
mov    -0x44(%rbp),%esi
add    $0x1,%esi
mov    -0x48(%rbp),%edx
add    $0x1,%edx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x4,%rax
add    %rax,%rsi
movslq -0x48(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1147 <main+0x27>
jmp    11a4 <main+0x84>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1136 <main+0x16>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x2,-0x44(%rbp)
jg     1244 <main+0x124>
movl   $0x0,-0x48(%rbp)
cmpl   $0x3,-0x48(%rbp)
jg     1231 <main+0x111>
movslq -0x44(%rbp),%rcx
lea    -0x40(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x4c(%rbp),%eax
jle    121e <main+0xfe>
movslq -0x44(%rbp),%rcx
lea    -0x40(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    1223 <main+0x103>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11d0 <main+0xb0>
jmp    1236 <main+0x116>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11bf <main+0x9f>
mov    -0x50(%rbp),%esi
add    $0x1,%esi
mov    -0x54(%rbp),%edx
add    $0x1,%edx
mov    -0x4c(%rbp),%ecx
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xecb(%rip),%r14
mov    $0x1,%r15d
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0x2,%r12d
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0x3,%ebp
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0x4,%r13d
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
mov    (%rsp),%ecx
mov    0x4(%rsp),%esi
cmp    %eax,%ecx
cmovle %eax,%ecx
xor    %edx,%edx
cmp    %ecx,%esi
setg   %dl
cmovg  %esi,%ecx
mov    0x8(%rsp),%esi
add    $0x1,%edx
cmp    %ecx,%esi
cmovg  %esi,%ecx
mov    0xc(%rsp),%esi
cmovg  %ebp,%edx
cmp    %ecx,%esi
cmovg  %esi,%ecx
cmovg  %r13d,%edx
mov    0x10(%rsp),%esi
cmp    %ecx,%esi
cmovg  %esi,%ecx
setg   %sil
cmovg  %r15d,%edx
cmp    %ecx,%eax
setg   %dil
cmovg  %eax,%ecx
mov    0x18(%rsp),%eax
cmovg  %r12d,%edx
or     %sil,%dil
cmp    %ecx,%eax
setg   %bl
cmovg  %eax,%ecx
mov    0x1c(%rsp),%eax
cmovg  %ebp,%edx
cmp    %ecx,%eax
setg   %sil
cmovg  %eax,%ecx
cmovg  %r13d,%edx
or     %dil,%bl
or     %sil,%bl
mov    0x20(%rsp),%eax
movzbl %bl,%esi
add    $0x1,%esi
cmp    %ecx,%eax
cmovg  %eax,%ecx
cmovg  %ebp,%esi
cmovg  %r15d,%edx
mov    0x24(%rsp),%eax
cmp    %ecx,%eax
cmovg  %eax,%ecx
cmovg  %ebp,%esi
cmovg  %r12d,%edx
mov    0x28(%rsp),%eax
cmp    %ecx,%eax
cmovg  %eax,%ecx
cmovg  %ebp,%esi
cmovg  %ebp,%edx
mov    0x2c(%rsp),%eax
cmp    %ecx,%eax
cmovg  %eax,%ecx
cmovg  %ebp,%esi
cmovg  %r13d,%edx
lea    0xc6c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Insira M[%d,%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"O meior numero est\C3\A1 em M[%d,%d] = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [4 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %8
8: ; preds = %32, %0
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 2
br i1 %10, label %11, label %35
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %28, %11
%13 = load i32, i32* %4
%14 = icmp sle i32 %13, 3
br i1 %14, label %15, label %31
15: ; preds = %12
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
%20 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %19)
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 %22
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [4 x i32], [4 x i32]* %23, i64 0, i64 %25
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %26)
br label %28
28: ; preds = %15
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %12
31: ; preds = %12
br label %32
32: ; preds = %31
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %8
35: ; preds = %8
%36 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %36, i64 0, i64 1
%38 = load i32, i32* %37
store i32 %38, i32* %5
store i32 0, i32* %3
br label %39
39: ; preds = %71, %35
%40 = load i32, i32* %3
%41 = icmp sle i32 %40, 2
br i1 %41, label %42, label %74
42: ; preds = %39
store i32 0, i32* %4
br label %43
43: ; preds = %67, %42
%44 = load i32, i32* %4
%45 = icmp sle i32 %44, 3
br i1 %45, label %46, label %70
46: ; preds = %43
%47 = load i32, i32* %3
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 %48
%50 = load i32, i32* %4
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [4 x i32], [4 x i32]* %49, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = load i32, i32* %5
%55 = icmp sgt i32 %53, %54
br i1 %55, label %56, label %66
56: ; preds = %46
%57 = load i32, i32* %3
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 %58
%60 = load i32, i32* %4
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [4 x i32], [4 x i32]* %59, i64 0, i64 %61
%63 = load i32, i32* %62
store i32 %63, i32* %5
%64 = load i32, i32* %3
store i32 %64, i32* %6
%65 = load i32, i32* %4
store i32 %65, i32* %7
br label %66
66: ; preds = %56, %46
br label %67
67: ; preds = %66
%68 = load i32, i32* %4
%69 = add nsw i32 %68, 1
store i32 %69, i32* %4
br label %43
70: ; preds = %43
br label %71
71: ; preds = %70
%72 = load i32, i32* %3
%73 = add nsw i32 %72, 1
store i32 %73, i32* %3
br label %39
74: ; preds = %39
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
%79 = load i32, i32* %5
%80 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %76, i32 %78, i32 %79)
%81 = load i32, i32* %1
ret i32 %81
}

LLVM IR (-O2):
@.str = [18 x i8] c"Insira M[%d,%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"O meior numero est\C3\A1 em M[%d,%d] = %d\00"
define i32 @main() {
%1 = alloca [3 x [4 x i32]]
%2 = bitcast [3 x [4 x i32]]* %1 to i8*
%3 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
%4 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%7 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 3)
%10 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 4)
%13 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 0, i64 3
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%15 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 2, i32 1)
%16 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1, i64 0
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%18 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 2, i32 2)
%19 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1, i64 1
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
%22 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1, i64 2
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %22)
%24 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 2, i32 4)
%25 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1, i64 3
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %25)
%27 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 3, i32 1)
%28 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2, i64 0
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %28)
%30 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 3, i32 2)
%31 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2, i64 1
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %31)
%33 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 3, i32 3)
%34 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2, i64 2
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %34)
%36 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 3, i32 4)
%37 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 2, i64 3
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %37)
%39 = load i32, i32* %19
%40 = load i32, i32* %4
%41 = icmp sgt i32 %40, %39
%42 = select i1 %41, i32 %40, i32 %39
%43 = load i32, i32* %7
%44 = icmp sgt i32 %43, %42
%45 = select i1 %44, i32 %43, i32 %42
%46 = load i32, i32* %10
%47 = icmp sgt i32 %46, %45
%48 = select i1 %47, i32 %46, i32 %45
%49 = load i32, i32* %13
%50 = icmp sgt i32 %49, %48
%51 = select i1 %50, i32 %49, i32 %48
%52 = load i32, i32* %16
%53 = icmp sgt i32 %52, %51
%54 = select i1 %53, i32 %52, i32 %51
%55 = icmp sgt i32 %39, %54
%56 = select i1 %55, i32 %39, i32 %54
%57 = or i1 %55, %53
%58 = load i32, i32* %22
%59 = icmp sgt i32 %58, %56
%60 = select i1 %59, i32 %58, i32 %56
%61 = load i32, i32* %25
%62 = icmp sgt i32 %61, %60
%63 = select i1 %62, i32 %61, i32 %60
%64 = or i1 %62, %59
%65 = select i1 %64, i1 true, i1 %57
%66 = load i32, i32* %28
%67 = icmp sgt i32 %66, %63
%68 = select i1 %67, i32 %66, i32 %63
%69 = load i32, i32* %31
%70 = icmp sgt i32 %69, %68
%71 = select i1 %70, i32 %69, i32 %68
%72 = or i1 %70, %67
%73 = load i32, i32* %34
%74 = icmp sgt i32 %73, %71
%75 = select i1 %74, i32 %73, i32 %71
%76 = load i32, i32* %37
%77 = icmp sgt i32 %76, %75
%78 = select i1 %77, i32 %76, i32 %75
%79 = or i1 %77, %74
%80 = select i1 %79, i1 true, i1 %72
%81 = select i1 %65, i32 2, i32 1
%82 = select i1 %80, i32 3, i32 %81
%83 = select i1 %44, i32 2, i32 1
%84 = select i1 %47, i32 3, i32 %83
%85 = select i1 %50, i32 4, i32 %84
%86 = select i1 %53, i32 1, i32 %85
%87 = select i1 %55, i32 2, i32 %86
%88 = select i1 %59, i32 3, i32 %87
%89 = select i1 %62, i32 4, i32 %88
%90 = select i1 %67, i32 1, i32 %89
%91 = select i1 %70, i32 2, i32 %90
%92 = select i1 %74, i32 3, i32 %91
%93 = select i1 %77, i32 4, i32 %92
%94 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %82, i32 %93, i32 %78)
ret i32 0
}