#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*/ modificarPelicula(int /*<<< orphan*/);
int /*<<< orphan*/ modificarPersona(int /*<<< orphan*/);
int /*<<< orphan*/ modificarPersonaje(int /*<<< orphan*/);
int /*<<< orphan*/ modificarRelacion();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
void menuModificar(void) {
  int op;
  while (1) {
    printf("1-Modificar pelicula\n");
    printf("2-Modificar persona\n");
    printf("3-Modificar personaje\n");
    printf("4-Modificar importancia en una relacion\n");
    printf("0-Volver\n\nOpcion: ");
    scanf("%d", &op);
    system("clear");
    switch (op) {
    case 1:
      modificarPelicula(0);
    case 2:
      modificarPersona(0);
    case 3:
      modificarPersonaje(0);
      break;
    case 4:
      modificarRelacion();
      break;
    case 0:
      return;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<menuModificar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1070 <scanf@plt>
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x4,%rax
ja     1221 <menuModificar+0xb1>
mov    -0x10(%rbp),%rax
lea    0xe14(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %edi,%edi
call   1050 <modificarPelicula@plt>
xor    %edi,%edi
call   1090 <modificarPersona@plt>
xor    %edi,%edi
call   1080 <modificarPersonaje@plt>
jmp    1221 <menuModificar+0xb1>
mov    $0x0,%al
call   1060 <modificarRelacion@plt>
jmp    1221 <menuModificar+0xb1>
add    $0x10,%rsp
pop    %rbp
ret
jmp    1178 <menuModificar+0x8>

x86 assembly (clang, -O2):
<menuModificar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xedd(%rip),%r13
lea    0xe7b(%rip),%rbx
lea    0xe87(%rip),%rbp
lea    0x4(%rsp),%r14
lea    0xe7e(%rip),%r15
lea    0xe4d(%rip),%r12
jmp    11c0 <menuModificar+0x40>
xor    %eax,%eax
call   1070 <modificarRelacion@plt>
nopl   0x0(%rax)
lea    0xe69(%rip),%rdi
call   1030 <puts@plt>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1080 <scanf@plt>
mov    %r15,%rdi
call   1040 <system@plt>
mov    0x4(%rsp),%eax
cmp    $0x4,%rax
ja     11c0 <menuModificar+0x40>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
xor    %edi,%edi
call   1060 <modificarPelicula@plt>
xor    %edi,%edi
call   10a0 <modificarPersona@plt>
xor    %edi,%edi
call   1090 <modificarPersonaje@plt>
jmp    11c0 <menuModificar+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"1-Modificar pelicula\0A\00"
@.str.1 = [21 x i8] c"2-Modificar persona\0A\00"
@.str.2 = [23 x i8] c"3-Modificar personaje\0A\00"
@.str.3 = [41 x i8] c"4-Modificar importancia en una relacion\0A\00"
@.str.4 = [19 x i8] c"0-Volver\0A\0AOpcion: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [6 x i8] c"clear\00"
define void @menuModificar() {
%1 = alloca i32
br label %2
2: ; preds = %0, %20
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%10 = load i32, i32* %1
switch i32 %10, label %20 [
i32 1, label %11
i32 2, label %13
i32 3, label %15
i32 4, label %17
i32 0, label %19
]
11: ; preds = %2
%12 = call i32 @modificarPelicula(i32 0)
br label %13
13: ; preds = %2, %11
%14 = call i32 @modificarPersona(i32 0)
br label %15
15: ; preds = %2, %13
%16 = call i32 @modificarPersonaje(i32 0)
br label %20
17: ; preds = %2
%18 = call i32 (...) @modificarRelacion()
br label %20
19: ; preds = %2
ret void
20: ; preds = %2, %17, %15
br label %2
}

LLVM IR (-O2):
@.str.4 = [19 x i8] c"0-Volver\0A\0AOpcion: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [6 x i8] c"clear\00"
@str = [21 x i8] c"1-Modificar pelicula\00"
@str.7 = [20 x i8] c"2-Modificar persona\00"
@str.8 = [22 x i8] c"3-Modificar personaje\00"
@str.9 = [40 x i8] c"4-Modificar importancia en una relacion\00"
define void @menuModificar() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %12, %0
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.9, i64 0, i64 0))
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%10 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%11 = load i32, i32* %1
switch i32 %11, label %12 [
i32 1, label %13
i32 2, label %15
i32 3, label %17
i32 4, label %19
i32 0, label %21
]
12: ; preds = %3, %19, %17
br label %3
13: ; preds = %3
%14 = call i32 @modificarPelicula(i32 0)
br label %15
15: ; preds = %3, %13
%16 = call i32 @modificarPersona(i32 0)
br label %17
17: ; preds = %3, %15
%18 = call i32 @modificarPersonaje(i32 0)
br label %12
19: ; preds = %3
%20 = call i32 (...) @modificarRelacion()
br label %12
21: ; preds = %3
ret void
}