#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*/ euler();
int /*<<< orphan*/ gauss();
int /*<<< orphan*/ integracion();
int /*<<< orphan*/ interpolacion();
int /*<<< orphan*/ matrices();
int /*<<< orphan*/ minimos();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ raices();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int menu;
  printf("ESIME Zacatenco\n");
  printf("Alumno: Tovar Ochoa Kevin Ricardo\n");
  printf("Profesor: Martinez Roldan Enrique\n");
  printf("Materia: Analisis numerico\n");
  printf("Grupo: 3AM1\n\n");
  printf("1.-Raices\n2.-Matrices\n3.-Sistemas de ecuacion\n");
  printf("4.-Interpolacion\n");
  printf("5.-Minimos Cuadrados\n");
  printf("6.-Integracions\n");
  printf("7.- EDO\n");
  scanf("%d", &menu);
  system("cls");
  switch (menu) {
  case 1:
    raices();
    break;
  case 2:
    matrices();
    break;
  case 3:
    gauss();
    break;
  case 4:
    interpolacion();
    break;
  case 5:
    minimos();
    break;
  case 6:
    integracion();
    break;
  case 7:
    euler();
    break;
  default:
    system("cls");
    printf("Opcion Invalida");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe66(%rip),%rdi
call   1050 <printf@plt>
lea    0xe6b(%rip),%rdi
call   1050 <printf@plt>
lea    0xe82(%rip),%rdi
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
call   1050 <printf@plt>
lea    0xeab(%rip),%rdi
call   1050 <printf@plt>
lea    0xece(%rip),%rdi
call   1050 <printf@plt>
lea    0xed4(%rip),%rdi
call   1050 <printf@plt>
lea    0xede(%rip),%rdi
call   1050 <printf@plt>
lea    0xee3(%rip),%rdi
call   1050 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
lea    0xed3(%rip),%rdi
call   1040 <system@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     12c0 <main+0x120>
mov    -0x10(%rbp),%rax
lea    0xd9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1080 <raices@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   10a0 <matrices@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   1030 <gauss@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   1090 <interpolacion@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   10c0 <minimos@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   10b0 <integracion@plt>
jmp    12d8 <main+0x138>
mov    $0x0,%al
call   1060 <euler@plt>
jmp    12d8 <main+0x138>
lea    0xe4a(%rip),%rdi
call   1040 <system@plt>
lea    0xe42(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xdec(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
lea    0xdde(%rip),%rdi
call   1050 <system@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     126b <main+0xbb>
lea    0xda7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1090 <raices@plt>
jmp    12b9 <main+0x109>
lea    0xdad(%rip),%rdi
call   1050 <system@plt>
lea    0xda5(%rip),%rdi
call   1060 <printf@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   10b0 <matrices@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   1040 <gauss@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   10a0 <interpolacion@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   10d0 <minimos@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   10c0 <integracion@plt>
jmp    12b9 <main+0x109>
xor    %eax,%eax
call   1070 <euler@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"ESIME Zacatenco\0A\00"
@.str.1 = [35 x i8] c"Alumno: Tovar Ochoa Kevin Ricardo\0A\00"
@.str.2 = [35 x i8] c"Profesor: Martinez Roldan Enrique\0A\00"
@.str.3 = [28 x i8] c"Materia: Analisis numerico\0A\00"
@.str.4 = [14 x i8] c"Grupo: 3AM1\0A\0A\00"
@.str.5 = [47 x i8] c"1.-Raices\0A2.-Matrices\0A3.-Sistemas de ecuacion\0A\00"
@.str.6 = [18 x i8] c"4.-Interpolacion\0A\00"
@.str.7 = [22 x i8] c"5.-Minimos Cuadrados\0A\00"
@.str.8 = [17 x i8] c"6.-Integracions\0A\00"
@.str.9 = [9 x i8] c"7.- EDO\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [4 x i8] c"cls\00"
@.str.12 = [16 x i8] c"Opcion Invalida\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %2)
%14 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%15 = load i32, i32* %2
switch i32 %15, label %30 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
i32 6, label %26
i32 7, label %28
]
16: ; preds = %0
%17 = call i32 (...) @raices()
br label %33
18: ; preds = %0
%19 = call i32 (...) @matrices()
br label %33
20: ; preds = %0
%21 = call i32 (...) @gauss()
br label %33
22: ; preds = %0
%23 = call i32 (...) @interpolacion()
br label %33
24: ; preds = %0
%25 = call i32 (...) @minimos()
br label %33
26: ; preds = %0
%27 = call i32 (...) @integracion()
br label %33
28: ; preds = %0
%29 = call i32 (...) @euler()
br label %33
30: ; preds = %0
%31 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %33
33: ; preds = %30, %28, %26, %24, %22, %20, %18, %16
ret i32 0
}

LLVM IR (-O2):
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [4 x i8] c"cls\00"
@.str.12 = [16 x i8] c"Opcion Invalida\00"
@str = [16 x i8] c"ESIME Zacatenco\00"
@str.13 = [34 x i8] c"Alumno: Tovar Ochoa Kevin Ricardo\00"
@str.14 = [34 x i8] c"Profesor: Martinez Roldan Enrique\00"
@str.15 = [27 x i8] c"Materia: Analisis numerico\00"
@str.16 = [13 x i8] c"Grupo: 3AM1\0A\00"
@str.17 = [46 x i8] c"1.-Raices\0A2.-Matrices\0A3.-Sistemas de ecuacion\00"
@str.18 = [17 x i8] c"4.-Interpolacion\00"
@str.19 = [21 x i8] c"5.-Minimos Cuadrados\00"
@str.20 = [16 x i8] c"6.-Integracions\00"
@str.21 = [8 x i8] c"7.- EDO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.21, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%14 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%15 = load i32, i32* %1
switch i32 %15, label %30 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
i32 6, label %26
i32 7, label %28
]
16: ; preds = %0
%17 = call i32 (...) @raices()
br label %33
18: ; preds = %0
%19 = call i32 (...) @matrices()
br label %33
20: ; preds = %0
%21 = call i32 (...) @gauss()
br label %33
22: ; preds = %0
%23 = call i32 (...) @interpolacion()
br label %33
24: ; preds = %0
%25 = call i32 (...) @minimos()
br label %33
26: ; preds = %0
%27 = call i32 (...) @integracion()
br label %33
28: ; preds = %0
%29 = call i32 (...) @euler()
br label %33
30: ; preds = %0
%31 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%32 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %33
33: ; preds = %30, %28, %26, %24, %22, %20, %18, %16
ret i32 0
}