#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ geraEndIPHost(char *, char *, char *);
int /*<<< orphan*/ geraEndIPRede(char *, char, char *, char *);
int /*<<< orphan*/ geraEndIPSR(char *, char *, char *, char *);
int /*<<< orphan*/ geraMascaraNumIP(char *, char, char *, char *);
unsigned long geraNumRelHost(char *, char *);
unsigned long geraNumRelRede(char *, char);
unsigned long geraNumRelSR(char *, char *, char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ verMaskNumIP(char *, char, char);
char verSemNumIP(char *);
char verSinNumIP(char *);
char verTipoNumIP(char *, char);
main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("DIP : Falta um parametro.\n");
    printf("\tDigite \"DIP --ajuda\" para obter ajuda.\n");
    exit(1);
  }
  if (argc > 2) {
    printf("DIP : Excesso de parametros.\n");
    printf("\tDigite \"DIP --ajuda\" para obter ajuda.\n");
    exit(1);
  }
  if ((!strcmp(*(argv + 1), "--ajuda")) || (!strcmp(*(argv + 1), "-a"))) {
    printf("Uso: dip NUMERO_IP/MASCARA\n");
    printf("\tonde: NUMERO_IP eh um numero IP valido e\n");
    printf("\t   MASCARA eh uma mascara de IP valida.\n");
    printf("ou   dip [opcoes]\n");
    printf("Gera e mostra informacoes acerca de um numero IP.\n");
    printf("opcoes:\n");
    printf("\t--ajuda, -a     Mostra esta ajuda e sai.\n");
    printf("\t--versao, -v    Mostra as notas da versao e sai.\n");
    exit(0);
  }
  if ((!strcmp(*(argv + 1), "--versao")) || (!strcmp(*(argv + 1), "-v"))) {
    printf("\tDIP ( Destrinchador de IPs ) 0.5   :)\n");
    printf("Escrito por Jose Lopes de Oliveira Júnior. ");
    printf("<jlojunior@gmail.com>\n\n");
    printf("Copyright (C) 2005.\n");
    printf("\tEste programa é um software de livre distribuição, que pode\n");
    printf("ser copiado e distribuído sob os termos da Licença Geral\n");
    printf("GNU, conforme publicada pela Free Software Foundation,\n");
    printf("versão 2 da licença, ou (a critério do autor) qualquer versão\n");
    printf("posterior.\n");
    printf("\tEste programa é distribuído na expectativa de ser útil aos\n");
    printf("seus usuários, porém NÃO POSSUI NENHUMA GARANTIA, EXPLÍCITA OU\n");
    printf("IMPLÍCITA, COMERCIAL OU DE ATENDIMENTO A UMA DETERMINADA\n");
    printf("FINALIDADE. Consulte a Licença Pública Geral GNU.\n");
    exit(0);
  }
  {
    register char classe, tipo;
    char mascaraBinario[32], mascaraDecimal[15], endIPHostBinario[32],
        endIPHostDecimal[15], endIPSRBinario[32], endIPSRDecimal[15],
        endIPRedeBinario[32], endIPRedeDecimal[15];
    unsigned long int numRelHost, numRelSR, numRelRede;
    char resAnaliseSintatica = verSinNumIP(*(argv + 1));
    if ((resAnaliseSintatica == 2) || (resAnaliseSintatica == 3)) {
      classe = verSemNumIP(*(argv + 1));
      if ((classe) &&
          (!(verMaskNumIP(*(argv + 1), resAnaliseSintatica, classe)))) {
        printf("DIP : Para um numero IP de classe %c,", classe);
        printf(" eh esperada uma mascara de,\n\tpelo menos, ");
        if (classe == 'A')
          printf("8 bits.\n");
        else if (classe == 'B')
          printf("16 bits.\n");
        else if (classe == 'C')
          printf("24 bits.\n");
        printf("\tDigite \"dip --ajuda\" para obter ajuda.\n");
        exit(1);
      }
      switch (classe) {
      case 'A':
      case 'B':
      case 'C':
        geraEndIPHost(*(argv + 1), endIPHostDecimal, endIPHostBinario);
        printf("CLASSE......................: %c\n", classe);
        tipo = verTipoNumIP(*(argv + 1), classe);
        (tipo == 'R') ? printf("TIPO........................: REAL\n")
                      : printf("TIPO........................: LOCAL\n");
        geraMascaraNumIP(*(argv + 1), resAnaliseSintatica, mascaraDecimal,
                         mascaraBinario);
        printf("MASCARA.....................: %s\n", mascaraDecimal);
        geraEndIPHost(*(argv + 1), endIPHostDecimal, endIPHostBinario);
        printf("ENDERECO IP DO HOST.........: %s\n", endIPHostDecimal);
        geraEndIPSR(endIPHostBinario, mascaraBinario, endIPSRDecimal,
                    endIPSRBinario);
        printf("ENDERECO IP DA SUB REDE.....: %s\n", endIPSRDecimal);
        geraEndIPRede(endIPHostBinario, classe, endIPRedeDecimal,
                      endIPRedeBinario);
        printf("ENDERECO IP DA REDE.........: %s\n", endIPRedeDecimal);
        numRelHost = geraNumRelHost(endIPHostBinario, mascaraBinario);
        printf("NUMERO RELATIVO DO HOST.....: %d\n", numRelHost);
        numRelSR = geraNumRelSR(endIPHostBinario, mascaraBinario, classe);
        printf("NUMERO RELATIVO DA SUB REDE.: %d\n", numRelSR);
        numRelRede = geraNumRelRede(endIPHostBinario, classe);
        printf("NUMERO RELATIVO DA REDE.....: %d\n", numRelRede);
        exit(0);
        break;
      case 'D':
      case 'E':
        geraEndIPHost(*(argv + 1), endIPHostDecimal, endIPHostBinario);
        printf("CLASSE......................: %c\n", classe);
        (classe == 'D') ? printf("TIPO........................: MULTICAST\n")
                        : printf("TIPO........................: RESERVADO\n");
        printf("MASCARA.....................: -\n");
        printf("ENDERECO IP DO HOST.........: %s\n", endIPHostDecimal);
        printf("ENDERECO IP DA SUB REDE.....: -\n");
        printf("ENDERECO IP DA REDE.........: -\n");
        printf("NUMERO RELATIVO DO HOST.....: -\n");
        printf("NUMERO RELATIVO DA SUB REDE.: -\n");
        printf("NUMERO RELATIVO DA REDE.....: -\n");
        exit(0);
        break;
      case 'L':
        geraEndIPHost(*(argv + 1), endIPHostDecimal, endIPHostBinario);
        printf("CLASSE......................: -\n");
        printf("TIPO........................: LOOPBACK\n");
        printf("MASCARA.....................: 255.0.0.0\n");
        printf("ENDERECO IP DO HOST.........: %s\n", endIPHostDecimal);
        printf("ENDERECO IP DA SUB REDE.....: -\n");
        printf("ENDERECO IP DA REDE.........: -\n");
        printf("NUMERO RELATIVO DO HOST.....: -\n");
        printf("NUMERO RELATIVO DA SUB REDE.: -\n");
        printf("NUMERO RELATIVO DA REDE.....: -\n");
        exit(0);
        break;
      default:
        printf("DIP : Numero IP invalido.\n");
        printf("\tDigite \"DIP --ajuda\" para obter ajuda.\n");
        exit(1);
        break;
      }
    } else {
      if (resAnaliseSintatica) {
        classe = verSemNumIP(*(argv + 1));
        switch (classe) {
        case 'D':
        case 'E':
          printf("CLASSE......................: %c\n", classe);
          (classe == 'D') ? printf("TIPO........................: MULTICAST\n")
                          : printf("TIPO........................: RESERVADO\n");
          printf("MASCARA.....................: -\n");
          printf("ENDERECO IP DO HOST.........: %s\n", *(argv + 1));
          printf("ENDERECO IP DA SUB REDE.....: -\n");
          printf("ENDERECO IP DA REDE.........: -\n");
          printf("NUMERO RELATIVO DO HOST.....: -\n");
          printf("NUMERO RELATIVO DA SUB REDE.: -\n");
          printf("NUMERO RELATIVO DA REDE.....: -\n");
          exit(0);
          break;
        case 'L':
          printf("CLASSE......................: -\n");
          printf("TIPO........................: LOOPBACK\n");
          printf("MASCARA.....................: 255.0.0.0\n");
          printf("ENDERECO IP DO HOST.........: %s\n", *(argv + 1));
          printf("ENDERECO IP DA SUB REDE.....: -\n");
          printf("ENDERECO IP DA REDE.........: -\n");
          printf("NUMERO RELATIVO DO HOST.....: -\n");
          printf("NUMERO RELATIVO DA SUB REDE.: -\n");
          printf("NUMERO RELATIVO DA REDE.....: -\n");
          exit(0);
          break;
        default:
          printf("DIP : Numero IP invalido.\n");
          printf("\tDigite \"dip --ajuda\" para obter ajuda.\n");
          exit(1);
          break;
        }
      }
      printf("DIP : Numero IP invalido.\n");
      printf("\tDigite \"dip --ajuda\" para obter ajuda.\n");
      exit(1);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1229 <main+0x49>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
cmpl   $0x2,-0x8(%rbp)
jle    1259 <main+0x79>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdfa(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     1293 <main+0xb3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde5(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    130a <main+0x12a>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe72(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     1344 <main+0x164>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe5e(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1401 <main+0x221>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf86(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfbc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfe9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <verSinNumIP@plt>
mov    %al,-0xf9(%rbp)
movsbl -0xf9(%rbp),%eax
cmp    $0x2,%eax
je     1434 <main+0x254>
movsbl -0xf9(%rbp),%eax
cmp    $0x3,%eax
jne    1885 <main+0x6a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <verSemNumIP@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     1511 <main+0x331>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0xf9(%rbp),%al
movsbl %al,%esi
movsbl -0x11(%rbp),%edx
call   1070 <verMaskNumIP@plt>
cmp    $0x0,%eax
jne    1511 <main+0x331>
movsbl -0x11(%rbp),%esi
lea    0xf92(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x41,%eax
jne    14b4 <main+0x2d4>
lea    0xfba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14f9 <main+0x319>
movsbl -0x11(%rbp),%eax
cmp    $0x42,%eax
jne    14d4 <main+0x2f4>
lea    0xfa3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14f4 <main+0x314>
movsbl -0x11(%rbp),%eax
cmp    $0x43,%eax
jne    14ef <main+0x30f>
lea    0xf8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14f4 <main+0x314>
jmp    14f9 <main+0x319>
lea    0xf7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
movsbl -0x11(%rbp),%eax
mov    %eax,-0x100(%rbp)
add    $0xffffffbf,%eax
sub    $0x3,%eax
jb     1557 <main+0x377>
jmp    152c <main+0x34c>
mov    -0x100(%rbp),%eax
add    $0xffffffbc,%eax
sub    $0x2,%eax
jb     16ff <main+0x51f>
jmp    1543 <main+0x363>
mov    -0x100(%rbp),%eax
sub    $0x4c,%eax
je     17c1 <main+0x5e1>
jmp    185f <main+0x67f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x7f(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   10a0 <geraEndIPHost@plt>
movsbl -0x11(%rbp),%esi
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
movsbl -0x11(%rbp),%esi
call   10b0 <verTipoNumIP@plt>
mov    %al,-0x12(%rbp)
movsbl -0x12(%rbp),%eax
cmp    $0x52,%eax
jne    15b2 <main+0x3d2>
lea    0xf24(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15c0 <main+0x3e0>
lea    0xf35(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0xf9(%rbp),%al
lea    -0x4f(%rbp),%rdx
lea    -0x40(%rbp),%rcx
movsbl %al,%esi
call   10e0 <geraMascaraNumIP@plt>
lea    -0x4f(%rbp),%rsi
lea    0xf2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x7f(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   10a0 <geraEndIPHost@plt>
lea    -0x7f(%rbp),%rsi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0xaf(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
call   1030 <geraEndIPSR@plt>
lea    -0xaf(%rbp),%rsi
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x11(%rbp),%al
lea    -0xdf(%rbp),%rdx
lea    -0xd0(%rbp),%rcx
movsbl %al,%esi
call   1090 <geraEndIPRede@plt>
lea    -0xdf(%rbp),%rsi
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1060 <geraNumRelHost@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rsi
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
lea    -0x40(%rbp),%rsi
movsbl -0x11(%rbp),%edx
call   10c0 <geraNumRelSR@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rsi
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1100 <geraNumRelRede@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rsi
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x7f(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   10a0 <geraEndIPHost@plt>
movsbl -0x11(%rbp),%esi
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x44,%eax
jne    1746 <main+0x566>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1754 <main+0x574>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x7f(%rbp),%rsi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x7f(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   10a0 <geraEndIPHost@plt>
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x7f(%rbp),%rsi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x7a7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
cmpb   $0x0,-0xf9(%rbp)
je     1a35 <main+0x855>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <verSemNumIP@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
mov    %eax,-0x104(%rbp)
add    $0xffffffbc,%eax
sub    $0x2,%eax
jb     18d1 <main+0x6f1>
jmp    18bd <main+0x6dd>
mov    -0x104(%rbp),%eax
sub    $0x4c,%eax
je     1982 <main+0x7a2>
jmp    1a0f <main+0x82f>
movsbl -0x11(%rbp),%esi
lea    0xbcc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x44,%eax
jne    1903 <main+0x723>
lea    0xd0a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1911 <main+0x731>
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xc07(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xb7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcab(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcf7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xa5b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xa35(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
cmp    $0x1,%edi
jg     1212 <main+0x22>
lea    0x152e(%rip),%rdi
jmp    12b3 <main+0xc3>
cmp    $0x2,%edi
jne    12ac <main+0xbc>
mov    %rsi,%rbx
mov    0x8(%rsi),%rbp
lea    0xdd7(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     124c <main+0x5c>
lea    0xdcc(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    12ce <main+0xde>
lea    0xf52(%rip),%rdi
call   1040 <puts@plt>
lea    0xf61(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc8(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc4(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe2(%rip),%rdi
jmp    1391 <main+0x1a1>
lea    0x146b(%rip),%rdi
call   1040 <puts@plt>
lea    0x1496(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
lea    0xd36(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     12f8 <main+0x108>
lea    0xd2c(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    139d <main+0x1ad>
lea    0xfbc(%rip),%rdi
call   1040 <puts@plt>
lea    0xd0c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xfc9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd4(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1040 <puts@plt>
lea    0x1010(%rip),%rdi
call   1040 <puts@plt>
lea    0x103f(%rip),%rdi
call   1040 <puts@plt>
lea    0x106a(%rip),%rdi
call   1040 <puts@plt>
lea    0x10a0(%rip),%rdi
call   1040 <puts@plt>
lea    0x109f(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d2(%rip),%rdi
call   1040 <puts@plt>
lea    0x1109(%rip),%rdi
call   1040 <puts@plt>
lea    0x1137(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>
mov    %rbp,%rdi
call   1050 <verSinNumIP@plt>
mov    %eax,%r15d
and    $0xfe,%al
cmp    $0x2,%al
jne    13c7 <main+0x1d7>
mov    0x8(%rbx),%rdi
call   10e0 <verSemNumIP@plt>
test   %al,%al
jne    141f <main+0x22f>
lea    0x1300(%rip),%rdi
jmp    12b3 <main+0xc3>
test   %r15b,%r15b
je     14b6 <main+0x2c6>
mov    0x8(%rbx),%rdi
call   10e0 <verSemNumIP@plt>
movsbl %al,%ebp
lea    -0x44(%rbp),%eax
cmp    $0x2,%eax
jae    147d <main+0x28d>
lea    0xca6(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x44,%bpl
lea    0x1250(%rip),%rax
lea    0x1161(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
lea    0x1179(%rip),%rdi
jmp    14a1 <main+0x2b1>
mov    %eax,%ebp
movsbl %al,%r14d
mov    0x8(%rbx),%rdi
movsbl %r15b,%r13d
mov    %r13d,%esi
mov    %r14d,%edx
call   1080 <verMaskNumIP@plt>
test   %eax,%eax
jne    14ce <main+0x2de>
lea    0xbfd(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc12(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xbf,%bpl
cmp    $0x2,%bpl
ja     14c2 <main+0x2d2>
movsbq %bpl,%rax
lea    0x130c(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    14bd <main+0x2cd>
cmp    $0x4c,%ebp
jne    14b6 <main+0x2c6>
lea    0x1073(%rip),%rdi
call   1040 <puts@plt>
lea    0x1087(%rip),%rdi
call   1040 <puts@plt>
lea    0x10a2(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rbx),%rsi
lea    0xc28(%rip),%rdi
jmp    16d4 <main+0x4e4>
lea    0x1205(%rip),%rdi
call   1040 <puts@plt>
lea    0x1213(%rip),%rdi
jmp    12bf <main+0xcf>
lea    -0x41(%r14),%eax
cmp    $0x3,%eax
jb     1532 <main+0x342>
lea    -0x44(%r14),%eax
cmp    $0x2,%eax
jae    1686 <main+0x496>
mov    0x8(%rbx),%rdi
lea    0x1(%rsp),%rbx
lea    0x10(%rsp),%rdx
mov    %rbx,%rsi
call   10b0 <geraEndIPHost@plt>
lea    0xb94(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x44,%bpl
lea    0x113d(%rip),%rax
lea    0x104e(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
lea    0x1066(%rip),%rdi
jmp    16c5 <main+0x4d5>
mov    0x8(%rbx),%rdi
lea    0x1(%rsp),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdx
call   10b0 <geraEndIPHost@plt>
lea    0xb46(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rbx),%rdi
mov    %r14d,%esi
call   10c0 <verTipoNumIP@plt>
cmp    $0x52,%al
lea    0x1131(%rip),%rax
lea    0x1106(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    0x8(%rbx),%rdi
lea    0x51(%rsp),%rbp
lea    0xa0(%rsp),%r12
mov    %r13d,%esi
mov    %rbp,%rdx
mov    %r12,%rcx
call   10f0 <geraMascaraNumIP@plt>
lea    0xb13(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rbx),%rdi
lea    0x1(%rsp),%rbx
mov    %rbx,%rsi
mov    %r15,%rdx
call   10b0 <geraEndIPHost@plt>
lea    0xb10(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x42(%rsp),%rbx
lea    0x80(%rsp),%rcx
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1030 <geraEndIPSR@plt>
lea    0xb06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x33(%rsp),%rbx
lea    0x60(%rsp),%rcx
mov    %r15,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
call   10a0 <geraEndIPRede@plt>
lea    0xaff(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1070 <geraNumRelHost@plt>
lea    0xb05(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14d,%edx
call   10d0 <geraNumRelSR@plt>
lea    0xb08(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1110 <geraNumRelRede@plt>
lea    0xb0e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   1100 <exit@plt>
cmp    $0x4c,%r14d
jne    13bb <main+0x1cb>
mov    0x8(%rbx),%rdi
lea    0x1(%rsp),%rbx
lea    0x10(%rsp),%rdx
mov    %rbx,%rsi
call   10b0 <geraEndIPHost@plt>
lea    0xe4f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe63(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7e(%rip),%rdi
call   1040 <puts@plt>
lea    0xa08(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rdi
call   1040 <puts@plt>
lea    0xef9(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf21(%rip),%rdi
jmp    1391 <main+0x1a1>

LLVM IR (-O0):
@.str = [27 x i8] c"DIP : Falta um parametro.\0A\00"
@.str.1 = [41 x i8] c"\09Digite \22DIP --ajuda\22 para obter ajuda.\0A\00"
@.str.2 = [30 x i8] c"DIP : Excesso de parametros.\0A\00"
@.str.3 = [8 x i8] c"--ajuda\00"
@.str.4 = [3 x i8] c"-a\00"
@.str.5 = [28 x i8] c"Uso: dip NUMERO_IP/MASCARA\0A\00"
@.str.6 = [43 x i8] c"\09onde: NUMERO_IP eh um numero IP valido e\0A\00"
@.str.7 = [42 x i8] c"\09 MASCARA eh uma mascara de IP valida.\0A\00"
@.str.8 = [19 x i8] c"ou dip [opcoes]\0A\00"
@.str.9 = [51 x i8] c"Gera e mostra informacoes acerca de um numero IP.\0A\00"
@.str.10 = [9 x i8] c"opcoes:\0A\00"
@.str.11 = [43 x i8] c"\09--ajuda, -a Mostra esta ajuda e sai.\0A\00"
@.str.12 = [51 x i8] c"\09--versao, -v Mostra as notas da versao e sai.\0A\00"
@.str.13 = [9 x i8] c"--versao\00"
@.str.14 = [3 x i8] c"-v\00"
@.str.15 = [40 x i8] c"\09DIP ( Destrinchador de IPs ) 0.5 :)\0A\00"
@.str.16 = [45 x i8] c"Escrito por Jose Lopes de Oliveira J\C3\BAnior. \00"
@.str.17 = [24 x i8] c"<jlojunior@gmail.com>\0A\0A\00"
@.str.18 = [21 x i8] c"Copyright (C) 2005.\0A\00"
@.str.19 = [65 x i8] c"\09Este programa \C3\A9 um software de livre distribui\C3\A7\C3\A3o, que pode\0A\00"
@.str.20 = [60 x i8] c"ser copiado e distribu\C3\ADdo sob os termos da Licen\C3\A7a Geral\0A\00"
@.str.21 = [56 x i8] c"GNU, conforme publicada pela Free Software Foundation,\0A\00"
@.str.22 = [67 x i8] c"vers\C3\A3o 2 da licen\C3\A7a, ou (a crit\C3\A9rio do autor) qualquer vers\C3\A3o\0A\00"
@.str.23 = [12 x i8] c"posterior.\0A\00"
@.str.24 = [64 x i8] c"\09Este programa \C3\A9 distribu\C3\ADdo na expectativa de ser \C3\BAtil aos\0A\00"
@.str.25 = [68 x i8] c"seus usu\C3\A1rios, por\C3\A9m N\C3\83O POSSUI NENHUMA GARANTIA, EXPL\C3\8DCITA OU\0A\00"
@.str.26 = [59 x i8] c"IMPL\C3\8DCITA, COMERCIAL OU DE ATENDIMENTO A UMA DETERMINADA\0A\00"
@.str.27 = [53 x i8] c"FINALIDADE. Consulte a Licen\C3\A7a P\C3\BAblica Geral GNU.\0A\00"
@.str.28 = [38 x i8] c"DIP : Para um numero IP de classe %c,\00"
@.str.29 = [43 x i8] c" eh esperada uma mascara de,\0A\09pelo menos, \00"
@.str.30 = [9 x i8] c"8 bits.\0A\00"
@.str.31 = [10 x i8] c"16 bits.\0A\00"
@.str.32 = [10 x i8] c"24 bits.\0A\00"
@.str.33 = [41 x i8] c"\09Digite \22dip --ajuda\22 para obter ajuda.\0A\00"
@.str.34 = [34 x i8] c"CLASSE......................: %c\0A\00"
@.str.35 = [36 x i8] c"TIPO........................: REAL\0A\00"
@.str.36 = [37 x i8] c"TIPO........................: LOCAL\0A\00"
@.str.37 = [34 x i8] c"MASCARA.....................: %s\0A\00"
@.str.38 = [34 x i8] c"ENDERECO IP DO HOST.........: %s\0A\00"
@.str.39 = [34 x i8] c"ENDERECO IP DA SUB REDE.....: %s\0A\00"
@.str.40 = [34 x i8] c"ENDERECO IP DA REDE.........: %s\0A\00"
@.str.41 = [34 x i8] c"NUMERO RELATIVO DO HOST.....: %d\0A\00"
@.str.42 = [34 x i8] c"NUMERO RELATIVO DA SUB REDE.: %d\0A\00"
@.str.43 = [34 x i8] c"NUMERO RELATIVO DA REDE.....: %d\0A\00"
@.str.44 = [41 x i8] c"TIPO........................: MULTICAST\0A\00"
@.str.45 = [41 x i8] c"TIPO........................: RESERVADO\0A\00"
@.str.46 = [33 x i8] c"MASCARA.....................: -\0A\00"
@.str.47 = [33 x i8] c"ENDERECO IP DA SUB REDE.....: -\0A\00"
@.str.48 = [33 x i8] c"ENDERECO IP DA REDE.........: -\0A\00"
@.str.49 = [33 x i8] c"NUMERO RELATIVO DO HOST.....: -\0A\00"
@.str.50 = [33 x i8] c"NUMERO RELATIVO DA SUB REDE.: -\0A\00"
@.str.51 = [33 x i8] c"NUMERO RELATIVO DA REDE.....: -\0A\00"
@.str.52 = [33 x i8] c"CLASSE......................: -\0A\00"
@.str.53 = [40 x i8] c"TIPO........................: LOOPBACK\0A\00"
@.str.54 = [41 x i8] c"MASCARA.....................: 255.0.0.0\0A\00"
@.str.55 = [27 x i8] c"DIP : Numero IP invalido.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca [32 x i8]
%9 = alloca [15 x i8]
%10 = alloca [32 x i8]
%11 = alloca [15 x i8]
%12 = alloca [32 x i8]
%13 = alloca [15 x i8]
%14 = alloca [32 x i8]
%15 = alloca [15 x i8]
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 2
br i1 %21, label %22, label %26
22: ; preds = %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %2
%27 = load i32, i32* %4
%28 = icmp sgt i32 %27, 2
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %26
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @strcmp(i8* %36, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %33
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 1
%42 = load i8*, i8** %41
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
br i1 %44, label %55, label %45
45: ; preds = %39, %33
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%54 = call i32 @exit(i32 0)
unreachable
55: ; preds = %39
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = call i32 @strcmp(i8* %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %55
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %82, label %67
67: ; preds = %61, %55
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.20, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.21, i64 0, i64 0))
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.22, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.24, i64 0, i64 0))
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.25, i64 0, i64 0))
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.26, i64 0, i64 0))
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.27, i64 0, i64 0))
%81 = call i32 @exit(i32 0)
unreachable
82: ; preds = %61
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 1
%85 = load i8*, i8** %84
%86 = call signext i8 @verSinNumIP(i8* %85)
store i8 %86, i8* %19
%87 = load i8, i8* %19
%88 = sext i8 %87 to i32
%89 = icmp eq i32 %88, 2
br i1 %89, label %94, label %90
90: ; preds = %82
%91 = load i8, i8* %19
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 3
br i1 %93, label %94, label %262
94: ; preds = %90, %82
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 1
%97 = load i8*, i8** %96
%98 = call signext i8 @verSemNumIP(i8* %97)
store i8 %98, i8* %6
%99 = load i8, i8* %6
%100 = sext i8 %99 to i32
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %137
102: ; preds = %94
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 1
%105 = load i8*, i8** %104
%106 = load i8, i8* %19
%107 = load i8, i8* %6
%108 = call i32 @verMaskNumIP(i8* %105, i8 signext %106, i8 signext %107)
%109 = icmp ne i32 %108, 0
br i1 %109, label %137, label %110
110: ; preds = %102
%111 = load i8, i8* %6
%112 = sext i8 %111 to i32
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.28, i64 0, i64 0), i32 %112)
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.29, i64 0, i64 0))
%115 = load i8, i8* %6
%116 = sext i8 %115 to i32
%117 = icmp eq i32 %116, 65
br i1 %117, label %118, label %120
118: ; preds = %110
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
br label %134
120: ; preds = %110
%121 = load i8, i8* %6
%122 = sext i8 %121 to i32
%123 = icmp eq i32 %122, 66
br i1 %123, label %124, label %126
124: ; preds = %120
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.31, i64 0, i64 0))
br label %133
126: ; preds = %120
%127 = load i8, i8* %6
%128 = sext i8 %127 to i32
%129 = icmp eq i32 %128, 67
br i1 %129, label %130, label %132
130: ; preds = %126
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0))
br label %132
132: ; preds = %130, %126
br label %133
133: ; preds = %132, %124
br label %134
134: ; preds = %133, %118
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.33, i64 0, i64 0))
%136 = call i32 @exit(i32 1)
unreachable
137: ; preds = %102, %94
%138 = load i8, i8* %6
%139 = sext i8 %138 to i32
switch i32 %139, label %258 [
i32 65, label %140
i32 66, label %140
i32 67, label %140
i32 68, label %212
i32 69, label %212
i32 76, label %240
]
140: ; preds = %137, %137, %137
%141 = load i8**, i8*** %5
%142 = getelementptr inbounds i8*, i8** %141, i64 1
%143 = load i8*, i8** %142
%144 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%145 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%146 = call i32 @geraEndIPHost(i8* %143, i8* %144, i8* %145)
%147 = load i8, i8* %6
%148 = sext i8 %147 to i32
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %148)
%150 = load i8**, i8*** %5
%151 = getelementptr inbounds i8*, i8** %150, i64 1
%152 = load i8*, i8** %151
%153 = load i8, i8* %6
%154 = call signext i8 @verTipoNumIP(i8* %152, i8 signext %153)
store i8 %154, i8* %7
%155 = load i8, i8* %7
%156 = sext i8 %155 to i32
%157 = icmp eq i32 %156, 82
br i1 %157, label %158, label %160
158: ; preds = %140
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))
br label %162
160: ; preds = %140
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.36, i64 0, i64 0))
br label %162
162: ; preds = %160, %158
%163 = phi i32 [ %159, %158 ], [ %161, %160 ]
%164 = load i8**, i8*** %5
%165 = getelementptr inbounds i8*, i8** %164, i64 1
%166 = load i8*, i8** %165
%167 = load i8, i8* %19
%168 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%169 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%170 = call i32 @geraMascaraNumIP(i8* %166, i8 signext %167, i8* %168, i8* %169)
%171 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.37, i64 0, i64 0), i8* %171)
%173 = load i8**, i8*** %5
%174 = getelementptr inbounds i8*, i8** %173, i64 1
%175 = load i8*, i8** %174
%176 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%177 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%178 = call i32 @geraEndIPHost(i8* %175, i8* %176, i8* %177)
%179 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %179)
%181 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%182 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%183 = getelementptr inbounds [15 x i8], [15 x i8]* %13, i64 0, i64 0
%184 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%185 = call i32 @geraEndIPSR(i8* %181, i8* %182, i8* %183, i8* %184)
%186 = getelementptr inbounds [15 x i8], [15 x i8]* %13, i64 0, i64 0
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.39, i64 0, i64 0), i8* %186)
%188 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%189 = load i8, i8* %6
%190 = getelementptr inbounds [15 x i8], [15 x i8]* %15, i64 0, i64 0
%191 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
%192 = call i32 @geraEndIPRede(i8* %188, i8 signext %189, i8* %190, i8* %191)
%193 = getelementptr inbounds [15 x i8], [15 x i8]* %15, i64 0, i64 0
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.40, i64 0, i64 0), i8* %193)
%195 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%196 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%197 = call i64 @geraNumRelHost(i8* %195, i8* %196)
store i64 %197, i64* %16
%198 = load i64, i64* %16
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.41, i64 0, i64 0), i64 %198)
%200 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%201 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%202 = load i8, i8* %6
%203 = call i64 @geraNumRelSR(i8* %200, i8* %201, i8 signext %202)
store i64 %203, i64* %17
%204 = load i64, i64* %17
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.42, i64 0, i64 0), i64 %204)
%206 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%207 = load i8, i8* %6
%208 = call i64 @geraNumRelRede(i8* %206, i8 signext %207)
store i64 %208, i64* %18
%209 = load i64, i64* %18
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.43, i64 0, i64 0), i64 %209)
%211 = call i32 @exit(i32 0)
unreachable
212: ; preds = %137, %137
%213 = load i8**, i8*** %5
%214 = getelementptr inbounds i8*, i8** %213, i64 1
%215 = load i8*, i8** %214
%216 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%217 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%218 = call i32 @geraEndIPHost(i8* %215, i8* %216, i8* %217)
%219 = load i8, i8* %6
%220 = sext i8 %219 to i32
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %220)
%222 = load i8, i8* %6
%223 = sext i8 %222 to i32
%224 = icmp eq i32 %223, 68
br i1 %224, label %225, label %227
225: ; preds = %212
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.44, i64 0, i64 0))
br label %229
227: ; preds = %212
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.45, i64 0, i64 0))
br label %229
229: ; preds = %227, %225
%230 = phi i32 [ %226, %225 ], [ %228, %227 ]
%231 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.46, i64 0, i64 0))
%232 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%233 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %232)
%234 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
%235 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.48, i64 0, i64 0))
%236 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.49, i64 0, i64 0))
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.51, i64 0, i64 0))
%239 = call i32 @exit(i32 0)
unreachable
240: ; preds = %137
%241 = load i8**, i8*** %5
%242 = getelementptr inbounds i8*, i8** %241, i64 1
%243 = load i8*, i8** %242
%244 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%245 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%246 = call i32 @geraEndIPHost(i8* %243, i8* %244, i8* %245)
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.52, i64 0, i64 0))
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.53, i64 0, i64 0))
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.54, i64 0, i64 0))
%250 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 0, i64 0
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %250)
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
%253 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.48, i64 0, i64 0))
%254 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.49, i64 0, i64 0))
%255 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
%256 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.51, i64 0, i64 0))
%257 = call i32 @exit(i32 0)
unreachable
258: ; preds = %137
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.55, i64 0, i64 0))
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%261 = call i32 @exit(i32 1)
unreachable
262: ; preds = %90
%263 = load i8, i8* %19
%264 = icmp ne i8 %263, 0
br i1 %264, label %265, label %314
265: ; preds = %262
%266 = load i8**, i8*** %5
%267 = getelementptr inbounds i8*, i8** %266, i64 1
%268 = load i8*, i8** %267
%269 = call signext i8 @verSemNumIP(i8* %268)
store i8 %269, i8* %6
%270 = load i8, i8* %6
%271 = sext i8 %270 to i32
switch i32 %271, label %310 [
i32 68, label %272
i32 69, label %272
i32 76, label %296
]
272: ; preds = %265, %265
%273 = load i8, i8* %6
%274 = sext i8 %273 to i32
%275 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %274)
%276 = load i8, i8* %6
%277 = sext i8 %276 to i32
%278 = icmp eq i32 %277, 68
br i1 %278, label %279, label %281
279: ; preds = %272
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.44, i64 0, i64 0))
br label %283
281: ; preds = %272
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.45, i64 0, i64 0))
br label %283
283: ; preds = %281, %279
%284 = phi i32 [ %280, %279 ], [ %282, %281 ]
%285 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.46, i64 0, i64 0))
%286 = load i8**, i8*** %5
%287 = getelementptr inbounds i8*, i8** %286, i64 1
%288 = load i8*, i8** %287
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %288)
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
%291 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.48, i64 0, i64 0))
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.49, i64 0, i64 0))
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
%294 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.51, i64 0, i64 0))
%295 = call i32 @exit(i32 0)
unreachable
296: ; preds = %265
%297 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.52, i64 0, i64 0))
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.53, i64 0, i64 0))
%299 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.54, i64 0, i64 0))
%300 = load i8**, i8*** %5
%301 = getelementptr inbounds i8*, i8** %300, i64 1
%302 = load i8*, i8** %301
%303 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %302)
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
%305 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.48, i64 0, i64 0))
%306 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.49, i64 0, i64 0))
%307 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
%308 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.51, i64 0, i64 0))
%309 = call i32 @exit(i32 0)
unreachable
310: ; preds = %265
%311 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.55, i64 0, i64 0))
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.33, i64 0, i64 0))
%313 = call i32 @exit(i32 1)
unreachable
314: ; preds = %262
%315 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.55, i64 0, i64 0))
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.33, i64 0, i64 0))
%317 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.3 = [8 x i8] c"--ajuda\00"
@.str.4 = [3 x i8] c"-a\00"
@.str.13 = [9 x i8] c"--versao\00"
@.str.14 = [3 x i8] c"-v\00"
@.str.16 = [45 x i8] c"Escrito por Jose Lopes de Oliveira J\C3\BAnior. \00"
@.str.28 = [38 x i8] c"DIP : Para um numero IP de classe %c,\00"
@.str.29 = [43 x i8] c" eh esperada uma mascara de,\0A\09pelo menos, \00"
@.str.34 = [34 x i8] c"CLASSE......................: %c\0A\00"
@.str.37 = [34 x i8] c"MASCARA.....................: %s\0A\00"
@.str.38 = [34 x i8] c"ENDERECO IP DO HOST.........: %s\0A\00"
@.str.39 = [34 x i8] c"ENDERECO IP DA SUB REDE.....: %s\0A\00"
@.str.40 = [34 x i8] c"ENDERECO IP DA REDE.........: %s\0A\00"
@.str.41 = [34 x i8] c"NUMERO RELATIVO DO HOST.....: %d\0A\00"
@.str.42 = [34 x i8] c"NUMERO RELATIVO DA SUB REDE.: %d\0A\00"
@.str.43 = [34 x i8] c"NUMERO RELATIVO DA REDE.....: %d\0A\00"
@str = [27 x i8] c"Uso: dip NUMERO_IP/MASCARA\00"
@str.56 = [42 x i8] c"\09onde: NUMERO_IP eh um numero IP valido e\00"
@str.57 = [41 x i8] c"\09 MASCARA eh uma mascara de IP valida.\00"
@str.58 = [18 x i8] c"ou dip [opcoes]\00"
@str.59 = [50 x i8] c"Gera e mostra informacoes acerca de um numero IP.\00"
@str.60 = [8 x i8] c"opcoes:\00"
@str.61 = [42 x i8] c"\09--ajuda, -a Mostra esta ajuda e sai.\00"
@str.62 = [50 x i8] c"\09--versao, -v Mostra as notas da versao e sai.\00"
@str.63 = [39 x i8] c"\09DIP ( Destrinchador de IPs ) 0.5 :)\00"
@str.64 = [23 x i8] c"<jlojunior@gmail.com>\0A\00"
@str.65 = [20 x i8] c"Copyright (C) 2005.\00"
@str.66 = [64 x i8] c"\09Este programa \C3\A9 um software de livre distribui\C3\A7\C3\A3o, que pode\00"
@str.67 = [59 x i8] c"ser copiado e distribu\C3\ADdo sob os termos da Licen\C3\A7a Geral\00"
@str.68 = [55 x i8] c"GNU, conforme publicada pela Free Software Foundation,\00"
@str.69 = [66 x i8] c"vers\C3\A3o 2 da licen\C3\A7a, ou (a crit\C3\A9rio do autor) qualquer vers\C3\A3o\00"
@str.70 = [11 x i8] c"posterior.\00"
@str.71 = [63 x i8] c"\09Este programa \C3\A9 distribu\C3\ADdo na expectativa de ser \C3\BAtil aos\00"
@str.72 = [67 x i8] c"seus usu\C3\A1rios, por\C3\A9m N\C3\83O POSSUI NENHUMA GARANTIA, EXPL\C3\8DCITA OU\00"
@str.73 = [58 x i8] c"IMPL\C3\8DCITA, COMERCIAL OU DE ATENDIMENTO A UMA DETERMINADA\00"
@str.74 = [52 x i8] c"FINALIDADE. Consulte a Licen\C3\A7a P\C3\BAblica Geral GNU.\00"
@str.95 = [32 x i8] c"CLASSE......................: -\00"
@str.96 = [39 x i8] c"TIPO........................: LOOPBACK\00"
@str.97 = [40 x i8] c"MASCARA.....................: 255.0.0.0\00"
@str.103 = [40 x i8] c"TIPO........................: RESERVADO\00"
@str.104 = [32 x i8] c"MASCARA.....................: -\00"
@str.105 = [32 x i8] c"ENDERECO IP DA SUB REDE.....: -\00"
@str.106 = [32 x i8] c"ENDERECO IP DA REDE.........: -\00"
@str.107 = [32 x i8] c"NUMERO RELATIVO DO HOST.....: -\00"
@str.108 = [32 x i8] c"NUMERO RELATIVO DA SUB REDE.: -\00"
@str.109 = [32 x i8] c"NUMERO RELATIVO DA REDE.....: -\00"
@str.110 = [40 x i8] c"TIPO........................: MULTICAST\00"
@str.111 = [36 x i8] c"TIPO........................: LOCAL\00"
@str.112 = [35 x i8] c"TIPO........................: REAL\00"
@str.113 = [26 x i8] c"DIP : Numero IP invalido.\00"
@str.115 = [40 x i8] c"\09Digite \22dip --ajuda\22 para obter ajuda.\00"
@str.116 = [9 x i8] c"24 bits.\00"
@str.117 = [9 x i8] c"16 bits.\00"
@str.118 = [8 x i8] c"8 bits.\00"
@str.119 = [29 x i8] c"DIP : Excesso de parametros.\00"
@str.121 = [26 x i8] c"DIP : Falta um parametro.\00"
@str.122 = [40 x i8] c"\09Digite \22DIP --ajuda\22 para obter ajuda.\00"
@reltable.main = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @str.118 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.117 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.116 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = alloca [15 x i8]
%5 = alloca [32 x i8]
%6 = alloca [15 x i8]
%7 = alloca [32 x i8]
%8 = alloca [15 x i8]
%9 = alloca [32 x i8]
%10 = alloca [15 x i8]
%11 = icmp slt i32 %0, 2
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.121, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.122, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = icmp eq i32 %0, 2
br i1 %17, label %22, label %18
18: ; preds = %16
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.119, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.122, i64 0, i64 0))
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %16
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i32 @strcmp(i8* dereferenceable(1) %24, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %22
%28 = tail call i32 @strcmp(i8* dereferenceable(1) %24, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %40
30: ; preds = %27, %22
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.56, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.57, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.58, i64 0, i64 0))
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.59, i64 0, i64 0))
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.60, i64 0, i64 0))
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.61, i64 0, i64 0))
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.62, i64 0, i64 0))
%39 = tail call i32 @exit(i32 0)
unreachable
40: ; preds = %27
%41 = tail call i32 @strcmp(i8* dereferenceable(1) %24, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = tail call i32 @strcmp(i8* dereferenceable(1) %24, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %61
46: ; preds = %43, %40
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.63, i64 0, i64 0))
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.64, i64 0, i64 0))
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.65, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.66, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.67, i64 0, i64 0))
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.68, i64 0, i64 0))
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.69, i64 0, i64 0))
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.70, i64 0, i64 0))
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.71, i64 0, i64 0))
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.72, i64 0, i64 0))
%58 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.73, i64 0, i64 0))
%59 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.74, i64 0, i64 0))
%60 = tail call i32 @exit(i32 0)
unreachable
61: ; preds = %43
%62 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%63 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%64 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%65 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%66 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%67 = getelementptr inbounds [15 x i8], [15 x i8]* %8, i64 0, i64 0
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%69 = getelementptr inbounds [15 x i8], [15 x i8]* %10, i64 0, i64 0
%70 = tail call signext i8 @verSinNumIP(i8* %24)
%71 = and i8 %70, -2
%72 = icmp eq i8 %71, 2
br i1 %72, label %73, label %154
73: ; preds = %61
%74 = load i8*, i8** %23
%75 = tail call signext i8 @verSemNumIP(i8* %74)
%76 = sext i8 %75 to i32
%77 = icmp eq i8 %75, 0
br i1 %77, label %150, label %78
78: ; preds = %73
%79 = load i8*, i8** %23
%80 = tail call i32 @verMaskNumIP(i8* %79, i8 signext %70, i8 signext %75)
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %95
82: ; preds = %78
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.28, i64 0, i64 0), i32 %76)
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.29, i64 0, i64 0))
%85 = add i8 %75, -65
%86 = icmp ult i8 %85, 3
br i1 %86, label %87, label %92
87: ; preds = %82
%88 = sext i8 %85 to i64
%89 = shl i64 %88, 2
%90 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.main to i8*), i64 %89)
%91 = tail call i32 @puts(i8* dereferenceable(1) %90)
br label %92
92: ; preds = %82, %87
%93 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.115, i64 0, i64 0))
%94 = tail call i32 @exit(i32 1)
unreachable
95: ; preds = %78
switch i32 %76, label %150 [
i32 65, label %96
i32 66, label %96
i32 67, label %96
i32 68, label %122
i32 69, label %122
i32 76, label %137
]
96: ; preds = %95, %95, %95
%97 = load i8*, i8** %23
%98 = call i32 @geraEndIPHost(i8* %97, i8* %65, i8* %64)
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %76)
%100 = load i8*, i8** %23
%101 = call signext i8 @verTipoNumIP(i8* %100, i8 signext %75)
%102 = icmp eq i8 %101, 82
%103 = select i1 %102, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.112, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @str.111, i64 0, i64 0)
%104 = call i32 @puts(i8* dereferenceable(1) %103)
%105 = load i8*, i8** %23
%106 = call i32 @geraMascaraNumIP(i8* %105, i8 signext %70, i8* %63, i8* %62)
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.37, i64 0, i64 0), i8* %63)
%108 = load i8*, i8** %23
%109 = call i32 @geraEndIPHost(i8* %108, i8* %65, i8* %64)
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %65)
%111 = call i32 @geraEndIPSR(i8* %64, i8* %62, i8* %67, i8* %66)
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.39, i64 0, i64 0), i8* %67)
%113 = call i32 @geraEndIPRede(i8* %64, i8 signext %75, i8* %69, i8* %68)
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.40, i64 0, i64 0), i8* %69)
%115 = call i64 @geraNumRelHost(i8* %64, i8* %62)
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.41, i64 0, i64 0), i64 %115)
%117 = call i64 @geraNumRelSR(i8* %64, i8* %62, i8 signext %75)
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.42, i64 0, i64 0), i64 %117)
%119 = call i64 @geraNumRelRede(i8* %64, i8 signext %75)
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.43, i64 0, i64 0), i64 %119)
%121 = call i32 @exit(i32 0)
unreachable
122: ; preds = %95, %95
%123 = load i8*, i8** %23
%124 = call i32 @geraEndIPHost(i8* %123, i8* %65, i8* %64)
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %76)
%126 = icmp eq i8 %75, 68
%127 = select i1 %126, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.110, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.103, i64 0, i64 0)
%128 = call i32 @puts(i8* dereferenceable(1) %127)
%129 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.104, i64 0, i64 0))
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %65)
%131 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.105, i64 0, i64 0))
%132 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.106, i64 0, i64 0))
%133 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.107, i64 0, i64 0))
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.108, i64 0, i64 0))
%135 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.109, i64 0, i64 0))
%136 = call i32 @exit(i32 0)
unreachable
137: ; preds = %95
%138 = load i8*, i8** %23
%139 = call i32 @geraEndIPHost(i8* %138, i8* %65, i8* %64)
%140 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.95, i64 0, i64 0))
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.96, i64 0, i64 0))
%142 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.97, i64 0, i64 0))
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %65)
%144 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.105, i64 0, i64 0))
%145 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.106, i64 0, i64 0))
%146 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.107, i64 0, i64 0))
%147 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.108, i64 0, i64 0))
%148 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.109, i64 0, i64 0))
%149 = call i32 @exit(i32 0)
unreachable
150: ; preds = %73, %95
%151 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.113, i64 0, i64 0))
%152 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.122, i64 0, i64 0))
%153 = tail call i32 @exit(i32 1)
unreachable
154: ; preds = %61
%155 = icmp eq i8 %70, 0
br i1 %155, label %190, label %156
156: ; preds = %154
%157 = load i8*, i8** %23
%158 = tail call signext i8 @verSemNumIP(i8* %157)
%159 = sext i8 %158 to i32
switch i32 %159, label %186 [
i32 68, label %160
i32 69, label %160
i32 76, label %174
]
160: ; preds = %156, %156
%161 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i32 %159)
%162 = icmp eq i8 %158, 68
%163 = select i1 %162, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.110, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.103, i64 0, i64 0)
%164 = tail call i32 @puts(i8* dereferenceable(1) %163)
%165 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.104, i64 0, i64 0))
%166 = load i8*, i8** %23
%167 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %166)
%168 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.105, i64 0, i64 0))
%169 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.106, i64 0, i64 0))
%170 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.107, i64 0, i64 0))
%171 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.108, i64 0, i64 0))
%172 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.109, i64 0, i64 0))
%173 = tail call i32 @exit(i32 0)
unreachable
174: ; preds = %156
%175 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.95, i64 0, i64 0))
%176 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.96, i64 0, i64 0))
%177 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.97, i64 0, i64 0))
%178 = load i8*, i8** %23
%179 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.38, i64 0, i64 0), i8* %178)
%180 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.105, i64 0, i64 0))
%181 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.106, i64 0, i64 0))
%182 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.107, i64 0, i64 0))
%183 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.108, i64 0, i64 0))
%184 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.109, i64 0, i64 0))
%185 = tail call i32 @exit(i32 0)
unreachable
186: ; preds = %156
%187 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.113, i64 0, i64 0))
%188 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.115, i64 0, i64 0))
%189 = tail call i32 @exit(i32 1)
unreachable
190: ; preds = %154
%191 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.113, i64 0, i64 0))
%192 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.115, i64 0, i64 0))
%193 = tail call i32 @exit(i32 1)
unreachable
}