#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 AttenteClient();
int EXIT_FAILURE;
int /*<<< orphan*/ Initialisation();
char *Reception();
int /*<<< orphan*/ Terminaison();
int authentification(char *, char *, char *);
int /*<<< orphan*/ bzero(char *, int);
scalar_t__ checkNewMessages(char *);
scalar_t__ deleteMessage(char *, char *);
int /*<<< orphan*/ envoi_reponse(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
scalar_t__ inscription(char *);
scalar_t__ listMessages(char *, char *);
int /*<<< orphan*/ parseType(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ readMessage(char *, char *);
int sendMessage(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int main(void) {
  char *requete = NULL;
  char type_requete[512];
  char login[20];
  char password[500];
  int connecte = 0;
  int authentifie = 0;
  if (!Initialisation()) {
    printf("[-] Une erreur est survenue lors de l'initialisation\n");
    exit(1);
  }
  while (1) {
    printf("\n[+] En attente de connexion d'un client...\n");
    if (!(connecte = AttenteClient())) {
      printf("[-] Erreur : la connection du client a échoué !\n");
      exit(2);
    }
    while (connecte) {
      requete = Reception();
      printf("Message reçu : %s\n:", requete);
      if (requete == NULL) {
        printf("[-] Warning : connexion interrompue !\n");
        authentifie = 0;
        connecte = 0;
      } else {
        printf("[+] Analyse de la requête...\n");
        parseType(requete, type_requete);
        if (!authentifie) {
          if (strncmp(type_requete, "authentification", strlen(type_requete)) ==
              0) {
            printf("\n##### Demande d'authentification #####\n");
            authentifie = authentification(requete, login, password);
          } else if ((strncmp(type_requete, "inscription",
                              strlen(type_requete)) == 0)) {
            printf("##### Demande d'inscription #####\n");
            if (inscription(requete) != 0) {
              fprintf(stderr, "[-] Erreur : Inscription impossible !\n");
              envoi_reponse(1);
            } else {
              envoi_reponse(5);
            }
          } else {
            fprintf(stderr, "[-] Erreur : authentification requise !\n");
            envoi_reponse(1);
          }
        } else {
          if (strncmp(type_requete, "send", strlen(type_requete)) == 0) {
            printf("\n##### Demande d'envoi d'un message #####\n");
            if (sendMessage(requete) == 6) {
              fprintf(stderr, "[-] Erreur : Envoi du message impossible !\n");
              Terminaison();
              exit(EXIT_FAILURE);
            }
          } else if (strncmp(type_requete, "check", strlen(type_requete)) ==
                     0) {
            printf("\n##### Demande du nombre de messages non lus #####\n");
            if (checkNewMessages(login) != 0) {
              fprintf(
                  stderr,
                  "[-] Erreur : vérification messages non lus impossible\n");
              Terminaison();
              exit(EXIT_FAILURE);
            }
          } else if (strncmp(type_requete, "list", strlen(type_requete)) == 0) {
            printf("\n##### Demande de listing #####\n");
            if (listMessages(requete, login) != 0) {
              fprintf(stderr, "[-] Erreur : listing des messages impossible\n");
              Terminaison();
              exit(EXIT_FAILURE);
            }
          } else if (strncmp(type_requete, "read", strlen(type_requete)) == 0) {
            printf("\n##### Demande de lecture de message #####\n");
            if (readMessage(requete, login) != 0) {
              fprintf(stderr, "[-] Erreur : Lecture du message impossible\n");
              Terminaison();
              exit(EXIT_FAILURE);
            }
          } else if ((strncmp(type_requete, "delete", strlen(type_requete)) ==
                      0)) {
            printf("\n##### Demande de suppression de message #####\n");
            if (deleteMessage(requete, login) != 0) {
              fprintf(stderr,
                      "[-] Erreur : Suppression du message impossible\n");
              Terminaison();
              exit(EXIT_FAILURE);
            }
          } else if ((strncmp(type_requete, "disconnect",
                              strlen(type_requete)) == 0)) {
            printf("\n##### Demande de déconnexion ! #####\n");
            authentifie = 0;
            printf("[+] Déconnexion aceptée : Au revoir %s\n", login);
            bzero(login, 20);
            bzero(password, 500);
          } else {
            printf("[-] Erreur : trame non reconnue !\n");
            envoi_reponse(6);
          }
        }
      }
      free(requete);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x434(%rbp)
movl   $0x0,-0x438(%rbp)
mov    $0x0,%al
call   10d0 <Initialisation@plt>
cmp    $0x0,%eax
jne    1296 <main+0x56>
lea    0xd7b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    129b <main+0x5b>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x0,%al
call   1070 <AttenteClient@plt>
mov    %eax,-0x434(%rbp)
cmp    $0x0,%eax
jne    12d7 <main+0x97>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x2,%edi
call   1140 <exit@plt>
jmp    12dc <main+0x9c>
cmpl   $0x0,-0x434(%rbp)
je     181c <main+0x5dc>
mov    $0x0,%al
call   1110 <Reception@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1338 <main+0xf8>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
movl   $0x0,-0x438(%rbp)
movl   $0x0,-0x434(%rbp)
jmp    180e <main+0x5ce>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1150 <parseType@plt>
cmpl   $0x0,-0x438(%rbp)
jne    1482 <main+0x242>
lea    -0x210(%rbp),%rax
mov    %rax,-0x440(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x440(%rbp),%rdi
mov    %eax,%edx
lea    0xd64(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13cc <main+0x18c>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x230(%rbp),%rsi
lea    -0x430(%rbp),%rdx
call   10a0 <authentification@plt>
mov    %eax,-0x438(%rbp)
jmp    147d <main+0x23d>
lea    -0x210(%rbp),%rax
mov    %rax,-0x448(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x448(%rbp),%rdi
mov    %eax,%edx
lea    0xd35(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1459 <main+0x219>
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
call   10f0 <inscription@plt>
cmp    $0x0,%rax
je     144a <main+0x20a>
mov    0x2bb3(%rip),%rax
mov    (%rax),%edi
lea    0xd24(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1160 <envoi_reponse@plt>
jmp    1454 <main+0x214>
mov    $0x5,%edi
call   1160 <envoi_reponse@plt>
jmp    1478 <main+0x238>
mov    0x2b80(%rip),%rax
mov    (%rax),%edi
lea    0xd18(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1160 <envoi_reponse@plt>
jmp    147d <main+0x23d>
jmp    1809 <main+0x5c9>
lea    -0x210(%rbp),%rax
mov    %rax,-0x450(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x450(%rbp),%rdi
mov    %eax,%edx
lea    0xcfe(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    150a <main+0x2ca>
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
call   10e0 <sendMessage@plt>
cmp    $0x6,%eax
jne    1505 <main+0x2c5>
mov    0x2afe(%rip),%rax
mov    (%rax),%edi
lea    0xcef(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   1060 <Terminaison@plt>
mov    0x2ada(%rip),%rax
mov    (%rax),%edi
call   1140 <exit@plt>
jmp    1804 <main+0x5c4>
lea    -0x210(%rbp),%rax
mov    %rax,-0x458(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x458(%rbp),%rdi
mov    %eax,%edx
lea    0xcd2(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1596 <main+0x356>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    -0x230(%rbp),%rdi
call   1100 <checkNewMessages@plt>
cmp    $0x0,%rax
je     1591 <main+0x351>
mov    0x2a72(%rip),%rax
mov    (%rax),%edi
lea    0xcc9(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   1060 <Terminaison@plt>
mov    0x2a4e(%rip),%rax
mov    (%rax),%edi
call   1140 <exit@plt>
jmp    17ff <main+0x5bf>
lea    -0x210(%rbp),%rax
mov    %rax,-0x460(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x460(%rbp),%rdi
mov    %eax,%edx
lea    0xcb8(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1626 <main+0x3e6>
lea    0xca7(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1050 <listMessages@plt>
cmp    $0x0,%rax
je     1621 <main+0x3e1>
mov    0x29e2(%rip),%rax
mov    (%rax),%edi
lea    0xc97(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   1060 <Terminaison@plt>
mov    0x29be(%rip),%rax
mov    (%rax),%edi
call   1140 <exit@plt>
jmp    17fa <main+0x5ba>
lea    -0x210(%rbp),%rax
mov    %rax,-0x468(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x468(%rbp),%rdi
mov    %eax,%edx
lea    0xc7c(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    16b6 <main+0x476>
lea    0xc6b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   10b0 <readMessage@plt>
cmp    $0x0,%rax
je     16b1 <main+0x471>
mov    0x2952(%rip),%rax
mov    (%rax),%edi
lea    0xc66(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   1060 <Terminaison@plt>
mov    0x292e(%rip),%rax
mov    (%rax),%edi
call   1140 <exit@plt>
jmp    17f5 <main+0x5b5>
lea    -0x210(%rbp),%rax
mov    %rax,-0x470(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x470(%rbp),%rdi
mov    %eax,%edx
lea    0xc49(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1746 <main+0x506>
lea    0xc3a(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1120 <deleteMessage@plt>
cmp    $0x0,%rax
je     1741 <main+0x501>
mov    0x28c2(%rip),%rax
mov    (%rax),%edi
lea    0xc39(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   1060 <Terminaison@plt>
mov    0x289e(%rip),%rax
mov    (%rax),%edi
call   1140 <exit@plt>
jmp    17f0 <main+0x5b0>
lea    -0x210(%rbp),%rax
mov    %rax,-0x478(%rbp)
lea    -0x210(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x478(%rbp),%rdi
mov    %eax,%edx
lea    0xc20(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    17d3 <main+0x593>
lea    0xc15(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
movl   $0x0,-0x438(%rbp)
lea    -0x230(%rbp),%rsi
lea    0xc1e(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    -0x230(%rbp),%rdi
mov    $0x14,%esi
call   1130 <bzero@plt>
lea    -0x430(%rbp),%rdi
mov    $0x1f4,%esi
call   1130 <bzero@plt>
jmp    17eb <main+0x5ab>
lea    0xc13(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    $0x6,%edi
call   1160 <envoi_reponse@plt>
jmp    17f0 <main+0x5b0>
jmp    17f5 <main+0x5b5>
jmp    17fa <main+0x5ba>
jmp    17ff <main+0x5bf>
jmp    1804 <main+0x5c4>
jmp    1809 <main+0x5c9>
jmp    180e <main+0x5ce>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    12dc <main+0x9c>
jmp    129b <main+0x5b>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
xor    %eax,%eax
call   10e0 <Initialisation@plt>
test   %eax,%eax
jne    1282 <main+0x32>
lea    0xf4e(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1150 <exit@plt>
lea    0xf6d(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <AttenteClient@plt>
test   %eax,%eax
jne    12af <main+0x5f>
lea    0xf82(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
call   1150 <exit@plt>
lea    0xd4a(%rip),%r13
lea    0xf97(%rip),%r12
lea    0x220(%rsp),%rbx
lea    0x20(%rsp),%r14
jmp    12fb <main+0xab>
nopl   0x0(%rax)
lea    0x1105(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
lea    0xf0b(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <AttenteClient@plt>
test   %eax,%eax
je     1299 <main+0x49>
xor    %eax,%eax
call   1120 <Reception@plt>
mov    %rax,%rbp
mov    %r13,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
test   %rbp,%rbp
je     12d0 <main+0x80>
xor    %r15d,%r15d
jmp    1365 <main+0x115>
nopl   0x0(%rax)
lea    0x108b(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   10f0 <sendMessage@plt>
cmp    $0x6,%eax
je     1605 <main+0x3b5>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1120 <Reception@plt>
mov    %rax,%rbp
mov    %r13,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
test   %rbp,%rbp
je     12d0 <main+0x80>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1160 <parseType@plt>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
test   %r15d,%r15d
je     1470 <main+0x220>
lea    0xcef(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1320 <main+0xd0>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xd02(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     14b6 <main+0x266>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xd1e(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     14fa <main+0x2aa>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xd2f(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     155f <main+0x30f>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xd3e(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1584 <main+0x334>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xd53(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     15b0 <main+0x360>
lea    0xe6c(%rip),%rdi
call   1050 <puts@plt>
mov    $0x6,%edi
call   1170 <envoi_reponse@plt>
jmp    133d <main+0xed>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xb9e(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     14d8 <main+0x288>
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %rbx,%rdi
lea    0xb91(%rip),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     151f <main+0x2cf>
mov    0x2b38(%rip),%rax
mov    (%rax),%edi
lea    0xba8(%rip),%rsi
jmp    1548 <main+0x2f8>
lea    0xec2(%rip),%rdi
call   1050 <puts@plt>
mov    %rsp,%rdi
call   1110 <checkNewMessages@plt>
test   %rax,%rax
je     133d <main+0xed>
jmp    1617 <main+0x3c7>
lea    0xdb5(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rsp,%rsi
mov    %r14,%rdx
call   10b0 <authentification@plt>
mov    %eax,%r15d
jmp    133d <main+0xed>
lea    0xe5e(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rsp,%rsi
call   1060 <listMessages@plt>
test   %rax,%rax
je     133d <main+0xed>
jmp    1629 <main+0x3d9>
lea    0xd4c(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   1100 <inscription@plt>
test   %rax,%rax
je     15a9 <main+0x359>
mov    0x2aa1(%rip),%rax
mov    (%rax),%edi
lea    0xaea(%rip),%rsi
call   10d0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <envoi_reponse@plt>
xor    %r15d,%r15d
jmp    133d <main+0xed>
lea    0xdce(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rsp,%rsi
call   10c0 <readMessage@plt>
test   %rax,%rax
je     133d <main+0xed>
jmp    163b <main+0x3eb>
lea    0xd7a(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rsp,%rsi
call   1130 <deleteMessage@plt>
test   %rax,%rax
je     133d <main+0xed>
jmp    164d <main+0x3fd>
mov    $0x5,%edi
jmp    1552 <main+0x302>
lea    0xd27(%rip),%rdi
call   1050 <puts@plt>
xor    %r15d,%r15d
lea    0xbd1(%rip),%rdi
mov    %r12,%r13
mov    %r14,%r12
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r14,%rdi
mov    %r12,%r14
mov    %r13,%r12
lea    0xa17(%rip),%r13
mov    $0x14,%esi
call   1140 <bzero@plt>
mov    %r14,%rdi
mov    $0x1f4,%esi
call   1140 <bzero@plt>
jmp    133d <main+0xed>
mov    0x29d4(%rip),%rax
mov    (%rax),%edi
lea    0xa72(%rip),%rsi
jmp    165d <main+0x40d>
mov    0x29c2(%rip),%rax
mov    (%rax),%edi
lea    0xa92(%rip),%rsi
jmp    165d <main+0x40d>
mov    0x29b0(%rip),%rax
mov    (%rax),%edi
lea    0xabd(%rip),%rsi
jmp    165d <main+0x40d>
mov    0x299e(%rip),%rax
mov    (%rax),%edi
lea    0xade(%rip),%rsi
jmp    165d <main+0x40d>
mov    0x298c(%rip),%rax
mov    (%rax),%edi
lea    0xaff(%rip),%rsi
call   10d0 <fprintf@plt>
xor    %eax,%eax
call   1070 <Terminaison@plt>
mov    0x2968(%rip),%rax
mov    (%rax),%edi
call   1150 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"[-] Une erreur est survenue lors de l'initialisation\0A\00"
@.str.1 = [45 x i8] c"\0A[+] En attente de connexion d'un client...\0A\00"
@.str.2 = [51 x i8] c"[-] Erreur : la connection du client a \C3\A9chou\C3\A9 !\0A\00"
@.str.3 = [21 x i8] c"Message re\C3\A7u : %s\0A:\00"
@.str.4 = [39 x i8] c"[-] Warning : connexion interrompue !\0A\00"
@.str.5 = [31 x i8] c"[+] Analyse de la requ\C3\AAte...\0A\00"
@.str.6 = [17 x i8] c"authentification\00"
@.str.7 = [41 x i8] c"\0A##### Demande d'authentification #####\0A\00"
@.str.8 = [12 x i8] c"inscription\00"
@.str.9 = [35 x i8] c"##### Demande d'inscription #####\0A\00"
@stderr = global i32 0
@.str.10 = [39 x i8] c"[-] Erreur : Inscription impossible !\0A\00"
@.str.11 = [41 x i8] c"[-] Erreur : authentification requise !\0A\00"
@.str.12 = [5 x i8] c"send\00"
@.str.13 = [43 x i8] c"\0A##### Demande d'envoi d'un message #####\0A\00"
@.str.14 = [44 x i8] c"[-] Erreur : Envoi du message impossible !\0A\00"
@EXIT_FAILURE = global i32 0
@.str.15 = [6 x i8] c"check\00"
@.str.16 = [52 x i8] c"\0A##### Demande du nombre de messages non lus #####\0A\00"
@.str.17 = [56 x i8] c"[-] Erreur : v\C3\A9rification messages non lus impossible\0A\00"
@.str.18 = [5 x i8] c"list\00"
@.str.19 = [33 x i8] c"\0A##### Demande de listing #####\0A\00"
@.str.20 = [46 x i8] c"[-] Erreur : listing des messages impossible\0A\00"
@.str.21 = [5 x i8] c"read\00"
@.str.22 = [44 x i8] c"\0A##### Demande de lecture de message #####\0A\00"
@.str.23 = [44 x i8] c"[-] Erreur : Lecture du message impossible\0A\00"
@.str.24 = [7 x i8] c"delete\00"
@.str.25 = [48 x i8] c"\0A##### Demande de suppression de message #####\0A\00"
@.str.26 = [48 x i8] c"[-] Erreur : Suppression du message impossible\0A\00"
@.str.27 = [11 x i8] c"disconnect\00"
@.str.28 = [40 x i8] c"\0A##### Demande de d\C3\A9connexion ! #####\0A\00"
@.str.29 = [42 x i8] c"[+] D\C3\A9connexion acept\C3\A9e : Au revoir %s\0A\00"
@.str.30 = [35 x i8] c"[-] Erreur : trame non reconnue !\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [512 x i8]
%4 = alloca [20 x i8]
%5 = alloca [500 x i8]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i8* null, i8** %2
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 (...) @Initialisation()
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %0
br label %14
14: ; preds = %13, %196
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 (...) @AttenteClient()
store i32 %16, i32* %6
%17 = icmp ne i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %14
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @exit(i32 2)
unreachable
21: ; preds = %14
br label %22
22: ; preds = %193, %21
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %196
25: ; preds = %22
%26 = call i8* (...) @Reception()
store i8* %26, i8** %2
%27 = load i8*, i8** %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %27)
%29 = load i8*, i8** %2
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %33
31: ; preds = %25
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
store i32 0, i32* %6
br label %193
33: ; preds = %25
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%35 = load i8*, i8** %2
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%37 = call i32 @parseType(i8* %35, i8* %36)
%38 = load i32, i32* %7
%39 = icmp ne i32 %38, 0
br i1 %39, label %76, label %40
40: ; preds = %33
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%42 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%43 = call i32 @strlen(i8* %42)
%44 = call i64 @strncmp(i8* %41, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %52
46: ; preds = %40
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%48 = load i8*, i8** %2
%49 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%50 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%51 = call i32 @authentification(i8* %48, i8* %49, i8* %50)
store i32 %51, i32* %7
br label %75
52: ; preds = %40
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%55 = call i32 @strlen(i8* %54)
%56 = call i64 @strncmp(i8* %53, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %70
58: ; preds = %52
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%60 = load i8*, i8** %2
%61 = call i64 @inscription(i8* %60)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %67
63: ; preds = %58
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%66 = call i32 @envoi_reponse(i32 1)
br label %69
67: ; preds = %58
%68 = call i32 @envoi_reponse(i32 5)
br label %69
69: ; preds = %67, %63
br label %74
70: ; preds = %52
%71 = load i32, i32* @stderr
%72 = call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%73 = call i32 @envoi_reponse(i32 1)
br label %74
74: ; preds = %70, %69
br label %75
75: ; preds = %74, %46
br label %192
76: ; preds = %33
%77 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%78 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%79 = call i32 @strlen(i8* %78)
%80 = call i64 @strncmp(i8* %77, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %79)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %94
82: ; preds = %76
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0))
%84 = load i8*, i8** %2
%85 = call i32 @sendMessage(i8* %84)
%86 = icmp eq i32 %85, 6
br i1 %86, label %87, label %93
87: ; preds = %82
%88 = load i32, i32* @stderr
%89 = call i32 @fprintf(i32 %88, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
%90 = call i32 (...) @Terminaison()
%91 = load i32, i32* @EXIT_FAILURE
%92 = call i32 @exit(i32 %91)
unreachable
93: ; preds = %82
br label %191
94: ; preds = %76
%95 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%96 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%97 = call i32 @strlen(i8* %96)
%98 = call i64 @strncmp(i8* %95, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %97)
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %112
100: ; preds = %94
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0))
%102 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%103 = call i64 @checkNewMessages(i8* %102)
%104 = icmp ne i64 %103, 0
br i1 %104, label %105, label %111
105: ; preds = %100
%106 = load i32, i32* @stderr
%107 = call i32 @fprintf(i32 %106, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.17, i64 0, i64 0))
%108 = call i32 (...) @Terminaison()
%109 = load i32, i32* @EXIT_FAILURE
%110 = call i32 @exit(i32 %109)
unreachable
111: ; preds = %100
br label %190
112: ; preds = %94
%113 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%114 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%115 = call i32 @strlen(i8* %114)
%116 = call i64 @strncmp(i8* %113, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i32 %115)
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %131
118: ; preds = %112
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0))
%120 = load i8*, i8** %2
%121 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%122 = call i64 @listMessages(i8* %120, i8* %121)
%123 = icmp ne i64 %122, 0
br i1 %123, label %124, label %130
124: ; preds = %118
%125 = load i32, i32* @stderr
%126 = call i32 @fprintf(i32 %125, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.20, i64 0, i64 0))
%127 = call i32 (...) @Terminaison()
%128 = load i32, i32* @EXIT_FAILURE
%129 = call i32 @exit(i32 %128)
unreachable
130: ; preds = %118
br label %189
131: ; preds = %112
%132 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%133 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%134 = call i32 @strlen(i8* %133)
%135 = call i64 @strncmp(i8* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 %134)
%136 = icmp eq i64 %135, 0
br i1 %136, label %137, label %150
137: ; preds = %131
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.22, i64 0, i64 0))
%139 = load i8*, i8** %2
%140 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%141 = call i64 @readMessage(i8* %139, i8* %140)
%142 = icmp ne i64 %141, 0
br i1 %142, label %143, label %149
143: ; preds = %137
%144 = load i32, i32* @stderr
%145 = call i32 @fprintf(i32 %144, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.23, i64 0, i64 0))
%146 = call i32 (...) @Terminaison()
%147 = load i32, i32* @EXIT_FAILURE
%148 = call i32 @exit(i32 %147)
unreachable
149: ; preds = %137
br label %188
150: ; preds = %131
%151 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%153 = call i32 @strlen(i8* %152)
%154 = call i64 @strncmp(i8* %151, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i32 %153)
%155 = icmp eq i64 %154, 0
br i1 %155, label %156, label %169
156: ; preds = %150
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.25, i64 0, i64 0))
%158 = load i8*, i8** %2
%159 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%160 = call i64 @deleteMessage(i8* %158, i8* %159)
%161 = icmp ne i64 %160, 0
br i1 %161, label %162, label %168
162: ; preds = %156
%163 = load i32, i32* @stderr
%164 = call i32 @fprintf(i32 %163, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
%165 = call i32 (...) @Terminaison()
%166 = load i32, i32* @EXIT_FAILURE
%167 = call i32 @exit(i32 %166)
unreachable
168: ; preds = %156
br label %187
169: ; preds = %150
%170 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%171 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%172 = call i32 @strlen(i8* %171)
%173 = call i64 @strncmp(i8* %170, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.27, i64 0, i64 0), i32 %172)
%174 = icmp eq i64 %173, 0
br i1 %174, label %175, label %183
175: ; preds = %169
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.28, i64 0, i64 0))
store i32 0, i32* %7
%177 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.29, i64 0, i64 0), i8* %177)
%179 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%180 = call i32 @bzero(i8* %179, i32 20)
%181 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%182 = call i32 @bzero(i8* %181, i32 500)
br label %186
183: ; preds = %169
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.30, i64 0, i64 0))
%185 = call i32 @envoi_reponse(i32 6)
br label %186
186: ; preds = %183, %175
br label %187
187: ; preds = %186, %168
br label %188
188: ; preds = %187, %149
br label %189
189: ; preds = %188, %130
br label %190
190: ; preds = %189, %111
br label %191
191: ; preds = %190, %93
br label %192
192: ; preds = %191, %75
br label %193
193: ; preds = %192, %31
%194 = load i8*, i8** %2
%195 = call i32 @free(i8* %194)
br label %22
196: ; preds = %22
br label %14
}

LLVM IR (-O2):
@.str.3 = [21 x i8] c"Message re\C3\A7u : %s\0A:\00"
@.str.6 = [17 x i8] c"authentification\00"
@.str.8 = [12 x i8] c"inscription\00"
@stderr = global i32 0
@.str.10 = [39 x i8] c"[-] Erreur : Inscription impossible !\0A\00"
@.str.11 = [41 x i8] c"[-] Erreur : authentification requise !\0A\00"
@.str.12 = [5 x i8] c"send\00"
@.str.14 = [44 x i8] c"[-] Erreur : Envoi du message impossible !\0A\00"
@EXIT_FAILURE = global i32 0
@.str.15 = [6 x i8] c"check\00"
@.str.17 = [56 x i8] c"[-] Erreur : v\C3\A9rification messages non lus impossible\0A\00"
@.str.18 = [5 x i8] c"list\00"
@.str.20 = [46 x i8] c"[-] Erreur : listing des messages impossible\0A\00"
@.str.21 = [5 x i8] c"read\00"
@.str.23 = [44 x i8] c"[-] Erreur : Lecture du message impossible\0A\00"
@.str.24 = [7 x i8] c"delete\00"
@.str.26 = [48 x i8] c"[-] Erreur : Suppression du message impossible\0A\00"
@.str.27 = [11 x i8] c"disconnect\00"
@.str.29 = [42 x i8] c"[+] D\C3\A9connexion acept\C3\A9e : Au revoir %s\0A\00"
@str = [53 x i8] c"[-] Une erreur est survenue lors de l'initialisation\00"
@str.31 = [44 x i8] c"\0A[+] En attente de connexion d'un client...\00"
@str.32 = [50 x i8] c"[-] Erreur : la connection du client a \C3\A9chou\C3\A9 !\00"
@str.33 = [30 x i8] c"[+] Analyse de la requ\C3\AAte...\00"
@str.34 = [34 x i8] c"##### Demande d'inscription #####\00"
@str.35 = [40 x i8] c"\0A##### Demande d'authentification #####\00"
@str.36 = [34 x i8] c"[-] Erreur : trame non reconnue !\00"
@str.37 = [39 x i8] c"\0A##### Demande de d\C3\A9connexion ! #####\00"
@str.38 = [47 x i8] c"\0A##### Demande de suppression de message #####\00"
@str.39 = [43 x i8] c"\0A##### Demande de lecture de message #####\00"
@str.40 = [32 x i8] c"\0A##### Demande de listing #####\00"
@str.41 = [51 x i8] c"\0A##### Demande du nombre de messages non lus #####\00"
@str.42 = [42 x i8] c"\0A##### Demande d'envoi d'un message #####\00"
@str.43 = [38 x i8] c"[-] Warning : connexion interrompue !\00"
define i32 @main() {
%1 = alloca [512 x i8]
%2 = alloca [20 x i8]
%3 = alloca [500 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%7 = tail call i32 (...) @Initialisation()
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %0
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.31, i64 0, i64 0))
%11 = call i32 (...) @AttenteClient()
%12 = icmp eq i32 %11, 0
br i1 %12, label %27, label %23
13: ; preds = %0
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %142, %23
%17 = phi i8* [ %24, %23 ], [ %145, %142 ]
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.43, i64 0, i64 0))
%19 = call i32 @free(i8* %17)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.31, i64 0, i64 0))
%21 = call i32 (...) @AttenteClient()
%22 = icmp eq i32 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %9, %16
%24 = call i8* (...) @Reception()
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = icmp eq i8* %24, null
br i1 %26, label %16, label %30
27: ; preds = %16, %9
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.32, i64 0, i64 0))
%29 = call i32 @exit(i32 2)
unreachable
30: ; preds = %23, %142
%31 = phi i8* [ %145, %142 ], [ %24, %23 ]
%32 = phi i32 [ %143, %142 ], [ 0, %23 ]
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.33, i64 0, i64 0))
%34 = call i32 @parseType(i8* %31, i8* %4)
%35 = icmp eq i32 %32, 0
%36 = call i32 @strlen(i8* %4)
br i1 %35, label %37, label %61
37: ; preds = %30
%38 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %36)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.35, i64 0, i64 0))
%42 = call i32 @authentification(i8* %31, i8* %5, i8* %6)
br label %142
43: ; preds = %37
%44 = call i32 @strlen(i8* %4)
%45 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %44)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %57
47: ; preds = %43
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.34, i64 0, i64 0))
%49 = call i64 @inscription(i8* %31)
%50 = icmp eq i64 %49, 0
br i1 %50, label %55, label %51
51: ; preds = %47
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%54 = call i32 @envoi_reponse(i32 1)
br label %142
55: ; preds = %47
%56 = call i32 @envoi_reponse(i32 5)
br label %142
57: ; preds = %43
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%60 = call i32 @envoi_reponse(i32 1)
br label %142
61: ; preds = %30
%62 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 %36)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %74
64: ; preds = %61
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.42, i64 0, i64 0))
%66 = call i32 @sendMessage(i8* %31)
%67 = icmp eq i32 %66, 6
br i1 %67, label %68, label %142
68: ; preds = %64
%69 = load i32, i32* @stderr
%70 = call i32 @fprintf(i32 %69, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
%71 = call i32 (...) @Terminaison()
%72 = load i32, i32* @EXIT_FAILURE
%73 = call i32 @exit(i32 %72)
unreachable
74: ; preds = %61
%75 = call i32 @strlen(i8* %4)
%76 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %75)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %88
78: ; preds = %74
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.41, i64 0, i64 0))
%80 = call i64 @checkNewMessages(i8* %5)
%81 = icmp eq i64 %80, 0
br i1 %81, label %142, label %82
82: ; preds = %78
%83 = load i32, i32* @stderr
%84 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.17, i64 0, i64 0))
%85 = call i32 (...) @Terminaison()
%86 = load i32, i32* @EXIT_FAILURE
%87 = call i32 @exit(i32 %86)
unreachable
88: ; preds = %74
%89 = call i32 @strlen(i8* %4)
%90 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i32 %89)
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %102
92: ; preds = %88
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.40, i64 0, i64 0))
%94 = call i64 @listMessages(i8* %31, i8* %5)
%95 = icmp eq i64 %94, 0
br i1 %95, label %142, label %96
96: ; preds = %92
%97 = load i32, i32* @stderr
%98 = call i32 @fprintf(i32 %97, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.20, i64 0, i64 0))
%99 = call i32 (...) @Terminaison()
%100 = load i32, i32* @EXIT_FAILURE
%101 = call i32 @exit(i32 %100)
unreachable
102: ; preds = %88
%103 = call i32 @strlen(i8* %4)
%104 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 %103)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %116
106: ; preds = %102
%107 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.39, i64 0, i64 0))
%108 = call i64 @readMessage(i8* %31, i8* %5)
%109 = icmp eq i64 %108, 0
br i1 %109, label %142, label %110
110: ; preds = %106
%111 = load i32, i32* @stderr
%112 = call i32 @fprintf(i32 %111, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.23, i64 0, i64 0))
%113 = call i32 (...) @Terminaison()
%114 = load i32, i32* @EXIT_FAILURE
%115 = call i32 @exit(i32 %114)
unreachable
116: ; preds = %102
%117 = call i32 @strlen(i8* %4)
%118 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i32 %117)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %130
120: ; preds = %116
%121 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.38, i64 0, i64 0))
%122 = call i64 @deleteMessage(i8* %31, i8* %5)
%123 = icmp eq i64 %122, 0
br i1 %123, label %142, label %124
124: ; preds = %120
%125 = load i32, i32* @stderr
%126 = call i32 @fprintf(i32 %125, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
%127 = call i32 (...) @Terminaison()
%128 = load i32, i32* @EXIT_FAILURE
%129 = call i32 @exit(i32 %128)
unreachable
130: ; preds = %116
%131 = call i32 @strlen(i8* %4)
%132 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.27, i64 0, i64 0), i32 %131)
%133 = icmp eq i64 %132, 0
br i1 %133, label %134, label %139
134: ; preds = %130
%135 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.37, i64 0, i64 0))
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.29, i64 0, i64 0), i8* %5)
%137 = call i32 @bzero(i8* %5, i32 20)
%138 = call i32 @bzero(i8* %6, i32 500)
br label %142
139: ; preds = %130
%140 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.36, i64 0, i64 0))
%141 = call i32 @envoi_reponse(i32 6)
br label %142
142: ; preds = %57, %55, %51, %40, %78, %106, %134, %139, %120, %92, %64
%143 = phi i32 [ %32, %64 ], [ %32, %78 ], [ %32, %92 ], [ %32, %106 ], [ %32, %120 ], [ 0, %134 ], [ %32, %139 ], [ %42, %40 ], [ 0, %51 ], [ 0, %55 ], [ 0, %57 ]
%144 = call i32 @free(i8* %31)
%145 = call i8* (...) @Reception()
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %145)
%147 = icmp eq i8* %145, null
br i1 %147, label %16, label %30
}