#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 contar_vocales(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  char cadena[200];
  fprintf(stdout, "Escribe lo que te de la gana: ");
  fgets(cadena, 200, stdin);
  fprintf(stdout,
          "Lo que has escrito tiene %d vocales,"
          " no te da verguenza?\n",
          contar_vocales(cadena));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    -0xd0(%rbp),%rdi
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
mov    $0xc8,%esi
call   1040 <fgets@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
lea    -0xd0(%rbp),%rdi
call   1030 <contar_vocales@plt>
mov    -0xd4(%rbp),%edi
mov    %eax,%edx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0xc8,%rsp
mov    0x2e98(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xeb6(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1040 <fgets@plt>
mov    0x0(%rbp),%ebp
mov    %rbx,%rdi
call   1030 <contar_vocales@plt>
lea    0xea3(%rip),%rsi
mov    %ebp,%edi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [31 x i8] c"Escribe lo que te de la gana: \00"
@stdin = global i32 0
@.str.1 = [58 x i8] c"Lo que has escrito tiene %d vocales, no te da verguenza?\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = load i32, i32* @stdout
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 200, i32 %6)
%8 = load i32, i32* @stdout
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%10 = call i32 @contar_vocales(i8* %9)
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [31 x i8] c"Escribe lo que te de la gana: \00"
@stdin = global i32 0
@.str.1 = [58 x i8] c"Lo que has escrito tiene %d vocales, no te da verguenza?\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %2, i32 200, i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @contar_vocales(i8* %2)
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}