#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 busqueda_binaria(int, int *, int);
int euros(int);
int factorial(int);
int introducir_array(int *);
int introducir_valor(int, int *, int);
int menu(int *);
int /*<<< orphan*/ ordenar_insercion(int *, int);
int potencia(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ visualizar_array(int *, int);
int main() {
  int Array[10], n_eltos = 0, x, pos, resu, resultadoMenu;
  int numeroEuros, resultadoEuros;
  int numeroFactorial, resultadoFactorial;
  int basePotencia, exponentePotencia, resultadoPotencia;
  int opcion;
  do {
    printf("0. Salir\n1. Potenica\n2. Factorial\n3. Euros\n4. Ordenar mediante "
           "algoritmo de insercion\n5. Busqueda binaria\n6. Menu \n");
    printf("Selecciona ejercicio:\t");
    scanf("%d", &opcion);
    switch (opcion) {
    case 1:
      system("cls");
      printf("Introduzca la base: \t");
      scanf("%d", &basePotencia);
      printf("Introduzca el exponente: \t");
      scanf("%d", &exponentePotencia);
      resultadoPotencia = potencia(basePotencia, exponentePotencia);
      printf("El resultado es:\t %d\n", resultadoPotencia);
      system("pause");
      break;
    case 2:
      do {
        system("cls");
        printf("Introduce numero:\t");
        scanf("%d", &numeroFactorial);
        if (numeroFactorial < 0) {
          printf("Introduce un numero mayor que 0\n");
          system("pause");
        }
      } while (numeroFactorial < 0);
      resultadoFactorial = factorial(numeroFactorial);
      printf("El resultado es:\t %d\n", resultadoFactorial);
      system("pause");
      break;
    case 3:
      system("cls");
      do {
        printf("Introduce los euros:\t");
        scanf("%d", &numeroEuros);
        if (numeroEuros <= 0) {
          printf("ERROR: La cantidad debe ser mayor que cero. \n");
          system("pause");
          system("cls");
        }
      } while (numeroEuros <= 0);
      resultadoEuros = euros(numeroEuros);
      break;
    case 4:
      break;
    case 5:
      break;
    case 6:
      system("cls");
      do {
        resultadoMenu = menu(Array);
        switch (resultadoMenu) {
        case 1:
          n_eltos = introducir_array(Array);
          break;
        case 2:
          visualizar_array(Array, n_eltos);
          system("pause");
          break;
        case 3:
          ordenar_insercion(Array, n_eltos);
          break;
        case 4:
          printf("Introduce el valor a buscar:\t");
          scanf("%d", &x);
          pos = busqueda_binaria(x, Array, n_eltos);
          if (pos == -1) {
            printf("Fracaso\n");
          } else {
            printf("La posicion del valor buscado es:\t %d", pos);
          }
          system("pause");
          break;
        case 5:
          printf("Introduce el valor a añadir:\t");
          scanf("%d", &x);
          resu = introducir_valor(x, Array, n_eltos);
          if (resu == -1) {
            printf("El array ya esta lleno");
          } else {
            printf("El valor se ha añadido con exito");
            n_eltos++;
          }
          system("pause");
          break;
        case 6:
          printf("Introduce numero a buscar en el array:\t");
          scanf("%d", &x);
          resu = busqueda_binaria(x, Array, n_eltos);
          if (resu == 1) {
            printf("No se encuentra el elemento\n");
            system("pause");
          } else {
            printf("Introduce el nuevo valor:\t");
            scanf("%d", &x);
            introducir_valor(x, Array, n_eltos);
          }
          break;
        case 7:
          printf("\nSaliendo...\n\n");
          system("pause");
          break;
        default:
          break;
        }
      } while (resultadoMenu != 7);
      break;
    default:
      if (opcion != 0) {
        system("cls");
        printf("Numero no conocido\n\n");
      }
      break;
    }
  } while (opcion != 0);
  printf("Saliendo...\n");
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
lea    0xe54(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x71(%rbp)
call   1080 <printf@plt>
mov    -0x71(%rbp),%al
lea    0xeb4(%rip),%rdi
call   1080 <printf@plt>
lea    0xfd2(%rip),%rdi
lea    -0x64(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x5,%eax
ja     15e3 <main+0x423>
mov    -0x70(%rbp),%rax
lea    0xdd7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe86(%rip),%rdi
call   1060 <system@plt>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xf7f(%rip),%rdi
lea    -0x58(%rbp),%rsi
call   10d0 <scanf@plt>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xf61(%rip),%rdi
lea    -0x5c(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x58(%rbp),%edi
mov    -0x5c(%rbp),%esi
call   10e0 <potencia@plt>
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%esi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe6a(%rip),%rdi
call   1060 <system@plt>
jmp    160c <main+0x44c>
jmp    12af <main+0xef>
lea    0xe09(%rip),%rdi
call   1060 <system@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xf02(%rip),%rdi
lea    -0x50(%rbp),%rsi
call   10d0 <scanf@plt>
cmpl   $0x0,-0x50(%rbp)
jge    12fd <main+0x13d>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe12(%rip),%rdi
call   1060 <system@plt>
jmp    1302 <main+0x142>
cmpl   $0x0,-0x50(%rbp)
jl     12af <main+0xef>
mov    -0x50(%rbp),%edi
call   1040 <factorial@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%esi
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xddb(%rip),%rdi
call   1060 <system@plt>
jmp    160c <main+0x44c>
lea    0xd7f(%rip),%rdi
call   1060 <system@plt>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe78(%rip),%rdi
lea    -0x48(%rbp),%rsi
call   10d0 <scanf@plt>
cmpl   $0x0,-0x48(%rbp)
jg     1393 <main+0x1d3>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd88(%rip),%rdi
call   1060 <system@plt>
lea    0xd31(%rip),%rdi
call   1060 <system@plt>
jmp    1398 <main+0x1d8>
cmpl   $0x0,-0x48(%rbp)
jle    1345 <main+0x185>
mov    -0x48(%rbp),%edi
call   1090 <euros@plt>
mov    %eax,-0x4c(%rbp)
jmp    160c <main+0x44c>
jmp    160c <main+0x44c>
jmp    160c <main+0x44c>
lea    0xcfc(%rip),%rdi
call   1060 <system@plt>
lea    -0x30(%rbp),%rdi
call   1050 <menu@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x6,%eax
ja     15ca <main+0x40a>
mov    -0x80(%rbp),%rax
lea    0xc24(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x30(%rbp),%rdi
call   1070 <introducir_array@plt>
mov    %eax,-0x34(%rbp)
jmp    15cf <main+0x40f>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   10a0 <visualizar_array@plt>
lea    0xce9(%rip),%rdi
call   1060 <system@plt>
jmp    15cf <main+0x40f>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   10c0 <ordenar_insercion@plt>
jmp    15cf <main+0x40f>
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd81(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x38(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   10b0 <busqueda_binaria@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xffffffff,-0x3c(%rbp)
jne    1489 <main+0x2c9>
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    149a <main+0x2da>
mov    -0x3c(%rbp),%esi
lea    0xd1c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc69(%rip),%rdi
call   1060 <system@plt>
jmp    15cf <main+0x40f>
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd12(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x38(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1030 <introducir_valor@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0xffffffff,-0x40(%rbp)
jne    14f8 <main+0x338>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    150f <main+0x34f>
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
lea    0xbf4(%rip),%rdi
call   1060 <system@plt>
jmp    15cf <main+0x40f>
lea    0xd06(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc9d(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x38(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   10b0 <busqueda_binaria@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x1,-0x40(%rbp)
jne    1579 <main+0x3b9>
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xb9b(%rip),%rdi
call   1060 <system@plt>
jmp    15a6 <main+0x3e6>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xc44(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x38(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1030 <introducir_valor@plt>
jmp    15cf <main+0x40f>
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xb4a(%rip),%rdi
call   1060 <system@plt>
jmp    15cf <main+0x40f>
jmp    15cf <main+0x40f>
jmp    15d4 <main+0x414>
cmpl   $0x7,-0x44(%rbp)
jne    13c8 <main+0x208>
jmp    160c <main+0x44c>
cmpl   $0x0,-0x64(%rbp)
je     1607 <main+0x447>
lea    0xacb(%rip),%rdi
call   1060 <system@plt>
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    160c <main+0x44c>
jmp    1611 <main+0x451>
cmpl   $0x0,-0x64(%rbp)
jne    11d9 <main+0x19>
lea    0xc8f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xada(%rip),%rdi
call   1060 <system@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xf25(%rip),%rbx
lea    0xeae(%rip),%rbp
lea    0x20(%rsp),%r15
lea    0xe24(%rip),%r13
lea    0x8(%rsp),%r14
xor    %r12d,%r12d
jmp    1222 <main+0x52>
lea    0x1012(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1070 <system@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     1535 <main+0x365>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe03(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%rax
ja     1325 <main+0x155>
lea    0xda2(%rip),%rdx
movslq (%rdx,%rax,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xde1(%rip),%rdi
call   1070 <system@plt>
lea    0xdd9(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
lea    0x1c(%rsp),%rsi
call   10e0 <scanf@plt>
lea    0xdd4(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
lea    0x18(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x1c(%rsp),%edi
mov    0x18(%rsp),%esi
call   10f0 <potencia@plt>
jmp    1310 <main+0x140>
nopl   0x0(%rax,%rax,1)
lea    0xd88(%rip),%rdi
call   1070 <system@plt>
lea    0xdcd(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x10(%rsp),%edi
test   %edi,%edi
jns    130b <main+0x13b>
lea    0xf90(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1070 <system@plt>
mov    0x10(%rsp),%edi
test   %edi,%edi
js     12c0 <main+0xf0>
call   1050 <factorial@plt>
lea    0xd6d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <printf@plt>
jmp    120e <main+0x3e>
lea    0xd23(%rip),%rdi
call   1070 <system@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
jmp    1216 <main+0x46>
lea    0xd06(%rip),%rdi
call   1070 <system@plt>
xchg   %ax,%ax
lea    0xd5c(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
call   10e0 <scanf@plt>
mov    0x14(%rsp),%edi
test   %edi,%edi
jg     139b <main+0x1cb>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1070 <system@plt>
lea    0xcc1(%rip),%rdi
call   1070 <system@plt>
mov    0x14(%rsp),%edi
test   %edi,%edi
jle    1350 <main+0x180>
call   10a0 <euros@plt>
jmp    1216 <main+0x46>
lea    0xca3(%rip),%rdi
jmp    13be <main+0x1ee>
xchg   %ax,%ax
mov    %r15,%rdi
mov    %r12d,%esi
call   10b0 <visualizar_array@plt>
mov    %rbp,%rdi
call   1070 <system@plt>
mov    %r15,%rdi
call   1060 <menu@plt>
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     13c3 <main+0x1f3>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
mov    %r15,%rdi
call   1080 <introducir_array@plt>
mov    %eax,%r12d
jmp    13c3 <main+0x1f3>
mov    %r15,%rdi
mov    %r12d,%esi
call   10d0 <ordenar_insercion@plt>
jmp    13c3 <main+0x1f3>
lea    0xd67(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10e0 <scanf@plt>
mov    0x8(%rsp),%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   10c0 <busqueda_binaria@plt>
cmp    $0x1,%eax
je     14f7 <main+0x327>
lea    0xd5e(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10e0 <scanf@plt>
mov    0x8(%rsp),%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   1030 <introducir_valor@plt>
jmp    13c3 <main+0x1f3>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xc62(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10e0 <scanf@plt>
mov    0x8(%rsp),%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   10c0 <busqueda_binaria@plt>
cmp    $0xffffffff,%eax
je     150b <main+0x33b>
lea    0xc53(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbp,%rdi
jmp    13be <main+0x1ee>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xc56(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10e0 <scanf@plt>
mov    0x8(%rsp),%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   1030 <introducir_valor@plt>
cmp    $0xffffffff,%eax
je     151f <main+0x34f>
lea    0xc5f(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
add    $0x1,%r12d
mov    %rbp,%rdi
jmp    13be <main+0x1ee>
lea    0xd37(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
jmp    13be <main+0x1ee>
lea    0xd3f(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
jmp    13be <main+0x1ee>
lea    0xc06(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbp,%rdi
jmp    13be <main+0x1ee>
lea    0xced(%rip),%rdi
call   1040 <puts@plt>
lea    0xb52(%rip),%rdi
call   1070 <system@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [116 x i8] c"0. Salir\0A1. Potenica\0A2. Factorial\0A3. Euros\0A4. Ordenar mediante algoritmo de insercion\0A5. Busqueda binaria\0A6. Menu \0A\00"
@.str.1 = [23 x i8] c"Selecciona ejercicio:\09\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"cls\00"
@.str.4 = [22 x i8] c"Introduzca la base: \09\00"
@.str.5 = [27 x i8] c"Introduzca el exponente: \09\00"
@.str.6 = [22 x i8] c"El resultado es:\09 %d\0A\00"
@.str.7 = [6 x i8] c"pause\00"
@.str.8 = [19 x i8] c"Introduce numero:\09\00"
@.str.9 = [33 x i8] c"Introduce un numero mayor que 0\0A\00"
@.str.10 = [22 x i8] c"Introduce los euros:\09\00"
@.str.11 = [46 x i8] c"ERROR: La cantidad debe ser mayor que cero. \0A\00"
@.str.12 = [30 x i8] c"Introduce el valor a buscar:\09\00"
@.str.13 = [9 x i8] c"Fracaso\0A\00"
@.str.14 = [38 x i8] c"La posicion del valor buscado es:\09 %d\00"
@.str.15 = [31 x i8] c"Introduce el valor a a\C3\B1adir:\09\00"
@.str.16 = [23 x i8] c"El array ya esta lleno\00"
@.str.17 = [34 x i8] c"El valor se ha a\C3\B1adido con exito\00"
@.str.18 = [40 x i8] c"Introduce numero a buscar en el array:\09\00"
@.str.19 = [29 x i8] c"No se encuentra el elemento\0A\00"
@.str.20 = [27 x i8] c"Introduce el nuevo valor:\09\00"
@.str.21 = [15 x i8] c"\0ASaliendo...\0A\0A\00"
@.str.22 = [21 x i8] c"Numero no conocido\0A\0A\00"
@.str.23 = [13 x i8] c"Saliendo...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %16
16: ; preds = %161, %0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %15)
%20 = load i32, i32* %15
switch i32 %20, label %153 [
i32 1, label %21
i32 2, label %33
i32 3, label %53
i32 4, label %71
i32 5, label %72
i32 6, label %73
]
21: ; preds = %16
%22 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %12)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %13)
%27 = load i32, i32* %12
%28 = load i32, i32* %13
%29 = call i32 @potencia(i32 %27, i32 %28)
store i32 %29, i32* %14
%30 = load i32, i32* %14
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %30)
%32 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %160
33: ; preds = %16
br label %34
34: ; preds = %44, %33
%35 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%38 = load i32, i32* %10
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %34
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%42 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %43
43: ; preds = %40, %34
br label %44
44: ; preds = %43
%45 = load i32, i32* %10
%46 = icmp slt i32 %45, 0
br i1 %46, label %34, label %47
47: ; preds = %44
%48 = load i32, i32* %10
%49 = call i32 @factorial(i32 %48)
store i32 %49, i32* %11
%50 = load i32, i32* %11
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %50)
%52 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %160
53: ; preds = %16
%54 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %65, %53
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%58 = load i32, i32* %8
%59 = icmp sle i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %55
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0))
%62 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%63 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %64
64: ; preds = %60, %55
br label %65
65: ; preds = %64
%66 = load i32, i32* %8
%67 = icmp sle i32 %66, 0
br i1 %67, label %55, label %68
68: ; preds = %65
%69 = load i32, i32* %8
%70 = call i32 @euros(i32 %69)
store i32 %70, i32* %9
br label %160
71: ; preds = %16
br label %160
72: ; preds = %16
br label %160
73: ; preds = %16
%74 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %75
75: ; preds = %149, %73
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%77 = call i32 @menu(i32* %76)
store i32 %77, i32* %7
%78 = load i32, i32* %7
switch i32 %78, label %147 [
i32 1, label %79
i32 2, label %82
i32 3, label %87
i32 4, label %91
i32 5, label %107
i32 6, label %124
i32 7, label %144
]
79: ; preds = %75
%80 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%81 = call i32 @introducir_array(i32* %80)
store i32 %81, i32* %3
br label %148
82: ; preds = %75
%83 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%84 = load i32, i32* %3
%85 = call i32 @visualizar_array(i32* %83, i32 %84)
%86 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %148
87: ; preds = %75
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%89 = load i32, i32* %3
%90 = call i32 @ordenar_insercion(i32* %88, i32 %89)
br label %148
91: ; preds = %75
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%93 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%94 = load i32, i32* %4
%95 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%96 = load i32, i32* %3
%97 = call i32 @busqueda_binaria(i32 %94, i32* %95, i32 %96)
store i32 %97, i32* %5
%98 = load i32, i32* %5
%99 = icmp eq i32 %98, -1
br i1 %99, label %100, label %102
100: ; preds = %91
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
br label %105
102: ; preds = %91
%103 = load i32, i32* %5
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), i32 %103)
br label %105
105: ; preds = %102, %100
%106 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %148
107: ; preds = %75
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
%109 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%110 = load i32, i32* %4
%111 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%112 = load i32, i32* %3
%113 = call i32 @introducir_valor(i32 %110, i32* %111, i32 %112)
store i32 %113, i32* %6
%114 = load i32, i32* %6
%115 = icmp eq i32 %114, -1
br i1 %115, label %116, label %118
116: ; preds = %107
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
br label %122
118: ; preds = %107
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%120 = load i32, i32* %3
%121 = add nsw i32 %120, 1
store i32 %121, i32* %3
br label %122
122: ; preds = %118, %116
%123 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %148
124: ; preds = %75
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.18, i64 0, i64 0))
%126 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%127 = load i32, i32* %4
%128 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%129 = load i32, i32* %3
%130 = call i32 @busqueda_binaria(i32 %127, i32* %128, i32 %129)
store i32 %130, i32* %6
%131 = load i32, i32* %6
%132 = icmp eq i32 %131, 1
br i1 %132, label %133, label %136
133: ; preds = %124
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%135 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %143
136: ; preds = %124
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0))
%138 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%139 = load i32, i32* %4
%140 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%141 = load i32, i32* %3
%142 = call i32 @introducir_valor(i32 %139, i32* %140, i32 %141)
br label %143
143: ; preds = %136, %133
br label %148
144: ; preds = %75
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0))
%146 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %148
147: ; preds = %75
br label %148
148: ; preds = %147, %144, %143, %122, %105, %87, %82, %79
br label %149
149: ; preds = %148
%150 = load i32, i32* %7
%151 = icmp ne i32 %150, 7
br i1 %151, label %75, label %152
152: ; preds = %149
br label %160
153: ; preds = %16
%154 = load i32, i32* %15
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %159
156: ; preds = %153
%157 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0))
br label %159
159: ; preds = %156, %153
br label %160
160: ; preds = %159, %152, %72, %71, %68, %47, %21
br label %161
161: ; preds = %160
%162 = load i32, i32* %15
%163 = icmp ne i32 %162, 0
br i1 %163, label %16, label %164
164: ; preds = %161
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
%166 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"Selecciona ejercicio:\09\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"cls\00"
@.str.4 = [22 x i8] c"Introduzca la base: \09\00"
@.str.5 = [27 x i8] c"Introduzca el exponente: \09\00"
@.str.6 = [22 x i8] c"El resultado es:\09 %d\0A\00"
@.str.7 = [6 x i8] c"pause\00"
@.str.8 = [19 x i8] c"Introduce numero:\09\00"
@.str.10 = [22 x i8] c"Introduce los euros:\09\00"
@.str.12 = [30 x i8] c"Introduce el valor a buscar:\09\00"
@.str.14 = [38 x i8] c"La posicion del valor buscado es:\09 %d\00"
@.str.15 = [31 x i8] c"Introduce el valor a a\C3\B1adir:\09\00"
@.str.16 = [23 x i8] c"El array ya esta lleno\00"
@.str.17 = [34 x i8] c"El valor se ha a\C3\B1adido con exito\00"
@.str.18 = [40 x i8] c"Introduce numero a buscar en el array:\09\00"
@.str.20 = [27 x i8] c"Introduce el nuevo valor:\09\00"
@str = [115 x i8] c"0. Salir\0A1. Potenica\0A2. Factorial\0A3. Euros\0A4. Ordenar mediante algoritmo de insercion\0A5. Busqueda binaria\0A6. Menu \00"
@str.24 = [14 x i8] c"\0ASaliendo...\0A\00"
@str.25 = [12 x i8] c"Saliendo...\00"
@str.26 = [28 x i8] c"No se encuentra el elemento\00"
@str.27 = [8 x i8] c"Fracaso\00"
@str.28 = [45 x i8] c"ERROR: La cantidad debe ser mayor que cero. \00"
@str.29 = [32 x i8] c"Introduce un numero mayor que 0\00"
@str.30 = [20 x i8] c"Numero no conocido\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast [10 x i32]* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
br label %16
16: ; preds = %128, %0
%17 = phi i32 [ 0, %0 ], [ %130, %128 ]
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%21 = load i32, i32* %7
switch i32 %21, label %122 [
i32 1, label %22
i32 2, label %33
i32 3, label %49
i32 4, label %128
i32 5, label %128
i32 6, label %65
i32 0, label %128
]
22: ; preds = %16
%23 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = call i32 @potencia(i32 %28, i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %30)
%32 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %125
33: ; preds = %16, %39
%34 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%37 = load i32, i32* %4
%38 = icmp slt i32 %37, 0
br i1 %38, label %39, label %44
39: ; preds = %33
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.29, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%42 = load i32, i32* %4
%43 = icmp slt i32 %42, 0
br i1 %43, label %33, label %44
44: ; preds = %33, %39
%45 = phi i32 [ %42, %39 ], [ %37, %33 ]
%46 = call i32 @factorial(i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %46)
%48 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %125
49: ; preds = %16
%50 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %56, %49
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%54 = load i32, i32* %3
%55 = icmp slt i32 %54, 1
br i1 %55, label %56, label %62
56: ; preds = %51
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.28, i64 0, i64 0))
%58 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%59 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%60 = load i32, i32* %3
%61 = icmp slt i32 %60, 1
br i1 %61, label %51, label %62
62: ; preds = %51, %56
%63 = phi i32 [ %60, %56 ], [ %54, %51 ]
%64 = call i32 @euros(i32 %63)
br label %125
65: ; preds = %16
%66 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %67
67: ; preds = %72, %65
%68 = phi i32 [ %17, %65 ], [ %73, %72 ]
%69 = call i32 @menu(i32* %15)
switch i32 %69, label %72 [
i32 1, label %70
i32 2, label %74
i32 3, label %77
i32 4, label %79
i32 5, label %91
i32 6, label %105
i32 7, label %119
]
70: ; preds = %67
%71 = call i32 @introducir_array(i32* %15)
br label %72
72: ; preds = %70, %74, %77, %89, %102, %114, %111, %67
%73 = phi i32 [ %68, %67 ], [ %68, %111 ], [ %68, %114 ], [ %103, %102 ], [ %68, %89 ], [ %68, %77 ], [ %68, %74 ], [ %71, %70 ]
br label %67
74: ; preds = %67
%75 = call i32 @visualizar_array(i32* %15, i32 %68)
%76 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %72
77: ; preds = %67
%78 = call i32 @ordenar_insercion(i32* %15, i32 %68)
br label %72
79: ; preds = %67
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%81 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%82 = load i32, i32* %2
%83 = call i32 @busqueda_binaria(i32 %82, i32* %15, i32 %68)
%84 = icmp eq i32 %83, -1
br i1 %84, label %85, label %87
85: ; preds = %79
%86 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.27, i64 0, i64 0))
br label %89
87: ; preds = %79
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), i32 %83)
br label %89
89: ; preds = %87, %85
%90 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %72
91: ; preds = %67
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
%93 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%94 = load i32, i32* %2
%95 = call i32 @introducir_valor(i32 %94, i32* %15, i32 %68)
%96 = icmp eq i32 %95, -1
br i1 %96, label %97, label %99
97: ; preds = %91
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
br label %102
99: ; preds = %91
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%101 = add nsw i32 %68, 1
br label %102
102: ; preds = %99, %97
%103 = phi i32 [ %68, %97 ], [ %101, %99 ]
%104 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %72
105: ; preds = %67
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.18, i64 0, i64 0))
%107 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%108 = load i32, i32* %2
%109 = call i32 @busqueda_binaria(i32 %108, i32* %15, i32 %68)
%110 = icmp eq i32 %109, 1
br i1 %110, label %111, label %114
111: ; preds = %105
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
%113 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %72
114: ; preds = %105
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0))
%116 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%117 = load i32, i32* %2
%118 = call i32 @introducir_valor(i32 %117, i32* %15, i32 %68)
br label %72
119: ; preds = %67
%120 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.24, i64 0, i64 0))
%121 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %125
122: ; preds = %16
%123 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.30, i64 0, i64 0))
br label %125
125: ; preds = %122, %62, %44, %22, %119
%126 = phi i32 [ %68, %119 ], [ %17, %22 ], [ %17, %44 ], [ %17, %62 ], [ %17, %122 ]
%127 = load i32, i32* %7
br label %128
128: ; preds = %125, %16, %16, %16
%129 = phi i32 [ %127, %125 ], [ %21, %16 ], [ %21, %16 ], [ %21, %16 ]
%130 = phi i32 [ %126, %125 ], [ %17, %16 ], [ %17, %16 ], [ %17, %16 ]
%131 = icmp eq i32 %129, 0
br i1 %131, label %132, label %16
132: ; preds = %128
%133 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.25, i64 0, i64 0))
%134 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}