#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int matriz[3][3];
  matriz[0][0] = 1;
  matriz[0][1] = 2;
  matriz[0][2] = 3;
  matriz[1][0] = 4;
  matriz[1][1] = 5;
  matriz[1][2] = 6;
  matriz[2][0] = 7;
  matriz[2][1] = 8;
  matriz[2][2] = 9;
  int coluna, linha, numero;
  printf("Digite um numero: ");
  scanf("%d", &numero);
  for (linha = 0; linha < 3; linha++) {
    for (coluna = 0; coluna < 3; coluna++) {
      if (numero == matriz[linha][coluna])
        printf("\nA posicao do numero eh linha: %d e coluna: %d", linha,
               coluna);
    }
  }
  if (numero < 1 || numero > 9)
    printf("Nao encontrado!");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
movl   $0x3,-0x28(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x5,-0x20(%rbp)
movl   $0x6,-0x1c(%rbp)
movl   $0x7,-0x18(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x9,-0x10(%rbp)
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x3c(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3,-0x38(%rbp)
jge    1207 <main+0xe7>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    11f4 <main+0xd4>
mov    -0x3c(%rbp),%eax
movslq -0x38(%rbp),%rdx
lea    -0x30(%rbp),%rcx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
movslq -0x34(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    11e1 <main+0xc1>
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a4 <main+0x84>
jmp    11f9 <main+0xd9>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1193 <main+0x73>
cmpl   $0x1,-0x3c(%rbp)
jl     121b <main+0xfb>
cmpl   $0x9,-0x3c(%rbp)
jle    1229 <main+0x109>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
je     11c3 <main+0xa3>
cmp    $0x2,%eax
je     11e2 <main+0xc2>
cmp    $0x3,%eax
je     1204 <main+0xe4>
cmp    $0x4,%eax
je     1226 <main+0x106>
cmp    $0x5,%eax
je     1248 <main+0x128>
cmp    $0x6,%eax
je     126d <main+0x14d>
cmp    $0x7,%eax
je     1292 <main+0x172>
cmp    $0x8,%eax
je     12b4 <main+0x194>
cmp    $0x9,%eax
jne    11a9 <main+0x89>
lea    0xe7f(%rip),%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
add    $0xfffffff6,%eax
cmp    $0xfffffff6,%eax
ja     11bf <main+0x9f>
lea    0xe8a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe49(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    1152 <main+0x32>
lea    0xe2a(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x3,%eax
jne    115b <main+0x3b>
lea    0xe08(%rip),%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x4,%eax
jne    1164 <main+0x44>
lea    0xde6(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x5,%eax
jne    116d <main+0x4d>
lea    0xdc4(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x6,%eax
jne    1176 <main+0x56>
lea    0xd9f(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x7,%eax
jne    117f <main+0x5f>
lea    0xd7a(%rip),%rdi
mov    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x8,%eax
jne    1188 <main+0x68>
lea    0xd58(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x9,%eax
je     118d <main+0x6d>
jmp    11a9 <main+0x89>

LLVM IR (-O0):
@.str = [19 x i8] c"Digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [47 x i8] c"\0AA posicao do numero eh linha: %d e coluna: %d\00"
@.str.3 = [16 x i8] c"Nao encontrado!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 1, i32* %7
%8 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 1
store i32 2, i32* %9
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 3, i32* %11
%12 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 0
store i32 4, i32* %13
%14 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %14, i64 0, i64 1
store i32 5, i32* %15
%16 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %16, i64 0, i64 2
store i32 6, i32* %17
%18 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %18, i64 0, i64 0
store i32 7, i32* %19
%20 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %20, i64 0, i64 1
store i32 8, i32* %21
%22 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %22, i64 0, i64 2
store i32 9, i32* %23
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
store i32 0, i32* %4
br label %26
26: ; preds = %52, %0
%27 = load i32, i32* %4
%28 = icmp slt i32 %27, 3
br i1 %28, label %29, label %55
29: ; preds = %26
store i32 0, i32* %3
br label %30
30: ; preds = %48, %29
%31 = load i32, i32* %3
%32 = icmp slt i32 %31, 3
br i1 %32, label %33, label %51
33: ; preds = %30
%34 = load i32, i32* %5
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %36
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %37, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = icmp eq i32 %34, %41
br i1 %42, label %43, label %47
43: ; preds = %33
%44 = load i32, i32* %4
%45 = load i32, i32* %3
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %44, i32 %45)
br label %47
47: ; preds = %43, %33
br label %48
48: ; preds = %47
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 1
store i32 %50, i32* %3
br label %30
51: ; preds = %30
br label %52
52: ; preds = %51
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 1
store i32 %54, i32* %4
br label %26
55: ; preds = %26
%56 = load i32, i32* %5
%57 = icmp slt i32 %56, 1
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = load i32, i32* %5
%60 = icmp sgt i32 %59, 9
br i1 %60, label %61, label %63
61: ; preds = %58, %55
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
%64 = load i32, i32* %1
ret i32 %64
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [47 x i8] c"\0AA posicao do numero eh linha: %d e coluna: %d\00"
@.str.3 = [16 x i8] c"Nao encontrado!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%9 = load i32, i32* %1
br label %10
10: ; preds = %0, %7
%11 = phi i32 [ %5, %0 ], [ %9, %7 ]
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1)
%15 = load i32, i32* %1
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %15, %13 ], [ %11, %10 ]
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 2)
%21 = load i32, i32* %1
br label %22
22: ; preds = %19, %16
%23 = phi i32 [ %21, %19 ], [ %17, %16 ]
%24 = icmp eq i32 %23, 4
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 0)
%27 = load i32, i32* %1
br label %28
28: ; preds = %25, %22
%29 = phi i32 [ %27, %25 ], [ %23, %22 ]
%30 = icmp eq i32 %29, 5
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 1)
%33 = load i32, i32* %1
br label %34
34: ; preds = %31, %28
%35 = phi i32 [ %33, %31 ], [ %29, %28 ]
%36 = icmp eq i32 %35, 6
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 2)
%39 = load i32, i32* %1
br label %40
40: ; preds = %37, %34
%41 = phi i32 [ %39, %37 ], [ %35, %34 ]
%42 = icmp eq i32 %41, 7
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 0)
%45 = load i32, i32* %1
br label %46
46: ; preds = %43, %40
%47 = phi i32 [ %45, %43 ], [ %41, %40 ]
%48 = icmp eq i32 %47, 8
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 1)
%51 = load i32, i32* %1
br label %52
52: ; preds = %49, %46
%53 = phi i32 [ %51, %49 ], [ %47, %46 ]
%54 = icmp eq i32 %53, 9
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 2)
%57 = load i32, i32* %1
br label %58
58: ; preds = %55, %52
%59 = phi i32 [ %57, %55 ], [ %53, %52 ]
%60 = add i32 %59, -10
%61 = icmp ult i32 %60, -9
br i1 %61, label %62, label %64
62: ; preds = %58
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %64
64: ; preds = %58, %62
ret i32 0
}