#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ limpa();
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
scalar_t__ realloc(int *, int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sleep(int);
int submenu(int **grafo, int t, int qnt_col, int opcao) {
  FILE *fp;
  int opcao2, vet_exclusao, tamanho, i, j, k, vez = 1, cont, gravar = 0;
  char ch;
  if (!fp) {
    puts("Erro na abertura do arquivo!\n");
  } else {
    puts("\tOPERACOES\t\n");
    puts("--------------------------------\n");
    puts("Digite 1 para excluir um vertice\n");
    puts("Digite 2 para inserir um vertice\n");
    puts("Digite 0 para voltar ao menu anterior\n");
    puts("--------------------------------\n");
    scanf("%i", &opcao2);
    if (opcao2 == 1) {
      gravar = 1;
      printf("Digite o vertice que deseja excluir\n:>>");
      scanf("%i", &vet_exclusao);
      vet_exclusao--;
      if (vet_exclusao > t - 1 || vet_exclusao < 0) {
        puts("Vetor inesistente\n");
        gravar = 0;
      } else {
        for (i = 0; i < qnt_col; i++) {
          grafo[vet_exclusao][i] = 0;
        }
      }
    } else if (opcao2 == 2) {
      gravar = 1;
    } else if (opcao2 == 0) {
      return 0;
    }
  }
  if (gravar == 1) {
    limpa();
    if (opcao == 1) {
      fp = fopen("entrada.txt", "w");
      for (i = 0; i < t; i++) {
        for (j = 0; j < qnt_col; j++) {
          printf("%i |", grafo[i][j]);
          if (grafo[i][j] != 0) {
            if (vez == 1) {
              fprintf(fp, "%i: %i", i + 1, j + 1);
              vez = 0;
            } else {
              for (k = 0; k < grafo[i][j]; k++)
                fprintf(fp, " %i", j + 1);
            }
          }
          if (j == qnt_col - 1) {
            fprintf(fp, "\n");
            puts("\n");
            vez = 1;
          }
        }
        puts("\n");
      }
      fclose(fp);
    } else if (opcao == 2) {
      fp = fopen("entrada.txt", "r");
      int contador_numeros = 0, *contador_total, qnt_linhas = 0, i, indice = 0,
          aux = 0, soma = 0;
      contador_total = (int *)malloc(sizeof(int));
      if (fp) {
        while ((ch = fgetc(fp)) != EOF) {
          if (ch != ':' && ch != ' ' && ch != '\n') {
            contador_numeros++;
          }
          if (ch == '\n') {
            qnt_linhas++;
            contador_total =
                (int *)realloc(contador_total, sizeof(int) * qnt_linhas);
            contador_total[qnt_linhas - 1] = contador_numeros - 1;
            contador_numeros = 0;
          }
        }
      }
      fclose(fp);
      fp = fopen("entrada.txt", "w");
      if (fp) {
        for (i = 0; i < qnt_linhas; i++) {
          soma += contador_total[i];
          if (soma > vet_exclusao) {
            contador_total[i]--;
            break;
          }
        }
        for (i = 0; i < t; i++) {
          for (j = 0; j < qnt_col; j++) {
            printf("%i |", grafo[i][j]);
            if (j != indice && grafo[i][j] == 1) {
              if (vez == 1) {
                fprintf(fp, "%i: %i", indice + 1, j + 1);
                vez = 0;
                aux++;
              } else {
                fprintf(fp, " %i", j + 1);
                aux++;
              }
            }
          }
          if (aux == contador_total[indice]) {
            indice++;
            fprintf(fp, "\n");
            puts("\n");
            vez = 1;
            aux = 0;
          }
        }
      }
      fclose(fp);
    } else if (opcao == 3) {
      fp = fopen("entrada.txt", "r");
      int contador_numeros = 0, *contador_total, qnt_linhas = 0, indice = 0,
          aux = 0, soma = 0, *aux_lin;
      contador_total = (int *)malloc(sizeof(int));
      aux_lin = (int *)malloc(sizeof(int));
      vez = 1;
      if (fp) {
        while ((ch = fgetc(fp)) != EOF) {
          if (ch != ':' && ch != ' ' && ch != '\n') {
            if (vez == 1) {
              aux = ch;
              aux -= 48;
              aux_lin[qnt_linhas] = aux;
              aux = 0;
              vez = 0;
            }
            contador_numeros++;
          }
          if (ch == '\n') {
            qnt_linhas++;
            aux_lin = (int *)realloc(aux_lin, sizeof(int) * qnt_linhas);
            contador_total =
                (int *)realloc(contador_total, sizeof(int) * qnt_linhas);
            contador_total[qnt_linhas - 1] = contador_numeros - 1;
            contador_numeros = 0;
            vez = 1;
          }
        }
      }
      fclose(fp);
      fp = fopen("entrada.txt", "w");
      if (fp) {
        for (i = 0; i < qnt_linhas; i++) {
          soma += contador_total[i];
          if (soma > vet_exclusao) {
            contador_total[i]--;
            break;
          }
        }
        for (i = 0; i < t; i++) {
          for (j = 0; j < qnt_col; j++) {
            if (j != (grafo[i][j] == 1) && grafo[i][j] == -1) {
              if (vez == 1) {
                fprintf(fp, "%i: %i", aux_lin[indice], j + 1);
                vez = 0;
                aux++;
              } else {
                fprintf(fp, " %i", j + 1);
                aux++;
              }
            }
          }
          if (aux == contador_total[indice]) {
            indice++;
            fprintf(fp, "\n");
            vez = 1;
            aux = 0;
          }
        }
      }
      fclose(fp);
    }
  }
  puts("Vertice removido com sucesso!\n");
  getchar();
  sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<submenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1202 <submenu+0x42>
lea    0xe08(%rip),%rdi
call   1030 <puts@plt>
jmp    1342 <submenu+0x182>
lea    0xe15(%rip),%rdi
call   1030 <puts@plt>
lea    0xe16(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe42(%rip),%rdi
call   1030 <puts@plt>
lea    0xe58(%rip),%rdi
call   1030 <puts@plt>
lea    0xde6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   10c0 <scanf@plt>
cmpl   $0x1,-0x2c(%rbp)
jne    1307 <submenu+0x147>
movl   $0x1,-0x4c(%rbp)
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   10c0 <scanf@plt>
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     12ad <submenu+0xed>
cmpl   $0x0,-0x30(%rbp)
jge    12c5 <submenu+0x105>
lea    0xe2c(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4c(%rbp)
jmp    1302 <submenu+0x142>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12fd <submenu+0x13d>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12cc <submenu+0x10c>
jmp    1302 <submenu+0x142>
jmp    133d <submenu+0x17d>
cmpl   $0x2,-0x2c(%rbp)
jne    131d <submenu+0x15d>
movl   $0x1,-0x4c(%rbp)
jmp    1338 <submenu+0x178>
cmpl   $0x0,-0x2c(%rbp)
jne    1333 <submenu+0x173>
movl   $0x0,-0x4(%rbp)
jmp    1b78 <submenu+0x9b8>
jmp    1338 <submenu+0x178>
jmp    133d <submenu+0x17d>
jmp    1342 <submenu+0x182>
cmpl   $0x1,-0x4c(%rbp)
jne    1b54 <submenu+0x994>
mov    $0x0,%al
call   1090 <limpa@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    14cd <submenu+0x30d>
lea    0xd8f(%rip),%rdi
lea    0xd94(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14bf <submenu+0x2ff>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    14a5 <submenu+0x2e5>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     145c <submenu+0x29c>
cmpl   $0x1,-0x44(%rbp)
jne    1409 <submenu+0x249>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%edx
add    $0x1,%edx
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
lea    0xd10(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x44(%rbp)
jmp    1457 <submenu+0x297>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x38(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1452 <submenu+0x292>
mov    -0x28(%rbp),%rdi
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
lea    0xccc(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1410 <submenu+0x250>
jmp    1457 <submenu+0x297>
jmp    145c <submenu+0x29c>
mov    -0x3c(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1492 <submenu+0x2d2>
mov    -0x28(%rbp),%rdi
lea    0xbb1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
lea    0xba3(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x44(%rbp)
jmp    1497 <submenu+0x2d7>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    138e <submenu+0x1ce>
lea    0xb7d(%rip),%rdi
call   1030 <puts@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    137b <submenu+0x1bb>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1b4f <submenu+0x98f>
cmpl   $0x2,-0x1c(%rbp)
jne    17aa <submenu+0x5ea>
lea    0xc15(%rip),%rdi
lea    0xc28(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    $0x4,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     15d4 <submenu+0x414>
jmp    152f <submenu+0x36f>
mov    -0x28(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x4d(%rbp)
movsbl %al,%eax
mov    0x2aa3(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     15cf <submenu+0x40f>
movsbl -0x4d(%rbp),%eax
cmp    $0x3a,%eax
je     1580 <submenu+0x3c0>
movsbl -0x4d(%rbp),%eax
cmp    $0x20,%eax
je     1580 <submenu+0x3c0>
movsbl -0x4d(%rbp),%eax
cmp    $0xa,%eax
je     1580 <submenu+0x3c0>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
movsbl -0x4d(%rbp),%eax
cmp    $0xa,%eax
jne    15ca <submenu+0x40a>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%rdi
movslq -0x64(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10b0 <realloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x54(%rbp),%edx
sub    $0x1,%edx
mov    -0x60(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x54(%rbp)
jmp    152f <submenu+0x36f>
jmp    15d4 <submenu+0x414>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xb0f(%rip),%rdi
lea    0xb14(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     179c <submenu+0x5dc>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1658 <submenu+0x498>
mov    -0x60(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x74(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x30(%rbp),%eax
jle    1645 <submenu+0x485>
mov    -0x60(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0xffffffff,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1658 <submenu+0x498>
jmp    164a <submenu+0x48a>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1606 <submenu+0x446>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1797 <submenu+0x5d7>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    173b <submenu+0x57b>
mov    -0x10(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xa69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
je     1728 <submenu+0x568>
mov    -0x10(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1728 <submenu+0x568>
cmpl   $0x1,-0x44(%rbp)
jne    1702 <submenu+0x542>
mov    -0x28(%rbp),%rdi
mov    -0x6c(%rbp),%edx
add    $0x1,%edx
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
lea    0xa20(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1723 <submenu+0x563>
mov    -0x28(%rbp),%rdi
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
lea    0x9f6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1728 <submenu+0x568>
jmp    172d <submenu+0x56d>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1672 <submenu+0x4b2>
mov    -0x70(%rbp),%eax
mov    -0x60(%rbp),%rcx
movslq -0x6c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1784 <submenu+0x5c4>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rdi
lea    0x8c6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
lea    0x8b8(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x70(%rbp)
jmp    1789 <submenu+0x5c9>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    165f <submenu+0x49f>
jmp    179c <submenu+0x5dc>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1b4a <submenu+0x98a>
cmpl   $0x3,-0x1c(%rbp)
jne    1b45 <submenu+0x985>
lea    0x938(%rip),%rdi
lea    0x94b(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
mov    $0x4,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    $0x4,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x98(%rbp)
movl   $0x1,-0x44(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1953 <submenu+0x793>
jmp    1830 <submenu+0x670>
mov    -0x28(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x4d(%rbp)
movsbl %al,%eax
mov    0x27a2(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     194e <submenu+0x78e>
movsbl -0x4d(%rbp),%eax
cmp    $0x3a,%eax
je     18cc <submenu+0x70c>
movsbl -0x4d(%rbp),%eax
cmp    $0x20,%eax
je     18cc <submenu+0x70c>
movsbl -0x4d(%rbp),%eax
cmp    $0xa,%eax
je     18cc <submenu+0x70c>
cmpl   $0x1,-0x44(%rbp)
jne    18c3 <submenu+0x703>
movsbl -0x4d(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edx
mov    -0x98(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsbl -0x4d(%rbp),%eax
cmp    $0xa,%eax
jne    1949 <submenu+0x789>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x98(%rbp),%rdi
movslq -0x84(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10b0 <realloc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x80(%rbp),%rdi
movslq -0x84(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10b0 <realloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%edx
sub    $0x1,%edx
mov    -0x80(%rbp),%rax
mov    -0x84(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x78(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    1830 <submenu+0x670>
jmp    1953 <submenu+0x793>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
lea    0x790(%rip),%rdi
lea    0x795(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1b3c <submenu+0x97c>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    19e3 <submenu+0x823>
mov    -0x80(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x90(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x30(%rbp),%eax
jle    19d0 <submenu+0x810>
mov    -0x80(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0xffffffff,%edx
mov    %edx,(%rax,%rcx,4)
jmp    19e3 <submenu+0x823>
jmp    19d5 <submenu+0x815>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1985 <submenu+0x7c5>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1b37 <submenu+0x977>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1ad8 <submenu+0x918>
mov    -0x3c(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x38(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
movslq -0x3c(%rbp),%rdx
cmpl   $0x1,(%rcx,%rdx,4)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1ac5 <submenu+0x905>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
jne    1ac5 <submenu+0x905>
cmpl   $0x1,-0x44(%rbp)
jne    1a99 <submenu+0x8d9>
mov    -0x28(%rbp),%rdi
mov    -0x98(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
lea    0x68f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1ac0 <submenu+0x900>
mov    -0x28(%rbp),%rdi
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
lea    0x65f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1ac5 <submenu+0x905>
jmp    1aca <submenu+0x90a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    19fd <submenu+0x83d>
mov    -0x8c(%rbp),%eax
mov    -0x80(%rbp),%rcx
movslq -0x88(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1b24 <submenu+0x964>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
mov    -0x28(%rbp),%rdi
lea    0x51d(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x8c(%rbp)
jmp    1b29 <submenu+0x969>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    19ea <submenu+0x82a>
jmp    1b3c <submenu+0x97c>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1b4a <submenu+0x98a>
jmp    1b4f <submenu+0x98f>
jmp    1b54 <submenu+0x994>
lea    0x5b4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    $0x1,%edi
call   10e0 <sleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submenu>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Erro na abertura do arquivo!\0A\00"
@.str.1 = [13 x i8] c"\09OPERACOES\09\0A\00"
@.str.2 = [34 x i8] c"--------------------------------\0A\00"
@.str.3 = [34 x i8] c"Digite 1 para excluir um vertice\0A\00"
@.str.4 = [34 x i8] c"Digite 2 para inserir um vertice\0A\00"
@.str.5 = [39 x i8] c"Digite 0 para voltar ao menu anterior\0A\00"
@.str.6 = [3 x i8] c"%i\00"
@.str.7 = [40 x i8] c"Digite o vertice que deseja excluir\0A:>>\00"
@.str.8 = [19 x i8] c"Vetor inesistente\0A\00"
@.str.9 = [12 x i8] c"entrada.txt\00"
@.str.10 = [2 x i8] c"w\00"
@.str.11 = [5 x i8] c"%i |\00"
@.str.12 = [7 x i8] c"%i: %i\00"
@.str.13 = [4 x i8] c" %i\00"
@.str.14 = [2 x i8] c"\0A\00"
@.str.15 = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.16 = [31 x i8] c"Vertice removido com sucesso!\0A\00"
define i32 @submenu(i32** %0, i32 %1, i32 %2, i32 %3) {
%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
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8
%21 = alloca i32
%22 = alloca i32*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32*
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32*
store i32** %0, i32*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 1, i32* %17
store i32 0, i32* %19
%35 = load i32*, i32** %10
%36 = icmp ne i32* %35, null
br i1 %36, label %39, label %37
37: ; preds = %4
%38 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %93
39: ; preds = %4
%40 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%41 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%44 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%45 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%46 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %11)
%47 = load i32, i32* %11
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %82
49: ; preds = %39
store i32 1, i32* %19
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %12)
%52 = load i32, i32* %12
%53 = add nsw i32 %52, -1
store i32 %53, i32* %12
%54 = load i32, i32* %12
%55 = load i32, i32* %7
%56 = sub nsw i32 %55, 1
%57 = icmp sgt i32 %54, %56
br i1 %57, label %61, label %58
58: ; preds = %49
%59 = load i32, i32* %12
%60 = icmp slt i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %58, %49
%62 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %19
br label %81
63: ; preds = %58
store i32 0, i32* %14
br label %64
64: ; preds = %77, %63
%65 = load i32, i32* %14
%66 = load i32, i32* %8
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %80
68: ; preds = %64
%69 = load i32**, i32*** %6
%70 = load i32, i32* %12
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i32*, i32** %69, i64 %71
%73 = load i32*, i32** %72
%74 = load i32, i32* %14
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %73, i64 %75
store i32 0, i32* %76
br label %77
77: ; preds = %68
%78 = load i32, i32* %14
%79 = add nsw i32 %78, 1
store i32 %79, i32* %14
br label %64
80: ; preds = %64
br label %81
81: ; preds = %80, %61
br label %92
82: ; preds = %39
%83 = load i32, i32* %11
%84 = icmp eq i32 %83, 2
br i1 %84, label %85, label %86
85: ; preds = %82
store i32 1, i32* %19
br label %91
86: ; preds = %82
%87 = load i32, i32* %11
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %86
store i32 0, i32* %5
br label %555
90: ; preds = %86
br label %91
91: ; preds = %90, %85
br label %92
92: ; preds = %91, %81
br label %93
93: ; preds = %92, %37
%94 = load i32, i32* %19
%95 = icmp eq i32 %94, 1
br i1 %95, label %96, label %551
96: ; preds = %93
%97 = call i32 (...) @limpa()
%98 = load i32, i32* %9
%99 = icmp eq i32 %98, 1
br i1 %99, label %100, label %186
100: ; preds = %96
%101 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
store i32* %101, i32** %10
store i32 0, i32* %14
br label %102
102: ; preds = %180, %100
%103 = load i32, i32* %14
%104 = load i32, i32* %7
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %183
106: ; preds = %102
store i32 0, i32* %15
br label %107
107: ; preds = %175, %106
%108 = load i32, i32* %15
%109 = load i32, i32* %8
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %178
111: ; preds = %107
%112 = load i32**, i32*** %6
%113 = load i32, i32* %14
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i32*, i32** %112, i64 %114
%116 = load i32*, i32** %115
%117 = load i32, i32* %15
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %116, i64 %118
%120 = load i32, i32* %119
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %120)
%122 = load i32**, i32*** %6
%123 = load i32, i32* %14
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i32*, i32** %122, i64 %124
%126 = load i32*, i32** %125
%127 = load i32, i32* %15
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %165
132: ; preds = %111
%133 = load i32, i32* %17
%134 = icmp eq i32 %133, 1
br i1 %134, label %135, label %142
135: ; preds = %132
%136 = load i32*, i32** %10
%137 = load i32, i32* %14
%138 = add nsw i32 %137, 1
%139 = load i32, i32* %15
%140 = add nsw i32 %139, 1
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %138, i32 %140)
store i32 0, i32* %17
br label %164
142: ; preds = %132
store i32 0, i32* %16
br label %143
143: ; preds = %160, %142
%144 = load i32, i32* %16
%145 = load i32**, i32*** %6
%146 = load i32, i32* %14
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32*, i32** %145, i64 %147
%149 = load i32*, i32** %148
%150 = load i32, i32* %15
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i32, i32* %149, i64 %151
%153 = load i32, i32* %152
%154 = icmp slt i32 %144, %153
br i1 %154, label %155, label %163
155: ; preds = %143
%156 = load i32*, i32** %10
%157 = load i32, i32* %15
%158 = add nsw i32 %157, 1
%159 = call i32 (i32*, i8*, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %158)
br label %160
160: ; preds = %155
%161 = load i32, i32* %16
%162 = add nsw i32 %161, 1
store i32 %162, i32* %16
br label %143
163: ; preds = %143
br label %164
164: ; preds = %163, %135
br label %165
165: ; preds = %164, %111
%166 = load i32, i32* %15
%167 = load i32, i32* %8
%168 = sub nsw i32 %167, 1
%169 = icmp eq i32 %166, %168
br i1 %169, label %170, label %174
170: ; preds = %165
%171 = load i32*, i32** %10
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %171, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%173 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %17
br label %174
174: ; preds = %170, %165
br label %175
175: ; preds = %174
%176 = load i32, i32* %15
%177 = add nsw i32 %176, 1
store i32 %177, i32* %15
br label %107
178: ; preds = %107
%179 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %180
180: ; preds = %178
%181 = load i32, i32* %14
%182 = add nsw i32 %181, 1
store i32 %182, i32* %14
br label %102
183: ; preds = %102
%184 = load i32*, i32** %10
%185 = call i32 @fclose(i32* %184)
br label %550
186: ; preds = %96
%187 = load i32, i32* %9
%188 = icmp eq i32 %187, 2
br i1 %188, label %189, label %355
189: ; preds = %186
%190 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
store i32* %190, i32** %10
store i32 0, i32* %21
store i32 0, i32* %23
store i32 0, i32* %25
store i32 0, i32* %26
store i32 0, i32* %27
%191 = call i64 @malloc(i32 4)
%192 = inttoptr i64 %191 to i32*
store i32* %192, i32** %22
%193 = load i32*, i32** %10
%194 = icmp ne i32* %193, null
br i1 %194, label %195, label %241
195: ; preds = %189
br label %196
196: ; preds = %239, %195
%197 = load i32*, i32** %10
%198 = call signext i8 @fgetc(i32* %197)
store i8 %198, i8* %20
%199 = sext i8 %198 to i32
%200 = load i8, i8* @EOF
%201 = sext i8 %200 to i32
%202 = icmp ne i32 %199, %201
br i1 %202, label %203, label %240
203: ; preds = %196
%204 = load i8, i8* %20
%205 = sext i8 %204 to i32
%206 = icmp ne i32 %205, 58
br i1 %206, label %207, label %218
207: ; preds = %203
%208 = load i8, i8* %20
%209 = sext i8 %208 to i32
%210 = icmp ne i32 %209, 32
br i1 %210, label %211, label %218
211: ; preds = %207
%212 = load i8, i8* %20
%213 = sext i8 %212 to i32
%214 = icmp ne i32 %213, 10
br i1 %214, label %215, label %218
215: ; preds = %211
%216 = load i32, i32* %21
%217 = add nsw i32 %216, 1
store i32 %217, i32* %21
br label %218
218: ; preds = %215, %211, %207, %203
%219 = load i8, i8* %20
%220 = sext i8 %219 to i32
%221 = icmp eq i32 %220, 10
br i1 %221, label %222, label %239
222: ; preds = %218
%223 = load i32, i32* %23
%224 = add nsw i32 %223, 1
store i32 %224, i32* %23
%225 = load i32*, i32** %22
%226 = load i32, i32* %23
%227 = sext i32 %226 to i64
%228 = mul i64 4, %227
%229 = trunc i64 %228 to i32
%230 = call i64 @realloc(i32* %225, i32 %229)
%231 = inttoptr i64 %230 to i32*
store i32* %231, i32** %22
%232 = load i32, i32* %21
%233 = sub nsw i32 %232, 1
%234 = load i32*, i32** %22
%235 = load i32, i32* %23
%236 = sub nsw i32 %235, 1
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds i32, i32* %234, i64 %237
store i32 %233, i32* %238
store i32 0, i32* %21
br label %239
239: ; preds = %222, %218
br label %196
240: ; preds = %196
br label %241
241: ; preds = %240, %189
%242 = load i32*, i32** %10
%243 = call i32 @fclose(i32* %242)
%244 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
store i32* %244, i32** %10
%245 = load i32*, i32** %10
%246 = icmp ne i32* %245, null
br i1 %246, label %247, label %352
247: ; preds = %241
store i32 0, i32* %24
br label %248
248: ; preds = %271, %247
%249 = load i32, i32* %24
%250 = load i32, i32* %23
%251 = icmp slt i32 %249, %250
br i1 %251, label %252, label %274
252: ; preds = %248
%253 = load i32*, i32** %22
%254 = load i32, i32* %24
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds i32, i32* %253, i64 %255
%257 = load i32, i32* %256
%258 = load i32, i32* %27
%259 = add nsw i32 %258, %257
store i32 %259, i32* %27
%260 = load i32, i32* %27
%261 = load i32, i32* %12
%262 = icmp sgt i32 %260, %261
br i1 %262, label %263, label %270
263: ; preds = %252
%264 = load i32*, i32** %22
%265 = load i32, i32* %24
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds i32, i32* %264, i64 %266
%268 = load i32, i32* %267
%269 = add nsw i32 %268, -1
store i32 %269, i32* %267
br label %274
270: ; preds = %252
br label %271
271: ; preds = %270
%272 = load i32, i32* %24
%273 = add nsw i32 %272, 1
store i32 %273, i32* %24
br label %248
274: ; preds = %263, %248
store i32 0, i32* %24
br label %275
275: ; preds = %348, %274
%276 = load i32, i32* %24
%277 = load i32, i32* %7
%278 = icmp slt i32 %276, %277
br i1 %278, label %279, label %351
279: ; preds = %275
store i32 0, i32* %15
br label %280
280: ; preds = %330, %279
%281 = load i32, i32* %15
%282 = load i32, i32* %8
%283 = icmp slt i32 %281, %282
br i1 %283, label %284, label %333
284: ; preds = %280
%285 = load i32**, i32*** %6
%286 = load i32, i32* %24
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds i32*, i32** %285, i64 %287
%289 = load i32*, i32** %288
%290 = load i32, i32* %15
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds i32, i32* %289, i64 %291
%293 = load i32, i32* %292
%294 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %293)
%295 = load i32, i32* %15
%296 = load i32, i32* %25
%297 = icmp ne i32 %295, %296
br i1 %297, label %298, label %329
298: ; preds = %284
%299 = load i32**, i32*** %6
%300 = load i32, i32* %24
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds i32*, i32** %299, i64 %301
%303 = load i32*, i32** %302
%304 = load i32, i32* %15
%305 = sext i32 %304 to i64
%306 = getelementptr inbounds i32, i32* %303, i64 %305
%307 = load i32, i32* %306
%308 = icmp eq i32 %307, 1
br i1 %308, label %309, label %329
309: ; preds = %298
%310 = load i32, i32* %17
%311 = icmp eq i32 %310, 1
br i1 %311, label %312, label %321
312: ; preds = %309
%313 = load i32*, i32** %10
%314 = load i32, i32* %25
%315 = add nsw i32 %314, 1
%316 = load i32, i32* %15
%317 = add nsw i32 %316, 1
%318 = call i32 (i32*, i8*, ...) @fprintf(i32* %313, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %315, i32 %317)
store i32 0, i32* %17
%319 = load i32, i32* %26
%320 = add nsw i32 %319, 1
store i32 %320, i32* %26
br label %328
321: ; preds = %309
%322 = load i32*, i32** %10
%323 = load i32, i32* %15
%324 = add nsw i32 %323, 1
%325 = call i32 (i32*, i8*, ...) @fprintf(i32* %322, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %324)
%326 = load i32, i32* %26
%327 = add nsw i32 %326, 1
store i32 %327, i32* %26
br label %328
328: ; preds = %321, %312
br label %329
329: ; preds = %328, %298, %284
br label %330
330: ; preds = %329
%331 = load i32, i32* %15
%332 = add nsw i32 %331, 1
store i32 %332, i32* %15
br label %280
333: ; preds = %280
%334 = load i32, i32* %26
%335 = load i32*, i32** %22
%336 = load i32, i32* %25
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds i32, i32* %335, i64 %337
%339 = load i32, i32* %338
%340 = icmp eq i32 %334, %339
br i1 %340, label %341, label %347
341: ; preds = %333
%342 = load i32, i32* %25
%343 = add nsw i32 %342, 1
store i32 %343, i32* %25
%344 = load i32*, i32** %10
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %344, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%346 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %17
store i32 0, i32* %26
br label %347
347: ; preds = %341, %333
br label %348
348: ; preds = %347
%349 = load i32, i32* %24
%350 = add nsw i32 %349, 1
store i32 %350, i32* %24
br label %275
351: ; preds = %275
br label %352
352: ; preds = %351, %241
%353 = load i32*, i32** %10
%354 = call i32 @fclose(i32* %353)
br label %549
355: ; preds = %186
%356 = load i32, i32* %9
%357 = icmp eq i32 %356, 3
br i1 %357, label %358, label %548
358: ; preds = %355
%359 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
store i32* %359, i32** %10
store i32 0, i32* %28
store i32 0, i32* %30
store i32 0, i32* %31
store i32 0, i32* %32
store i32 0, i32* %33
%360 = call i64 @malloc(i32 4)
%361 = inttoptr i64 %360 to i32*
store i32* %361, i32** %29
%362 = call i64 @malloc(i32 4)
%363 = inttoptr i64 %362 to i32*
store i32* %363, i32** %34
store i32 1, i32* %17
%364 = load i32*, i32** %10
%365 = icmp ne i32* %364, null
br i1 %365, label %366, label %432
366: ; preds = %358
br label %367
367: ; preds = %430, %366
%368 = load i32*, i32** %10
%369 = call signext i8 @fgetc(i32* %368)
store i8 %369, i8* %20
%370 = sext i8 %369 to i32
%371 = load i8, i8* @EOF
%372 = sext i8 %371 to i32
%373 = icmp ne i32 %370, %372
br i1 %373, label %374, label %431
374: ; preds = %367
%375 = load i8, i8* %20
%376 = sext i8 %375 to i32
%377 = icmp ne i32 %376, 58
br i1 %377, label %378, label %402
378: ; preds = %374
%379 = load i8, i8* %20
%380 = sext i8 %379 to i32
%381 = icmp ne i32 %380, 32
br i1 %381, label %382, label %402
382: ; preds = %378
%383 = load i8, i8* %20
%384 = sext i8 %383 to i32
%385 = icmp ne i32 %384, 10
br i1 %385, label %386, label %402
386: ; preds = %382
%387 = load i32, i32* %17
%388 = icmp eq i32 %387, 1
br i1 %388, label %389, label %399
389: ; preds = %386
%390 = load i8, i8* %20
%391 = sext i8 %390 to i32
store i32 %391, i32* %32
%392 = load i32, i32* %32
%393 = sub nsw i32 %392, 48
store i32 %393, i32* %32
%394 = load i32, i32* %32
%395 = load i32*, i32** %34
%396 = load i32, i32* %30
%397 = sext i32 %396 to i64
%398 = getelementptr inbounds i32, i32* %395, i64 %397
store i32 %394, i32* %398
store i32 0, i32* %32
store i32 0, i32* %17
br label %399
399: ; preds = %389, %386
%400 = load i32, i32* %28
%401 = add nsw i32 %400, 1
store i32 %401, i32* %28
br label %402
402: ; preds = %399, %382, %378, %374
%403 = load i8, i8* %20
%404 = sext i8 %403 to i32
%405 = icmp eq i32 %404, 10
br i1 %405, label %406, label %430
406: ; preds = %402
%407 = load i32, i32* %30
%408 = add nsw i32 %407, 1
store i32 %408, i32* %30
%409 = load i32*, i32** %34
%410 = load i32, i32* %30
%411 = sext i32 %410 to i64
%412 = mul i64 4, %411
%413 = trunc i64 %412 to i32
%414 = call i64 @realloc(i32* %409, i32 %413)
%415 = inttoptr i64 %414 to i32*
store i32* %415, i32** %34
%416 = load i32*, i32** %29
%417 = load i32, i32* %30
%418 = sext i32 %417 to i64
%419 = mul i64 4, %418
%420 = trunc i64 %419 to i32
%421 = call i64 @realloc(i32* %416, i32 %420)
%422 = inttoptr i64 %421 to i32*
store i32* %422, i32** %29
%423 = load i32, i32* %28
%424 = sub nsw i32 %423, 1
%425 = load i32*, i32** %29
%426 = load i32, i32* %30
%427 = sub nsw i32 %426, 1
%428 = sext i32 %427 to i64
%429 = getelementptr inbounds i32, i32* %425, i64 %428
store i32 %424, i32* %429
store i32 0, i32* %28
store i32 1, i32* %17
br label %430
430: ; preds = %406, %402
br label %367
431: ; preds = %367
br label %432
432: ; preds = %431, %358
%433 = load i32*, i32** %10
%434 = call i32 @fclose(i32* %433)
%435 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
store i32* %435, i32** %10
%436 = load i32*, i32** %10
%437 = icmp ne i32* %436, null
br i1 %437, label %438, label %545
438: ; preds = %432
store i32 0, i32* %14
br label %439
439: ; preds = %462, %438
%440 = load i32, i32* %14
%441 = load i32, i32* %30
%442 = icmp slt i32 %440, %441
br i1 %442, label %443, label %465
443: ; preds = %439
%444 = load i32*, i32** %29
%445 = load i32, i32* %14
%446 = sext i32 %445 to i64
%447 = getelementptr inbounds i32, i32* %444, i64 %446
%448 = load i32, i32* %447
%449 = load i32, i32* %33
%450 = add nsw i32 %449, %448
store i32 %450, i32* %33
%451 = load i32, i32* %33
%452 = load i32, i32* %12
%453 = icmp sgt i32 %451, %452
br i1 %453, label %454, label %461
454: ; preds = %443
%455 = load i32*, i32** %29
%456 = load i32, i32* %14
%457 = sext i32 %456 to i64
%458 = getelementptr inbounds i32, i32* %455, i64 %457
%459 = load i32, i32* %458
%460 = add nsw i32 %459, -1
store i32 %460, i32* %458
br label %465
461: ; preds = %443
br label %462
462: ; preds = %461
%463 = load i32, i32* %14
%464 = add nsw i32 %463, 1
store i32 %464, i32* %14
br label %439
465: ; preds = %454, %439
store i32 0, i32* %14
br label %466
466: ; preds = %541, %465
%467 = load i32, i32* %14
%468 = load i32, i32* %7
%469 = icmp slt i32 %467, %468
br i1 %469, label %470, label %544
470: ; preds = %466
store i32 0, i32* %15
br label %471
471: ; preds = %524, %470
%472 = load i32, i32* %15
%473 = load i32, i32* %8
%474 = icmp slt i32 %472, %473
br i1 %474, label %475, label %527
475: ; preds = %471
%476 = load i32, i32* %15
%477 = load i32**, i32*** %6
%478 = load i32, i32* %14
%479 = sext i32 %478 to i64
%480 = getelementptr inbounds i32*, i32** %477, i64 %479
%481 = load i32*, i32** %480
%482 = load i32, i32* %15
%483 = sext i32 %482 to i64
%484 = getelementptr inbounds i32, i32* %481, i64 %483
%485 = load i32, i32* %484
%486 = icmp eq i32 %485, 1
%487 = zext i1 %486 to i32
%488 = icmp ne i32 %476, %487
br i1 %488, label %489, label %523
489: ; preds = %475
%490 = load i32**, i32*** %6
%491 = load i32, i32* %14
%492 = sext i32 %491 to i64
%493 = getelementptr inbounds i32*, i32** %490, i64 %492
%494 = load i32*, i32** %493
%495 = load i32, i32* %15
%496 = sext i32 %495 to i64
%497 = getelementptr inbounds i32, i32* %494, i64 %496
%498 = load i32, i32* %497
%499 = icmp eq i32 %498, -1
br i1 %499, label %500, label %523
500: ; preds = %489
%501 = load i32, i32* %17
%502 = icmp eq i32 %501, 1
br i1 %502, label %503, label %515
503: ; preds = %500
%504 = load i32*, i32** %10
%505 = load i32*, i32** %34
%506 = load i32, i32* %31
%507 = sext i32 %506 to i64
%508 = getelementptr inbounds i32, i32* %505, i64 %507
%509 = load i32, i32* %508
%510 = load i32, i32* %15
%511 = add nsw i32 %510, 1
%512 = call i32 (i32*, i8*, ...) @fprintf(i32* %504, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %509, i32 %511)
store i32 0, i32* %17
%513 = load i32, i32* %32
%514 = add nsw i32 %513, 1
store i32 %514, i32* %32
br label %522
515: ; preds = %500
%516 = load i32*, i32** %10
%517 = load i32, i32* %15
%518 = add nsw i32 %517, 1
%519 = call i32 (i32*, i8*, ...) @fprintf(i32* %516, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %518)
%520 = load i32, i32* %32
%521 = add nsw i32 %520, 1
store i32 %521, i32* %32
br label %522
522: ; preds = %515, %503
br label %523
523: ; preds = %522, %489, %475
br label %524
524: ; preds = %523
%525 = load i32, i32* %15
%526 = add nsw i32 %525, 1
store i32 %526, i32* %15
br label %471
527: ; preds = %471
%528 = load i32, i32* %32
%529 = load i32*, i32** %29
%530 = load i32, i32* %31
%531 = sext i32 %530 to i64
%532 = getelementptr inbounds i32, i32* %529, i64 %531
%533 = load i32, i32* %532
%534 = icmp eq i32 %528, %533
br i1 %534, label %535, label %540
535: ; preds = %527
%536 = load i32, i32* %31
%537 = add nsw i32 %536, 1
store i32 %537, i32* %31
%538 = load i32*, i32** %10
%539 = call i32 (i32*, i8*, ...) @fprintf(i32* %538, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %17
store i32 0, i32* %32
br label %540
540: ; preds = %535, %527
br label %541
541: ; preds = %540
%542 = load i32, i32* %14
%543 = add nsw i32 %542, 1
store i32 %543, i32* %14
br label %466
544: ; preds = %466
br label %545
545: ; preds = %544, %432
%546 = load i32*, i32** %10
%547 = call i32 @fclose(i32* %546)
br label %548
548: ; preds = %545, %355
br label %549
549: ; preds = %548, %352
br label %550
550: ; preds = %549, %183
br label %551
551: ; preds = %550, %93
%552 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0))
%553 = call i32 (...) @getchar()
%554 = call i32 @sleep(i32 1)
store i32 0, i32* %5
br label %555
555: ; preds = %551, %89
%556 = load i32, i32* %5
ret i32 %556
}

LLVM IR (-O2):
@.str = [30 x i8] c"Erro na abertura do arquivo!\0A\00"
@EOF = global i8 0
@.str.16 = [31 x i8] c"Vertice removido com sucesso!\0A\00"
define i32 @submenu(i32** nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0))
%7 = tail call i32 (...) @getchar()
%8 = tail call i32 @sleep(i32 1)
ret i32 0
}