#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*/ system(char *);
int presentar_menu(void) {
  system("CLS");
  printf("Menu Principal \n \n");
  printf("(1) Comprobar si un numero es primo \n");
  printf("(2) Descomponer un numero impar en la suma de dos numeros primos \n");
  printf("(3) Calcular factorial mas exacto o mas proximo de un numero \n");
  printf("(4) Comprobar si un numero es o no capicua \n \n");
  printf("Elige una opcion: ");
}


x86 assembly (clang, -O0):
<presentar_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
call   1040 <printf@plt>
lea    0xf21(%rip),%rdi
call   1040 <printf@plt>
lea    0xf54(%rip),%rdi
call   1040 <printf@plt>
lea    0xf77(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<presentar_menu>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <system@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe84(%rip),%rdi
pop    %rax
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"CLS\00"
@.str.1 = [19 x i8] c"Menu Principal \0A \0A\00"
@.str.2 = [38 x i8] c"(1) Comprobar si un numero es primo \0A\00"
@.str.3 = [67 x i8] c"(2) Descomponer un numero impar en la suma de dos numeros primos \0A\00"
@.str.4 = [63 x i8] c"(3) Calcular factorial mas exacto o mas proximo de un numero \0A\00"
@.str.5 = [47 x i8] c"(4) Comprobar si un numero es o no capicua \0A \0A\00"
@.str.6 = [19 x i8] c"Elige una opcion: \00"
define i32 @presentar_menu() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"CLS\00"
@.str.6 = [19 x i8] c"Elige una opcion: \00"
@str = [18 x i8] c"Menu Principal \0A \00"
@str.7 = [37 x i8] c"(1) Comprobar si un numero es primo \00"
@str.8 = [66 x i8] c"(2) Descomponer un numero impar en la suma de dos numeros primos \00"
@str.9 = [62 x i8] c"(3) Calcular factorial mas exacto o mas proximo de un numero \00"
@str.10 = [46 x i8] c"(4) Comprobar si un numero es o no capicua \0A \00"
define i32 @presentar_menu() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.7, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.8, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.10, i64 0, i64 0))
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
ret i32 undef
}