#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 */
int Carregador(char *, char *);
int /*<<< orphan*/ Estatistica();
int /*<<< orphan*/ ExtrairCaminho(char *, char *);
int /*<<< orphan*/ ExtrairNome(char *, char *);
int InterpretaAlvo(char *);
int /*<<< orphan*/ PrintMem(int *);
int Processador(int, int /*<<< orphan*/ *, int, int, int, int *);
scalar_t__ Tradutor(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char getc(int /*<<< orphan*/);
int getopt(int, char **, char *);
char *optarg;
scalar_t__ opterr;
int optind;
char optopt;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
long strtol(char *, char **, int);
int main(int argc, char **argv) {
  int flagS = 0, flagR = 0, flagL = 0, flagM = 0, flagP = 0, flagErro = 0,
      flagHelp = 0;
  int valorM;
  int valorP[2];
  int opcao;
  opterr = 0;
  while ((opcao = getopt(argc, argv, "hsrlm:p:")) != -1) {
    long int valor1 = 0, valor2 = 0;
    char *auxptr;
    switch (opcao) {
    case 'h':
      flagHelp = 1;
      break;
    case 's':
      flagS = 1;
      break;
    case 'r':
      flagR = 1;
      break;
    case 'l':
      flagL = 1;
      break;
    case 'm':
      valor1 = strtol(optarg, &auxptr, 10);
      if (strcmp(auxptr, "") != 0) {
        fprintf(stderr, "Erro: Valor de memória inválido\n");
        flagErro = 1;
      } else if (valor1 < 1) {
        fprintf(stderr, "Erro: O valor de memória mínimo é 1\n");
        flagErro = 1;
      } else if (valor1 > 4096) {
        fprintf(stderr, "Erro: O valor de memória máximo é 4096\n");
        flagErro = 1;
      } else {
        valorM = valor1;
        flagM = 1;
      }
      break;
    case 'p':
      valor1 = strtol(optarg, &auxptr, 10);
      if (strcmp(auxptr, "") == 0) {
        fprintf(stderr, "Erro: Apenas um valor foi especificado em -p\n");
        fprintf(stderr,
                " *Use -p valor1/valor1 para observar um único endereço\n");
        flagErro = 1;
      } else if (auxptr[0] != '/') {
        fprintf(stderr,
                "Erro: Os valores em -p devem ser separados por \"/\"\n");
        flagErro = 1;
      } else {
        auxptr++;
        valor2 = strtol(auxptr, &auxptr, 10);
        if (strcmp(auxptr, "") != 0) {
          fprintf(stderr, "Erro: Valor inválido no argumento de -p\n");
          flagErro = 1;
        } else {
          if ((valor1 > -1) && (valor1 < 4096) && (valor2 < 4096)) {
            if (valor1 <= valor2) {
              valorP[0] = valor1;
              valorP[1] = valor2;
              flagP = 1;
            } else {
              fprintf(
                  stderr,
                  "Erro: Os valores em -p devem estar em ordem crescente\n");
              flagErro = 1;
            }
          } else {
            fprintf(stderr, "Erro: O intervalo especificado em -p ultrapassa "
                            "os limites da memória\n");
            flagErro = 1;
          }
        }
      }
      break;
    case '?':
      if (optopt == 'm') {
        fprintf(stderr, "Erro: Falta o argumento para -m\n");
        fprintf(stderr, "Uso: -m <valor>\n");
        flagErro = 1;
      } else if (optopt == 'p') {
        fprintf(stderr, "Erro: Falta o argumento para -p\n");
        fprintf(stderr, "Uso: -p <valor1/valor2>\n");
        flagErro = 1;
      } else {
        fprintf(stderr, "Erro: Opção -%c desconhecida\n", optopt);
        fprintf(stderr, "Use -h para obter ajuda\n");
        flagErro = 1;
      }
      break;
    default:
      fprintf(stderr, "Johnny, la gente esta muy loca!\n");
      flagErro = 1;
    }
  }
  char *nomeArquivoFull;
  char nomeArquivo[100] = "";
  char caminhoArquivo[100] = "";
  if (argc > (optind + 1)) {
    fprintf(stderr, "Erro: Há mais parametros que o esperado\n");
    fprintf(stderr, "Uso: iasmas [opções] <arquivo>\n");
    flagErro = 1;
  } else if (argc == optind) {
    if (flagErro == 0) {
      if (flagHelp == 0) {
        fprintf(stderr, "Erro: Falta o nome do arquivo alvo\n");
        fprintf(stderr, "Uso: iasmas [opções] <arquivo>\n");
        flagErro = 1;
      }
    }
  } else {
    nomeArquivoFull = argv[optind];
    if (InterpretaAlvo(nomeArquivoFull) == 0) {
      fprintf(stderr, "Erro: O arquivo especificado não é válido\n");
      flagErro = 1;
    } else if (InterpretaAlvo(nomeArquivoFull) == 1) {
      ExtrairNome(nomeArquivoFull, nomeArquivo);
    } else if (InterpretaAlvo(nomeArquivoFull) == 2) {
      ExtrairCaminho(nomeArquivoFull, caminhoArquivo);
      ExtrairNome(nomeArquivoFull, nomeArquivo);
    }
  }
  if (flagHelp) {
    printf("Uso: iasmas [opçoes] arquivo\n");
    printf("Opções:\n");
    printf(" -h                  Exibe esta informação\n");
    printf(" -s                  Reduz a quantidade de informações durante a "
           "execução\n");
    printf(" -l                  Grava as informações sobre a execução em um "
           "arquivo de texto\n");
    printf(" -r                  Mostra o estado de todos os registradores a "
           "cada ciclo\n");
    printf(" -m <valor>          Define o tamanho da memória acessível (0 a "
           "4096)\n");
    printf(" -p <valor1.valor2>  Define um intervalo de memória que será "
           "exibido constantemente\n\n");
    printf("Atenção:\n");
    printf(" A opção -m não afeta os valores permitidos em -p\n");
    printf(" A opção -s anula a opção -r\n");
    return 0;
  }
  if (flagErro) {
    fprintf(stderr, "Execução abortada!\n");
    return 1;
  }
  if (flagS && flagR)
    flagR = 0;
  printf("Condições de simulação:\n");
  printf("\tCaminho de trabalho:   %s\n", caminhoArquivo);
  printf("\tCódigo fonte:          %s.ias\n", nomeArquivo);
  printf("\tCódigo objeto:         %s.hex\n", nomeArquivo);
  if (flagL)
    printf("\tArquivo de log:        %s.log\n", nomeArquivo);
  printf("\n");
  if (flagM)
    printf("\tA memória será limitada a %d endereços\n", valorM);
  if (flagP)
    printf("\tO conteúdo da memória nos endereços %d a %d será monitorado\n",
           valorP[0], valorP[1]);
  if (flagS)
    printf("\tSerá exibido o mínimo de informações durante a execução\n");
  if (flagR)
    printf("\tSerão exibidas informações detalhadas durante a execução\n");
  printf("Continuar? [s/n] ");
  char resposta = getc(stdin);
  if ((resposta == 'n') || (resposta == 'N')) {
    printf("\n#partiu\n");
    printf("Execução cancelada pelo usuário!\n");
    return 0;
  } else if ((resposta == 's') || (resposta == 'S')) {
    printf("\nIniciando geração do código objeto...\n");
    if (Tradutor(caminhoArquivo, nomeArquivo) == 0) {
      fprintf(stderr, "Ocorreram erros durante o processo de "
                      "tradução.\nExecução abortada!\n");
      return 1;
    } else
      printf("Arquivo objeto criado com sucesso!\n\n");
  } else {
    printf("\nNenhuma resposta foi fornecida.\n");
    printf("Execução cancelada!\n");
    return 0;
  }
  printf("\nCarregando dados na memoria...\n");
  int inicioPrograma = Carregador(caminhoArquivo, nomeArquivo);
  if (inicioPrograma == -1) {
    fprintf(stderr, "Ocorreram erros durante o carregamento.\n");
    return 1;
  } else {
    printf("Programa carregado com sucesso!\n");
    printf("Iniciando execução...\n\n");
    FILE *logfile;
    if (flagL) {
      char nomeArquivoLog[100] = "";
      strcat(nomeArquivoLog, caminhoArquivo);
      strcat(nomeArquivoLog, nomeArquivo);
      strcat(nomeArquivoLog, ".log");
      logfile = fopen(nomeArquivoLog, "w");
      if (logfile == NULL) {
        fprintf(
            stderr,
            "Erro: Arquivo \"%s\" não pôde ser criado!\nExecução abortada!\n",
            nomeArquivoLog);
        return 1;
      }
    } else
      logfile = NULL;
    int resultadoSim =
        Processador(inicioPrograma, logfile, flagS, flagR, flagP, valorP);
    if (resultadoSim == 0) {
      fprintf(stderr, "Simulação finalizada devido a erros!\n");
      return 1;
    } else {
      if ((flagP) && (flagS))
        PrintMem(valorP);
      printf("Simulação completa!\n\n");
      Estatistica();
      return 0;
    }
    if (logfile != NULL)
      fclose(logfile);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    0x2d57(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe5e(%rip),%rdx
call   10f0 <getopt@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0xffffffff,%eax
je     1674 <main+0x464>
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x1d0(%rbp)
sub    $0x34,%eax
ja     1651 <main+0x441>
mov    -0x1d0(%rbp),%rax
lea    0xd43(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x2c(%rbp)
jmp    166f <main+0x45f>
movl   $0x1,-0x14(%rbp)
jmp    166f <main+0x45f>
movl   $0x1,-0x18(%rbp)
jmp    166f <main+0x45f>
movl   $0x1,-0x1c(%rbp)
jmp    166f <main+0x45f>
mov    0x2cfb(%rip),%rax
mov    (%rax),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0x48(%rbp)
mov    -0x58(%rbp),%rdi
lea    0x16d5(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     134e <main+0x13e>
mov    0x2c8e(%rip),%rax
mov    (%rax),%edi
lea    0xda2(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    13c5 <main+0x1b5>
cmpq   $0x1,-0x48(%rbp)
jge    137c <main+0x16c>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
lea    0xd97(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    13c0 <main+0x1b0>
cmpq   $0x1000,-0x48(%rbp)
jle    13ad <main+0x19d>
mov    0x2c2f(%rip),%rax
mov    (%rax),%edi
lea    0xd8e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    13bb <main+0x1ab>
mov    -0x48(%rbp),%rax
mov    %eax,-0x30(%rbp)
movl   $0x1,-0x20(%rbp)
jmp    13c0 <main+0x1b0>
jmp    13c5 <main+0x1b5>
jmp    166f <main+0x45f>
mov    0x2c27(%rip),%rax
mov    (%rax),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0x48(%rbp)
mov    -0x58(%rbp),%rdi
lea    0x1601(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1439 <main+0x229>
mov    0x2bba(%rip),%rax
mov    (%rax),%edi
lea    0xd44(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2ba3(%rip),%rax
mov    (%rax),%edi
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    1569 <main+0x359>
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     146c <main+0x25c>
mov    0x2b70(%rip),%rax
mov    (%rax),%edi
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    1564 <main+0x354>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rdi
lea    0x1559(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     14ca <main+0x2ba>
mov    0x2b12(%rip),%rax
mov    (%rax),%edi
lea    0xd38(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    155f <main+0x34f>
cmpq   $0xffffffffffffffff,-0x48(%rbp)
jle    153c <main+0x32c>
cmpq   $0x1000,-0x48(%rbp)
jge    153c <main+0x32c>
cmpq   $0x1000,-0x50(%rbp)
jge    153c <main+0x32c>
mov    -0x48(%rbp),%rax
cmp    -0x50(%rbp),%rax
jg     1519 <main+0x309>
mov    -0x48(%rbp),%rax
mov    %eax,-0x38(%rbp)
mov    -0x50(%rbp),%rax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    1537 <main+0x327>
mov    0x2aa0(%rip),%rax
mov    (%rax),%edi
lea    0xcf0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    155a <main+0x34a>
mov    0x2a7d(%rip),%rax
mov    (%rax),%edi
lea    0xd04(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    155f <main+0x34f>
jmp    1564 <main+0x354>
jmp    1569 <main+0x359>
jmp    166f <main+0x45f>
mov    0x2a63(%rip),%rax
movsbl (%rax),%eax
cmp    $0x6d,%eax
jne    15bb <main+0x3ab>
mov    0x2a38(%rip),%rax
mov    (%rax),%edi
lea    0xd07(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2a21(%rip),%rax
mov    (%rax),%edi
lea    0xd11(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    164c <main+0x43c>
mov    0x2a16(%rip),%rax
movsbl (%rax),%eax
cmp    $0x70,%eax
jne    1608 <main+0x3f8>
mov    0x29eb(%rip),%rax
mov    (%rax),%edi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x29d4(%rip),%rax
mov    (%rax),%edi
lea    0xcf6(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    1647 <main+0x437>
mov    0x29b1(%rip),%rax
mov    (%rax),%edi
mov    0x29c0(%rip),%rax
movsbl (%rax),%edx
lea    0xce2(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2990(%rip),%rax
mov    (%rax),%edi
lea    0xceb(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    164c <main+0x43c>
jmp    166f <main+0x45f>
mov    0x2968(%rip),%rax
mov    (%rax),%edi
lea    0xcdc(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    1268 <main+0x58>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%eax
mov    0x292c(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    16eb <main+0x4db>
mov    0x2908(%rip),%rax
mov    (%rax),%edi
lea    0xc9d(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x28f1(%rip),%rax
mov    (%rax),%edi
lea    0xcb0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    1808 <main+0x5f8>
mov    -0x8(%rbp),%eax
mov    0x28db(%rip),%rcx
cmp    (%rcx),%eax
jne    1750 <main+0x540>
cmpl   $0x0,-0x28(%rbp)
jne    174b <main+0x53b>
cmpl   $0x0,-0x2c(%rbp)
jne    1746 <main+0x536>
mov    0x28a8(%rip),%rax
mov    (%rax),%edi
lea    0xc89(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2891(%rip),%rax
mov    (%rax),%edi
lea    0xc50(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    174b <main+0x53b>
jmp    1803 <main+0x5f3>
mov    -0x10(%rbp),%rax
mov    0x2875(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
call   1110 <InterpretaAlvo@plt>
cmp    $0x0,%eax
jne    179b <main+0x58b>
mov    0x2841(%rip),%rax
mov    (%rax),%edi
lea    0xc46(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x28(%rbp)
jmp    17fe <main+0x5ee>
mov    -0x60(%rbp),%rdi
call   1110 <InterpretaAlvo@plt>
cmp    $0x1,%eax
jne    17c2 <main+0x5b2>
mov    -0x60(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   10b0 <ExtrairNome@plt>
jmp    17f9 <main+0x5e9>
mov    -0x60(%rbp),%rdi
call   1110 <InterpretaAlvo@plt>
cmp    $0x2,%eax
jne    17f4 <main+0x5e4>
mov    -0x60(%rbp),%rdi
lea    -0x140(%rbp),%rsi
call   1070 <ExtrairCaminho@plt>
mov    -0x60(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   10b0 <ExtrairNome@plt>
jmp    17f9 <main+0x5e9>
jmp    17fe <main+0x5ee>
jmp    1803 <main+0x5f3>
jmp    1808 <main+0x5f8>
cmpl   $0x0,-0x2c(%rbp)
je     18b8 <main+0x6a8>
lea    0xbe3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
cmpl   $0x0,-0x28(%rbp)
je     18e5 <main+0x6d5>
mov    0x26f7(%rip),%rax
mov    (%rax),%edi
lea    0x10cb(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
cmpl   $0x0,-0x14(%rbp)
je     1900 <main+0x6f0>
cmpl   $0x0,-0x18(%rbp)
je     1900 <main+0x6f0>
movl   $0x0,-0x18(%rbp)
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x140(%rbp),%rsi
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     196c <main+0x75c>
lea    -0xd0(%rbp),%rsi
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
je     1995 <main+0x785>
mov    -0x30(%rbp),%esi
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
je     19b3 <main+0x7a3>
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     19cb <main+0x7bb>
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
je     19e3 <main+0x7d3>
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x25e8(%rip),%rax
mov    (%rax),%edi
call   1120 <getc@plt>
mov    %al,-0x141(%rbp)
movsbl -0x141(%rbp),%eax
cmp    $0x6e,%eax
je     1a25 <main+0x815>
movsbl -0x141(%rbp),%eax
cmp    $0x4e,%eax
jne    1a4d <main+0x83d>
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
movsbl -0x141(%rbp),%eax
cmp    $0x73,%eax
je     1a6d <main+0x85d>
movsbl -0x141(%rbp),%eax
cmp    $0x53,%eax
jne    1ace <main+0x8be>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x140(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1060 <Tradutor@plt>
cmp    $0x0,%rax
jne    1abb <main+0x8ab>
mov    0x2521(%rip),%rax
mov    (%rax),%edi
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1af6 <main+0x8e6>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
jmp    1afb <main+0x8eb>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x140(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   10d0 <Carregador@plt>
mov    %eax,-0x148(%rbp)
cmpl   $0xffffffff,-0x148(%rbp)
jne    1b52 <main+0x942>
mov    0x248a(%rip),%rax
mov    (%rax),%edi
lea    0xdc9(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     1c1b <main+0xa0b>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
lea    -0x1c0(%rbp),%rdi
lea    -0x140(%rbp),%rsi
call   1100 <strcat@plt>
lea    -0x1c0(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1100 <strcat@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xdad(%rip),%rsi
call   1100 <strcat@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xd9f(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x150(%rbp)
cmpq   $0x0,-0x150(%rbp)
jne    1c16 <main+0xa06>
mov    0x23cd(%rip),%rax
mov    (%rax),%edi
lea    -0x1c0(%rbp),%rdx
lea    0xd70(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
jmp    1c26 <main+0xa16>
movq   $0x0,-0x150(%rbp)
mov    -0x148(%rbp),%edi
mov    -0x150(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    -0x38(%rbp),%r9
call   1130 <Processador@plt>
mov    %eax,-0x1c4(%rbp)
cmpl   $0x0,-0x1c4(%rbp)
jne    1c7c <main+0xa6c>
mov    0x2360(%rip),%rax
mov    (%rax),%edi
lea    0xd4a(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1cb5 <main+0xaa5>
cmpl   $0x0,-0x24(%rbp)
je     1c99 <main+0xa89>
cmpl   $0x0,-0x14(%rbp)
je     1c99 <main+0xa89>
lea    -0x38(%rbp),%rdi
call   10e0 <PrintMem@plt>
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Estatistica@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %rsi,%r13
mov    %edi,%r14d
mov    0x2d8a(%rip),%rax
movq   $0x0,(%rax)
lea    0xe98(%rip),%rdx
call   10f0 <getopt@plt>
cmp    $0xffffffff,%eax
je     14f5 <main+0x2e5>
mov    0x2d6f(%rip),%rbp
lea    0xe7c(%rip),%r15
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x10(%rsp)
xor    %r12d,%r12d
movl   $0x0,0x4(%rsp)
movl   $0x0,0x8(%rsp)
jmp    12c3 <main+0xb3>
mov    0x0(%rbp),%edi
lea    0x10a6(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
movl   $0x1,0x4(%rsp)
mov    %r12d,%ebx
mov    %r14d,%edi
mov    %r13,%rsi
mov    %r15,%rdx
call   10f0 <getopt@plt>
mov    %ebx,%r12d
cmp    $0xffffffff,%eax
je     1527 <main+0x317>
add    $0xffffffc1,%eax
cmp    $0x34,%eax
ja     128d <main+0x7d>
mov    $0x1,%ebx
lea    0xd29(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2cf1(%rip),%rax
movsbl (%rax),%edx
cmp    $0x70,%edx
je     13f1 <main+0x1e1>
cmp    $0x6d,%dl
jne    1411 <main+0x201>
mov    0x0(%rbp),%edi
lea    0xf92(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xfa2(%rip),%rsi
jmp    1297 <main+0x87>
movl   $0x1,0xc(%rsp)
jmp    12a6 <main+0x96>
mov    0x2ccb(%rip),%rax
mov    (%rax),%rdi
lea    0x30(%rsp),%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    0x30(%rsp),%rcx
cmpb   $0x0,(%rcx)
je     13cd <main+0x1bd>
mov    0x0(%rbp),%edi
lea    0xd86(%rip),%rsi
jmp    1297 <main+0x87>
mov    0x2c95(%rip),%rax
mov    (%rax),%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,%r15
mov    0x30(%rsp),%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1431 <main+0x221>
test   %al,%al
jne    145d <main+0x24d>
mov    0x0(%rbp),%edi
lea    0xdb6(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xdd3(%rip),%rsi
jmp    1467 <main+0x257>
movl   $0x1,0x14(%rsp)
jmp    12a6 <main+0x96>
movl   $0x1,0x18(%rsp)
jmp    12a6 <main+0x96>
test   %rax,%rax
jle    1485 <main+0x275>
cmp    $0x1001,%rax
jb     14b6 <main+0x2a6>
mov    0x0(%rbp),%edi
lea    0xd3c(%rip),%rsi
jmp    1297 <main+0x87>
mov    0x0(%rbp),%edi
lea    0xecf(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xedf(%rip),%rsi
jmp    1297 <main+0x87>
mov    0x0(%rbp),%edi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xef8(%rip),%rsi
jmp    1297 <main+0x87>
add    $0x1,%rdi
mov    %rdi,0x30(%rsp)
mov    %rbx,%rsi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    0x30(%rsp),%rcx
cmpb   $0x0,(%rcx)
je     1494 <main+0x284>
mov    0x0(%rbp),%edi
lea    0xd94(%rip),%rsi
jmp    1467 <main+0x257>
mov    0x0(%rbp),%edi
lea    0xd54(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
movl   $0x1,0x4(%rsp)
mov    %r12d,%ebx
lea    0xc54(%rip),%r15
jmp    12a9 <main+0x99>
mov    0x0(%rbp),%edi
lea    0xc71(%rip),%rsi
jmp    1297 <main+0x87>
cmp    $0xfff,%r15
ja     14ca <main+0x2ba>
cmp    $0xfff,%rax
jg     14ca <main+0x2ba>
cmp    %rax,%r15
jle    14d6 <main+0x2c6>
mov    0x0(%rbp),%edi
lea    0xd65(%rip),%rsi
jmp    1467 <main+0x257>
movl   $0x1,0x10(%rsp)
mov    %r12d,%ebx
mov    %eax,0x24(%rsp)
jmp    12a9 <main+0x99>
mov    0x0(%rbp),%edi
lea    0xd7c(%rip),%rsi
jmp    1467 <main+0x257>
mov    %r15d,0x28(%rsp)
mov    %eax,0x2c(%rsp)
movl   $0x1,0x8(%rsp)
mov    %eax,0x20(%rsp)
mov    %r15d,%eax
mov    %r15d,0x1c(%rsp)
jmp    1476 <main+0x266>
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %ebx,%ebx
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x18(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x90(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movl   $0x0,0x100(%rsp)
mov    0x2a38(%rip),%rax
movslq (%rax),%rax
lea    0x1(%rax),%ecx
cmp    %r14d,%ecx
jge    15d6 <main+0x3c6>
mov    0x2a16(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xdaa(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xdc3(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%ecx
jmp    1661 <main+0x451>
cmp    %r14d,%eax
jne    1611 <main+0x401>
mov    0x4(%rsp),%ecx
mov    %ecx,%eax
or     %ebx,%eax
jne    1661 <main+0x451>
mov    0x29d4(%rip),%rbx
mov    (%rbx),%edi
lea    0xdb5(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd83(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    16f5 <main+0x4e5>
mov    0x0(%r13,%rax,8),%rbp
mov    %rbp,%rdi
call   1110 <InterpretaAlvo@plt>
test   %eax,%eax
je     1845 <main+0x635>
mov    %rbp,%rdi
call   1110 <InterpretaAlvo@plt>
cmp    $0x1,%eax
je     1650 <main+0x440>
mov    %rbp,%rdi
call   1110 <InterpretaAlvo@plt>
cmp    $0x2,%eax
jne    165d <main+0x44d>
lea    0xa0(%rsp),%rsi
mov    %rbp,%rdi
call   1080 <ExtrairCaminho@plt>
lea    0x30(%rsp),%rsi
mov    %rbp,%rdi
call   10b0 <ExtrairNome@plt>
mov    0x4(%rsp),%ecx
test   %ebx,%ebx
je     16f1 <main+0x4e1>
lea    0x1126(%rip),%rdi
call   1040 <puts@plt>
lea    0x1138(%rip),%rdi
call   1040 <puts@plt>
lea    0x1136(%rip),%rdi
call   1040 <puts@plt>
lea    0x1157(%rip),%rdi
call   1040 <puts@plt>
lea    0x1199(%rip),%rdi
call   1040 <puts@plt>
lea    0x11e3(%rip),%rdi
call   1040 <puts@plt>
lea    0x1223(%rip),%rdi
call   1040 <puts@plt>
lea    0x125f(%rip),%rdi
call   1040 <puts@plt>
lea    0x12aa(%rip),%rdi
call   1040 <puts@plt>
lea    0x12a9(%rip),%rdi
call   1040 <puts@plt>
lea    0x12d2(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
jmp    1711 <main+0x501>
test   %ecx,%ecx
je     1725 <main+0x515>
mov    0x28c4(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
mov    0x14(%rsp),%ecx
test   %ecx,%ecx
mov    %ecx,%r15d
cmovne %eax,%r15d
mov    0x18(%rsp),%ebx
test   %ebx,%ebx
cmove  %ecx,%r15d
lea    0xe95(%rip),%rdi
call   1040 <puts@plt>
lea    0xcab(%rip),%rdi
lea    0xa0(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcb1(%rip),%rdi
lea    0x30(%rsp),%rbp
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcbc(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
je     17a1 <main+0x591>
lea    0xcc5(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x10(%rsp)
mov    0x8(%rsp),%ebp
je     17c8 <main+0x5b8>
lea    0xcbd(%rip),%rdi
mov    0x24(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
je     17e2 <main+0x5d2>
lea    0xcd3(%rip),%rdi
mov    0x1c(%rsp),%esi
mov    0x20(%rsp),%edx
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebx,%ebx
je     17f2 <main+0x5e2>
lea    0xf6a(%rip),%rdi
call   1040 <puts@plt>
test   %r15d,%r15d
je     1803 <main+0x5f3>
lea    0xf1a(%rip),%rdi
call   1040 <puts@plt>
lea    0xcde(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x27c8(%rip),%rax
mov    (%rax),%edi
call   1120 <getc@plt>
and    $0xdf,%al
cmp    $0x53,%al
je     185a <main+0x64a>
cmp    $0x4e,%al
jne    196d <main+0x75d>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb4(%rip),%rdi
jmp    16e8 <main+0x4d8>
mov    0x2774(%rip),%rax
mov    (%rax),%edi
lea    0xb79(%rip),%rsi
jmp    15c5 <main+0x3b5>
lea    0xdcc(%rip),%rdi
call   1040 <puts@plt>
lea    0xa0(%rsp),%rdi
lea    0x30(%rsp),%rsi
call   1070 <Tradutor@plt>
test   %rax,%rax
je     1985 <main+0x775>
lea    0xdcf(%rip),%rdi
call   1040 <puts@plt>
lea    0xde7(%rip),%rdi
call   1040 <puts@plt>
lea    0xa0(%rsp),%rdi
lea    0x30(%rsp),%rsi
call   10d0 <Carregador@plt>
cmp    $0xffffffff,%eax
je     199a <main+0x78a>
mov    %eax,%r14d
lea    0xddd(%rip),%rdi
call   1040 <puts@plt>
lea    0xdf1(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
je     19af <main+0x79f>
xorps  %xmm0,%xmm0
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movl   $0x0,0x170(%rsp)
lea    0x110(%rsp),%rbp
lea    0xa0(%rsp),%rsi
mov    %rbp,%rdi
call   1100 <strcat@plt>
lea    0x30(%rsp),%rsi
mov    %rbp,%rdi
call   1100 <strcat@plt>
lea    0xc27(%rip),%rsi
mov    %rbp,%rdi
call   1100 <strcat@plt>
lea    0xc1d(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1a0b <main+0x7fb>
mov    %rax,%rsi
mov    0x8(%rsp),%ebp
jmp    19b1 <main+0x7a1>
lea    0xc82(%rip),%rdi
call   1040 <puts@plt>
lea    0xc97(%rip),%rdi
jmp    16e8 <main+0x4d8>
mov    0x2634(%rip),%rax
mov    (%rax),%edi
lea    0xb65(%rip),%rsi
jmp    1705 <main+0x4f5>
mov    0x261f(%rip),%rax
mov    (%rax),%edi
lea    0xb98(%rip),%rsi
jmp    1705 <main+0x4f5>
xor    %esi,%esi
lea    0x28(%rsp),%r9
mov    %r14d,%edi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1130 <Processador@plt>
test   %eax,%eax
je     19f6 <main+0x7e6>
test   %ebp,%ebp
je     19dc <main+0x7cc>
test   %ebx,%ebx
je     19dc <main+0x7cc>
lea    0x28(%rsp),%rdi
call   10e0 <PrintMem@plt>
lea    0xcf1(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <Estatistica@plt>
jmp    1711 <main+0x501>
mov    0x25c3(%rip),%rax
mov    (%rax),%edi
lea    0xbac(%rip),%rsi
jmp    1705 <main+0x4f5>
mov    0x25ae(%rip),%rax
mov    (%rax),%edi
lea    0xb57(%rip),%rsi
lea    0x110(%rsp),%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    170c <main+0x4fc>

LLVM IR (-O0):
@opterr = global i64 0
@.str = [9 x i8] c"hsrlm:p:\00"
@optarg = global i8* null
@.str.1 = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.2 = [35 x i8] c"Erro: Valor de mem\C3\B3ria inv\C3\A1lido\0A\00"
@.str.3 = [40 x i8] c"Erro: O valor de mem\C3\B3ria m\C3\ADnimo \C3\A9 1\0A\00"
@.str.4 = [43 x i8] c"Erro: O valor de mem\C3\B3ria m\C3\A1ximo \C3\A9 4096\0A\00"
@.str.5 = [46 x i8] c"Erro: Apenas um valor foi especificado em -p\0A\00"
@.str.6 = [58 x i8] c" *Use -p valor1/valor1 para observar um \C3\BAnico endere\C3\A7o\0A\00"
@.str.7 = [52 x i8] c"Erro: Os valores em -p devem ser separados por \22/\22\0A\00"
@.str.8 = [42 x i8] c"Erro: Valor inv\C3\A1lido no argumento de -p\0A\00"
@.str.9 = [55 x i8] c"Erro: Os valores em -p devem estar em ordem crescente\0A\00"
@.str.10 = [72 x i8] c"Erro: O intervalo especificado em -p ultrapassa os limites da mem\C3\B3ria\0A\00"
@optopt = global i8 0
@.str.11 = [33 x i8] c"Erro: Falta o argumento para -m\0A\00"
@.str.12 = [17 x i8] c"Uso: -m <valor>\0A\00"
@.str.13 = [33 x i8] c"Erro: Falta o argumento para -p\0A\00"
@.str.14 = [25 x i8] c"Uso: -p <valor1/valor2>\0A\00"
@.str.15 = [32 x i8] c"Erro: Op\C3\A7\C3\A3o -%c desconhecida\0A\00"
@.str.16 = [25 x i8] c"Use -h para obter ajuda\0A\00"
@.str.17 = [33 x i8] c"Johnny, la gente esta muy loca!\0A\00"
@optind = global i32 0
@.str.18 = [42 x i8] c"Erro: H\C3\A1 mais parametros que o esperado\0A\00"
@.str.19 = [34 x i8] c"Uso: iasmas [op\C3\A7\C3\B5es] <arquivo>\0A\00"
@.str.20 = [36 x i8] c"Erro: Falta o nome do arquivo alvo\0A\00"
@.str.21 = [46 x i8] c"Erro: O arquivo especificado n\C3\A3o \C3\A9 v\C3\A1lido\0A\00"
@.str.22 = [31 x i8] c"Uso: iasmas [op\C3\A7oes] arquivo\0A\00"
@.str.23 = [11 x i8] c"Op\C3\A7\C3\B5es:\0A\00"
@.str.24 = [46 x i8] c" -h Exibe esta informa\C3\A7\C3\A3o\0A\00"
@.str.25 = [79 x i8] c" -s Reduz a quantidade de informa\C3\A7\C3\B5es durante a execu\C3\A7\C3\A3o\0A\00"
@.str.26 = [87 x i8] c" -l Grava as informa\C3\A7\C3\B5es sobre a execu\C3\A7\C3\A3o em um arquivo de texto\0A\00"
@.str.27 = [77 x i8] c" -r Mostra o estado de todos os registradores a cada ciclo\0A\00"
@.str.28 = [73 x i8] c" -m <valor> Define o tamanho da mem\C3\B3ria acess\C3\ADvel (0 a 4096)\0A\00"
@.str.29 = [88 x i8] c" -p <valor1.valor2> Define um intervalo de mem\C3\B3ria que ser\C3\A1 exibido constantemente\0A\0A\00"
@.str.30 = [12 x i8] c"Aten\C3\A7\C3\A3o:\0A\00"
@.str.31 = [54 x i8] c" A op\C3\A7\C3\A3o -m n\C3\A3o afeta os valores permitidos em -p\0A\00"
@.str.32 = [34 x i8] c" A op\C3\A7\C3\A3o -s anula a op\C3\A7\C3\A3o -r\0A\00"
@.str.33 = [22 x i8] c"Execu\C3\A7\C3\A3o abortada!\0A\00"
@.str.34 = [29 x i8] c"Condi\C3\A7\C3\B5es de simula\C3\A7\C3\A3o:\0A\00"
@.str.35 = [28 x i8] c"\09Caminho de trabalho: %s\0A\00"
@.str.36 = [33 x i8] c"\09C\C3\B3digo fonte: %s.ias\0A\00"
@.str.37 = [33 x i8] c"\09C\C3\B3digo objeto: %s.hex\0A\00"
@.str.38 = [32 x i8] c"\09Arquivo de log: %s.log\0A\00"
@.str.39 = [2 x i8] c"\0A\00"
@.str.40 = [44 x i8] c"\09A mem\C3\B3ria ser\C3\A1 limitada a %d endere\C3\A7os\0A\00"
@.str.41 = [66 x i8] c"\09O conte\C3\BAdo da mem\C3\B3ria nos endere\C3\A7os %d a %d ser\C3\A1 monitorado\0A\00"
@.str.42 = [64 x i8] c"\09Ser\C3\A1 exibido o m\C3\ADnimo de informa\C3\A7\C3\B5es durante a execu\C3\A7\C3\A3o\0A\00"
@.str.43 = [64 x i8] c"\09Ser\C3\A3o exibidas informa\C3\A7\C3\B5es detalhadas durante a execu\C3\A7\C3\A3o\0A\00"
@.str.44 = [18 x i8] c"Continuar? [s/n] \00"
@stdin = global i32 0
@.str.45 = [10 x i8] c"\0A#partiu\0A\00"
@.str.46 = [37 x i8] c"Execu\C3\A7\C3\A3o cancelada pelo usu\C3\A1rio!\0A\00"
@.str.47 = [43 x i8] c"\0AIniciando gera\C3\A7\C3\A3o do c\C3\B3digo objeto...\0A\00"
@.str.48 = [72 x i8] c"Ocorreram erros durante o processo de tradu\C3\A7\C3\A3o.\0AExecu\C3\A7\C3\A3o abortada!\0A\00"
@.str.49 = [37 x i8] c"Arquivo objeto criado com sucesso!\0A\0A\00"
@.str.50 = [34 x i8] c"\0ANenhuma resposta foi fornecida.\0A\00"
@.str.51 = [23 x i8] c"Execu\C3\A7\C3\A3o cancelada!\0A\00"
@.str.52 = [33 x i8] c"\0ACarregando dados na memoria...\0A\00"
@.str.53 = [41 x i8] c"Ocorreram erros durante o carregamento.\0A\00"
@.str.54 = [33 x i8] c"Programa carregado com sucesso!\0A\00"
@.str.55 = [26 x i8] c"Iniciando execu\C3\A7\C3\A3o...\0A\0A\00"
@.str.56 = [5 x i8] c".log\00"
@.str.57 = [2 x i8] c"w\00"
@.str.58 = [64 x i8] c"Erro: Arquivo \22%s\22 n\C3\A3o p\C3\B4de ser criado!\0AExecu\C3\A7\C3\A3o abortada!\0A\00"
@.str.59 = [40 x i8] c"Simula\C3\A7\C3\A3o finalizada devido a erros!\0A\00"
@.str.60 = [24 x i8] c"Simula\C3\A7\C3\A3o completa!\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%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 [2 x i32]
%15 = alloca i32
%16 = alloca i64
%17 = alloca i64
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca [100 x i8]
%21 = alloca [100 x i8]
%22 = alloca i8
%23 = alloca i32
%24 = alloca i32*
%25 = alloca [100 x i8]
%26 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i64 0, i64* @opterr
br label %27
27: ; preds = %157, %2
%28 = load i32, i32* %4
%29 = load i8**, i8*** %5
%30 = call i32 @getopt(i32 %28, i8** %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %30, i32* %15
%31 = icmp ne i32 %30, -1
br i1 %31, label %32, label %158
32: ; preds = %27
store i64 0, i64* %16
store i64 0, i64* %17
%33 = load i32, i32* %15
switch i32 %33, label %154 [
i32 104, label %34
i32 115, label %35
i32 114, label %36
i32 108, label %37
i32 109, label %38
i32 112, label %65
i32 63, label %127
]
34: ; preds = %32
store i32 1, i32* %12
br label %157
35: ; preds = %32
store i32 1, i32* %6
br label %157
36: ; preds = %32
store i32 1, i32* %7
br label %157
37: ; preds = %32
store i32 1, i32* %8
br label %157
38: ; preds = %32
%39 = load i8*, i8** @optarg
%40 = call i64 @strtol(i8* %39, i8** %18, i32 10)
store i64 %40, i64* %16
%41 = load i8*, i8** %18
%42 = call i32 @strcmp(i8* %41, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %38
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %11
br label %64
47: ; preds = %38
%48 = load i64, i64* %16
%49 = icmp slt i64 %48, 1
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %11
br label %63
53: ; preds = %47
%54 = load i64, i64* %16
%55 = icmp sgt i64 %54, 4096
br i1 %55, label %56, label %59
56: ; preds = %53
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %11
br label %62
59: ; preds = %53
%60 = load i64, i64* %16
%61 = trunc i64 %60 to i32
store i32 %61, i32* %13
store i32 1, i32* %9
br label %62
62: ; preds = %59, %56
br label %63
63: ; preds = %62, %50
br label %64
64: ; preds = %63, %44
br label %157
65: ; preds = %32
%66 = load i8*, i8** @optarg
%67 = call i64 @strtol(i8* %66, i8** %18, i32 10)
store i64 %67, i64* %16
%68 = load i8*, i8** %18
%69 = call i32 @strcmp(i8* %68, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %76
71: ; preds = %65
%72 = load i32, i32* @stderr
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
%74 = load i32, i32* @stderr
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %11
br label %126
76: ; preds = %65
%77 = load i8*, i8** %18
%78 = getelementptr inbounds i8, i8* %77, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 47
br i1 %81, label %82, label %85
82: ; preds = %76
%83 = load i32, i32* @stderr
%84 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
store i32 1, i32* %11
br label %125
85: ; preds = %76
%86 = load i8*, i8** %18
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %18
%88 = load i8*, i8** %18
%89 = call i64 @strtol(i8* %88, i8** %18, i32 10)
store i64 %89, i64* %17
%90 = load i8*, i8** %18
%91 = call i32 @strcmp(i8* %90, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %85
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %11
br label %124
96: ; preds = %85
%97 = load i64, i64* %16
%98 = icmp sgt i64 %97, -1
br i1 %98, label %99, label %120
99: ; preds = %96
%100 = load i64, i64* %16
%101 = icmp slt i64 %100, 4096
br i1 %101, label %102, label %120
102: ; preds = %99
%103 = load i64, i64* %17
%104 = icmp slt i64 %103, 4096
br i1 %104, label %105, label %120
105: ; preds = %102
%106 = load i64, i64* %16
%107 = load i64, i64* %17
%108 = icmp sle i64 %106, %107
br i1 %108, label %109, label %116
109: ; preds = %105
%110 = load i64, i64* %16
%111 = trunc i64 %110 to i32
%112 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
store i32 %111, i32* %112
%113 = load i64, i64* %17
%114 = trunc i64 %113 to i32
%115 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 1
store i32 %114, i32* %115
store i32 1, i32* %10
br label %119
116: ; preds = %105
%117 = load i32, i32* @stderr
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %11
br label %119
119: ; preds = %116, %109
br label %123
120: ; preds = %102, %99, %96
%121 = load i32, i32* @stderr
%122 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %11
br label %123
123: ; preds = %120, %119
br label %124
124: ; preds = %123, %93
br label %125
125: ; preds = %124, %82
br label %126
126: ; preds = %125, %71
br label %157
127: ; preds = %32
%128 = load i8, i8* @optopt
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 109
br i1 %130, label %131, label %136
131: ; preds = %127
%132 = load i32, i32* @stderr
%133 = call i32 (i32, i8*, ...) @fprintf(i32 %132, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0))
%134 = load i32, i32* @stderr
%135 = call i32 (i32, i8*, ...) @fprintf(i32 %134, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
store i32 1, i32* %11
br label %153
136: ; preds = %127
%137 = load i8, i8* @optopt
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 112
br i1 %139, label %140, label %145
140: ; preds = %136
%141 = load i32, i32* @stderr
%142 = call i32 (i32, i8*, ...) @fprintf(i32 %141, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0))
%143 = load i32, i32* @stderr
%144 = call i32 (i32, i8*, ...) @fprintf(i32 %143, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %11
br label %152
145: ; preds = %136
%146 = load i32, i32* @stderr
%147 = load i8, i8* @optopt
%148 = sext i8 %147 to i32
%149 = call i32 (i32, i8*, ...) @fprintf(i32 %146, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %148)
%150 = load i32, i32* @stderr
%151 = call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
store i32 1, i32* %11
br label %152
152: ; preds = %145, %140
br label %153
153: ; preds = %152, %131
br label %157
154: ; preds = %32
%155 = load i32, i32* @stderr
%156 = call i32 (i32, i8*, ...) @fprintf(i32 %155, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0))
store i32 1, i32* %11
br label %157
157: ; preds = %154, %153, %126, %64, %37, %36, %35, %34
br label %27
158: ; preds = %27
%159 = bitcast [100 x i8]* %20 to i8*
%160 = bitcast [100 x i8]* %21 to i8*
%161 = load i32, i32* %4
%162 = load i32, i32* @optind
%163 = add nsw i32 %162, 1
%164 = icmp sgt i32 %161, %163
br i1 %164, label %165, label %170
165: ; preds = %158
%166 = load i32, i32* @stderr
%167 = call i32 (i32, i8*, ...) @fprintf(i32 %166, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0))
%168 = load i32, i32* @stderr
%169 = call i32 (i32, i8*, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0))
store i32 1, i32* %11
br label %222
170: ; preds = %158
%171 = load i32, i32* %4
%172 = load i32, i32* @optind
%173 = icmp eq i32 %171, %172
br i1 %173, label %174, label %187
174: ; preds = %170
%175 = load i32, i32* %11
%176 = icmp eq i32 %175, 0
br i1 %176, label %177, label %186
177: ; preds = %174
%178 = load i32, i32* %12
%179 = icmp eq i32 %178, 0
br i1 %179, label %180, label %185
180: ; preds = %177
%181 = load i32, i32* @stderr
%182 = call i32 (i32, i8*, ...) @fprintf(i32 %181, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
%183 = load i32, i32* @stderr
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0))
store i32 1, i32* %11
br label %185
185: ; preds = %180, %177
br label %186
186: ; preds = %185, %174
br label %221
187: ; preds = %170
%188 = load i8**, i8*** %5
%189 = load i32, i32* @optind
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds i8*, i8** %188, i64 %190
%192 = load i8*, i8** %191
store i8* %192, i8** %19
%193 = load i8*, i8** %19
%194 = call i32 @InterpretaAlvo(i8* %193)
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %199
196: ; preds = %187
%197 = load i32, i32* @stderr
%198 = call i32 (i32, i8*, ...) @fprintf(i32 %197, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.21, i64 0, i64 0))
store i32 1, i32* %11
br label %220
199: ; preds = %187
%200 = load i8*, i8** %19
%201 = call i32 @InterpretaAlvo(i8* %200)
%202 = icmp eq i32 %201, 1
br i1 %202, label %203, label %207
203: ; preds = %199
%204 = load i8*, i8** %19
%205 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%206 = call i32 @ExtrairNome(i8* %204, i8* %205)
br label %219
207: ; preds = %199
%208 = load i8*, i8** %19
%209 = call i32 @InterpretaAlvo(i8* %208)
%210 = icmp eq i32 %209, 2
br i1 %210, label %211, label %218
211: ; preds = %207
%212 = load i8*, i8** %19
%213 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%214 = call i32 @ExtrairCaminho(i8* %212, i8* %213)
%215 = load i8*, i8** %19
%216 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%217 = call i32 @ExtrairNome(i8* %215, i8* %216)
br label %218
218: ; preds = %211, %207
br label %219
219: ; preds = %218, %203
br label %220
220: ; preds = %219, %196
br label %221
221: ; preds = %220, %186
br label %222
222: ; preds = %221, %165
%223 = load i32, i32* %12
%224 = icmp ne i32 %223, 0
br i1 %224, label %225, label %237
225: ; preds = %222
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.22, i64 0, i64 0))
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.23, i64 0, i64 0))
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.24, i64 0, i64 0))
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.25, i64 0, i64 0))
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.26, i64 0, i64 0))
%231 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.27, i64 0, i64 0))
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.28, i64 0, i64 0))
%233 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.29, i64 0, i64 0))
%234 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.30, i64 0, i64 0))
%235 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.31, i64 0, i64 0))
%236 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.32, i64 0, i64 0))
store i32 0, i32* %3
br label %387
237: ; preds = %222
%238 = load i32, i32* %11
%239 = icmp ne i32 %238, 0
br i1 %239, label %240, label %243
240: ; preds = %237
%241 = load i32, i32* @stderr
%242 = call i32 (i32, i8*, ...) @fprintf(i32 %241, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.33, i64 0, i64 0))
store i32 1, i32* %3
br label %387
243: ; preds = %237
%244 = load i32, i32* %6
%245 = icmp ne i32 %244, 0
br i1 %245, label %246, label %250
246: ; preds = %243
%247 = load i32, i32* %7
%248 = icmp ne i32 %247, 0
br i1 %248, label %249, label %250
249: ; preds = %246
store i32 0, i32* %7
br label %250
250: ; preds = %249, %246, %243
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.34, i64 0, i64 0))
%252 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%253 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.35, i64 0, i64 0), i8* %252)
%254 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%255 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.36, i64 0, i64 0), i8* %254)
%256 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%257 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.37, i64 0, i64 0), i8* %256)
%258 = load i32, i32* %8
%259 = icmp ne i32 %258, 0
br i1 %259, label %260, label %263
260: ; preds = %250
%261 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.38, i64 0, i64 0), i8* %261)
br label %263
263: ; preds = %260, %250
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.39, i64 0, i64 0))
%265 = load i32, i32* %9
%266 = icmp ne i32 %265, 0
br i1 %266, label %267, label %270
267: ; preds = %263
%268 = load i32, i32* %13
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.40, i64 0, i64 0), i32 %268)
br label %270
270: ; preds = %267, %263
%271 = load i32, i32* %10
%272 = icmp ne i32 %271, 0
br i1 %272, label %273, label %279
273: ; preds = %270
%274 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
%275 = load i32, i32* %274
%276 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 1
%277 = load i32, i32* %276
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.41, i64 0, i64 0), i32 %275, i32 %277)
br label %279
279: ; preds = %273, %270
%280 = load i32, i32* %6
%281 = icmp ne i32 %280, 0
br i1 %281, label %282, label %284
282: ; preds = %279
%283 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.42, i64 0, i64 0))
br label %284
284: ; preds = %282, %279
%285 = load i32, i32* %7
%286 = icmp ne i32 %285, 0
br i1 %286, label %287, label %289
287: ; preds = %284
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.43, i64 0, i64 0))
br label %289
289: ; preds = %287, %284
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.44, i64 0, i64 0))
%291 = load i32, i32* @stdin
%292 = call signext i8 @getc(i32 %291)
store i8 %292, i8* %22
%293 = load i8, i8* %22
%294 = sext i8 %293 to i32
%295 = icmp eq i32 %294, 110
br i1 %295, label %300, label %296
296: ; preds = %289
%297 = load i8, i8* %22
%298 = sext i8 %297 to i32
%299 = icmp eq i32 %298, 78
br i1 %299, label %300, label %303
300: ; preds = %296, %289
%301 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.45, i64 0, i64 0))
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.46, i64 0, i64 0))
store i32 0, i32* %3
br label %387
303: ; preds = %296
%304 = load i8, i8* %22
%305 = sext i8 %304 to i32
%306 = icmp eq i32 %305, 115
br i1 %306, label %311, label %307
307: ; preds = %303
%308 = load i8, i8* %22
%309 = sext i8 %308 to i32
%310 = icmp eq i32 %309, 83
br i1 %310, label %311, label %323
311: ; preds = %307, %303
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.47, i64 0, i64 0))
%313 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%314 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%315 = call i64 @Tradutor(i8* %313, i8* %314)
%316 = icmp eq i64 %315, 0
br i1 %316, label %317, label %320
317: ; preds = %311
%318 = load i32, i32* @stderr
%319 = call i32 (i32, i8*, ...) @fprintf(i32 %318, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.48, i64 0, i64 0))
store i32 1, i32* %3
br label %387
320: ; preds = %311
%321 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.49, i64 0, i64 0))
br label %322
322: ; preds = %320
br label %326
323: ; preds = %307
%324 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.50, i64 0, i64 0))
%325 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.51, i64 0, i64 0))
store i32 0, i32* %3
br label %387
326: ; preds = %322
br label %327
327: ; preds = %326
%328 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.52, i64 0, i64 0))
%329 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%330 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%331 = call i32 @Carregador(i8* %329, i8* %330)
store i32 %331, i32* %23
%332 = load i32, i32* %23
%333 = icmp eq i32 %332, -1
br i1 %333, label %334, label %337
334: ; preds = %327
%335 = load i32, i32* @stderr
%336 = call i32 (i32, i8*, ...) @fprintf(i32 %335, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.53, i64 0, i64 0))
store i32 1, i32* %3
br label %387
337: ; preds = %327
%338 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.54, i64 0, i64 0))
%339 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.55, i64 0, i64 0))
%340 = load i32, i32* %8
%341 = icmp ne i32 %340, 0
br i1 %341, label %342, label %361
342: ; preds = %337
%343 = bitcast [100 x i8]* %25 to i8*
%344 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%345 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%346 = call i32 @strcat(i8* %344, i8* %345)
%347 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%348 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%349 = call i32 @strcat(i8* %347, i8* %348)
%350 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%351 = call i32 @strcat(i8* %350, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.56, i64 0, i64 0))
%352 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%353 = call i32* @fopen(i8* %352, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.57, i64 0, i64 0))
store i32* %353, i32** %24
%354 = load i32*, i32** %24
%355 = icmp eq i32* %354, null
br i1 %355, label %356, label %360
356: ; preds = %342
%357 = load i32, i32* @stderr
%358 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%359 = call i32 (i32, i8*, ...) @fprintf(i32 %357, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.58, i64 0, i64 0), i8* %358)
store i32 1, i32* %3
br label %387
360: ; preds = %342
br label %362
361: ; preds = %337
store i32* null, i32** %24
br label %362
362: ; preds = %361, %360
%363 = load i32, i32* %23
%364 = load i32*, i32** %24
%365 = load i32, i32* %6
%366 = load i32, i32* %7
%367 = load i32, i32* %10
%368 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
%369 = call i32 @Processador(i32 %363, i32* %364, i32 %365, i32 %366, i32 %367, i32* %368)
store i32 %369, i32* %26
%370 = load i32, i32* %26
%371 = icmp eq i32 %370, 0
br i1 %371, label %372, label %375
372: ; preds = %362
%373 = load i32, i32* @stderr
%374 = call i32 (i32, i8*, ...) @fprintf(i32 %373, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.59, i64 0, i64 0))
store i32 1, i32* %3
br label %387
375: ; preds = %362
%376 = load i32, i32* %10
%377 = icmp ne i32 %376, 0
br i1 %377, label %378, label %384
378: ; preds = %375
%379 = load i32, i32* %6
%380 = icmp ne i32 %379, 0
br i1 %380, label %381, label %384
381: ; preds = %378
%382 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
%383 = call i32 @PrintMem(i32* %382)
br label %384
384: ; preds = %381, %378, %375
%385 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.60, i64 0, i64 0))
%386 = call i32 (...) @Estatistica()
store i32 0, i32* %3
br label %387
387: ; preds = %384, %372, %356, %334, %323, %317, %300, %240, %225
%388 = load i32, i32* %3
ret i32 %388
}

