#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
main() {
  char a[] = {'M', '!', 'a', '"', '5', '#', 't', '$', '3', '%', 'R', '&', '\0'},
       b[13];
  int n, si, no;
  si = no = 0;
  printf("Cuantas veces intentar?:");
  fflush(stdin);
  for (scanf("%d", &n); n != 0; --n) {
    printf("ingresa password:");
    scanf("%s", b);
    if (strcmp(a, b) == 0) {
      printf("correcto! ;)\n");
      si++;
    } else {
      printf("error!, intente de nuevo :s\n");
      no++;
    }
  }
  printf("correctos:%d, incorrectos:%d\n", si, no);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xea8(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xea3(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xe89(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x0,-0x24(%rbp)
je     122f <main+0xef>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1e(%rbp),%rsi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    -0x11(%rbp),%rdi
lea    -0x1e(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <main+0xc5>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    121c <main+0xdc>
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1221 <main+0xe1>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    11a8 <main+0x68>
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x26522533247423,%rax
mov    %rax,0xd(%rsp)
movabs $0x247423352261214d,%rax
23 74 24
mov    %rax,0x8(%rsp)
lea    0xe8a(%rip),%rdi
xor    %r12d,%r12d
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
lea    0xe84(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
mov    $0x0,%ebp
je     1234 <main+0xe4>
lea    0xe68(%rip),%r14
lea    0xe73(%rip),%r15
lea    0x1b(%rsp),%rbx
lea    0x8(%rsp),%r13
xor    %ebp,%ebp
xor    %r12d,%r12d
jmp    11f6 <main+0xa6>
nopl   0x0(%rax)
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
addl   $0xffffffff,0x4(%rsp)
je     1234 <main+0xe4>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11e0 <main+0x90>
lea    0xe54(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%r12d
addl   $0xffffffff,0x4(%rsp)
jne    11f6 <main+0xa6>
lea    0xe03(%rip),%rdi
mov    %r12d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.a = [13 x i8] c"M!a\225#t$3%R&\00"
@.str = [25 x i8] c"Cuantas veces intentar?:\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"ingresa password:\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [14 x i8] c"correcto! ;)\0A\00"
@.str.5 = [29 x i8] c"error!, intente de nuevo :s\0A\00"
@.str.6 = [30 x i8] c"correctos:%d, incorrectos:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
%3 = alloca [13 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [13 x i8]* %2 to i8*
store i32 0, i32* %6
store i32 0, i32* %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdin
%10 = call i32 @fflush(i32 %9)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
br label %12
12: ; preds = %32, %0
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %35
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%17 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%20 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%21 = call i64 @strcmp(i8* %19, i8* %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %15
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %31
27: ; preds = %15
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %31
31: ; preds = %27, %23
br label %32
32: ; preds = %31
%33 = load i32, i32* %4
%34 = add nsw i32 %33, -1
store i32 %34, i32* %4
br label %12
35: ; preds = %12
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %36, i32 %37)
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@__const.main.a = [13 x i8] c"M!a\225#t$3%R&\00"
@.str = [25 x i8] c"Cuantas veces intentar?:\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"ingresa password:\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.6 = [30 x i8] c"correctos:%d, incorrectos:%d\0A\00"
@str = [28 x i8] c"error!, intente de nuevo :s\00"
@str.7 = [13 x i8] c"correcto! ;)\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [13 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdin
%9 = tail call i32 @fflush(i32 %8)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %0, %26
%14 = phi i32 [ %28, %26 ], [ 0, %0 ]
%15 = phi i32 [ %27, %26 ], [ 0, %0 ]
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%18 = call i64 @strcmp(i8* %4, i8* %5)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0))
%22 = add nsw i32 %15, 1
br label %26
23: ; preds = %13
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%25 = add nsw i32 %14, 1
br label %26
26: ; preds = %20, %23
%27 = phi i32 [ %22, %20 ], [ %15, %23 ]
%28 = phi i32 [ %14, %20 ], [ %25, %23 ]
%29 = load i32, i32* %3
%30 = add nsw i32 %29, -1
store i32 %30, i32* %3
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %13
32: ; preds = %26, %0
%33 = phi i32 [ 0, %0 ], [ %27, %26 ]
%34 = phi i32 [ 0, %0 ], [ %28, %26 ]
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %33, i32 %34)
ret i32 0
}