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

/* Forward declarations */

/* Type definitions */
typedef int nbphi;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ bzero(char *, int);
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ inc(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int main(int argc, char **argv) {
  FILE *f;
  int nbphi;
  int cste;
  int i, j;
  char name[1024];
  char *counter;
  char *pcounter;
  int nom;
  int hamd;
  int prem = 0;
  int premint = 0;
  if (argc < 3) {
    printf("usage : %s nb_phi constant\n", argv[0]);
    exit(0);
  }
  nbphi = atoi(argv[1]);
  cste = atoi(argv[2]);
  counter = (char *)calloc(nbphi - 1, 1);
  sprintf(name, "lr%d%d.pm", nbphi, cste);
  f = fopen(name, "w");
  fprintf(f, "probabilistic\n\nconst n=%d;\n", cste);
  for (i = 1; i < nbphi - 1; i++) {
    fprintf(f, "const n_%d=%d;\n", i, cste - i);
  }
  for (i = 1; i <= nbphi; i++) {
    fprintf(f, "formula can%d = !(", i);
    bzero(counter, nbphi);
    prem = 1;
    while (inc(counter, 0, nbphi - 1)) {
      hamd = 0;
      for (j = 0; j < nbphi - 1; j++)
        hamd += counter[j];
      if (prem)
        prem = 0;
      else
        fprintf(f, " | ");
      if (hamd == 1) {
        nom = 0;
        for (j = 0; j < nbphi - 1; j++) {
          nom++;
          if (nom == i)
            nom++;
          if (counter[j])
            fprintf(f, "(c%d=n)", nom);
        }
      } else {
        fprintf(f, "(");
        premint = 1;
        nom = 0;
        for (j = 0; j < nbphi - 1; j++) {
          nom++;
          if (nom == i)
            nom++;
          if (counter[j]) {
            if (premint)
              premint = 0;
            else
              fprintf(f, " & ");
            fprintf(f, "(c%d=n_%d)", nom, hamd - 1);
          }
        }
        fprintf(f, ")");
      }
    }
    fprintf(f, ");\n");
  }
  for (i = 1; i <= nbphi; i++) {
    fprintf(f, "formula count%d = (p%d!=13) & (p%d!=0);\n", i, i, i);
    fprintf(f, "formula ncount%d = (p%d=13) | (p%d=0);\n", i, i, i);
  }
  fprintf(f, "\nmodule counter\n\n");
  for (i = 1; i <= nbphi; i++) {
    fprintf(f, "c%d : [0..n];\n", i);
  }
  for (i = 1; i <= nbphi; i++) {
    bzero(counter, nbphi);
    do {
      nom = 0;
      fprintf(f, "\t[s%d] can%d ", i, i);
      for (j = 0; j < nbphi - 1; j++) {
        nom++;
        if (nom == i)
          nom++;
        if (counter[j])
          fprintf(f, " & count%d ", nom);
        else
          fprintf(f, " & ncount%d ", nom);
      }
      fprintf(f, " -> (c%d'=0)", i);
      nom = 0;
      for (j = 0; j < nbphi - 1; j++) {
        nom++;
        if (nom == i)
          nom++;
        if (counter[j])
          fprintf(f, " & (c%d'=c%d+1)", nom, nom);
      }
      fprintf(f, ";\n");
    } while (inc(counter, 0, nbphi - 1));
  }
  fprintf(f, "\nendmodule\n\n");
  fprintf(f, "formula lfree = (p2=0..4,6,11,13);\n");
  fprintf(f, "formula rfree = (p%d=0..3,5,7,12,13);\n", nbphi);
  fprintf(f, "\n\nmodule phil1\n\n");
  fprintf(f, "p1 : [0..13];\n");
  fprintf(f, "[s1] (p1=0) -> 0.2 : (p1'=0) + 0.8 : (p1'=1);\n");
  fprintf(f, "[s1] (p1=1) -> 0.5 : (p1'=2) + 0.5 : (p1'=3);\n");
  fprintf(f, "[s1] (p1=2) &  lfree -> (p1'=4);\n");
  fprintf(f, "[s1] (p1=2) & !lfree -> (p1'=2);\n");
  fprintf(f, "[s1] (p1=3) &  rfree -> (p1'=5);\n");
  fprintf(f, "[s1] (p1=3) & !rfree -> (p1'=3);\n");
  fprintf(f, "[s1] (p1=4) &  rfree -> (p1'=8);\n");
  fprintf(f, "[s1] (p1=4) & !rfree -> (p1'=6);\n");
  fprintf(f, "[s1] (p1=5) &  lfree -> (p1'=8);\n");
  fprintf(f, "[s1] (p1=5) & !lfree -> (p1'=7);\n");
  fprintf(f, "[s1] (p1=6)  -> (p1'=1);\n");
  fprintf(f, "[s1] (p1=7)  -> (p1'=1);\n");
  fprintf(f, "[s1] (p1=8)  -> (p1'=9);\n");
  fprintf(f, "[s1] (p1=9)  -> (p1'=10);\n");
  fprintf(f, "[s1] (p1=10) ->  0.5 : (p1'=11) + 0.5: (p1'=12);\n");
  fprintf(f, "[s1] (p1=11) -> (p1'=13);\n");
  fprintf(f, "[s1] (p1=12) -> (p1'=13);\n");
  fprintf(f, "[s1] (p1=13) ->  0.5 : (p1'=0) + 0.5 : (p1'=13);\n");
  fprintf(f, "\nendmodule\n\n");
  for (i = 2; i <= nbphi; i++) {
    fprintf(f,
            "module phil%d=phil1 [p1=p%d, p2=p%d, p3=p%d, p4=p%d, s1=s%d] "
            "endmodule\n",
            i, i, (i) % (nbphi) + 1, (i + 1) % (nbphi) + 1,
            (i + 2) % (nbphi) + 1, i);
  }
  fclose(f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x44c(%rbp)
movl   $0x0,-0x450(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11f1 <main+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe1b(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
sub    $0x1,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x438(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xde0(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0x430(%rbp),%rdi
lea    0xdd7(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xdc2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12ae <main+0x10e>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
sub    -0x24(%rbp),%ecx
lea    0xdab(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1274 <main+0xd4>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1540 <main+0x3a0>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x438(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1080 <bzero@plt>
movl   $0x1,-0x44c(%rbp)
mov    -0x438(%rbp),%rdi
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   10c0 <inc@plt>
cmp    $0x0,%rax
je     1520 <main+0x380>
movl   $0x0,-0x448(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1358 <main+0x1b8>
mov    -0x438(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0x448(%rbp),%eax
mov    %eax,-0x448(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    131e <main+0x17e>
cmpl   $0x0,-0x44c(%rbp)
je     1374 <main+0x1d4>
movl   $0x0,-0x44c(%rbp)
jmp    1386 <main+0x1e6>
mov    -0x18(%rbp),%rdi
lea    0xce8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x1,-0x448(%rbp)
jne    1427 <main+0x287>
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1422 <main+0x282>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x444(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    13e2 <main+0x242>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x438(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     140f <main+0x26f>
mov    -0x18(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0xc63(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1414 <main+0x274>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13a4 <main+0x204>
jmp    151b <main+0x37b>
mov    -0x18(%rbp),%rdi
lea    0xc33(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x450(%rbp)
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1509 <main+0x369>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x444(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    1492 <main+0x2f2>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x438(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     14f6 <main+0x356>
cmpl   $0x0,-0x450(%rbp)
je     14c3 <main+0x323>
movl   $0x0,-0x450(%rbp)
jmp    14d5 <main+0x335>
mov    -0x18(%rbp),%rdi
lea    0xba5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x444(%rbp),%edx
mov    -0x448(%rbp),%ecx
sub    $0x1,%ecx
lea    0xb88(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    14fb <main+0x35b>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1454 <main+0x2b4>
mov    -0x18(%rbp),%rdi
lea    0xc12(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    12ef <main+0x14f>
mov    -0x18(%rbp),%rdi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12b5 <main+0x115>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1599 <main+0x3f9>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    0xb1a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    0xb27(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1547 <main+0x3a7>
mov    -0x18(%rbp),%rdi
lea    0xb2f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     15e1 <main+0x441>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xb19(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15b2 <main+0x412>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     17b4 <main+0x614>
mov    -0x438(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1080 <bzero@plt>
movl   $0x0,-0x444(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xad6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    16c7 <main+0x527>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x444(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    166a <main+0x4ca>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x438(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     169c <main+0x4fc>
mov    -0x18(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0xa72(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    16b4 <main+0x514>
mov    -0x18(%rbp),%rdi
mov    -0x444(%rbp),%edx
lea    0xa61(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    16b9 <main+0x519>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    162c <main+0x48c>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xa46(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x444(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1771 <main+0x5d1>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x444(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    172b <main+0x58b>
mov    -0x444(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444(%rbp)
mov    -0x438(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     175e <main+0x5be>
mov    -0x18(%rbp),%rdi
mov    -0x444(%rbp),%edx
mov    -0x444(%rbp),%ecx
lea    0x9d1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1763 <main+0x5c3>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    16ed <main+0x54d>
mov    -0x18(%rbp),%rdi
lea    0xc08(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x438(%rbp),%rdi
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   10c0 <inc@plt>
cmp    $0x0,%rax
jne    1603 <main+0x463>
jmp    17a6 <main+0x606>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15e8 <main+0x448>
mov    -0x18(%rbp),%rdi
lea    0x979(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x974(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0x983(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x998(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x997(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x994(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x9b1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x9ce(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x9de(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x9ee(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x9fe(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa0e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa1e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa2e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa3e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa4e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa56(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa5e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa66(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa6f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa8f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xa98(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xaa1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0x7d8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x2,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     19e7 <main+0x847>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%eax
mov    %eax,-0x454(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %edx,%r8d
add    $0x1,%r8d
mov    -0x24(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x1c(%rbp)
mov    %edx,%r9d
add    $0x1,%r9d
mov    -0x24(%rbp),%eax
add    $0x2,%eax
cltd
idivl  -0x1c(%rbp)
mov    %edx,%r10d
mov    -0x454(%rbp),%edx
add    $0x1,%r10d
mov    -0x24(%rbp),%eax
lea    0xa57(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    196e <main+0x7ce>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jle    1b25 <main+0x965>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r12d
mov    0x10(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ebx
lea    -0x1(%r12),%edi
mov    $0x1,%r14d
mov    %edi,0x1c(%rsp)
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%r13
lea    0xe05(%rip),%rsi
lea    0x50(%rsp),%r15
mov    %r15,%rdi
mov    %r12d,%edx
mov    %ebx,%ecx
call   10b0 <sprintf@plt>
lea    0xdf6(%rip),%rsi
mov    %r15,%rdi
call   1080 <fopen@plt>
mov    %rax,%rbp
lea    0xde6(%rip),%rsi
mov    %rax,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r12,0x8(%rsp)
cmp    $0x3,%r12d
jl     129a <main+0xda>
mov    $0x2,%r12d
sub    0x8(%rsp),%r12d
add    $0xffffffff,%ebx
lea    0xdd6(%rip),%r15
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    (%r12,%r14,1),%eax
add    $0x1,%eax
mov    %r14d,%ecx
add    $0x1,%ecx
add    $0xffffffff,%ebx
mov    %ecx,%r14d
cmp    $0x1,%eax
jne    1270 <main+0xb0>
mov    0x8(%rsp),%r14
test   %r14d,%r14d
jle    1832 <main+0x672>
mov    0x1c(%rsp),%r12d
mov    %r12d,%eax
mov    %rax,0x10(%rsp)
and    $0xfffffff8,%eax
mov    %rax,0x48(%rsp)
add    $0xfffffffffffffff8,%rax
mov    %rax,0x40(%rsp)
mov    %rax,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x38(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x30(%rsp)
mov    $0x1,%r15d
mov    %rbp,0x20(%rsp)
jmp    1319 <main+0x159>
nop
mov    $0x3,%esi
mov    $0x1,%edx
lea    0x1082(%rip),%rdi
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x1(%r15),%eax
cmp    %r14d,%r15d
mov    %eax,%r15d
je     1604 <main+0x444>
mov    %rbp,%rdi
lea    0xd31(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
call   1090 <bzero@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   10e0 <inc@plt>
test   %rax,%rax
je     12f0 <main+0x130>
xor    %ecx,%ecx
mov    %r15,0x28(%rsp)
jmp    139b <main+0x1db>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x29,%edi
mov    0x20(%rsp),%rsi
call   1050 <fputc@plt>
mov    0x8(%rsp),%r14
mov    0x1c(%rsp),%r12d
mov    0x28(%rsp),%r15
mov    %r13,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   10e0 <inc@plt>
mov    $0x1,%cl
test   %rax,%rax
mov    0x20(%rsp),%rbp
je     12f0 <main+0x130>
mov    $0x0,%r15d
cmp    $0x1,%r14d
mov    0x10(%rsp),%rsi
je     14c2 <main+0x302>
cmp    $0x8,%r12d
jae    13c0 <main+0x200>
xor    %eax,%eax
xor    %r15d,%r15d
jmp    14b0 <main+0x2f0>
cmpq   $0x0,0x40(%rsp)
je     15ea <main+0x42a>
pxor   %xmm0,%xmm0
mov    0x30(%rsp),%rdx
xor    %eax,%eax
pxor   %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
movd   0x0(%r13,%rax,1),%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
movd   0x4(%r13,%rax,1),%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
psrad  $0x18,%xmm2
paddd  %xmm0,%xmm2
psrad  $0x18,%xmm3
paddd  %xmm1,%xmm3
movd   0x8(%r13,%rax,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0xc(%r13,%rax,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
paddd  %xmm2,%xmm0
psrad  $0x18,%xmm1
paddd  %xmm3,%xmm1
add    $0x10,%rax
add    $0xfffffffffffffffe,%rdx
jne    13e0 <main+0x220>
testb  $0x1,0x38(%rsp)
je     1481 <main+0x2c1>
movd   0x0(%r13,%rax,1),%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
movd   0x4(%r13,%rax,1),%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
psrad  $0x18,%xmm2
paddd  %xmm2,%xmm0
psrad  $0x18,%xmm3
paddd  %xmm3,%xmm1
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%r15d
mov    0x48(%rsp),%rdx
mov    %rdx,%rax
cmp    %rsi,%rdx
je     14c2 <main+0x302>
nopl   0x0(%rax)
movsbl 0x0(%r13,%rax,1),%edx
add    %edx,%r15d
add    $0x1,%rax
cmp    %rax,%rsi
jne    14b0 <main+0x2f0>
test   $0x1,%cl
je     14e7 <main+0x327>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xb8f(%rip),%rdi
mov    0x20(%rsp),%rcx
call   10d0 <fwrite@plt>
mov    0x10(%rsp),%rsi
cmp    $0x1,%r15d
jne    1550 <main+0x390>
cmp    $0x1,%r14d
mov    0x28(%rsp),%r15
je     137e <main+0x1be>
xor    %ebp,%ebp
xor    %ebx,%ebx
jmp    151d <main+0x35d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%rsi
je     137e <main+0x1be>
lea    0x1(%rbx),%eax
add    $0x2,%ebx
cmp    %r15d,%eax
cmovne %eax,%ebx
cmpb   $0x0,0x0(%r13,%rbp,1)
je     1510 <main+0x350>
mov    0x20(%rsp),%rdi
lea    0xb2e(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x10(%rsp),%rsi
jmp    1510 <main+0x350>
nopl   (%rax)
mov    $0x28,%edi
mov    0x20(%rsp),%rsi
call   1050 <fputc@plt>
mov    0x10(%rsp),%rcx
cmp    $0x1,%r14d
je     1360 <main+0x1a0>
add    $0xffffffff,%r15d
xor    %ebx,%ebx
mov    $0x1,%r14d
xor    %r12d,%r12d
jmp    15ac <main+0x3ec>
nop
xor    %r14d,%r14d
mov    %rbp,%rdi
lea    0xaea(%rip),%rsi
mov    %r12d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x10(%rsp),%rcx
add    $0x1,%rbx
cmp    %rbx,%rcx
je     1360 <main+0x1a0>
lea    0x1(%r12),%eax
add    $0x2,%r12d
cmp    0x28(%rsp),%eax
cmovne %eax,%r12d
cmpb   $0x0,0x0(%r13,%rbx,1)
je     159f <main+0x3df>
test   %r14d,%r14d
mov    0x20(%rsp),%rbp
jne    1580 <main+0x3c0>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa93(%rip),%rdi
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
jmp    1580 <main+0x3c0>
pxor   %xmm0,%xmm0
xor    %eax,%eax
pxor   %xmm1,%xmm1
testb  $0x1,0x38(%rsp)
jne    1451 <main+0x291>
jmp    1481 <main+0x2c1>
test   %r14d,%r14d
jle    1832 <main+0x672>
mov    %r14d,%r12d
neg    %r12d
mov    $0x1,%ebx
lea    0xa63(%rip),%r14
lea    0xa85(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    (%r12,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1630 <main+0x470>
lea    0xa61(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
mov    0x8(%rsp),%r14
test   %r14d,%r14d
jle    184b <main+0x68b>
mov    $0x1,%ebx
lea    0xa47(%rip),%r14
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    (%r12,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    16a0 <main+0x4e0>
mov    0x8(%rsp),%r14
test   %r14d,%r14d
jle    184b <main+0x68b>
mov    $0x1,%r12d
jmp    16f6 <main+0x536>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r12),%eax
mov    0x8(%rsp),%r14
cmp    %r14d,%r12d
mov    %eax,%r12d
je     184b <main+0x68b>
mov    %r13,%rdi
mov    %r14d,%esi
call   1090 <bzero@plt>
jmp    1750 <main+0x590>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rdi
lea    0xa01(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xc4f(%rip),%rdi
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    0x1c(%rsp),%edx
call   10e0 <inc@plt>
test   %rax,%rax
je     16e0 <main+0x520>
mov    %rbp,%rdi
lea    0x99a(%rip),%rsi
mov    %r12d,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
cmpl   $0x1,0x8(%rsp)
je     1710 <main+0x550>
mov    %rbp,%r15
xor    %ebp,%ebp
xor    %ebx,%ebx
mov    0x10(%rsp),%r14
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%eax
add    $0x2,%ebx
cmp    %r12d,%eax
cmovne %eax,%ebx
cmpb   $0x0,0x0(%r13,%rbp,1)
lea    0x969(%rip),%rsi
lea    0x96e(%rip),%rax
cmove  %rax,%rsi
mov    %r15,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1780 <main+0x5c0>
mov    %r15,%rdi
lea    0x958(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
cmpl   $0x1,0x8(%rsp)
mov    %r15,%rbp
je     1724 <main+0x564>
xor    %ebx,%ebx
xor    %r15d,%r15d
jmp    17fd <main+0x63d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r14
je     1724 <main+0x564>
lea    0x1(%r15),%eax
add    $0x2,%r15d
cmp    %r12d,%eax
cmovne %eax,%r15d
cmpb   $0x0,0x0(%r13,%rbx,1)
je     17f0 <main+0x630>
mov    %rbp,%rdi
lea    0x90a(%rip),%rsi
mov    %r15d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x10(%rsp),%r14
jmp    17f0 <main+0x630>
lea    0x89a(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8e6(%rip),%rbx
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8d7(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8e2(%rip),%rsi
mov    %rbp,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x8f5(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8ed(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8e3(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x8f9(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x90f(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x918(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x921(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x92a(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x933(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x93c(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x945(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x94e(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x957(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x958(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x959(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x95a(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x95c(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x975(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x977(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
lea    0x979(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
cmp    $0x2,%r14d
mov    %rbp,%r13
jl     1b09 <main+0x949>
mov    $0x2,%ebx
lea    0x96f(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rbx),%r15d
cmp    %ebx,%r14d
mov    %r15d,%r8d
mov    $0x1,%eax
cmove  %eax,%r8d
mov    %r15d,%eax
cltd
idiv   %r14d
lea    0x1(%rdx),%r9d
lea    0x2(%rbx),%eax
cltd
idiv   %r14d
mov    %edx,%ebp
add    $0x1,%ebp
mov    %r13,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
xor    %eax,%eax
push   %rbx
push   %rbp
call   1070 <fprintf@plt>
add    $0x10,%rsp
cmp    %r14d,%ebx
mov    %r15d,%ebx
jne    1ac0 <main+0x900>
mov    %r13,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0x4d1(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"usage : %s nb_phi constant\0A\00"
@.str.1 = [10 x i8] c"lr%d%d.pm\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [28 x i8] c"probabilistic\0A\0Aconst n=%d;\0A\00"
@.str.4 = [16 x i8] c"const n_%d=%d;\0A\00"
@.str.5 = [19 x i8] c"formula can%d = !(\00"
@.str.6 = [4 x i8] c" | \00"
@.str.7 = [8 x i8] c"(c%d=n)\00"
@.str.8 = [2 x i8] c"(\00"
@.str.9 = [4 x i8] c" & \00"
@.str.10 = [11 x i8] c"(c%d=n_%d)\00"
@.str.11 = [2 x i8] c")\00"
@.str.12 = [4 x i8] c");\0A\00"
@.str.13 = [41 x i8] c"formula count%d = (p%d!=13) & (p%d!=0);\0A\00"
@.str.14 = [40 x i8] c"formula ncount%d = (p%d=13) | (p%d=0);\0A\00"
@.str.15 = [18 x i8] c"\0Amodule counter\0A\0A\00"
@.str.16 = [15 x i8] c"c%d : [0..n];\0A\00"
@.str.17 = [14 x i8] c"\09[s%d] can%d \00"
@.str.18 = [12 x i8] c" & count%d \00"
@.str.19 = [13 x i8] c" & ncount%d \00"
@.str.20 = [13 x i8] c" -> (c%d'=0)\00"
@.str.21 = [16 x i8] c" & (c%d'=c%d+1)\00"
@.str.22 = [3 x i8] c";\0A\00"
@.str.23 = [13 x i8] c"\0Aendmodule\0A\0A\00"
@.str.24 = [36 x i8] c"formula lfree = (p2=0..4,6,11,13);\0A\00"
@.str.25 = [39 x i8] c"formula rfree = (p%d=0..3,5,7,12,13);\0A\00"
@.str.26 = [17 x i8] c"\0A\0Amodule phil1\0A\0A\00"
@.str.27 = [15 x i8] c"p1 : [0..13];\0A\00"
@.str.28 = [47 x i8] c"[s1] (p1=0) -> 0.2 : (p1'=0) + 0.8 : (p1'=1);\0A\00"
@.str.29 = [47 x i8] c"[s1] (p1=1) -> 0.5 : (p1'=2) + 0.5 : (p1'=3);\0A\00"
@.str.30 = [34 x i8] c"[s1] (p1=2) & lfree -> (p1'=4);\0A\00"
@.str.31 = [34 x i8] c"[s1] (p1=2) & !lfree -> (p1'=2);\0A\00"
@.str.32 = [34 x i8] c"[s1] (p1=3) & rfree -> (p1'=5);\0A\00"
@.str.33 = [34 x i8] c"[s1] (p1=3) & !rfree -> (p1'=3);\0A\00"
@.str.34 = [34 x i8] c"[s1] (p1=4) & rfree -> (p1'=8);\0A\00"
@.str.35 = [34 x i8] c"[s1] (p1=4) & !rfree -> (p1'=6);\0A\00"
@.str.36 = [34 x i8] c"[s1] (p1=5) & lfree -> (p1'=8);\0A\00"
@.str.37 = [34 x i8] c"[s1] (p1=5) & !lfree -> (p1'=7);\0A\00"
@.str.38 = [26 x i8] c"[s1] (p1=6) -> (p1'=1);\0A\00"
@.str.39 = [26 x i8] c"[s1] (p1=7) -> (p1'=1);\0A\00"
@.str.40 = [26 x i8] c"[s1] (p1=8) -> (p1'=9);\0A\00"
@.str.41 = [27 x i8] c"[s1] (p1=9) -> (p1'=10);\0A\00"
@.str.42 = [50 x i8] c"[s1] (p1=10) -> 0.5 : (p1'=11) + 0.5: (p1'=12);\0A\00"
@.str.43 = [27 x i8] c"[s1] (p1=11) -> (p1'=13);\0A\00"
@.str.44 = [27 x i8] c"[s1] (p1=12) -> (p1'=13);\0A\00"
@.str.45 = [50 x i8] c"[s1] (p1=13) -> 0.5 : (p1'=0) + 0.5 : (p1'=13);\0A\00"
@.str.46 = [72 x i8] c"module phil%d=phil1 [p1=p%d, p2=p%d, p3=p%d, p4=p%d, s1=s%d] endmodule\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [1024 x i8]
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %16
store i32 0, i32* %17
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %26
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = call i32 @exit(i32 0)
unreachable
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
store i32 %30, i32* %7
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i32 @atoi(i8* %33)
store i32 %34, i32* %8
%35 = load i32, i32* %7
%36 = sub nsw i32 %35, 1
%37 = call i64 @calloc(i32 %36, i32 1)
%38 = inttoptr i64 %37 to i8*
store i8* %38, i8** %12
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%40 = load i32, i32* %7
%41 = load i32, i32* %8
%42 = call i32 @sprintf(i8* %39, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %40, i32 %41)
%43 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%44 = call i32* @fopen(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %44, i32** %6
%45 = load i32*, i32** %6
%46 = load i32, i32* %8
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %46)
store i32 1, i32* %9
br label %48
48: ; preds = %60, %26
%49 = load i32, i32* %9
%50 = load i32, i32* %7
%51 = sub nsw i32 %50, 1
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %63
53: ; preds = %48
%54 = load i32*, i32** %6
%55 = load i32, i32* %9
%56 = load i32, i32* %8
%57 = load i32, i32* %9
%58 = sub nsw i32 %56, %57
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %55, i32 %58)
br label %60
60: ; preds = %53
%61 = load i32, i32* %9
%62 = add nsw i32 %61, 1
store i32 %62, i32* %9
br label %48
63: ; preds = %48
store i32 1, i32* %9
br label %64
64: ; preds = %188, %63
%65 = load i32, i32* %9
%66 = load i32, i32* %7
%67 = icmp sle i32 %65, %66
br i1 %67, label %68, label %191
68: ; preds = %64
%69 = load i32*, i32** %6
%70 = load i32, i32* %9
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %70)
%72 = load i8*, i8** %12
%73 = load i32, i32* %7
%74 = call i32 @bzero(i8* %72, i32 %73)
store i32 1, i32* %16
br label %75
75: ; preds = %184, %68
%76 = load i8*, i8** %12
%77 = load i32, i32* %7
%78 = sub nsw i32 %77, 1
%79 = call i64 @inc(i8* %76, i32 0, i32 %78)
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %185
81: ; preds = %75
store i32 0, i32* %15
store i32 0, i32* %10
br label %82
82: ; preds = %96, %81
%83 = load i32, i32* %10
%84 = load i32, i32* %7
%85 = sub nsw i32 %84, 1
%86 = icmp slt i32 %83, %85
br i1 %86, label %87, label %99
87: ; preds = %82
%88 = load i8*, i8** %12
%89 = load i32, i32* %10
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = load i32, i32* %15
%95 = add nsw i32 %94, %93
store i32 %95, i32* %15
br label %96
96: ; preds = %87
%97 = load i32, i32* %10
%98 = add nsw i32 %97, 1
store i32 %98, i32* %10
br label %82
99: ; preds = %82
%100 = load i32, i32* %16
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %99
store i32 0, i32* %16
br label %106
103: ; preds = %99
%104 = load i32*, i32** %6
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %106
106: ; preds = %103, %102
%107 = load i32, i32* %15
%108 = icmp eq i32 %107, 1
br i1 %108, label %109, label %140
109: ; preds = %106
store i32 0, i32* %14
store i32 0, i32* %10
br label %110
110: ; preds = %136, %109
%111 = load i32, i32* %10
%112 = load i32, i32* %7
%113 = sub nsw i32 %112, 1
%114 = icmp slt i32 %111, %113
br i1 %114, label %115, label %139
115: ; preds = %110
%116 = load i32, i32* %14
%117 = add nsw i32 %116, 1
store i32 %117, i32* %14
%118 = load i32, i32* %14
%119 = load i32, i32* %9
%120 = icmp eq i32 %118, %119
br i1 %120, label %121, label %124
121: ; preds = %115
%122 = load i32, i32* %14
%123 = add nsw i32 %122, 1
store i32 %123, i32* %14
br label %124
124: ; preds = %121, %115
%125 = load i8*, i8** %12
%126 = load i32, i32* %10
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8, i8* %125, i64 %127
%129 = load i8, i8* %128
%130 = icmp ne i8 %129, 0
br i1 %130, label %131, label %135
131: ; preds = %124
%132 = load i32*, i32** %6
%133 = load i32, i32* %14
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %133)
br label %135
135: ; preds = %131, %124
br label %136
136: ; preds = %135
%137 = load i32, i32* %10
%138 = add nsw i32 %137, 1
store i32 %138, i32* %10
br label %110
139: ; preds = %110
br label %184
140: ; preds = %106
%141 = load i32*, i32** %6
%142 = call i32 (i32*, i8*, ...) @fprintf(i32* %141, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %17
store i32 0, i32* %14
store i32 0, i32* %10
br label %143
143: ; preds = %178, %140
%144 = load i32, i32* %10
%145 = load i32, i32* %7
%146 = sub nsw i32 %145, 1
%147 = icmp slt i32 %144, %146
br i1 %147, label %148, label %181
148: ; preds = %143
%149 = load i32, i32* %14
%150 = add nsw i32 %149, 1
store i32 %150, i32* %14
%151 = load i32, i32* %14
%152 = load i32, i32* %9
%153 = icmp eq i32 %151, %152
br i1 %153, label %154, label %157
154: ; preds = %148
%155 = load i32, i32* %14
%156 = add nsw i32 %155, 1
store i32 %156, i32* %14
br label %157
157: ; preds = %154, %148
%158 = load i8*, i8** %12
%159 = load i32, i32* %10
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
%162 = load i8, i8* %161
%163 = icmp ne i8 %162, 0
br i1 %163, label %164, label %177
164: ; preds = %157
%165 = load i32, i32* %17
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %168
167: ; preds = %164
store i32 0, i32* %17
br label %171
168: ; preds = %164
%169 = load i32*, i32** %6
%170 = call i32 (i32*, i8*, ...) @fprintf(i32* %169, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %171
171: ; preds = %168, %167
%172 = load i32*, i32** %6
%173 = load i32, i32* %14
%174 = load i32, i32* %15
%175 = sub nsw i32 %174, 1
%176 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %173, i32 %175)
br label %177
177: ; preds = %171, %157
br label %178
178: ; preds = %177
%179 = load i32, i32* %10
%180 = add nsw i32 %179, 1
store i32 %180, i32* %10
br label %143
181: ; preds = %143
%182 = load i32*, i32** %6
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %184
184: ; preds = %181, %139
br label %75
185: ; preds = %75
%186 = load i32*, i32** %6
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %186, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
br label %188
188: ; preds = %185
%189 = load i32, i32* %9
%190 = add nsw i32 %189, 1
store i32 %190, i32* %9
br label %64
191: ; preds = %64
store i32 1, i32* %9
br label %192
192: ; preds = %207, %191
%193 = load i32, i32* %9
%194 = load i32, i32* %7
%195 = icmp sle i32 %193, %194
br i1 %195, label %196, label %210
196: ; preds = %192
%197 = load i32*, i32** %6
%198 = load i32, i32* %9
%199 = load i32, i32* %9
%200 = load i32, i32* %9
%201 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %198, i32 %199, i32 %200)
%202 = load i32*, i32** %6
%203 = load i32, i32* %9
%204 = load i32, i32* %9
%205 = load i32, i32* %9
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %202, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0), i32 %203, i32 %204, i32 %205)
br label %207
207: ; preds = %196
%208 = load i32, i32* %9
%209 = add nsw i32 %208, 1
store i32 %209, i32* %9
br label %192
210: ; preds = %192
%211 = load i32*, i32** %6
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %211, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
store i32 1, i32* %9
br label %213
213: ; preds = %221, %210
%214 = load i32, i32* %9
%215 = load i32, i32* %7
%216 = icmp sle i32 %214, %215
br i1 %216, label %217, label %224
217: ; preds = %213
%218 = load i32*, i32** %6
%219 = load i32, i32* %9
%220 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i32 %219)
br label %221
221: ; preds = %217
%222 = load i32, i32* %9
%223 = add nsw i32 %222, 1
store i32 %223, i32* %9
br label %213
224: ; preds = %213
store i32 1, i32* %9
br label %225
225: ; preds = %315, %224
%226 = load i32, i32* %9
%227 = load i32, i32* %7
%228 = icmp sle i32 %226, %227
br i1 %228, label %229, label %318
229: ; preds = %225
%230 = load i8*, i8** %12
%231 = load i32, i32* %7
%232 = call i32 @bzero(i8* %230, i32 %231)
br label %233
233: ; preds = %308, %229
store i32 0, i32* %14
%234 = load i32*, i32** %6
%235 = load i32, i32* %9
%236 = load i32, i32* %9
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %234, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i32 %235, i32 %236)
store i32 0, i32* %10
br label %238
238: ; preds = %268, %233
%239 = load i32, i32* %10
%240 = load i32, i32* %7
%241 = sub nsw i32 %240, 1
%242 = icmp slt i32 %239, %241
br i1 %242, label %243, label %271
243: ; preds = %238
%244 = load i32, i32* %14
%245 = add nsw i32 %244, 1
store i32 %245, i32* %14
%246 = load i32, i32* %14
%247 = load i32, i32* %9
%248 = icmp eq i32 %246, %247
br i1 %248, label %249, label %252
249: ; preds = %243
%250 = load i32, i32* %14
%251 = add nsw i32 %250, 1
store i32 %251, i32* %14
br label %252
252: ; preds = %249, %243
%253 = load i8*, i8** %12
%254 = load i32, i32* %10
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds i8, i8* %253, i64 %255
%257 = load i8, i8* %256
%258 = icmp ne i8 %257, 0
br i1 %258, label %259, label %263
259: ; preds = %252
%260 = load i32*, i32** %6
%261 = load i32, i32* %14
%262 = call i32 (i32*, i8*, ...) @fprintf(i32* %260, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %261)
br label %267
263: ; preds = %252
%264 = load i32*, i32** %6
%265 = load i32, i32* %14
%266 = call i32 (i32*, i8*, ...) @fprintf(i32* %264, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %265)
br label %267
267: ; preds = %263, %259
br label %268
268: ; preds = %267
%269 = load i32, i32* %10
%270 = add nsw i32 %269, 1
store i32 %270, i32* %10
br label %238
271: ; preds = %238
%272 = load i32*, i32** %6
%273 = load i32, i32* %9
%274 = call i32 (i32*, i8*, ...) @fprintf(i32* %272, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0), i32 %273)
store i32 0, i32* %14
store i32 0, i32* %10
br label %275
275: ; preds = %302, %271
%276 = load i32, i32* %10
%277 = load i32, i32* %7
%278 = sub nsw i32 %277, 1
%279 = icmp slt i32 %276, %278
br i1 %279, label %280, label %305
280: ; preds = %275
%281 = load i32, i32* %14
%282 = add nsw i32 %281, 1
store i32 %282, i32* %14
%283 = load i32, i32* %14
%284 = load i32, i32* %9
%285 = icmp eq i32 %283, %284
br i1 %285, label %286, label %289
286: ; preds = %280
%287 = load i32, i32* %14
%288 = add nsw i32 %287, 1
store i32 %288, i32* %14
br label %289
289: ; preds = %286, %280
%290 = load i8*, i8** %12
%291 = load i32, i32* %10
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds i8, i8* %290, i64 %292
%294 = load i8, i8* %293
%295 = icmp ne i8 %294, 0
br i1 %295, label %296, label %301
296: ; preds = %289
%297 = load i32*, i32** %6
%298 = load i32, i32* %14
%299 = load i32, i32* %14
%300 = call i32 (i32*, i8*, ...) @fprintf(i32* %297, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i32 %298, i32 %299)
br label %301
301: ; preds = %296, %289
br label %302
302: ; preds = %301
%303 = load i32, i32* %10
%304 = add nsw i32 %303, 1
store i32 %304, i32* %10
br label %275
305: ; preds = %275
%306 = load i32*, i32** %6
%307 = call i32 (i32*, i8*, ...) @fprintf(i32* %306, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
br label %308
308: ; preds = %305
%309 = load i8*, i8** %12
%310 = load i32, i32* %7
%311 = sub nsw i32 %310, 1
%312 = call i64 @inc(i8* %309, i32 0, i32 %311)
%313 = icmp ne i64 %312, 0
br i1 %313, label %233, label %314
314: ; preds = %308
br label %315
315: ; preds = %314
%316 = load i32, i32* %9
%317 = add nsw i32 %316, 1
store i32 %317, i32* %9
br label %225
318: ; preds = %225
%319 = load i32*, i32** %6
%320 = call i32 (i32*, i8*, ...) @fprintf(i32* %319, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
%321 = load i32*, i32** %6
%322 = call i32 (i32*, i8*, ...) @fprintf(i32* %321, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0))
%323 = load i32*, i32** %6
%324 = load i32, i32* %7
%325 = call i32 (i32*, i8*, ...) @fprintf(i32* %323, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.25, i64 0, i64 0), i32 %324)
%326 = load i32*, i32** %6
%327 = call i32 (i32*, i8*, ...) @fprintf(i32* %326, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
%328 = load i32*, i32** %6
%329 = call i32 (i32*, i8*, ...) @fprintf(i32* %328, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i64 0, i64 0))
%330 = load i32*, i32** %6
%331 = call i32 (i32*, i8*, ...) @fprintf(i32* %330, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.28, i64 0, i64 0))
%332 = load i32*, i32** %6
%333 = call i32 (i32*, i8*, ...) @fprintf(i32* %332, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.29, i64 0, i64 0))
%334 = load i32*, i32** %6
%335 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.30, i64 0, i64 0))
%336 = load i32*, i32** %6
%337 = call i32 (i32*, i8*, ...) @fprintf(i32* %336, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.31, i64 0, i64 0))
%338 = load i32*, i32** %6
%339 = call i32 (i32*, i8*, ...) @fprintf(i32* %338, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.32, i64 0, i64 0))
%340 = load i32*, i32** %6
%341 = call i32 (i32*, i8*, ...) @fprintf(i32* %340, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.33, i64 0, i64 0))
%342 = load i32*, i32** %6
%343 = call i32 (i32*, i8*, ...) @fprintf(i32* %342, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0))
%344 = load i32*, i32** %6
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %344, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.35, i64 0, i64 0))
%346 = load i32*, i32** %6
%347 = call i32 (i32*, i8*, ...) @fprintf(i32* %346, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.36, i64 0, i64 0))
%348 = load i32*, i32** %6
%349 = call i32 (i32*, i8*, ...) @fprintf(i32* %348, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.37, i64 0, i64 0))
%350 = load i32*, i32** %6
%351 = call i32 (i32*, i8*, ...) @fprintf(i32* %350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.38, i64 0, i64 0))
%352 = load i32*, i32** %6
%353 = call i32 (i32*, i8*, ...) @fprintf(i32* %352, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.39, i64 0, i64 0))
%354 = load i32*, i32** %6
%355 = call i32 (i32*, i8*, ...) @fprintf(i32* %354, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0))
%356 = load i32*, i32** %6
%357 = call i32 (i32*, i8*, ...) @fprintf(i32* %356, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.41, i64 0, i64 0))
%358 = load i32*, i32** %6
%359 = call i32 (i32*, i8*, ...) @fprintf(i32* %358, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.42, i64 0, i64 0))
%360 = load i32*, i32** %6
%361 = call i32 (i32*, i8*, ...) @fprintf(i32* %360, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.43, i64 0, i64 0))
%362 = load i32*, i32** %6
%363 = call i32 (i32*, i8*, ...) @fprintf(i32* %362, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.44, i64 0, i64 0))
%364 = load i32*, i32** %6
%365 = call i32 (i32*, i8*, ...) @fprintf(i32* %364, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.45, i64 0, i64 0))
%366 = load i32*, i32** %6
%367 = call i32 (i32*, i8*, ...) @fprintf(i32* %366, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
store i32 2, i32* %9
br label %368
368: ; preds = %392, %318
%369 = load i32, i32* %9
%370 = load i32, i32* %7
%371 = icmp sle i32 %369, %370
br i1 %371, label %372, label %395
372: ; preds = %368
%373 = load i32*, i32** %6
%374 = load i32, i32* %9
%375 = load i32, i32* %9
%376 = load i32, i32* %9
%377 = load i32, i32* %7
%378 = srem i32 %376, %377
%379 = add nsw i32 %378, 1
%380 = load i32, i32* %9
%381 = add nsw i32 %380, 1
%382 = load i32, i32* %7
%383 = srem i32 %381, %382
%384 = add nsw i32 %383, 1
%385 = load i32, i32* %9
%386 = add nsw i32 %385, 2
%387 = load i32, i32* %7
%388 = srem i32 %386, %387
%389 = add nsw i32 %388, 1
%390 = load i32, i32* %9
%391 = call i32 (i32*, i8*, ...) @fprintf(i32* %373, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.46, i64 0, i64 0), i32 %374, i32 %375, i32 %379, i32 %384, i32 %389, i32 %390)
br label %392
392: ; preds = %372
%393 = load i32, i32* %9
%394 = add nsw i32 %393, 1
store i32 %394, i32* %9
br label %368
395: ; preds = %368
%396 = load i32*, i32** %6
%397 = call i32 @fclose(i32* %396)
%398 = load i32, i32* %3
ret i32 %398
}

LLVM IR (-O2):
@.str = [28 x i8] c"usage : %s nb_phi constant\0A\00"
@.str.1 = [10 x i8] c"lr%d%d.pm\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [28 x i8] c"probabilistic\0A\0Aconst n=%d;\0A\00"
@.str.4 = [16 x i8] c"const n_%d=%d;\0A\00"
@.str.5 = [19 x i8] c"formula can%d = !(\00"
@.str.6 = [4 x i8] c" | \00"
@.str.7 = [8 x i8] c"(c%d=n)\00"
@.str.9 = [4 x i8] c" & \00"
@.str.10 = [11 x i8] c"(c%d=n_%d)\00"
@.str.12 = [4 x i8] c");\0A\00"
@.str.13 = [41 x i8] c"formula count%d = (p%d!=13) & (p%d!=0);\0A\00"
@.str.14 = [40 x i8] c"formula ncount%d = (p%d=13) | (p%d=0);\0A\00"
@.str.15 = [18 x i8] c"\0Amodule counter\0A\0A\00"
@.str.16 = [15 x i8] c"c%d : [0..n];\0A\00"
@.str.17 = [14 x i8] c"\09[s%d] can%d \00"
@.str.18 = [12 x i8] c" & count%d \00"
@.str.19 = [13 x i8] c" & ncount%d \00"
@.str.20 = [13 x i8] c" -> (c%d'=0)\00"
@.str.21 = [16 x i8] c" & (c%d'=c%d+1)\00"
@.str.22 = [3 x i8] c";\0A\00"
@.str.23 = [13 x i8] c"\0Aendmodule\0A\0A\00"
@.str.24 = [36 x i8] c"formula lfree = (p2=0..4,6,11,13);\0A\00"
@.str.25 = [39 x i8] c"formula rfree = (p%d=0..3,5,7,12,13);\0A\00"
@.str.26 = [17 x i8] c"\0A\0Amodule phil1\0A\0A\00"
@.str.27 = [15 x i8] c"p1 : [0..13];\0A\00"
@.str.28 = [47 x i8] c"[s1] (p1=0) -> 0.2 : (p1'=0) + 0.8 : (p1'=1);\0A\00"
@.str.29 = [47 x i8] c"[s1] (p1=1) -> 0.5 : (p1'=2) + 0.5 : (p1'=3);\0A\00"
@.str.30 = [34 x i8] c"[s1] (p1=2) & lfree -> (p1'=4);\0A\00"
@.str.31 = [34 x i8] c"[s1] (p1=2) & !lfree -> (p1'=2);\0A\00"
@.str.32 = [34 x i8] c"[s1] (p1=3) & rfree -> (p1'=5);\0A\00"
@.str.33 = [34 x i8] c"[s1] (p1=3) & !rfree -> (p1'=3);\0A\00"
@.str.34 = [34 x i8] c"[s1] (p1=4) & rfree -> (p1'=8);\0A\00"
@.str.35 = [34 x i8] c"[s1] (p1=4) & !rfree -> (p1'=6);\0A\00"
@.str.36 = [34 x i8] c"[s1] (p1=5) & lfree -> (p1'=8);\0A\00"
@.str.37 = [34 x i8] c"[s1] (p1=5) & !lfree -> (p1'=7);\0A\00"
@.str.38 = [26 x i8] c"[s1] (p1=6) -> (p1'=1);\0A\00"
@.str.39 = [26 x i8] c"[s1] (p1=7) -> (p1'=1);\0A\00"
@.str.40 = [26 x i8] c"[s1] (p1=8) -> (p1'=9);\0A\00"
@.str.41 = [27 x i8] c"[s1] (p1=9) -> (p1'=10);\0A\00"
@.str.42 = [50 x i8] c"[s1] (p1=10) -> 0.5 : (p1'=11) + 0.5: (p1'=12);\0A\00"
@.str.43 = [27 x i8] c"[s1] (p1=11) -> (p1'=13);\0A\00"
@.str.44 = [27 x i8] c"[s1] (p1=12) -> (p1'=13);\0A\00"
@.str.45 = [50 x i8] c"[s1] (p1=13) -> 0.5 : (p1'=0) + 0.5 : (p1'=13);\0A\00"
@.str.46 = [72 x i8] c"module phil%d=phil1 [p1=p%d, p2=p%d, p3=p%d, p4=p%d, s1=s%d] endmodule\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = add nsw i32 %13, -1
%18 = tail call i64 @calloc(i32 %17, i32 1)
%19 = inttoptr i64 %18 to i8*
%20 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %16)
%21 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%23 = icmp sgt i32 %13, 2
br i1 %23, label %42, label %24
24: ; preds = %42, %10
%25 = icmp slt i32 %13, 1
br i1 %25, label %184, label %26
26: ; preds = %24
%27 = icmp eq i32 %13, 1
%28 = zext i32 %17 to i64
%29 = zext i32 %17 to i64
%30 = zext i32 %17 to i64
%31 = and i64 %28, 4294967288
%32 = add nsw i64 %31, -8
%33 = lshr exact i64 %32, 3
%34 = add nuw nsw i64 %33, 1
%35 = icmp ult i32 %17, 8
%36 = and i64 %28, 4294967288
%37 = and i64 %34, 1
%38 = icmp eq i64 %32, 0
%39 = and i64 %34, 4611686018427387902
%40 = icmp eq i64 %37, 0
%41 = icmp eq i64 %36, %28
br label %49
42: ; preds = %10, %42
%43 = phi i32 [ %46, %42 ], [ 1, %10 ]
%44 = sub nsw i32 %16, %43
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %43, i32 %44)
%46 = add nuw nsw i32 %43, 1
%47 = icmp eq i32 %46, %17
br i1 %47, label %24, label %42
48: ; preds = %174
br i1 %25, label %184, label %178
49: ; preds = %26, %174
%50 = phi i32 [ 1, %26 ], [ %176, %174 ]
%51 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %50)
%52 = tail call i32 @bzero(i8* %19, i32 %13)
%53 = tail call i64 @inc(i8* %19, i32 0, i32 %17)
%54 = icmp eq i64 %53, 0
br i1 %54, label %174, label %55
55: ; preds = %49, %171
%56 = phi i1 [ true, %171 ], [ false, %49 ]
br i1 %27, label %122, label %57
57: ; preds = %55
br i1 %35, label %110, label %58
58: ; preds = %57
br i1 %38, label %88, label %59
59: ; preds = %58, %59
%60 = phi i64 [ %85, %59 ], [ 0, %58 ]
%61 = phi <4 x i32> [ %83, %59 ], [ zeroinitializer, %58 ]
%62 = phi <4 x i32> [ %84, %59 ], [ zeroinitializer, %58 ]
%63 = phi i64 [ %86, %59 ], [ 0, %58 ]
%64 = getelementptr inbounds i8, i8* %19, i64 %60
%65 = bitcast i8* %64 to <4 x i8>*
%66 = load <4 x i8>, <4 x i8>* %65
%67 = getelementptr inbounds i8, i8* %64, i64 4
%68 = bitcast i8* %67 to <4 x i8>*
%69 = load <4 x i8>, <4 x i8>* %68
%70 = sext <4 x i8> %66 to <4 x i32>
%71 = sext <4 x i8> %69 to <4 x i32>
%72 = add <4 x i32> %61, %70
%73 = add <4 x i32> %62, %71
%74 = or i64 %60, 8
%75 = getelementptr inbounds i8, i8* %19, i64 %74
%76 = bitcast i8* %75 to <4 x i8>*
%77 = load <4 x i8>, <4 x i8>* %76
%78 = getelementptr inbounds i8, i8* %75, i64 4
%79 = bitcast i8* %78 to <4 x i8>*
%80 = load <4 x i8>, <4 x i8>* %79
%81 = sext <4 x i8> %77 to <4 x i32>
%82 = sext <4 x i8> %80 to <4 x i32>
%83 = add <4 x i32> %72, %81
%84 = add <4 x i32> %73, %82
%85 = add nuw i64 %60, 16
%86 = add i64 %63, 2
%87 = icmp eq i64 %86, %39
br i1 %87, label %88, label %59
88: ; preds = %59, %58
%89 = phi <4 x i32> [ undef, %58 ], [ %83, %59 ]
%90 = phi <4 x i32> [ undef, %58 ], [ %84, %59 ]
%91 = phi i64 [ 0, %58 ], [ %85, %59 ]
%92 = phi <4 x i32> [ zeroinitializer, %58 ], [ %83, %59 ]
%93 = phi <4 x i32> [ zeroinitializer, %58 ], [ %84, %59 ]
br i1 %40, label %105, label %94
94: ; preds = %88
%95 = getelementptr inbounds i8, i8* %19, i64 %91
%96 = bitcast i8* %95 to <4 x i8>*
%97 = load <4 x i8>, <4 x i8>* %96
%98 = getelementptr inbounds i8, i8* %95, i64 4
%99 = bitcast i8* %98 to <4 x i8>*
%100 = load <4 x i8>, <4 x i8>* %99
%101 = sext <4 x i8> %97 to <4 x i32>
%102 = sext <4 x i8> %100 to <4 x i32>
%103 = add <4 x i32> %92, %101
%104 = add <4 x i32> %93, %102
br label %105
105: ; preds = %88, %94
%106 = phi <4 x i32> [ %89, %88 ], [ %103, %94 ]
%107 = phi <4 x i32> [ %90, %88 ], [ %104, %94 ]
%108 = add <4 x i32> %107, %106
%109 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %108)
br i1 %41, label %122, label %110
110: ; preds = %57, %105
%111 = phi i64 [ 0, %57 ], [ %36, %105 ]
%112 = phi i32 [ 0, %57 ], [ %109, %105 ]
br label %113
113: ; preds = %110, %113
%114 = phi i64 [ %120, %113 ], [ %111, %110 ]
%115 = phi i32 [ %119, %113 ], [ %112, %110 ]
%116 = getelementptr inbounds i8, i8* %19, i64 %114
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = add nsw i32 %115, %118
%120 = add nuw nsw i64 %114, 1
%121 = icmp eq i64 %120, %28
br i1 %121, label %122, label %113
122: ; preds = %113, %105, %55
%123 = phi i32 [ 0, %55 ], [ %109, %105 ], [ %119, %113 ]
br i1 %56, label %124, label %126
124: ; preds = %122
%125 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 3, i64 1, i32* %21)
br label %126
126: ; preds = %122, %124
%127 = icmp eq i32 %123, 1
br i1 %127, label %128, label %144
128: ; preds = %126
br i1 %27, label %171, label %129
129: ; preds = %128, %141
%130 = phi i64 [ %142, %141 ], [ 0, %128 ]
%131 = phi i32 [ %135, %141 ], [ 0, %128 ]
%132 = add nsw i32 %131, 1
%133 = icmp eq i32 %132, %50
%134 = add nsw i32 %131, 2
%135 = select i1 %133, i32 %134, i32 %132
%136 = getelementptr inbounds i8, i8* %19, i64 %130
%137 = load i8, i8* %136
%138 = icmp eq i8 %137, 0
br i1 %138, label %141, label %139
139: ; preds = %129
%140 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %135)
br label %141
141: ; preds = %129, %139
%142 = add nuw nsw i64 %130, 1
%143 = icmp eq i64 %142, %30
br i1 %143, label %171, label %129
144: ; preds = %126
%145 = tail call i32 @fputc(i32 40, i32* %21)
br i1 %27, label %169, label %146
146: ; preds = %144
%147 = add nsw i32 %123, -1
br label %148
148: ; preds = %146, %165
%149 = phi i64 [ 0, %146 ], [ %167, %165 ]
%150 = phi i32 [ 1, %146 ], [ %166, %165 ]
%151 = phi i32 [ 0, %146 ], [ %155, %165 ]
%152 = add nsw i32 %151, 1
%153 = icmp eq i32 %152, %50
%154 = add nsw i32 %151, 2
%155 = select i1 %153, i32 %154, i32 %152
%156 = getelementptr inbounds i8, i8* %19, i64 %149
%157 = load i8, i8* %156
%158 = icmp eq i8 %157, 0
br i1 %158, label %165, label %159
159: ; preds = %148
%160 = icmp eq i32 %150, 0
br i1 %160, label %161, label %163
161: ; preds = %159
%162 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i64 3, i64 1, i32* %21)
br label %163
163: ; preds = %159, %161
%164 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %155, i32 %147)
br label %165
165: ; preds = %148, %163
%166 = phi i32 [ 0, %163 ], [ %150, %148 ]
%167 = add nuw nsw i64 %149, 1
%168 = icmp eq i64 %167, %29
br i1 %168, label %169, label %148
169: ; preds = %165, %144
%170 = tail call i32 @fputc(i32 41, i32* %21)
br label %171
171: ; preds = %141, %128, %169
%172 = tail call i64 @inc(i8* %19, i32 0, i32 %17)
%173 = icmp eq i64 %172, 0
br i1 %173, label %174, label %55
174: ; preds = %171, %49
%175 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i64 3, i64 1, i32* %21)
%176 = add nuw i32 %50, 1
%177 = icmp eq i32 %50, %13
br i1 %177, label %48, label %49
178: ; preds = %48, %178
%179 = phi i32 [ %182, %178 ], [ 1, %48 ]
%180 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %179, i32 %179, i32 %179)
%181 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0), i32 %179, i32 %179, i32 %179)
%182 = add nuw i32 %179, 1
%183 = icmp eq i32 %179, %13
br i1 %183, label %186, label %178
184: ; preds = %48, %24
%185 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i64 17, i64 1, i32* %21)
br label %243
186: ; preds = %178
%187 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0), i64 17, i64 1, i32* %21)
br i1 %25, label %243, label %193
188: ; preds = %193
br i1 %25, label %243, label %189
189: ; preds = %188
%190 = icmp eq i32 %13, 1
%191 = zext i32 %17 to i64
%192 = zext i32 %17 to i64
br label %198
193: ; preds = %186, %193
%194 = phi i32 [ %196, %193 ], [ 1, %186 ]
%195 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i32 %194)
%196 = add nuw i32 %194, 1
%197 = icmp eq i32 %194, %13
br i1 %197, label %188, label %193
198: ; preds = %189, %240
%199 = phi i32 [ 1, %189 ], [ %241, %240 ]
%200 = tail call i32 @bzero(i8* %19, i32 %13)
br label %201
201: ; preds = %236, %198
%202 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i32 %199, i32 %199)
br i1 %190, label %203, label %205
203: ; preds = %201
%204 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0), i32 %199)
br label %236
205: ; preds = %201, %205
%206 = phi i64 [ %217, %205 ], [ 0, %201 ]
%207 = phi i32 [ %211, %205 ], [ 0, %201 ]
%208 = add nsw i32 %207, 1
%209 = icmp eq i32 %208, %199
%210 = add nsw i32 %207, 2
%211 = select i1 %209, i32 %210, i32 %208
%212 = getelementptr inbounds i8, i8* %19, i64 %206
%213 = load i8, i8* %212
%214 = icmp eq i8 %213, 0
%215 = select i1 %214, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0)
%216 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* %215, i32 %211)
%217 = add nuw nsw i64 %206, 1
%218 = icmp eq i64 %217, %191
br i1 %218, label %219, label %205
219: ; preds = %205
%220 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i64 0, i64 0), i32 %199)
br i1 %190, label %236, label %221
221: ; preds = %219, %233
%222 = phi i64 [ %234, %233 ], [ 0, %219 ]
%223 = phi i32 [ %227, %233 ], [ 0, %219 ]
%224 = add nsw i32 %223, 1
%225 = icmp eq i32 %224, %199
%226 = add nsw i32 %223, 2
%227 = select i1 %225, i32 %226, i32 %224
%228 = getelementptr inbounds i8, i8* %19, i64 %222
%229 = load i8, i8* %228
%230 = icmp eq i8 %229, 0
br i1 %230, label %233, label %231
231: ; preds = %221
%232 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i32 %227, i32 %227)
br label %233
233: ; preds = %221, %231
%234 = add nuw nsw i64 %222, 1
%235 = icmp eq i64 %234, %192
br i1 %235, label %236, label %221
236: ; preds = %233, %203, %219
%237 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i64 2, i64 1, i32* %21)
%238 = tail call i64 @inc(i8* %19, i32 0, i32 %17)
%239 = icmp eq i64 %238, 0
br i1 %239, label %240, label %201
240: ; preds = %236
%241 = add nuw i32 %199, 1
%242 = icmp eq i32 %199, %13
br i1 %242, label %243, label %198
243: ; preds = %240, %186, %184, %188
%244 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i64 12, i64 1, i32* %21)
%245 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), i64 35, i64 1, i32* %21)
%246 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.25, i64 0, i64 0), i32 %13)
%247 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0), i64 16, i64 1, i32* %21)
%248 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i64 0, i64 0), i64 14, i64 1, i32* %21)
%249 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.28, i64 0, i64 0), i64 46, i64 1, i32* %21)
%250 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.29, i64 0, i64 0), i64 46, i64 1, i32* %21)
%251 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.30, i64 0, i64 0), i64 33, i64 1, i32* %21)
%252 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.31, i64 0, i64 0), i64 33, i64 1, i32* %21)
%253 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.32, i64 0, i64 0), i64 33, i64 1, i32* %21)
%254 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.33, i64 0, i64 0), i64 33, i64 1, i32* %21)
%255 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.34, i64 0, i64 0), i64 33, i64 1, i32* %21)
%256 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.35, i64 0, i64 0), i64 33, i64 1, i32* %21)
%257 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.36, i64 0, i64 0), i64 33, i64 1, i32* %21)
%258 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.37, i64 0, i64 0), i64 33, i64 1, i32* %21)
%259 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.38, i64 0, i64 0), i64 25, i64 1, i32* %21)
%260 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.39, i64 0, i64 0), i64 25, i64 1, i32* %21)
%261 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0), i64 25, i64 1, i32* %21)
%262 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.41, i64 0, i64 0), i64 26, i64 1, i32* %21)
%263 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.42, i64 0, i64 0), i64 49, i64 1, i32* %21)
%264 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.43, i64 0, i64 0), i64 26, i64 1, i32* %21)
%265 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.44, i64 0, i64 0), i64 26, i64 1, i32* %21)
%266 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.45, i64 0, i64 0), i64 49, i64 1, i32* %21)
%267 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i64 12, i64 1, i32* %21)
%268 = icmp slt i32 %13, 2
br i1 %268, label %282, label %269
269: ; preds = %243, %269
%270 = phi i32 [ %274, %269 ], [ 2, %243 ]
%271 = icmp eq i32 %270, %13
%272 = add nuw nsw i32 %270, 1
%273 = select i1 %271, i32 1, i32 %272
%274 = add nuw nsw i32 %270, 1
%275 = srem i32 %274, %13
%276 = add nuw nsw i32 %275, 1
%277 = add nuw nsw i32 %270, 2
%278 = srem i32 %277, %13
%279 = add nuw nsw i32 %278, 1
%280 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.46, i64 0, i64 0), i32 %270, i32 %270, i32 %273, i32 %276, i32 %279, i32 %270)
%281 = icmp eq i32 %270, %13
br i1 %281, label %282, label %269
282: ; preds = %269, %243
%283 = tail call i32 @fclose(i32* %21)
ret i32 0
}