LLVM IR (-O2):
@opterr = global i64 0
@.str = [9 x i8] c"hsrlm:p:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.2 = [35 x i8] c"Erro: Valor de mem\C3\B3ria inv\C3\A1lido\0A\00"
@.str.3 = [40 x i8] c"Erro: O valor de mem\C3\B3ria m\C3\ADnimo \C3\A9 1\0A\00"
@.str.4 = [43 x i8] c"Erro: O valor de mem\C3\B3ria m\C3\A1ximo \C3\A9 4096\0A\00"
@.str.5 = [46 x i8] c"Erro: Apenas um valor foi especificado em -p\0A\00"
@.str.6 = [58 x i8] c" *Use -p valor1/valor1 para observar um \C3\BAnico endere\C3\A7o\0A\00"
@.str.7 = [52 x i8] c"Erro: Os valores em -p devem ser separados por \22/\22\0A\00"
@.str.8 = [42 x i8] c"Erro: Valor inv\C3\A1lido no argumento de -p\0A\00"
@.str.9 = [55 x i8] c"Erro: Os valores em -p devem estar em ordem crescente\0A\00"
@.str.10 = [72 x i8] c"Erro: O intervalo especificado em -p ultrapassa os limites da mem\C3\B3ria\0A\00"
@optopt = global i8 0
@.str.11 = [33 x i8] c"Erro: Falta o argumento para -m\0A\00"
@.str.12 = [17 x i8] c"Uso: -m <valor>\0A\00"
@.str.13 = [33 x i8] c"Erro: Falta o argumento para -p\0A\00"
@.str.14 = [25 x i8] c"Uso: -p <valor1/valor2>\0A\00"
@.str.15 = [32 x i8] c"Erro: Op\C3\A7\C3\A3o -%c desconhecida\0A\00"
@.str.16 = [25 x i8] c"Use -h para obter ajuda\0A\00"
@.str.17 = [33 x i8] c"Johnny, la gente esta muy loca!\0A\00"
@optind = global i32 0
@.str.18 = [42 x i8] c"Erro: H\C3\A1 mais parametros que o esperado\0A\00"
@.str.19 = [34 x i8] c"Uso: iasmas [op\C3\A7\C3\B5es] <arquivo>\0A\00"
@.str.20 = [36 x i8] c"Erro: Falta o nome do arquivo alvo\0A\00"
@.str.21 = [46 x i8] c"Erro: O arquivo especificado n\C3\A3o \C3\A9 v\C3\A1lido\0A\00"
@.str.33 = [22 x i8] c"Execu\C3\A7\C3\A3o abortada!\0A\00"
@.str.35 = [28 x i8] c"\09Caminho de trabalho: %s\0A\00"
@.str.36 = [33 x i8] c"\09C\C3\B3digo fonte: %s.ias\0A\00"
@.str.37 = [33 x i8] c"\09C\C3\B3digo objeto: %s.hex\0A\00"
@.str.38 = [32 x i8] c"\09Arquivo de log: %s.log\0A\00"
@.str.40 = [44 x i8] c"\09A mem\C3\B3ria ser\C3\A1 limitada a %d endere\C3\A7os\0A\00"
@.str.41 = [66 x i8] c"\09O conte\C3\BAdo da mem\C3\B3ria nos endere\C3\A7os %d a %d ser\C3\A1 monitorado\0A\00"
@.str.44 = [18 x i8] c"Continuar? [s/n] \00"
@stdin = global i32 0
@.str.48 = [72 x i8] c"Ocorreram erros durante o processo de tradu\C3\A7\C3\A3o.\0AExecu\C3\A7\C3\A3o abortada!\0A\00"
@.str.53 = [41 x i8] c"Ocorreram erros durante o carregamento.\0A\00"
@.str.56 = [5 x i8] c".log\00"
@.str.57 = [2 x i8] c"w\00"
@.str.58 = [64 x i8] c"Erro: Arquivo \22%s\22 n\C3\A3o p\C3\B4de ser criado!\0AExecu\C3\A7\C3\A3o abortada!\0A\00"
@.str.59 = [40 x i8] c"Simula\C3\A7\C3\A3o finalizada devido a erros!\0A\00"
@str = [28 x i8] c"Condi\C3\A7\C3\B5es de simula\C3\A7\C3\A3o:\00"
@str.61 = [33 x i8] c"\0ANenhuma resposta foi fornecida.\00"
@str.62 = [22 x i8] c"Execu\C3\A7\C3\A3o cancelada!\00"
@str.63 = [42 x i8] c"\0AIniciando gera\C3\A7\C3\A3o do c\C3\B3digo objeto...\00"
@str.64 = [36 x i8] c"Arquivo objeto criado com sucesso!\0A\00"
@str.65 = [32 x i8] c"\0ACarregando dados na memoria...\00"
@str.66 = [32 x i8] c"Programa carregado com sucesso!\00"
@str.67 = [25 x i8] c"Iniciando execu\C3\A7\C3\A3o...\0A\00"
@str.68 = [23 x i8] c"Simula\C3\A7\C3\A3o completa!\0A\00"
@str.69 = [9 x i8] c"\0A#partiu\00"
@str.70 = [36 x i8] c"Execu\C3\A7\C3\A3o cancelada pelo usu\C3\A1rio!\00"
@str.71 = [63 x i8] c"\09Ser\C3\A3o exibidas informa\C3\A7\C3\B5es detalhadas durante a execu\C3\A7\C3\A3o\00"
@str.72 = [63 x i8] c"\09Ser\C3\A1 exibido o m\C3\ADnimo de informa\C3\A7\C3\B5es durante a execu\C3\A7\C3\A3o\00"
@str.73 = [30 x i8] c"Uso: iasmas [op\C3\A7oes] arquivo\00"
@str.74 = [10 x i8] c"Op\C3\A7\C3\B5es:\00"
@str.75 = [45 x i8] c" -h Exibe esta informa\C3\A7\C3\A3o\00"
@str.76 = [78 x i8] c" -s Reduz a quantidade de informa\C3\A7\C3\B5es durante a execu\C3\A7\C3\A3o\00"
@str.77 = [86 x i8] c" -l Grava as informa\C3\A7\C3\B5es sobre a execu\C3\A7\C3\A3o em um arquivo de texto\00"
@str.78 = [76 x i8] c" -r Mostra o estado de todos os registradores a cada ciclo\00"
@str.79 = [72 x i8] c" -m <valor> Define o tamanho da mem\C3\B3ria acess\C3\ADvel (0 a 4096)\00"
@str.80 = [87 x i8] c" -p <valor1.valor2> Define um intervalo de mem\C3\B3ria que ser\C3\A1 exibido constantemente\0A\00"
@str.81 = [11 x i8] c"Aten\C3\A7\C3\A3o:\00"
@str.82 = [53 x i8] c" A op\C3\A7\C3\A3o -m n\C3\A3o afeta os valores permitidos em -p\00"
@str.83 = [33 x i8] c" A op\C3\A7\C3\A3o -s anula a op\C3\A7\C3\A3o -r\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [2 x i32]
%4 = alloca i8*
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
%8 = bitcast [2 x i32]* %3 to i8*
store i64 0, i64* @opterr
%9 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32 %9, -1
br i1 %10, label %122, label %11
11: ; preds = %2
%12 = bitcast i8** %4 to i8*
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
br label %15
15: ; preds = %11, %109
%16 = phi i32 [ undef, %11 ], [ %110, %109 ]
%17 = phi i32 [ undef, %11 ], [ %111, %109 ]
%18 = phi i32 [ %9, %11 ], [ %120, %109 ]
%19 = phi i32 [ 0, %11 ], [ %119, %109 ]
%20 = phi i32 [ 0, %11 ], [ %118, %109 ]
%21 = phi i32 [ 0, %11 ], [ %117, %109 ]
%22 = phi i32 [ 0, %11 ], [ %116, %109 ]
%23 = phi i32 [ undef, %11 ], [ %115, %109 ]
%24 = phi i32 [ 0, %11 ], [ %114, %109 ]
%25 = phi i32 [ 0, %11 ], [ %113, %109 ]
%26 = phi i32 [ 0, %11 ], [ %112, %109 ]
switch i32 %18, label %106 [
i32 104, label %109
i32 115, label %27
i32 114, label %28
i32 108, label %29
i32 109, label %30
i32 112, label %51
i32 63, label %88
]
27: ; preds = %15
br label %109
28: ; preds = %15
br label %109
29: ; preds = %15
br label %109
30: ; preds = %15
%31 = load i8*, i8** @optarg
%32 = call i64 @strtol(i8* %31, i8** %4, i32 10)
%33 = load i8*, i8** %4
%34 = load i8, i8* %33
%35 = icmp eq i8 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %30
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
br label %109
39: ; preds = %30
%40 = icmp slt i64 %32, 1
br i1 %40, label %41, label %44
41: ; preds = %39
%42 = load i32, i32* @stderr
%43 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
br label %109
44: ; preds = %39
%45 = icmp ugt i64 %32, 4096
br i1 %45, label %46, label %49
46: ; preds = %44
%47 = load i32, i32* @stderr
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
br label %109
49: ; preds = %44
%50 = trunc i64 %32 to i32
br label %109
51: ; preds = %15
%52 = load i8*, i8** @optarg
%53 = call i64 @strtol(i8* %52, i8** %4, i32 10)
%54 = load i8*, i8** %4
%55 = load i8, i8* %54
switch i8 %55, label %61 [
i8 0, label %56
i8 47, label %64
]
56: ; preds = %51
%57 = load i32, i32* @stderr
%58 = tail call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
%59 = load i32, i32* @stderr
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0))
br label %109
61: ; preds = %51
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
br label %109
64: ; preds = %51
%65 = getelementptr inbounds i8, i8* %54, i64 1
store i8* %65, i8** %4
%66 = call i64 @strtol(i8* %65, i8** %4, i32 10)
%67 = load i8*, i8** %4
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 0
br i1 %69, label %73, label %70
70: ; preds = %64
%71 = load i32, i32* @stderr
%72 = tail call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
br label %109
73: ; preds = %64
%74 = icmp ult i64 %53, 4096
%75 = icmp slt i64 %66, 4096
%76 = select i1 %74, i1 %75, i1 false
br i1 %76, label %77, label %85
77: ; preds = %73
%78 = icmp sgt i64 %53, %66
br i1 %78, label %82, label %79
79: ; preds = %77
%80 = trunc i64 %53 to i32
store i32 %80, i32* %13
%81 = trunc i64 %66 to i32
store i32 %81, i32* %14
br label %109
82: ; preds = %77
%83 = load i32, i32* @stderr
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
br label %109
85: ; preds = %73
%86 = load i32, i32* @stderr
%87 = tail call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.10, i64 0, i64 0))
br label %109
88: ; preds = %15
%89 = load i8, i8* @optopt
switch i8 %89, label %100 [
i8 109, label %90
i8 112, label %95
]
90: ; preds = %88
%91 = load i32, i32* @stderr
%92 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0))
%93 = load i32, i32* @stderr
%94 = tail call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
br label %109
95: ; preds = %88
%96 = load i32, i32* @stderr
%97 = tail call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0))
%98 = load i32, i32* @stderr
%99 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %109
100: ; preds = %88
%101 = sext i8 %89 to i32
%102 = load i32, i32* @stderr
%103 = tail call i32 (i32, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %101)
%104 = load i32, i32* @stderr
%105 = tail call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
br label %109
106: ; preds = %15
%107 = load i32, i32* @stderr
%108 = tail call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0))
br label %109
109: ; preds = %15, %90, %100, %95, %56, %70, %79, %82, %85, %61, %36, %46, %49, %41, %106, %29, %28, %27
%110 = phi i32 [ %16, %106 ], [ %16, %90 ], [ %16, %95 ], [ %16, %100 ], [ %16, %56 ], [ %16, %61 ], [ %16, %70 ], [ %81, %79 ], [ %16, %82 ], [ %16, %85 ], [ %16, %36 ], [ %16, %41 ], [ %16, %46 ], [ %16, %49 ], [ %16, %29 ], [ %16, %28 ], [ %16, %27 ], [ %16, %15 ]
%111 = phi i32 [ %17, %106 ], [ %17, %90 ], [ %17, %95 ], [ %17, %100 ], [ %17, %56 ], [ %17, %61 ], [ %17, %70 ], [ %80, %79 ], [ %17, %82 ], [ %17, %85 ], [ %17, %36 ], [ %17, %41 ], [ %17, %46 ], [ %17, %49 ], [ %17, %29 ], [ %17, %28 ], [ %17, %27 ], [ %17, %15 ]
%112 = phi i32 [ %26, %106 ], [ %26, %90 ], [ %26, %95 ], [ %26, %100 ], [ %26, %56 ], [ %26, %61 ], [ %26, %70 ], [ 1, %79 ], [ %26, %82 ], [ %26, %85 ], [ %26, %36 ], [ %26, %41 ], [ %26, %46 ], [ %26, %49 ], [ %26, %29 ], [ %26, %28 ], [ %26, %27 ], [ %26, %15 ]
%113 = phi i32 [ 1, %106 ], [ 1, %90 ], [ 1, %95 ], [ 1, %100 ], [ 1, %56 ], [ 1, %61 ], [ 1, %70 ], [ %25, %79 ], [ 1, %82 ], [ 1, %85 ], [ 1, %36 ], [ 1, %41 ], [ 1, %46 ], [ %25, %49 ], [ %25, %29 ], [ %25, %28 ], [ %25, %27 ], [ %25, %15 ]
%114 = phi i32 [ %24, %106 ], [ %24, %90 ], [ %24, %95 ], [ %24, %100 ], [ %24, %56 ], [ %24, %61 ], [ %24, %70 ], [ %24, %79 ], [ %24, %82 ], [ %24, %85 ], [ %24, %36 ], [ %24, %41 ], [ %24, %46 ], [ %24, %49 ], [ %24, %29 ], [ %24, %28 ], [ %24, %27 ], [ 1, %15 ]
%115 = phi i32 [ %23, %106 ], [ %23, %90 ], [ %23, %95 ], [ %23, %100 ], [ %23, %56 ], [ %23, %61 ], [ %23, %70 ], [ %23, %79 ], [ %23, %82 ], [ %23, %85 ], [ %23, %36 ], [ %23, %41 ], [ %23, %46 ], [ %50, %49 ], [ %23, %29 ], [ %23, %28 ], [ %23, %27 ], [ %23, %15 ]
%116 = phi i32 [ %22, %106 ], [ %22, %90 ], [ %22, %95 ], [ %22, %100 ], [ %22, %56 ], [ %22, %61 ], [ %22, %70 ], [ %22, %79 ], [ %22, %82 ], [ %22, %85 ], [ %22, %36 ], [ %22, %41 ], [ %22, %46 ], [ 1, %49 ], [ %22, %29 ], [ %22, %28 ], [ %22, %27 ], [ %22, %15 ]
%117 = phi i32 [ %21, %106 ], [ %21, %90 ], [ %21, %95 ], [ %21, %100 ], [ %21, %56 ], [ %21, %61 ], [ %21, %70 ], [ %21, %79 ], [ %21, %82 ], [ %21, %85 ], [ %21, %36 ], [ %21, %41 ], [ %21, %46 ], [ %21, %49 ], [ 1, %29 ], [ %21, %28 ], [ %21, %27 ], [ %21, %15 ]
%118 = phi i32 [ %20, %106 ], [ %20, %90 ], [ %20, %95 ], [ %20, %100 ], [ %20, %56 ], [ %20, %61 ], [ %20, %70 ], [ %20, %79 ], [ %20, %82 ], [ %20, %85 ], [ %20, %36 ], [ %20, %41 ], [ %20, %46 ], [ %20, %49 ], [ %20, %29 ], [ 1, %28 ], [ %20, %27 ], [ %20, %15 ]
%119 = phi i32 [ %19, %106 ], [ %19, %90 ], [ %19, %95 ], [ %19, %100 ], [ %19, %56 ], [ %19, %61 ], [ %19, %70 ], [ %19, %79 ], [ %19, %82 ], [ %19, %85 ], [ %19, %36 ], [ %19, %41 ], [ %19, %46 ], [ %19, %49 ], [ %19, %29 ], [ %19, %28 ], [ 1, %27 ], [ %19, %15 ]
%120 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%121 = icmp eq i32 %120, -1
br i1 %121, label %122, label %15
122: ; preds = %109, %2
%123 = phi i32 [ undef, %2 ], [ %110, %109 ]
%124 = phi i32 [ undef, %2 ], [ %111, %109 ]
%125 = phi i32 [ 0, %2 ], [ %112, %109 ]
%126 = phi i32 [ 0, %2 ], [ %113, %109 ]
%127 = phi i32 [ 0, %2 ], [ %114, %109 ]
%128 = phi i32 [ undef, %2 ], [ %115, %109 ]
%129 = phi i32 [ 0, %2 ], [ %116, %109 ]
%130 = phi i32 [ 0, %2 ], [ %117, %109 ]
%131 = phi i32 [ 0, %2 ], [ %118, %109 ]
%132 = phi i32 [ 0, %2 ], [ %119, %109 ]
%133 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%134 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%135 = load i32, i32* @optind
%136 = add nsw i32 %135, 1
%137 = icmp slt i32 %136, %0
br i1 %137, label %138, label %143
138: ; preds = %122
%139 = load i32, i32* @stderr
%140 = tail call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0))
%141 = load i32, i32* @stderr
%142 = tail call i32 (i32, i8*, ...) @fprintf(i32 %141, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0))
br label %174
143: ; preds = %122
%144 = icmp eq i32 %135, %0
br i1 %144, label %145, label %154
145: ; preds = %143
%146 = icmp eq i32 %126, 0
%147 = icmp eq i32 %127, 0
%148 = select i1 %146, i1 %147, i1 false
br i1 %148, label %149, label %174
149: ; preds = %145
%150 = load i32, i32* @stderr
%151 = tail call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
%152 = load i32, i32* @stderr
%153 = tail call i32 (i32, i8*, ...) @fprintf(i32 %152, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0))
br label %191
154: ; preds = %143
%155 = sext i32 %135 to i64
%156 = getelementptr inbounds i8*, i8** %1, i64 %155
%157 = load i8*, i8** %156
%158 = tail call i32 @InterpretaAlvo(i8* %157)
%159 = icmp eq i32 %158, 0
br i1 %159, label %160, label %163
160: ; preds = %154
%161 = load i32, i32* @stderr
%162 = tail call i32 (i32, i8*, ...) @fprintf(i32 %161, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.21, i64 0, i64 0))
br label %174
163: ; preds = %154
%164 = tail call i32 @InterpretaAlvo(i8* %157)
%165 = icmp eq i32 %164, 1
br i1 %165, label %166, label %168
166: ; preds = %163
%167 = call i32 @ExtrairNome(i8* %157, i8* %133)
br label %174
168: ; preds = %163
%169 = tail call i32 @InterpretaAlvo(i8* %157)
%170 = icmp eq i32 %169, 2
br i1 %170, label %171, label %174
171: ; preds = %168
%172 = call i32 @ExtrairCaminho(i8* %157, i8* %134)
%173 = call i32 @ExtrairNome(i8* %157, i8* %133)
br label %174
174: ; preds = %145, %166, %171, %168, %160, %138
%175 = phi i32 [ 1, %138 ], [ %126, %145 ], [ 1, %160 ], [ %126, %166 ], [ %126, %171 ], [ %126, %168 ]
%176 = icmp eq i32 %127, 0
br i1 %176, label %189, label %177
177: ; preds = %174
%178 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.73, i64 0, i64 0))
%179 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.74, i64 0, i64 0))
%180 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.75, i64 0, i64 0))
%181 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.76, i64 0, i64 0))
%182 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.77, i64 0, i64 0))
%183 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.78, i64 0, i64 0))
%184 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.79, i64 0, i64 0))
%185 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.80, i64 0, i64 0))
%186 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.81, i64 0, i64 0))
%187 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.82, i64 0, i64 0))
%188 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.83, i64 0, i64 0))
br label %277
189: ; preds = %174
%190 = icmp eq i32 %175, 0
br i1 %190, label %194, label %191
191: ; preds = %149, %189
%192 = load i32, i32* @stderr
%193 = call i32 (i32, i8*, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.33, i64 0, i64 0))
br label %277
194: ; preds = %189
%195 = icmp ne i32 %132, 0
%196 = icmp ne i32 %131, 0
%197 = select i1 %195, i1 %196, i1 false
%198 = select i1 %197, i32 0, i32 %131
%199 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%200 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.35, i64 0, i64 0), i8* %134)
%201 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.36, i64 0, i64 0), i8* %133)
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.37, i64 0, i64 0), i8* %133)
%203 = icmp eq i32 %130, 0
br i1 %203, label %206, label %204
204: ; preds = %194
%205 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.38, i64 0, i64 0), i8* %133)
br label %206
206: ; preds = %204, %194
%207 = call i32 @putchar(i32 10)
%208 = icmp eq i32 %129, 0
br i1 %208, label %211, label %209
209: ; preds = %206
%210 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.40, i64 0, i64 0), i32 %128)
br label %211
211: ; preds = %209, %206
%212 = icmp ne i32 %125, 0
br i1 %212, label %213, label %215
213: ; preds = %211
%214 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.41, i64 0, i64 0), i32 %124, i32 %123)
br label %215
215: ; preds = %213, %211
br i1 %195, label %216, label %218
216: ; preds = %215
%217 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.72, i64 0, i64 0))
br label %218
218: ; preds = %216, %215
%219 = icmp eq i32 %198, 0
br i1 %219, label %222, label %220
220: ; preds = %218
%221 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.71, i64 0, i64 0))
br label %222
222: ; preds = %220, %218
%223 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.44, i64 0, i64 0))
%224 = load i32, i32* @stdin
%225 = call signext i8 @getc(i32 %224)
%226 = and i8 %225, -33
switch i8 %226, label %242 [
i8 78, label %227
i8 83, label %230
]
227: ; preds = %222
%228 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.69, i64 0, i64 0))
%229 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.70, i64 0, i64 0))
br label %277
230: ; preds = %222
%231 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.63, i64 0, i64 0))
%232 = call i64 @Tradutor(i8* %134, i8* %133)
%233 = icmp eq i64 %232, 0
br i1 %233, label %234, label %237
234: ; preds = %230
%235 = load i32, i32* @stderr
%236 = call i32 (i32, i8*, ...) @fprintf(i32 %235, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.48, i64 0, i64 0))
br label %277
237: ; preds = %230
%238 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.64, i64 0, i64 0))
%239 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.65, i64 0, i64 0))
%240 = call i32 @Carregador(i8* %134, i8* %133)
%241 = icmp eq i32 %240, -1
br i1 %241, label %245, label %248
242: ; preds = %222
%243 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.61, i64 0, i64 0))
%244 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.62, i64 0, i64 0))
br label %277
245: ; preds = %237
%246 = load i32, i32* @stderr
%247 = call i32 (i32, i8*, ...) @fprintf(i32 %246, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.53, i64 0, i64 0))
br label %277
248: ; preds = %237
%249 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.66, i64 0, i64 0))
%250 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.67, i64 0, i64 0))
br i1 %203, label %262, label %251
251: ; preds = %248
%252 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%253 = call i32 @strcat(i8* %252, i8* %134)
%254 = call i32 @strcat(i8* %252, i8* %133)
%255 = call i32 @strcat(i8* %252, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.56, i64 0, i64 0))
%256 = call i32* @fopen(i8* %252, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.57, i64 0, i64 0))
%257 = icmp eq i32* %256, null
br i1 %257, label %258, label %261
258: ; preds = %251
%259 = load i32, i32* @stderr
%260 = call i32 (i32, i8*, ...) @fprintf(i32 %259, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.58, i64 0, i64 0), i8* %252)
br label %277
261: ; preds = %251
br label %262
262: ; preds = %261, %248
%263 = phi i32* [ %256, %261 ], [ null, %248 ]
%264 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%265 = call i32 @Processador(i32 %240, i32* %263, i32 %132, i32 %198, i32 %125, i32* %264)
%266 = icmp eq i32 %265, 0
br i1 %266, label %267, label %270
267: ; preds = %262
%268 = load i32, i32* @stderr
%269 = call i32 (i32, i8*, ...) @fprintf(i32 %268, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.59, i64 0, i64 0))
br label %277
270: ; preds = %262
%271 = select i1 %212, i1 %195, i1 false
br i1 %271, label %272, label %274
272: ; preds = %270
%273 = call i32 @PrintMem(i32* %264)
br label %274
274: ; preds = %272, %270
%275 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.68, i64 0, i64 0))
%276 = call i32 (...) @Estatistica()
br label %277
277: ; preds = %258, %227, %234, %242, %274, %267, %245, %191, %177
%278 = phi i32 [ 0, %177 ], [ 1, %191 ], [ 0, %227 ], [ 1, %234 ], [ 0, %242 ], [ 1, %245 ], [ 1, %267 ], [ 0, %274 ], [ 1, %258 ]
ret i32 %278
}