#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*/ generar();
scalar_t__ gravedad(char);
int /*<<< orphan*/ inicializar();
int /*<<< orphan*/ mostrar();
scalar_t__ posible();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  char grav;
  srand(time(NULL));
  inicializar();
  do {
    printf("WADX? ");
    scanf(" %c", &grav);
    if (gravedad(grav))
      generar();
    mostrar();
  } while (posible());
  printf("\n*** Has fracasado miserablemente como una rata de cloaca ***\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1040 <inicializar@plt>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1090 <scanf@plt>
movsbl -0x5(%rbp),%edi
call   1050 <gravedad@plt>
cmp    $0x0,%rax
je     11ec <main+0x5c>
mov    $0x0,%al
call   1080 <generar@plt>
mov    $0x0,%al
call   10b0 <mostrar@plt>
mov    $0x0,%al
call   10a0 <posible@plt>
cmp    $0x0,%rax
jne    11b6 <main+0x26>
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   1050 <inicializar@plt>
lea    0xe3b(%rip),%r14
lea    0xe3b(%rip),%r15
lea    0xf(%rsp),%rbx
jmp    11f3 <main+0x53>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   10c0 <mostrar@plt>
xor    %eax,%eax
call   10b0 <posible@plt>
test   %rax,%rax
je     121e <main+0x7e>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10a0 <scanf@plt>
movsbl 0xf(%rsp),%edi
call   1060 <gravedad@plt>
test   %rax,%rax
je     11e0 <main+0x40>
xor    %eax,%eax
call   1090 <generar@plt>
jmp    11e0 <main+0x40>
lea    0xde6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"WADX? \00"
@.str.1 = [4 x i8] c" %c\00"
@.str.2 = [64 x i8] c"\0A*** Has fracasado miserablemente como una rata de cloaca ***\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @inicializar()
br label %6
6: ; preds = %16, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%9 = load i8, i8* %2
%10 = call i64 @gravedad(i8 signext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = call i32 (...) @generar()
br label %14
14: ; preds = %12, %6
%15 = call i32 (...) @mostrar()
br label %16
16: ; preds = %14
%17 = call i64 (...) @posible()
%18 = icmp ne i64 %17, 0
br i1 %18, label %6, label %19
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"WADX? \00"
@.str.1 = [4 x i8] c" %c\00"
@str = [63 x i8] c"\0A*** Has fracasado miserablemente como una rata de cloaca ***\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @inicializar()
br label %5
5: ; preds = %13, %0
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%8 = load i8, i8* %1
%9 = call i64 @gravedad(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %5
%12 = call i32 (...) @generar()
br label %13
13: ; preds = %11, %5
%14 = call i32 (...) @mostrar()
%15 = call i64 (...) @posible()
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %13
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
ret i32 0
}