#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 main() {
  int mapa[5][5];
  int i, j;
  char continuar;
  do {
    for (i = 0; i <= 4; i++) {
      for (j = 0; j <= 4; j++) {
        printf("\n Entre com números entre 1 e 0 : [%d][%d] - ", i + 1, j + 1);
        scanf("%d", &mapa[i][j]);
      }
    }
    for (i = 0; i <= 4; i++) {
      for (j = 0; j <= 4; j++) {
        printf(" %d ", mapa[i][j]);
      }
      printf("\n");
    }
    printf("\n Entre com a linha:\n");
    scanf("%d", &j);
    printf("\n Entre com a coluna:\n");
    scanf("%d", &i);
    if (mapa[i][j] == 1) {
      printf("você acertou !!");
    } else if (mapa[i][j] == 0) {
      printf("você errou !!");
    }
    printf("\n Deseja continuar(s/n)?");
    scanf(" %c", &continuar);
    printf("continuar = %c", continuar);
  } while (continuar == 's');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x4,-0x74(%rbp)
jg     11b7 <main+0x97>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jg     11a4 <main+0x84>
mov    -0x74(%rbp),%esi
add    $0x1,%esi
mov    -0x78(%rbp),%edx
add    $0x1,%edx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x74(%rbp),%rax
lea    -0x70(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    114a <main+0x2a>
jmp    11a9 <main+0x89>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1139 <main+0x19>
movl   $0x0,-0x74(%rbp)
cmpl   $0x4,-0x74(%rbp)
jg     1227 <main+0x107>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jg     120b <main+0xeb>
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11cf <main+0xaf>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11be <main+0x9e>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf3(%rip),%rdi
lea    -0x78(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd3(%rip),%rdi
lea    -0x74(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1297 <main+0x177>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12c7 <main+0x1a7>
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    12c2 <main+0x1a2>
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12c7 <main+0x1a7>
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdcc(%rip),%rdi
lea    -0x79(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x79(%rbp),%esi
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x79(%rbp),%eax
cmp    $0x73,%eax
je     1132 <main+0x12>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xeab(%rip),%r14
lea    0xed3(%rip),%rbx
lea    0xecf(%rip),%r15
lea    0xf11(%rip),%rbp
lea    0x7(%rsp),%r12
lea    0xefa(%rip),%r13
jmp    11bc <main+0x7c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
movsbl 0x7(%rsp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpb   $0x73,0x7(%rsp)
jne    1353 <main+0x213>
movl   $0x0,0xc(%rsp)
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movl   $0x0,0x8(%rsp)
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
add    $0x1,%esi
add    $0x1,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq 0xc(%rsp),%rax
movslq 0x8(%rsp),%rcx
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
lea    0x1(%rax),%edx
mov    %edx,0x8(%rsp)
mov    0xc(%rsp),%esi
cmp    $0x4,%eax
jl     11e0 <main+0xa0>
lea    0x1(%rsi),%eax
mov    %eax,0xc(%rsp)
cmp    $0x4,%esi
mov    %eax,%esi
jl     11d0 <main+0x90>
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
jmp    126a <main+0x12a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0xc(%rsp)
cmp    $0x4,%ecx
jge    12e0 <main+0x1a0>
movl   $0x0,0x8(%rsp)
cltq
lea    (%rax,%rax,4),%rax
mov    0x10(%rsp,%rax,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x8(%rsp)
cmp    $0x3,%ecx
jg     1250 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
movslq 0xc(%rsp),%rcx
cltq
lea    (%rcx,%rcx,4),%rcx
lea    (%rsp,%rcx,4),%rcx
add    $0x10,%rcx
mov    (%rcx,%rax,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x8(%rsp)
cmp    $0x4,%ecx
jl     12a0 <main+0x160>
jmp    1250 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xd98(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xd92(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
movslq 0x8(%rsp),%rcx
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    (%rax,%rcx,4),%eax
lea    0xd01(%rip),%rdi
cmp    $0x1,%eax
je     1180 <main+0x40>
test   %eax,%eax
jne    1187 <main+0x47>
lea    0xcfa(%rip),%rdi
jmp    1180 <main+0x40>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\0A Entre com n\C3\BAmeros entre 1 e 0 : [%d][%d] - \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c" %d \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [22 x i8] c"\0A Entre com a linha:\0A\00"
@.str.5 = [23 x i8] c"\0A Entre com a coluna:\0A\00"
@.str.6 = [17 x i8] c"voc\C3\AA acertou !!\00"
@.str.7 = [15 x i8] c"voc\C3\AA errou !!\00"
@.str.8 = [25 x i8] c"\0A Deseja continuar(s/n)?\00"
@.str.9 = [4 x i8] c" %c\00"
@.str.10 = [15 x i8] c"continuar = %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [5 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 0, i32* %1
br label %6
6: ; preds = %92, %0
store i32 0, i32* %3
br label %7
7: ; preds = %31, %6
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 4
br i1 %9, label %10, label %34
10: ; preds = %7
store i32 0, i32* %4
br label %11
11: ; preds = %27, %10
%12 = load i32, i32* %4
%13 = icmp sle i32 %12, 4
br i1 %13, label %14, label %30
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %18)
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %21
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %22, i64 0, i64 %24
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %25)
br label %27
27: ; preds = %14
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %11
30: ; preds = %11
br label %31
31: ; preds = %30
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %7
34: ; preds = %7
store i32 0, i32* %3
br label %35
35: ; preds = %56, %34
%36 = load i32, i32* %3
%37 = icmp sle i32 %36, 4
br i1 %37, label %38, label %59
38: ; preds = %35
store i32 0, i32* %4
br label %39
39: ; preds = %51, %38
%40 = load i32, i32* %4
%41 = icmp sle i32 %40, 4
br i1 %41, label %42, label %54
42: ; preds = %39
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %44
%46 = load i32, i32* %4
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [5 x i32], [5 x i32]* %45, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %42
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %39
54: ; preds = %39
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %56
56: ; preds = %54
%57 = load i32, i32* %3
%58 = add nsw i32 %57, 1
store i32 %58, i32* %3
br label %35
59: ; preds = %35
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%64 = load i32, i32* %3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %65
%67 = load i32, i32* %4
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [5 x i32], [5 x i32]* %66, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %74
72: ; preds = %59
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %86
74: ; preds = %59
%75 = load i32, i32* %3
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 %76
%78 = load i32, i32* %4
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [5 x i32], [5 x i32]* %77, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %74
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %85
85: ; preds = %83, %74
br label %86
86: ; preds = %85, %72
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%88 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %5)
%89 = load i8, i8* %5
%90 = sext i8 %89 to i32
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %90)
br label %92
92: ; preds = %86
%93 = load i8, i8* %5
%94 = sext i8 %93 to i32
%95 = icmp eq i32 %94, 115
br i1 %95, label %6, label %96
96: ; preds = %92
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"\0A Entre com n\C3\BAmeros entre 1 e 0 : [%d][%d] - \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c" %d \00"
@.str.6 = [17 x i8] c"voc\C3\AA acertou !!\00"
@.str.7 = [15 x i8] c"voc\C3\AA errou !!\00"
@.str.8 = [25 x i8] c"\0A Deseja continuar(s/n)?\00"
@.str.9 = [4 x i8] c" %c\00"
@.str.10 = [15 x i8] c"continuar = %c\00"
@str = [21 x i8] c"\0A Entre com a linha:\00"
@str.11 = [22 x i8] c"\0A Entre com a coluna:\00"
define i32 @main() {
%1 = alloca [5 x [5 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = bitcast [5 x [5 x i32]]* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
br label %8
8: ; preds = %71, %0
store i32 0, i32* %2
br label %10
9: ; preds = %28
store i32 0, i32* %2
br label %31
10: ; preds = %8, %28
%11 = phi i32 [ 0, %8 ], [ %29, %28 ]
store i32 0, i32* %3
br label %12
12: ; preds = %12, %10
%13 = phi i32 [ %11, %10 ], [ %27, %12 ]
%14 = phi i32 [ 0, %10 ], [ %25, %12 ]
%15 = add nsw i32 %13, 1
%16 = add nsw i32 %14, 1
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 %19, i64 %21
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %22)
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
%26 = icmp slt i32 %24, 4
%27 = load i32, i32* %2
br i1 %26, label %12, label %28
28: ; preds = %12
%29 = add nsw i32 %27, 1
store i32 %29, i32* %2
%30 = icmp slt i32 %27, 4
br i1 %30, label %10, label %9
31: ; preds = %9, %51
%32 = phi i32 [ 0, %9 ], [ %54, %51 ]
store i32 0, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 %33, i64 0
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
%39 = icmp slt i32 %37, 4
br i1 %39, label %40, label %51
40: ; preds = %31, %40
%41 = phi i32 [ %49, %40 ], [ %38, %31 ]
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = sext i32 %41 to i64
%45 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 %43, i64 %44
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
store i32 %49, i32* %3
%50 = icmp slt i32 %48, 4
br i1 %50, label %40, label %51
51: ; preds = %40, %31
%52 = call i32 @putchar(i32 10)
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
%55 = icmp slt i32 %53, 4
br i1 %55, label %31, label %56
56: ; preds = %51
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.11, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%61 = load i32, i32* %2
%62 = sext i32 %61 to i64
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 %62, i64 %64
%66 = load i32, i32* %65
switch i32 %66, label %71 [
i32 1, label %68
i32 0, label %67
]
67: ; preds = %56
br label %68
68: ; preds = %56, %67
%69 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), %67 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), %56 ]
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %69)
br label %71
71: ; preds = %68, %56
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%74 = load i8, i8* %4
%75 = sext i8 %74 to i32
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %75)
%77 = load i8, i8* %4
%78 = icmp eq i8 %77, 115
br i1 %78, label %8, label %79
79: ; preds = %71
ret i32 0
}