#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*/ alta_modifica(int, int *, char **, char **, float *, char **,
                                 char *);
int existe_legajo(int, int *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ listar(int, int *, char **, char **, float *, char **,
                          char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  char pregunta = '0';
  int proximo_legajo = 1;
  int legajo[10000];
  char nombre[10000][51];
  char apellido[10000][51];
  float salario[10000];
  char fecha[10000][10];
  char sector[10000];
  int pregunta_legajo;
  int i;
  for (i = 0; i < 10000; i++) {
    legajo[i] = -1;
  }
  while (pregunta != '9') {
    printf("\n1-ALTA\n");
    printf("2-EDITAR\n");
    printf("3-BAJA\n");
    printf("4-LISTAR\n");
    printf("9-SALIR\n");
    scanf("%c", &pregunta);
    switch (pregunta) {
    case '1':
      alta_modifica(proximo_legajo, legajo, nombre, apellido, salario, fecha,
                    sector);
      break;
    case '2':
      printf("\nLegajo a editar:");
      scanf("%d", &pregunta_legajo);
      if (existe_legajo(pregunta_legajo, legajo, 10000) == 1) {
        printf("\nExiste");
        alta_modifica(pregunta_legajo, legajo, nombre, apellido, salario, fecha,
                      sector);
      } else {
        printf("\nEl legajo %d no existe", pregunta_legajo);
      }
      break;
    case '3':
      printf("\nLegajo a eliminar:");
      scanf("%d", &pregunta_legajo);
      if (existe_legajo(pregunta_legajo, legajo, 10000) == 1) {
        printf("\nExiste");
        legajo[pregunta_legajo] = -1;
      } else {
        printf("\nEl legajo %d no existe", pregunta_legajo);
      }
      break;
      break;
    case '4':
      listar(10000, legajo, nombre, apellido, salario, fecha, sector);
      break;
    case '5':
      printf("\nGUARDADO\n");
      break;
    }
  }
  do {
    printf("\n\n--PAUSE- file: %s line:%d\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/"
           "heads/master/practica_primer_examen/main.c",
           99);
    getchar();
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1276c0,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x30,-0x5(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x1276a8(%rbp)
cmpl   $0x2710,-0x1276a8(%rbp)
jge    11bd <main+0x5d>
movslq -0x1276a8(%rbp),%rax
movl   $0xffffffff,-0x9c50(%rbp,%rax,4)
ff ff ff ff
mov    -0x1276a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1276a8(%rbp)
jmp    1187 <main+0x27>
jmp    11c2 <main+0x62>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
je     1425 <main+0x2c5>
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x1276b1(%rbp)
call   1040 <printf@plt>
mov    -0x1276b1(%rbp),%al
lea    0xe2d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1276b1(%rbp),%al
lea    0xe25(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1276b1(%rbp),%al
lea    0xe1b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1276b1(%rbp),%al
lea    0xe13(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1276b1(%rbp),%al
lea    0xe0a(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1070 <scanf@plt>
movsbl -0x5(%rbp),%eax
add    $0xffffffcf,%eax
mov    %eax,%ecx
mov    %rcx,-0x1276b0(%rbp)
sub    $0x4,%eax
ja     1420 <main+0x2c0>
mov    -0x1276b0(%rbp),%rax
lea    0xd98(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%edi
lea    -0x9c50(%rbp),%rsi
lea    -0x86480(%rbp),%rdx
lea    -0x102cb0(%rbp),%rcx
lea    -0x10c8f0(%rbp),%r8
lea    -0x124f90(%rbp),%r9
lea    -0x1276a0(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <alta_modifica@plt>
jmp    1420 <main+0x2c0>
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd96(%rip),%rdi
lea    -0x1276a4(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x1276a4(%rbp),%edi
lea    -0x9c50(%rbp),%rsi
mov    $0x2710,%edx
call   1060 <existe_legajo@plt>
cmp    $0x1,%eax
jne    133b <main+0x1db>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1276a4(%rbp),%edi
lea    -0x9c50(%rbp),%rsi
lea    -0x86480(%rbp),%rdx
lea    -0x102cb0(%rbp),%rcx
lea    -0x10c8f0(%rbp),%r8
lea    -0x124f90(%rbp),%r9
lea    -0x1276a0(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <alta_modifica@plt>
jmp    134f <main+0x1ef>
mov    -0x1276a4(%rbp),%esi
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1420 <main+0x2c0>
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcee(%rip),%rdi
lea    -0x1276a4(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x1276a4(%rbp),%edi
lea    -0x9c50(%rbp),%rsi
mov    $0x2710,%edx
call   1060 <existe_legajo@plt>
cmp    $0x1,%eax
jne    13bc <main+0x25c>
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x1276a4(%rbp),%rax
movl   $0xffffffff,-0x9c50(%rbp,%rax,4)
ff ff ff ff
jmp    13d0 <main+0x270>
mov    -0x1276a4(%rbp),%esi
lea    0xc99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1420 <main+0x2c0>
lea    -0x9c50(%rbp),%rsi
lea    -0x86480(%rbp),%rdx
lea    -0x102cb0(%rbp),%rcx
lea    -0x10c8f0(%rbp),%r8
lea    -0x124f90(%rbp),%r9
lea    -0x1276a0(%rbp),%rax
mov    $0x2710,%edi
mov    %rax,(%rsp)
call   1080 <listar@plt>
jmp    1420 <main+0x2c0>
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c2 <main+0x62>
jmp    142a <main+0x2ca>
lea    0xc68(%rip),%rdi
lea    0xc7e(%rip),%rsi
mov    $0x63,%edx
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x1276c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1276a8,%rsp
movb   $0x30,0xb(%rsp)
lea    0x2720(%rsp),%rdi
mov    $0x9c40,%edx
mov    $0xff,%esi
call   1060 <memset@plt>
lea    0xf72(%rip),%r13
lea    0xf73(%rip),%r15
lea    0xf75(%rip),%r14
lea    0xf75(%rip),%r12
lea    0xf77(%rip),%rbx
lea    0xe3d(%rip),%rbp
jmp    11fd <main+0x7d>
lea    0xf6f(%rip),%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0xb(%rsp),%eax
cmp    $0x39,%al
je     1408 <main+0x288>
mov    %r13,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
movsbl 0xb(%rsp),%eax
lea    -0x31(%rax),%ecx
cmp    $0x4,%ecx
ja     11f5 <main+0x75>
lea    0xdb8(%rip),%rdx
movslq (%rdx,%rcx,4),%rax
add    %rdx,%rax
jmp    *%rax
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
mov    $0x1,%edi
lea    0x2720(%rsp),%rsi
lea    0xaae70(%rsp),%rdx
lea    0x2e640(%rsp),%rcx
lea    0xc360(%rsp),%r8
lea    0x15fa0(%rsp),%r9
call   1030 <alta_modifica@plt>
jmp    11f0 <main+0x70>
mov    %r13,%rbx
lea    0xd7c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd80(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%edi
lea    0x2720(%rsp),%r13
mov    %r13,%rsi
mov    $0x2710,%edx
call   1080 <existe_legajo@plt>
cmp    $0x1,%eax
jne    13c2 <main+0x242>
lea    0xd4e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
mov    %r13,%rsi
lea    0xaae70(%rsp),%rdx
lea    0x2e640(%rsp),%rcx
lea    0xc360(%rsp),%r8
lea    0x15fa0(%rsp),%r9
call   1030 <alta_modifica@plt>
jmp    13d4 <main+0x254>
lea    0xd26(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcf5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%edi
lea    0x2720(%rsp),%rsi
mov    $0x2710,%edx
call   1080 <existe_legajo@plt>
cmp    $0x1,%eax
jne    13f1 <main+0x271>
lea    0xcc6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movslq 0xc(%rsp),%rax
movl   $0xffffffff,0x2720(%rsp,%rax,4)
ff ff ff ff
jmp    11f0 <main+0x70>
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
mov    $0x2710,%edi
lea    0x2720(%rsp),%rsi
lea    0xaae70(%rsp),%rdx
lea    0x2e640(%rsp),%rcx
lea    0xc360(%rsp),%r8
lea    0x15fa0(%rsp),%r9
call   10a0 <listar@plt>
jmp    11f0 <main+0x70>
mov    0xc(%rsp),%esi
lea    0xc67(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%r13
lea    0xd60(%rip),%r12
lea    0xd62(%rip),%rbx
lea    0xc28(%rip),%rbp
jmp    11f0 <main+0x70>
mov    0xc(%rsp),%esi
lea    0xc38(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11f0 <main+0x70>
lea    0xc51(%rip),%rdi
lea    0xc67(%rip),%rsi
mov    $0x63,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x1276a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\0A1-ALTA\0A\00"
@.str.1 = [10 x i8] c"2-EDITAR\0A\00"
@.str.2 = [8 x i8] c"3-BAJA\0A\00"
@.str.3 = [10 x i8] c"4-LISTAR\0A\00"
@.str.4 = [9 x i8] c"9-SALIR\0A\00"
@.str.5 = [3 x i8] c"%c\00"
@.str.6 = [18 x i8] c"\0ALegajo a editar:\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [8 x i8] c"\0AExiste\00"
@.str.9 = [24 x i8] c"\0AEl legajo %d no existe\00"
@.str.10 = [20 x i8] c"\0ALegajo a eliminar:\00"
@.str.11 = [11 x i8] c"\0AGUARDADO\0A\00"
@.str.12 = [29 x i8] c"\0A\0A--PAUSE- file: %s line:%d\0A\00"
@.str.13 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/practica_primer_examen/main.c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca [10000 x i32]
%5 = alloca [10000 x [51 x i8]]
%6 = alloca [10000 x [51 x i8]]
%7 = alloca [10000 x float]
%8 = alloca [10000 x [10 x i8]]
%9 = alloca [10000 x i8]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i8 48, i8* %2
store i32 1, i32* %3
store i32 0, i32* %11
br label %12
12: ; preds = %19, %0
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 10000
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 %17
store i32 -1, i32* %18
br label %19
19: ; preds = %15
%20 = load i32, i32* %11
%21 = add nsw i32 %20, 1
store i32 %21, i32* %11
br label %12
22: ; preds = %12
br label %23
23: ; preds = %101, %22
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 57
br i1 %26, label %27, label %102
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%34 = load i8, i8* %2
%35 = sext i8 %34 to i32
switch i32 %35, label %101 [
i32 49, label %36
i32 50, label %48
i32 51, label %72
i32 52, label %88
i32 53, label %99
]
36: ; preds = %27
%37 = load i32, i32* %3
%38 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 0
%39 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %5, i64 0, i64 0
%40 = bitcast [51 x i8]* %39 to i8**
%41 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %6, i64 0, i64 0
%42 = bitcast [51 x i8]* %41 to i8**
%43 = getelementptr inbounds [10000 x float], [10000 x float]* %7, i64 0, i64 0
%44 = getelementptr inbounds [10000 x [10 x i8]], [10000 x [10 x i8]]* %8, i64 0, i64 0
%45 = bitcast [10 x i8]* %44 to i8**
%46 = getelementptr inbounds [10000 x i8], [10000 x i8]* %9, i64 0, i64 0
%47 = call i32 @alta_modifica(i32 %37, i32* %38, i8** %40, i8** %42, float* %43, i8** %45, i8* %46)
br label %101
48: ; preds = %27
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %10)
%51 = load i32, i32* %10
%52 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 0
%53 = call i32 @existe_legajo(i32 %51, i32* %52, i32 10000)
%54 = icmp eq i32 %53, 1
br i1 %54, label %55, label %68
55: ; preds = %48
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%57 = load i32, i32* %10
%58 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 0
%59 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %5, i64 0, i64 0
%60 = bitcast [51 x i8]* %59 to i8**
%61 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %6, i64 0, i64 0
%62 = bitcast [51 x i8]* %61 to i8**
%63 = getelementptr inbounds [10000 x float], [10000 x float]* %7, i64 0, i64 0
%64 = getelementptr inbounds [10000 x [10 x i8]], [10000 x [10 x i8]]* %8, i64 0, i64 0
%65 = bitcast [10 x i8]* %64 to i8**
%66 = getelementptr inbounds [10000 x i8], [10000 x i8]* %9, i64 0, i64 0
%67 = call i32 @alta_modifica(i32 %57, i32* %58, i8** %60, i8** %62, float* %63, i8** %65, i8* %66)
br label %71
68: ; preds = %48
%69 = load i32, i32* %10
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %68, %55
br label %101
72: ; preds = %27
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%74 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %10)
%75 = load i32, i32* %10
%76 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 0
%77 = call i32 @existe_legajo(i32 %75, i32* %76, i32 10000)
%78 = icmp eq i32 %77, 1
br i1 %78, label %79, label %84
79: ; preds = %72
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%81 = load i32, i32* %10
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 %82
store i32 -1, i32* %83
br label %87
84: ; preds = %72
%85 = load i32, i32* %10
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %85)
br label %87
87: ; preds = %84, %79
br label %101
88: ; preds = %27
%89 = getelementptr inbounds [10000 x i32], [10000 x i32]* %4, i64 0, i64 0
%90 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %5, i64 0, i64 0
%91 = bitcast [51 x i8]* %90 to i8**
%92 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %6, i64 0, i64 0
%93 = bitcast [51 x i8]* %92 to i8**
%94 = getelementptr inbounds [10000 x float], [10000 x float]* %7, i64 0, i64 0
%95 = getelementptr inbounds [10000 x [10 x i8]], [10000 x [10 x i8]]* %8, i64 0, i64 0
%96 = bitcast [10 x i8]* %95 to i8**
%97 = getelementptr inbounds [10000 x i8], [10000 x i8]* %9, i64 0, i64 0
%98 = call i32 @listar(i32 10000, i32* %89, i8** %91, i8** %93, float* %94, i8** %96, i8* %97)
br label %101
99: ; preds = %27
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %101
101: ; preds = %27, %99, %88, %87, %71, %36
br label %23
102: ; preds = %23
br label %103
103: ; preds = %102
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.13, i64 0, i64 0), i32 99)
%105 = call i32 (...) @getchar()
br label %106
106: ; preds = %103
ret i32 0
}

LLVM IR (-O2):
@.str.5 = [3 x i8] c"%c\00"
@.str.6 = [18 x i8] c"\0ALegajo a editar:\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [8 x i8] c"\0AExiste\00"
@.str.9 = [24 x i8] c"\0AEl legajo %d no existe\00"
@.str.10 = [20 x i8] c"\0ALegajo a eliminar:\00"
@.str.12 = [29 x i8] c"\0A\0A--PAUSE- file: %s line:%d\0A\00"
@.str.13 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/practica_primer_examen/main.c\00"
@str = [8 x i8] c"\0A1-ALTA\00"
@str.14 = [9 x i8] c"2-EDITAR\00"
@str.15 = [7 x i8] c"3-BAJA\00"
@str.16 = [9 x i8] c"4-LISTAR\00"
@str.17 = [8 x i8] c"9-SALIR\00"
@str.18 = [10 x i8] c"\0AGUARDADO\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [10000 x i32]
%3 = bitcast [10000 x i32]* %2 to i8*
%4 = alloca [10000 x [51 x i8]]
%5 = alloca [10000 x [51 x i8]]
%6 = alloca [10000 x float]
%7 = alloca [10000 x [10 x i8]]
%8 = alloca [10000 x i8]
%9 = alloca i32
store i8 48, i8* %1
%10 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %4, i64 0, i64 0, i64 0
%11 = getelementptr inbounds [10000 x [51 x i8]], [10000 x [51 x i8]]* %5, i64 0, i64 0, i64 0
%12 = bitcast [10000 x float]* %6 to i8*
%13 = getelementptr inbounds [10000 x [10 x i8]], [10000 x [10 x i8]]* %7, i64 0, i64 0, i64 0
%14 = getelementptr inbounds [10000 x i8], [10000 x i8]* %8, i64 0, i64 0
%15 = bitcast i32* %9 to i8*
%16 = getelementptr inbounds [10000 x i32], [10000 x i32]* %2, i64 0, i64 0
%17 = bitcast [10000 x [51 x i8]]* %4 to i8**
%18 = bitcast [10000 x [51 x i8]]* %5 to i8**
%19 = getelementptr inbounds [10000 x float], [10000 x float]* %6, i64 0, i64 0
%20 = bitcast [10000 x [10 x i8]]* %7 to i8**
br label %21
21: ; preds = %0, %65
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.14, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.15, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.16, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.17, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %1)
%28 = load i8, i8* %1
%29 = sext i8 %28 to i32
switch i32 %29, label %65 [
i32 49, label %30
i32 50, label %32
i32 51, label %45
i32 52, label %59
i32 53, label %61
]
30: ; preds = %21
%31 = call i32 @alta_modifica(i32 1, i32* %16, i8** %17, i8** %18, float* %19, i8** %20, i8* %14)
br label %63
32: ; preds = %21
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %9)
%35 = load i32, i32* %9
%36 = call i32 @existe_legajo(i32 %35, i32* %16, i32 10000)
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %42
38: ; preds = %32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%40 = load i32, i32* %9
%41 = call i32 @alta_modifica(i32 %40, i32* %16, i8** %17, i8** %18, float* %19, i8** %20, i8* %14)
br label %63
42: ; preds = %32
%43 = load i32, i32* %9
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %43)
br label %63
45: ; preds = %21
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%47 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %9)
%48 = load i32, i32* %9
%49 = call i32 @existe_legajo(i32 %48, i32* %16, i32 10000)
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %56
51: ; preds = %45
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%53 = load i32, i32* %9
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [10000 x i32], [10000 x i32]* %2, i64 0, i64 %54
store i32 -1, i32* %55
br label %63
56: ; preds = %45
%57 = load i32, i32* %9
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %57)
br label %63
59: ; preds = %21
%60 = call i32 @listar(i32 10000, i32* %16, i8** %17, i8** %18, float* %19, i8** %20, i8* %14)
br label %63
61: ; preds = %21
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.18, i64 0, i64 0))
br label %63
63: ; preds = %30, %59, %61, %42, %38, %56, %51
%64 = load i8, i8* %1
br label %65
65: ; preds = %63, %21
%66 = phi i8 [ %64, %63 ], [ %28, %21 ]
%67 = icmp eq i8 %66, 57
br i1 %67, label %68, label %21
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.13, i64 0, i64 0), i32 99)
%70 = call i32 (...) @getchar()
ret i32 0
}