#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 EXIT_SUCCESS;
int /*<<< orphan*/ mzeros(unsigned int **, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ printm(unsigned int **, unsigned int, unsigned int);
int /*<<< orphan*/ printv(unsigned int *, unsigned int);
int rand();
int /*<<< orphan*/ rlist(unsigned int *, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *, ...);
int /*<<< orphan*/ srand(unsigned int);
unsigned int time(int /*<<< orphan*/ *);
int /*<<< orphan*/ vzeros(unsigned int *, int);
int main(void) {
  unsigned t = time(NULL);
  unsigned l[1000], lt[1000][1000], tl[1000][1000], qt, ql, chosen[1000],
      v[1000];
  unsigned i, j, k, m, flag, it_escape, lctk, alt, atl;
  srand(time(NULL));
  vzeros(l, 1000);
  vzeros(v, 1000);
  mzeros(lt, 1000, 1000);
  mzeros(tl, 1000, 1000);
  scanf("%u", &ql);
  scanf("%u", &qt);
  if (0 > 1)
    printf("Quantidade de lugares: %u\n", ql);
  if (ql > 1000) {
    printf("Erro linha 1: quantidade de lugares acima do maximo. \n");
    return -1;
  }
  if (0 > 1)
    printf("Quantidade de transicoes: %u\n", qt);
  if (qt > 1000) {
    printf("Erro linha 2: quantidade de transicoes acima do maximo. \n");
    return -1;
  }
  scanf("%u", &lctk);
  scanf("%u", &alt);
  scanf("%u", &atl);
  for (k = 0; k < lctk; k++) {
    scanf("%u %u", &i, &j);
    if (i >= ql) {
      printf("Erro linha %u: lugar maior que o definido. \n", 6 + k);
      return -1;
    }
    l[i] = j;
  }
  for (k = 0; k < alt; k++) {
    scanf("%u %u %u", &i, &lctk, &j);
    if (i >= ql || j >= qt) {
      printf("Erro linha %u: lugar ou transicao acima do definido. \n",
             6 + lctk + k);
      return -1;
    }
    lt[i][j] = lctk;
  }
  for (k = 0; k < atl; k++) {
    scanf("%u %u %u", &i, &lctk, &j);
    if (i >= qt || j >= ql) {
      printf("Erro linha %u: lugar ou transicao acima do definido. \n",
             6 + lctk + k + alt);
      return -1;
    }
    tl[i][j] = lctk;
  }
  if (0 > 1)
    printf("Token em cada lugar:[");
  if (0 > 1)
    printv(l, ql);
  if (0 > 1)
    printf(" ]\n");
  if (0 > 1)
    printf("Matriz lt:");
  if (0 > 1)
    printm(lt, ql, qt);
  if (0 > 1)
    printf("\nMatriz tl:");
  if (0 > 1)
    printm(tl, qt, ql);
  if (0 > 1)
    printf("\n");
  printf("======= INICIO DA SIMULACAO =======\n");
  for (k = 0; k < 1000; k++) {
    if (0 > 1)
      printf("\nInteracao %u:\n", k + 1);
    rlist(chosen, qt);
    it_escape = 0;
    if (0 > 1)
      printf("Ordem de tentativa:");
    if (0 > 1)
      printv(chosen, qt);
    if (0 > 1)
      printf("\n");
    for (m = 0; m < qt; m++) {
      i = chosen[m];
      if (0 > 0)
        printf("Tentativa %u: numero sorteado: [%u]\n", m + 1, i);
      flag = 1;
      for (j = 0; j < ql; j++)
        if (lt[j][i] != 0)
          if (l[j] < lt[j][i]) {
            flag = 0;
            break;
          }
      if (flag) {
        it_escape = 1;
        if ((rand() % 100 + 1) <= 50) {
          if (0 > 0)
            printf("Transicao %u ativou!\n", i);
          for (j = 0; j < ql; j++)
            if (lt[j][i] != 0) {
              l[j] -= lt[j][i];
              if (0 > 1)
                printf("Transicao %u consumiu %u token(s) do lugar %u \n", i,
                       lt[j][i], j);
            }
          for (j = 0; j < ql; j++)
            if (tl[i][j] != 0) {
              l[j] += tl[i][j];
              v[i]++;
              if (0 > 1)
                printf("Transicao %u produziu %u token(s) \n", i, tl[i][j]);
            }
          if (0 > 0)
            printf("Token em cada lugar:[");
          if (0 > 0)
            printv(l, ql);
          if (0 > 0)
            printf(" ]\n");
        } else if (0 > 0)
          printf("Transicao %u decidiu nao ativar.\n", i);
      }
    }
    if (it_escape == 0)
      break;
  }
  printf("======= FIM DA SIMULACAO ==========\n");
  t = time(NULL) - t;
  printf("Tempo de reprodução do programa: %u segundo(s).\n", t);
  if (k == 0)
    printf("Aviso: nenhuma transicao foi disparada! \n");
  printf("Numero de iteracoes: %u.\n", k);
  printf("Lugares com token: \n");
  for (j = 0; j < ql; j++)
    if (l[j] != 0)
      printf("Lugar %u: %u tokens \n", j, l[j]);
  printf("Transicoes disparadas: \n");
  for (j = 0; j < ql; j++)
    if (v[j] != 0)
      printf("Transicao %u: disparada %u vezes \n", j, v[j]);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a4130,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    -0xfb0(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <vzeros@plt>
lea    -0x7a4100(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <vzeros@plt>
lea    -0x3d18b0(%rbp),%rdi
mov    $0x3e8,%edx
mov    %edx,%esi
call   1070 <mzeros@plt>
lea    -0x7a21b0(%rbp),%rdi
mov    $0x3e8,%edx
mov    %edx,%esi
call   1070 <mzeros@plt>
lea    0xea7(%rip),%rdi
lea    -0x7a21b8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    0xe92(%rip),%rdi
lea    -0x7a21b4(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
cmpl   $0x3e8,-0x7a21b8(%rbp)
jbe    124a <main+0xca>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1920 <main+0x7a0>
cmpl   $0x3e8,-0x7a21b4(%rbp)
jbe    1274 <main+0xf4>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1920 <main+0x7a0>
lea    0xe29(%rip),%rdi
lea    -0x7a411c(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    0xe14(%rip),%rdi
lea    -0x7a4120(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    0xdff(%rip),%rdi
lea    -0x7a4124(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
movl   $0x0,-0x7a410c(%rbp)
mov    -0x7a410c(%rbp),%eax
cmp    -0x7a411c(%rbp),%eax
jae    1347 <main+0x1c7>
lea    0xdcb(%rip),%rdi
lea    -0x7a4104(%rbp),%rsi
lea    -0x7a4108(%rbp),%rdx
mov    $0x0,%al
call   1080 <scanf@plt>
mov    -0x7a4104(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jb     1320 <main+0x1a0>
mov    -0x7a410c(%rbp),%esi
add    $0x6,%esi
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1920 <main+0x7a0>
mov    -0x7a4108(%rbp),%ecx
mov    -0x7a4104(%rbp),%eax
mov    %ecx,-0xfb0(%rbp,%rax,4)
mov    -0x7a410c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a410c(%rbp)
jmp    12bd <main+0x13d>
movl   $0x0,-0x7a410c(%rbp)
mov    -0x7a410c(%rbp),%eax
cmp    -0x7a4120(%rbp),%eax
jae    140f <main+0x28f>
lea    0xd34(%rip),%rdi
lea    -0x7a4104(%rbp),%rsi
lea    -0x7a411c(%rbp),%rdx
lea    -0x7a4108(%rbp),%rcx
mov    $0x0,%al
call   1080 <scanf@plt>
mov    -0x7a4104(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    13aa <main+0x22a>
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b4(%rbp),%eax
jb     13d3 <main+0x253>
mov    -0x7a411c(%rbp),%esi
add    $0x6,%esi
add    -0x7a410c(%rbp),%esi
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1920 <main+0x7a0>
mov    -0x7a411c(%rbp),%edx
mov    -0x7a4104(%rbp),%eax
mov    %eax,%ecx
lea    -0x3d18b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4108(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x7a410c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a410c(%rbp)
jmp    1351 <main+0x1d1>
movl   $0x0,-0x7a410c(%rbp)
mov    -0x7a410c(%rbp),%eax
cmp    -0x7a4124(%rbp),%eax
jae    14dd <main+0x35d>
lea    0xc6c(%rip),%rdi
lea    -0x7a4104(%rbp),%rsi
lea    -0x7a411c(%rbp),%rdx
lea    -0x7a4108(%rbp),%rcx
mov    $0x0,%al
call   1080 <scanf@plt>
mov    -0x7a4104(%rbp),%eax
cmp    -0x7a21b4(%rbp),%eax
jae    1472 <main+0x2f2>
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jb     14a1 <main+0x321>
mov    -0x7a411c(%rbp),%esi
add    $0x6,%esi
add    -0x7a410c(%rbp),%esi
add    -0x7a4120(%rbp),%esi
lea    0xc19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1920 <main+0x7a0>
mov    -0x7a411c(%rbp),%edx
mov    -0x7a4104(%rbp),%eax
mov    %eax,%ecx
lea    -0x7a21b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4108(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x7a410c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a410c(%rbp)
jmp    1419 <main+0x299>
lea    0xbfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7a410c(%rbp)
cmpl   $0x3e8,-0x7a410c(%rbp)
jae    17c7 <main+0x647>
lea    -0x7a3160(%rbp),%rdi
mov    -0x7a21b4(%rbp),%esi
call   1090 <rlist@plt>
movl   $0x0,-0x7a4118(%rbp)
movl   $0x0,-0x7a4110(%rbp)
mov    -0x7a4110(%rbp),%eax
cmp    -0x7a21b4(%rbp),%eax
jae    179c <main+0x61c>
mov    -0x7a4110(%rbp),%eax
mov    -0x7a3160(%rbp,%rax,4),%eax
mov    %eax,-0x7a4104(%rbp)
movl   $0x1,-0x7a4114(%rbp)
movl   $0x0,-0x7a4108(%rbp)
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    1601 <main+0x481>
mov    -0x7a4108(%rbp),%eax
mov    %eax,%ecx
lea    -0x3d18b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4104(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     15e8 <main+0x468>
mov    -0x7a4108(%rbp),%eax
mov    -0xfb0(%rbp,%rax,4),%eax
mov    -0x7a4108(%rbp),%ecx
mov    %ecx,%edx
lea    -0x3d18b0(%rbp),%rcx
imul   $0xfa0,%rdx,%rdx
add    %rdx,%rcx
mov    -0x7a4104(%rbp),%edx
cmp    (%rcx,%rdx,4),%eax
jae    15e3 <main+0x463>
movl   $0x0,-0x7a4114(%rbp)
jmp    1601 <main+0x481>
jmp    15e8 <main+0x468>
jmp    15ed <main+0x46d>
mov    -0x7a4108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4108(%rbp)
jmp    1564 <main+0x3e4>
cmpl   $0x0,-0x7a4114(%rbp)
je     1783 <main+0x603>
movl   $0x1,-0x7a4118(%rbp)
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
cmp    $0x32,%edx
jg     1779 <main+0x5f9>
movl   $0x0,-0x7a4108(%rbp)
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    16c9 <main+0x549>
mov    -0x7a4108(%rbp),%eax
mov    %eax,%ecx
lea    -0x3d18b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4104(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     16b0 <main+0x530>
mov    -0x7a4108(%rbp),%eax
mov    %eax,%ecx
lea    -0x3d18b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4104(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x7a4108(%rbp),%eax
mov    -0xfb0(%rbp,%rax,4),%ecx
sub    %edx,%ecx
mov    %ecx,-0xfb0(%rbp,%rax,4)
jmp    16b5 <main+0x535>
mov    -0x7a4108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4108(%rbp)
jmp    163d <main+0x4bd>
movl   $0x0,-0x7a4108(%rbp)
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    1774 <main+0x5f4>
mov    -0x7a4104(%rbp),%eax
mov    %eax,%ecx
lea    -0x7a21b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4108(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     175b <main+0x5db>
mov    -0x7a4104(%rbp),%eax
mov    %eax,%ecx
lea    -0x7a21b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a4108(%rbp),%ecx
mov    (%rax,%rcx,4),%ecx
mov    -0x7a4108(%rbp),%eax
add    -0xfb0(%rbp,%rax,4),%ecx
mov    %ecx,-0xfb0(%rbp,%rax,4)
mov    -0x7a4104(%rbp),%eax
mov    -0x7a4100(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x7a4100(%rbp,%rax,4)
jmp    1760 <main+0x5e0>
mov    -0x7a4108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4108(%rbp)
jmp    16d3 <main+0x553>
jmp    177e <main+0x5fe>
jmp    177e <main+0x5fe>
jmp    1783 <main+0x603>
jmp    1788 <main+0x608>
mov    -0x7a4110(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4110(%rbp)
jmp    152b <main+0x3ab>
cmpl   $0x0,-0x7a4118(%rbp)
jne    17ae <main+0x62e>
jmp    17c7 <main+0x647>
jmp    17b3 <main+0x633>
mov    -0x7a410c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a410c(%rbp)
jmp    14f5 <main+0x375>
lea    0x935(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0x93a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x7a410c(%rbp)
jne    1810 <main+0x690>
lea    0x952(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7a410c(%rbp),%esi
lea    0x968(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x974(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7a4108(%rbp)
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    189c <main+0x71c>
mov    -0x7a4108(%rbp),%eax
cmpl   $0x0,-0xfb0(%rbp,%rax,4)
je     1883 <main+0x703>
mov    -0x7a4108(%rbp),%esi
mov    -0x7a4108(%rbp),%eax
mov    -0xfb0(%rbp,%rax,4),%edx
lea    0x938(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1888 <main+0x708>
mov    -0x7a4108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4108(%rbp)
jmp    183c <main+0x6bc>
lea    0x927(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7a4108(%rbp)
mov    -0x7a4108(%rbp),%eax
cmp    -0x7a21b8(%rbp),%eax
jae    1914 <main+0x794>
mov    -0x7a4108(%rbp),%eax
cmpl   $0x0,-0x7a4100(%rbp,%rax,4)
je     18fb <main+0x77b>
mov    -0x7a4108(%rbp),%esi
mov    -0x7a4108(%rbp),%eax
mov    -0x7a4100(%rbp,%rax,4),%edx
lea    0x8ef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1900 <main+0x780>
mov    -0x7a4108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a4108(%rbp)
jmp    18b4 <main+0x734>
mov    0x26c5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7a4130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7a4108,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%r15d
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
lea    0x20(%rsp),%rdi
mov    $0x3e8,%esi
call   1030 <vzeros@plt>
lea    0xfc0(%rsp),%rdi
mov    $0x3e8,%esi
call   1030 <vzeros@plt>
lea    0x2f00(%rsp),%rdi
mov    $0x3e8,%esi
mov    $0x3e8,%edx
call   1080 <mzeros@plt>
lea    0x3d3800(%rsp),%rdi
mov    $0x3e8,%esi
mov    $0x3e8,%edx
call   1080 <mzeros@plt>
lea    0xe24(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
cmpl   $0x3e9,0x8(%rsp)
jb     1240 <main+0xb0>
lea    0xf8b(%rip),%rdi
jmp    1251 <main+0xc1>
cmpl   $0x3e9,0x14(%rsp)
jb     125b <main+0xcb>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
jmp    16df <main+0x54f>
lea    0xdd1(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
je     12e4 <main+0x154>
mov    $0x6,%ebx
lea    0xd8e(%rip),%r14
lea    0x10(%rsp),%r12
lea    0x4(%rsp),%rbp
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
jae    1649 <main+0x4b9>
mov    0x4(%rsp),%ecx
mov    %ecx,0x20(%rsp,%rax,4)
lea    0x1(%rbx),%eax
add    $0xfffffffb,%ebx
cmp    0xc(%rsp),%ebx
mov    %eax,%ebx
jb     12b0 <main+0x120>
cmpl   $0x0,0x18(%rsp)
je     1364 <main+0x1d4>
mov    $0x6,%ebp
lea    0xd36(%rip),%r14
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    0x8(%rsp),%eax
jae    1657 <main+0x4c7>
mov    0x4(%rsp),%ecx
cmp    0x14(%rsp),%ecx
jae    1657 <main+0x4c7>
mov    0xc(%rsp),%edx
imul   $0xfa0,%rax,%rax
add    %rsp,%rax
add    $0x2f00,%rax
mov    %edx,(%rax,%rcx,4)
lea    0x1(%rbp),%eax
add    $0xfffffffb,%ebp
cmp    0x18(%rsp),%ebp
mov    %eax,%ebp
jb     1310 <main+0x180>
cmpl   $0x0,0x1c(%rsp)
je     13e4 <main+0x254>
mov    $0x6,%ebx
lea    0xcb6(%rip),%r14
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x4(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    0x14(%rsp),%eax
jae    16c7 <main+0x537>
mov    0x4(%rsp),%ecx
cmp    0x8(%rsp),%ecx
jae    16c7 <main+0x537>
mov    0xc(%rsp),%edx
imul   $0xfa0,%rax,%rax
add    %rsp,%rax
add    $0x3d3800,%rax
mov    %edx,(%rax,%rcx,4)
lea    0x1(%rbx),%eax
add    $0xfffffffb,%ebx
cmp    0x1c(%rsp),%ebx
mov    %eax,%ebx
jb     1390 <main+0x200>
lea    0xd08(%rip),%rdi
call   1040 <puts@plt>
mov    0x14(%rsp),%esi
lea    0x1f60(%rsp),%r14
xor    %r12d,%r12d
nop
mov    %r14,%rdi
call   10a0 <rlist@plt>
cmpl   $0x0,0x14(%rsp)
je     15ac <main+0x41c>
xor    %ebx,%ebx
xor    %r8d,%r8d
jmp    1435 <main+0x2a5>
nopw   0x0(%rax,%rax,1)
mov    %ecx,0x4(%rsp)
add    $0x1,%rbx
mov    0x14(%rsp),%esi
cmp    %rsi,%rbx
jae    1590 <main+0x400>
mov    0x1f60(%rsp,%rbx,4),%edx
mov    %edx,0x10(%rsp)
mov    0x8(%rsp),%ecx
test   %rcx,%rcx
je     1490 <main+0x300>
lea    (%rsp,%rdx,4),%rdx
add    $0x2f00,%rdx
xor    %esi,%esi
jmp    1470 <main+0x2e0>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0xfa0,%rdx
cmp    %rsi,%rcx
je     1490 <main+0x300>
mov    (%rdx),%edi
test   %edi,%edi
je     1460 <main+0x2d0>
cmp    %edi,0x20(%rsp,%rsi,4)
jae    1460 <main+0x2d0>
mov    %esi,0x4(%rsp)
jmp    1424 <main+0x294>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,0x4(%rsp)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    $0x1,%r8d
cmp    $0x31,%eax
jg     1424 <main+0x294>
mov    0x8(%rsp),%ecx
test   %rcx,%rcx
je     1420 <main+0x290>
mov    0x10(%rsp),%edx
cmp    $0x1,%ecx
jne    1542 <main+0x3b2>
xor    %esi,%esi
test   $0x1,%cl
je     14fd <main+0x36d>
imul   $0xfa0,%rsi,%rax
add    %rsp,%rax
add    $0x2f00,%rax
mov    (%rax,%rdx,4),%edx
test   %edx,%edx
je     14fd <main+0x36d>
sub    %edx,0x20(%rsp,%rsi,4)
test   %ecx,%ecx
je     1420 <main+0x290>
mov    0x10(%rsp),%edx
imul   $0xfa0,%rdx,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x3d3800,%rsi
xor    %edi,%edi
jmp    152d <main+0x39d>
nop
add    $0x1,%rdi
cmp    %rdi,%rcx
je     1420 <main+0x290>
mov    (%rsi,%rdi,4),%eax
test   %eax,%eax
je     1520 <main+0x390>
add    %eax,0x20(%rsp,%rdi,4)
addl   $0x1,0xfc0(%rsp,%rdx,4)
01
jmp    1520 <main+0x390>
mov    %ecx,%edi
and    $0xfffffffe,%edi
lea    (%rsp,%rdx,4),%rbp
add    $0x2f00,%rbp
xor    %esi,%esi
jmp    1574 <main+0x3e4>
cs nopw 0x0(%rax,%rax,1)
add    $0x2,%rsi
add    $0x1f40,%rbp
cmp    %rsi,%rdi
je     14dd <main+0x34d>
mov    0x0(%rbp),%eax
test   %eax,%eax
je     157f <main+0x3ef>
sub    %eax,0x20(%rsp,%rsi,4)
mov    0xfa0(%rbp),%eax
test   %eax,%eax
je     1560 <main+0x3d0>
sub    %eax,0x24(%rsp,%rsi,4)
jmp    1560 <main+0x3d0>
nop
test   %r8d,%r8d
je     15ac <main+0x41c>
add    $0x1,%r12d
cmp    $0x3e8,%r12d
jne    1400 <main+0x270>
mov    $0x3e8,%r12d
lea    0xb64(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1070 <time@plt>
sub    %r15d,%eax
lea    0xaa4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jne    15e3 <main+0x453>
lea    0xb89(%rip),%rdi
call   1040 <puts@plt>
lea    0xab6(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb40(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0x4(%rsp)
mov    0x8(%rsp),%eax
test   %eax,%eax
je     1666 <main+0x4d6>
lea    0xaa3(%rip),%rbx
xor    %esi,%esi
jmp    162b <main+0x49b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
mov    %esi,0x4(%rsp)
cmp    %eax,%esi
jae    1666 <main+0x4d6>
mov    %esi,%ecx
mov    0x20(%rsp,%rcx,4),%edx
test   %edx,%edx
je     1620 <main+0x490>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%esi
mov    0x8(%rsp),%eax
jmp    1620 <main+0x490>
lea    0x9b0(%rip),%rdi
mov    %ebx,%esi
jmp    16d8 <main+0x548>
add    0xc(%rsp),%ebp
lea    0x9d4(%rip),%rdi
mov    %ebp,%esi
jmp    16d8 <main+0x548>
lea    0xae2(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0x4(%rsp)
mov    0x8(%rsp),%eax
test   %eax,%eax
je     16bc <main+0x52c>
lea    0xa47(%rip),%rbx
xor    %esi,%esi
jmp    169b <main+0x50b>
nopl   (%rax)
add    $0x1,%esi
mov    %esi,0x4(%rsp)
cmp    %eax,%esi
jae    16bc <main+0x52c>
mov    %esi,%ecx
mov    0xfc0(%rsp,%rcx,4),%edx
test   %edx,%edx
je     1690 <main+0x500>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%esi
mov    0x8(%rsp),%eax
jmp    1690 <main+0x500>
mov    0x291d(%rip),%rax
mov    (%rax),%eax
jmp    16e4 <main+0x554>
mov    0xc(%rsp),%esi
add    0x18(%rsp),%esi
add    %ebx,%esi
lea    0x95e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%eax
add    $0x7a4108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [55 x i8] c"Erro linha 1: quantidade de lugares acima do maximo. \0A\00"
@.str.2 = [58 x i8] c"Erro linha 2: quantidade de transicoes acima do maximo. \0A\00"
@.str.3 = [6 x i8] c"%u %u\00"
@.str.4 = [45 x i8] c"Erro linha %u: lugar maior que o definido. \0A\00"
@.str.5 = [9 x i8] c"%u %u %u\00"
@.str.6 = [55 x i8] c"Erro linha %u: lugar ou transicao acima do definido. \0A\00"
@.str.7 = [37 x i8] c"======= INICIO DA SIMULACAO =======\0A\00"
@.str.8 = [37 x i8] c"======= FIM DA SIMULACAO ==========\0A\00"
@.str.9 = [51 x i8] c"Tempo de reprodu\C3\A7\C3\A3o do programa: %u segundo(s).\0A\00"
@.str.10 = [42 x i8] c"Aviso: nenhuma transicao foi disparada! \0A\00"
@.str.11 = [26 x i8] c"Numero de iteracoes: %u.\0A\00"
@.str.12 = [21 x i8] c"Lugares com token: \0A\00"
@.str.13 = [22 x i8] c"Lugar %u: %u tokens \0A\00"
@.str.14 = [25 x i8] c"Transicoes disparadas: \0A\00"
@.str.15 = [35 x i8] c"Transicao %u: disparada %u vezes \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i32]
%4 = alloca [1000 x [1000 x i32]]
%5 = alloca [1000 x [1000 x i32]]
%6 = alloca i32
%7 = alloca i32
%8 = alloca [1000 x i32]
%9 = alloca [1000 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %1
%19 = call i32 @time(i32* null)
store i32 %19, i32* %2
%20 = call i32 @time(i32* null)
%21 = call i32 @srand(i32 %20)
%22 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 0
%23 = call i32 @vzeros(i32* %22, i32 1000)
%24 = getelementptr inbounds [1000 x i32], [1000 x i32]* %9, i64 0, i64 0
%25 = call i32 @vzeros(i32* %24, i32 1000)
%26 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 0
%27 = bitcast [1000 x i32]* %26 to i32**
%28 = call i32 @mzeros(i32** %27, i32 1000, i32 1000)
%29 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %5, i64 0, i64 0
%30 = bitcast [1000 x i32]* %29 to i32**
%31 = call i32 @mzeros(i32** %30, i32 1000, i32 1000)
%32 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%33 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%34 = load i32, i32* %7
%35 = icmp ugt i32 %34, 1000
br i1 %35, label %36, label %38
36: ; preds = %0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %333
38: ; preds = %0
%39 = load i32, i32* %6
%40 = icmp ugt i32 %39, 1000
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %333
43: ; preds = %38
%44 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%45 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%46 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %18)
store i32 0, i32* %12
br label %47
47: ; preds = %65, %43
%48 = load i32, i32* %12
%49 = load i32, i32* %16
%50 = icmp ult i32 %48, %49
br i1 %50, label %51, label %68
51: ; preds = %47
%52 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %10, i32* %11)
%53 = load i32, i32* %10
%54 = load i32, i32* %7
%55 = icmp uge i32 %53, %54
br i1 %55, label %56, label %60
56: ; preds = %51
%57 = load i32, i32* %12
%58 = add i32 6, %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i32 %58)
store i32 -1, i32* %1
br label %333
60: ; preds = %51
%61 = load i32, i32* %11
%62 = load i32, i32* %10
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %63
store i32 %61, i32* %64
br label %65
65: ; preds = %60
%66 = load i32, i32* %12
%67 = add i32 %66, 1
store i32 %67, i32* %12
br label %47
68: ; preds = %47
store i32 0, i32* %12
br label %69
69: ; preds = %96, %68
%70 = load i32, i32* %12
%71 = load i32, i32* %17
%72 = icmp ult i32 %70, %71
br i1 %72, label %73, label %99
73: ; preds = %69
%74 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32* %10, i32* %16, i32* %11)
%75 = load i32, i32* %10
%76 = load i32, i32* %7
%77 = icmp uge i32 %75, %76
br i1 %77, label %82, label %78
78: ; preds = %73
%79 = load i32, i32* %11
%80 = load i32, i32* %6
%81 = icmp uge i32 %79, %80
br i1 %81, label %82, label %88
82: ; preds = %78, %73
%83 = load i32, i32* %16
%84 = add i32 6, %83
%85 = load i32, i32* %12
%86 = add i32 %84, %85
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %86)
store i32 -1, i32* %1
br label %333
88: ; preds = %78
%89 = load i32, i32* %16
%90 = load i32, i32* %10
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 %91
%93 = load i32, i32* %11
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds [1000 x i32], [1000 x i32]* %92, i64 0, i64 %94
store i32 %89, i32* %95
br label %96
96: ; preds = %88
%97 = load i32, i32* %12
%98 = add i32 %97, 1
store i32 %98, i32* %12
br label %69
99: ; preds = %69
store i32 0, i32* %12
br label %100
100: ; preds = %129, %99
%101 = load i32, i32* %12
%102 = load i32, i32* %18
%103 = icmp ult i32 %101, %102
br i1 %103, label %104, label %132
104: ; preds = %100
%105 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32* %10, i32* %16, i32* %11)
%106 = load i32, i32* %10
%107 = load i32, i32* %6
%108 = icmp uge i32 %106, %107
br i1 %108, label %113, label %109
109: ; preds = %104
%110 = load i32, i32* %11
%111 = load i32, i32* %7
%112 = icmp uge i32 %110, %111
br i1 %112, label %113, label %121
113: ; preds = %109, %104
%114 = load i32, i32* %16
%115 = add i32 6, %114
%116 = load i32, i32* %12
%117 = add i32 %115, %116
%118 = load i32, i32* %17
%119 = add i32 %117, %118
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %119)
store i32 -1, i32* %1
br label %333
121: ; preds = %109
%122 = load i32, i32* %16
%123 = load i32, i32* %10
%124 = zext i32 %123 to i64
%125 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %5, i64 0, i64 %124
%126 = load i32, i32* %11
%127 = zext i32 %126 to i64
%128 = getelementptr inbounds [1000 x i32], [1000 x i32]* %125, i64 0, i64 %127
store i32 %122, i32* %128
br label %129
129: ; preds = %121
%130 = load i32, i32* %12
%131 = add i32 %130, 1
store i32 %131, i32* %12
br label %100
132: ; preds = %100
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %12
br label %134
134: ; preds = %269, %132
%135 = load i32, i32* %12
%136 = icmp ult i32 %135, 1000
br i1 %136, label %137, label %272
137: ; preds = %134
%138 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%139 = load i32, i32* %6
%140 = call i32 @rlist(i32* %138, i32 %139)
store i32 0, i32* %15
store i32 0, i32* %13
br label %141
141: ; preds = %261, %137
%142 = load i32, i32* %13
%143 = load i32, i32* %6
%144 = icmp ult i32 %142, %143
br i1 %144, label %145, label %264
145: ; preds = %141
%146 = load i32, i32* %13
%147 = zext i32 %146 to i64
%148 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 %147
%149 = load i32, i32* %148
store i32 %149, i32* %10
store i32 1, i32* %14
store i32 0, i32* %11
br label %150
150: ; preds = %179, %145
%151 = load i32, i32* %11
%152 = load i32, i32* %7
%153 = icmp ult i32 %151, %152
br i1 %153, label %154, label %182
154: ; preds = %150
%155 = load i32, i32* %11
%156 = zext i32 %155 to i64
%157 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 %156
%158 = load i32, i32* %10
%159 = zext i32 %158 to i64
%160 = getelementptr inbounds [1000 x i32], [1000 x i32]* %157, i64 0, i64 %159
%161 = load i32, i32* %160
%162 = icmp ne i32 %161, 0
br i1 %162, label %163, label %178
163: ; preds = %154
%164 = load i32, i32* %11
%165 = zext i32 %164 to i64
%166 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %165
%167 = load i32, i32* %166
%168 = load i32, i32* %11
%169 = zext i32 %168 to i64
%170 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 %169
%171 = load i32, i32* %10
%172 = zext i32 %171 to i64
%173 = getelementptr inbounds [1000 x i32], [1000 x i32]* %170, i64 0, i64 %172
%174 = load i32, i32* %173
%175 = icmp ult i32 %167, %174
br i1 %175, label %176, label %177
176: ; preds = %163
store i32 0, i32* %14
br label %182
177: ; preds = %163
br label %178
178: ; preds = %177, %154
br label %179
179: ; preds = %178
%180 = load i32, i32* %11
%181 = add i32 %180, 1
store i32 %181, i32* %11
br label %150
182: ; preds = %176, %150
%183 = load i32, i32* %14
%184 = icmp ne i32 %183, 0
br i1 %184, label %185, label %260
185: ; preds = %182
store i32 1, i32* %15
%186 = call i32 (...) @rand()
%187 = srem i32 %186, 100
%188 = add nsw i32 %187, 1
%189 = icmp sle i32 %188, 50
br i1 %189, label %190, label %258
190: ; preds = %185
store i32 0, i32* %11
br label %191
191: ; preds = %218, %190
%192 = load i32, i32* %11
%193 = load i32, i32* %7
%194 = icmp ult i32 %192, %193
br i1 %194, label %195, label %221
195: ; preds = %191
%196 = load i32, i32* %11
%197 = zext i32 %196 to i64
%198 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 %197
%199 = load i32, i32* %10
%200 = zext i32 %199 to i64
%201 = getelementptr inbounds [1000 x i32], [1000 x i32]* %198, i64 0, i64 %200
%202 = load i32, i32* %201
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %217
204: ; preds = %195
%205 = load i32, i32* %11
%206 = zext i32 %205 to i64
%207 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %4, i64 0, i64 %206
%208 = load i32, i32* %10
%209 = zext i32 %208 to i64
%210 = getelementptr inbounds [1000 x i32], [1000 x i32]* %207, i64 0, i64 %209
%211 = load i32, i32* %210
%212 = load i32, i32* %11
%213 = zext i32 %212 to i64
%214 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %213
%215 = load i32, i32* %214
%216 = sub i32 %215, %211
store i32 %216, i32* %214
br label %217
217: ; preds = %204, %195
br label %218
218: ; preds = %217
%219 = load i32, i32* %11
%220 = add i32 %219, 1
store i32 %220, i32* %11
br label %191
221: ; preds = %191
store i32 0, i32* %11
br label %222
222: ; preds = %254, %221
%223 = load i32, i32* %11
%224 = load i32, i32* %7
%225 = icmp ult i32 %223, %224
br i1 %225, label %226, label %257
226: ; preds = %222
%227 = load i32, i32* %10
%228 = zext i32 %227 to i64
%229 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %5, i64 0, i64 %228
%230 = load i32, i32* %11
%231 = zext i32 %230 to i64
%232 = getelementptr inbounds [1000 x i32], [1000 x i32]* %229, i64 0, i64 %231
%233 = load i32, i32* %232
%234 = icmp ne i32 %233, 0
br i1 %234, label %235, label %253
235: ; preds = %226
%236 = load i32, i32* %10
%237 = zext i32 %236 to i64
%238 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %5, i64 0, i64 %237
%239 = load i32, i32* %11
%240 = zext i32 %239 to i64
%241 = getelementptr inbounds [1000 x i32], [1000 x i32]* %238, i64 0, i64 %240
%242 = load i32, i32* %241
%243 = load i32, i32* %11
%244 = zext i32 %243 to i64
%245 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %244
%246 = load i32, i32* %245
%247 = add i32 %246, %242
store i32 %247, i32* %245
%248 = load i32, i32* %10
%249 = zext i32 %248 to i64
%250 = getelementptr inbounds [1000 x i32], [1000 x i32]* %9, i64 0, i64 %249
%251 = load i32, i32* %250
%252 = add i32 %251, 1
store i32 %252, i32* %250
br label %253
253: ; preds = %235, %226
br label %254
254: ; preds = %253
%255 = load i32, i32* %11
%256 = add i32 %255, 1
store i32 %256, i32* %11
br label %222
257: ; preds = %222
br label %259
258: ; preds = %185
br label %259
259: ; preds = %258, %257
br label %260
260: ; preds = %259, %182
br label %261
261: ; preds = %260
%262 = load i32, i32* %13
%263 = add i32 %262, 1
store i32 %263, i32* %13
br label %141
264: ; preds = %141
%265 = load i32, i32* %15
%266 = icmp eq i32 %265, 0
br i1 %266, label %267, label %268
267: ; preds = %264
br label %272
268: ; preds = %264
br label %269
269: ; preds = %268
%270 = load i32, i32* %12
%271 = add i32 %270, 1
store i32 %271, i32* %12
br label %134
272: ; preds = %267, %134
%273 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%274 = call i32 @time(i32* null)
%275 = load i32, i32* %2
%276 = sub i32 %274, %275
store i32 %276, i32* %2
%277 = load i32, i32* %2
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %277)
%279 = load i32, i32* %12
%280 = icmp eq i32 %279, 0
br i1 %280, label %281, label %283
281: ; preds = %272
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0))
br label %283
283: ; preds = %281, %272
%284 = load i32, i32* %12
%285 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %284)
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %11
br label %287
287: ; preds = %305, %283
%288 = load i32, i32* %11
%289 = load i32, i32* %7
%290 = icmp ult i32 %288, %289
br i1 %290, label %291, label %308
291: ; preds = %287
%292 = load i32, i32* %11
%293 = zext i32 %292 to i64
%294 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %293
%295 = load i32, i32* %294
%296 = icmp ne i32 %295, 0
br i1 %296, label %297, label %304
297: ; preds = %291
%298 = load i32, i32* %11
%299 = load i32, i32* %11
%300 = zext i32 %299 to i64
%301 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %300
%302 = load i32, i32* %301
%303 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i32 %298, i32 %302)
br label %304
304: ; preds = %297, %291
br label %305
305: ; preds = %304
%306 = load i32, i32* %11
%307 = add i32 %306, 1
store i32 %307, i32* %11
br label %287
308: ; preds = %287
%309 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %11
br label %310
310: ; preds = %328, %308
%311 = load i32, i32* %11
%312 = load i32, i32* %7
%313 = icmp ult i32 %311, %312
br i1 %313, label %314, label %331
314: ; preds = %310
%315 = load i32, i32* %11
%316 = zext i32 %315 to i64
%317 = getelementptr inbounds [1000 x i32], [1000 x i32]* %9, i64 0, i64 %316
%318 = load i32, i32* %317
%319 = icmp ne i32 %318, 0
br i1 %319, label %320, label %327
320: ; preds = %314
%321 = load i32, i32* %11
%322 = load i32, i32* %11
%323 = zext i32 %322 to i64
%324 = getelementptr inbounds [1000 x i32], [1000 x i32]* %9, i64 0, i64 %323
%325 = load i32, i32* %324
%326 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), i32 %321, i32 %325)
br label %327
327: ; preds = %320, %314
br label %328
328: ; preds = %327
%329 = load i32, i32* %11
%330 = add i32 %329, 1
store i32 %330, i32* %11
br label %310
331: ; preds = %310
%332 = load i32, i32* @EXIT_SUCCESS
store i32 %332, i32* %1
br label %333
333: ; preds = %331, %113, %82, %56, %41, %36
%334 = load i32, i32* %1
ret i32 %334
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@.str.3 = [6 x i8] c"%u %u\00"
@.str.4 = [45 x i8] c"Erro linha %u: lugar maior que o definido. \0A\00"
@.str.5 = [9 x i8] c"%u %u %u\00"
@.str.6 = [55 x i8] c"Erro linha %u: lugar ou transicao acima do definido. \0A\00"
@.str.9 = [51 x i8] c"Tempo de reprodu\C3\A7\C3\A3o do programa: %u segundo(s).\0A\00"
@.str.11 = [26 x i8] c"Numero de iteracoes: %u.\0A\00"
@.str.13 = [22 x i8] c"Lugar %u: %u tokens \0A\00"
@.str.15 = [35 x i8] c"Transicao %u: disparada %u vezes \0A\00"
@EXIT_SUCCESS = global i32 0
@str = [36 x i8] c"======= INICIO DA SIMULACAO =======\00"
@str.16 = [36 x i8] c"======= FIM DA SIMULACAO ==========\00"
@str.17 = [20 x i8] c"Lugares com token: \00"
@str.18 = [24 x i8] c"Transicoes disparadas: \00"
@str.19 = [41 x i8] c"Aviso: nenhuma transicao foi disparada! \00"
@str.20 = [57 x i8] c"Erro linha 2: quantidade de transicoes acima do maximo. \00"
@str.21 = [54 x i8] c"Erro linha 1: quantidade de lugares acima do maximo. \00"
define i32 @main() {
%1 = alloca [1000 x i32]
%2 = alloca [1000 x [1000 x i32]]
%3 = alloca [1000 x [1000 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca [1000 x i32]
%7 = alloca [1000 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = tail call i32 @time(i32* null)
%14 = bitcast [1000 x i32]* %1 to i8*
%15 = bitcast [1000 x [1000 x i32]]* %2 to i8*
%16 = bitcast [1000 x [1000 x i32]]* %3 to i8*
%17 = bitcast i32* %4 to i8*
%18 = bitcast i32* %5 to i8*
%19 = bitcast [1000 x i32]* %6 to i8*
%20 = bitcast [1000 x i32]* %7 to i8*
%21 = bitcast i32* %8 to i8*
%22 = bitcast i32* %9 to i8*
%23 = bitcast i32* %10 to i8*
%24 = bitcast i32* %11 to i8*
%25 = bitcast i32* %12 to i8*
%26 = tail call i32 @time(i32* null)
%27 = tail call i32 @srand(i32 %26)
%28 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 0
%29 = call i32 @vzeros(i32* %28, i32 1000)
%30 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 0
%31 = call i32 @vzeros(i32* %30, i32 1000)
%32 = bitcast [1000 x [1000 x i32]]* %2 to i32**
%33 = call i32 @mzeros(i32** %32, i32 1000, i32 1000)
%34 = bitcast [1000 x [1000 x i32]]* %3 to i32**
%35 = call i32 @mzeros(i32** %34, i32 1000, i32 1000)
%36 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%37 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%38 = load i32, i32* %5
%39 = icmp ugt i32 %38, 1000
br i1 %39, label %40, label %42
40: ; preds = %0
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.21, i64 0, i64 0))
br label %290
42: ; preds = %0
%43 = load i32, i32* %4
%44 = icmp ugt i32 %43, 1000
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.20, i64 0, i64 0))
br label %290
47: ; preds = %42
%48 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%49 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%50 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
%51 = load i32, i32* %10
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %65, %47
%54 = load i32, i32* %11
%55 = icmp eq i32 %54, 0
br i1 %55, label %72, label %75
56: ; preds = %47, %65
%57 = phi i32 [ %69, %65 ], [ 0, %47 ]
%58 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %8, i32* %9)
%59 = load i32, i32* %8
%60 = load i32, i32* %5
%61 = icmp ult i32 %59, %60
br i1 %61, label %65, label %62
62: ; preds = %56
%63 = add i32 %57, 6
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i32 %63)
br label %290
65: ; preds = %56
%66 = load i32, i32* %9
%67 = zext i32 %59 to i64
%68 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %67
store i32 %66, i32* %68
%69 = add nuw i32 %57, 1
%70 = load i32, i32* %10
%71 = icmp ult i32 %69, %70
br i1 %71, label %56, label %53
72: ; preds = %90, %53
%73 = load i32, i32* %12
%74 = icmp eq i32 %73, 0
br i1 %74, label %123, label %98
75: ; preds = %53, %90
%76 = phi i32 [ %95, %90 ], [ 0, %53 ]
%77 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32* %8, i32* %10, i32* %9)
%78 = load i32, i32* %8
%79 = load i32, i32* %5
%80 = icmp ult i32 %78, %79
br i1 %80, label %81, label %85
81: ; preds = %75
%82 = load i32, i32* %9
%83 = load i32, i32* %4
%84 = icmp ult i32 %82, %83
br i1 %84, label %90, label %85
85: ; preds = %81, %75
%86 = load i32, i32* %10
%87 = add i32 %76, 6
%88 = add i32 %87, %86
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %88)
br label %290
90: ; preds = %81
%91 = load i32, i32* %10
%92 = zext i32 %78 to i64
%93 = zext i32 %82 to i64
%94 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %2, i64 0, i64 %92, i64 %93
store i32 %91, i32* %94
%95 = add nuw i32 %76, 1
%96 = load i32, i32* %11
%97 = icmp ult i32 %95, %96
br i1 %97, label %75, label %72
98: ; preds = %72, %115
%99 = phi i32 [ %120, %115 ], [ 0, %72 ]
%100 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32* %8, i32* %10, i32* %9)
%101 = load i32, i32* %8
%102 = load i32, i32* %4
%103 = icmp ult i32 %101, %102
br i1 %103, label %104, label %108
104: ; preds = %98
%105 = load i32, i32* %9
%106 = load i32, i32* %5
%107 = icmp ult i32 %105, %106
br i1 %107, label %115, label %108
108: ; preds = %104, %98
%109 = load i32, i32* %10
%110 = load i32, i32* %11
%111 = add i32 %99, 6
%112 = add i32 %111, %109
%113 = add i32 %112, %110
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %113)
br label %290
115: ; preds = %104
%116 = load i32, i32* %10
%117 = zext i32 %101 to i64
%118 = zext i32 %105 to i64
%119 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %3, i64 0, i64 %117, i64 %118
store i32 %116, i32* %119
%120 = add nuw i32 %99, 1
%121 = load i32, i32* %12
%122 = icmp ult i32 %120, %121
br i1 %122, label %98, label %123
123: ; preds = %115, %72
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%125 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%126 = load i32, i32* %4
br label %127
127: ; preds = %123, %235
%128 = phi i32 [ %126, %123 ], [ %230, %235 ]
%129 = phi i32 [ 0, %123 ], [ %236, %235 ]
%130 = call i32 @rlist(i32* %125, i32 %128)
%131 = load i32, i32* %4
%132 = icmp eq i32 %131, 0
br i1 %132, label %238, label %133
133: ; preds = %127, %227
%134 = phi i64 [ %229, %227 ], [ 0, %127 ]
%135 = phi i32 [ %228, %227 ], [ 0, %127 ]
%136 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 %134
%137 = load i32, i32* %136
store i32 %137, i32* %8
%138 = load i32, i32* %5
%139 = icmp eq i32 %138, 0
br i1 %139, label %155, label %140
140: ; preds = %133
%141 = zext i32 %137 to i64
%142 = zext i32 %138 to i64
br label %143
143: ; preds = %140, %152
%144 = phi i64 [ 0, %140 ], [ %153, %152 ]
%145 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %2, i64 0, i64 %144, i64 %141
%146 = load i32, i32* %145
%147 = icmp eq i32 %146, 0
br i1 %147, label %152, label %148
148: ; preds = %143
%149 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %144
%150 = load i32, i32* %149
%151 = icmp ult i32 %150, %146
br i1 %151, label %225, label %152
152: ; preds = %143, %148
%153 = add nuw nsw i64 %144, 1
%154 = icmp eq i64 %153, %142
br i1 %154, label %155, label %143
155: ; preds = %152, %133
store i32 %138, i32* %9
%156 = call i32 (...) @rand()
%157 = srem i32 %156, 100
%158 = icmp slt i32 %157, 50
br i1 %158, label %159, label %227
159: ; preds = %155
%160 = load i32, i32* %5
%161 = icmp eq i32 %160, 0
br i1 %161, label %224, label %162
162: ; preds = %159
%163 = load i32, i32* %8
%164 = zext i32 %163 to i64
%165 = zext i32 %160 to i64
%166 = and i64 %165, 1
%167 = icmp eq i32 %160, 1
br i1 %167, label %170, label %168
168: ; preds = %162
%169 = and i64 %165, 4294967294
br label %187
170: ; preds = %206, %162
%171 = phi i64 [ 0, %162 ], [ %207, %206 ]
%172 = icmp eq i64 %166, 0
br i1 %172, label %181, label %173
173: ; preds = %170
%174 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %2, i64 0, i64 %171, i64 %164
%175 = load i32, i32* %174
%176 = icmp eq i32 %175, 0
br i1 %176, label %181, label %177
177: ; preds = %173
%178 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %171
%179 = load i32, i32* %178
%180 = sub i32 %179, %175
store i32 %180, i32* %178
br label %181
181: ; preds = %173, %177, %170
br i1 %161, label %224, label %182
182: ; preds = %181
%183 = load i32, i32* %8
%184 = zext i32 %183 to i64
%185 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 %184
%186 = zext i32 %160 to i64
br label %210
187: ; preds = %206, %168
%188 = phi i64 [ 0, %168 ], [ %207, %206 ]
%189 = phi i64 [ 0, %168 ], [ %208, %206 ]
%190 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %2, i64 0, i64 %188, i64 %164
%191 = load i32, i32* %190
%192 = icmp eq i32 %191, 0
br i1 %192, label %197, label %193
193: ; preds = %187
%194 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %188
%195 = load i32, i32* %194
%196 = sub i32 %195, %191
store i32 %196, i32* %194
br label %197
197: ; preds = %187, %193
%198 = or i64 %188, 1
%199 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %2, i64 0, i64 %198, i64 %164
%200 = load i32, i32* %199
%201 = icmp eq i32 %200, 0
br i1 %201, label %206, label %202
202: ; preds = %197
%203 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %198
%204 = load i32, i32* %203
%205 = sub i32 %204, %200
store i32 %205, i32* %203
br label %206
206: ; preds = %202, %197
%207 = add nuw nsw i64 %188, 2
%208 = add i64 %189, 2
%209 = icmp eq i64 %208, %169
br i1 %209, label %170, label %187
210: ; preds = %182, %221
%211 = phi i64 [ 0, %182 ], [ %222, %221 ]
%212 = getelementptr inbounds [1000 x [1000 x i32]], [1000 x [1000 x i32]]* %3, i64 0, i64 %184, i64 %211
%213 = load i32, i32* %212
%214 = icmp eq i32 %213, 0
br i1 %214, label %221, label %215
215: ; preds = %210
%216 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %211
%217 = load i32, i32* %216
%218 = add i32 %217, %213
store i32 %218, i32* %216
%219 = load i32, i32* %185
%220 = add i32 %219, 1
store i32 %220, i32* %185
br label %221
221: ; preds = %210, %215
%222 = add nuw nsw i64 %211, 1
%223 = icmp eq i64 %222, %186
br i1 %223, label %224, label %210
224: ; preds = %221, %159, %181
store i32 %160, i32* %9
br label %227
225: ; preds = %148
%226 = trunc i64 %144 to i32
store i32 %226, i32* %9
br label %227
227: ; preds = %225, %224, %155
%228 = phi i32 [ 1, %155 ], [ 1, %224 ], [ %135, %225 ]
%229 = add nuw nsw i64 %134, 1
%230 = load i32, i32* %4
%231 = zext i32 %230 to i64
%232 = icmp ult i64 %229, %231
br i1 %232, label %133, label %233
233: ; preds = %227
%234 = icmp eq i32 %228, 0
br i1 %234, label %238, label %235
235: ; preds = %233
%236 = add nuw nsw i32 %129, 1
%237 = icmp eq i32 %236, 1000
br i1 %237, label %238, label %127
238: ; preds = %127, %233, %235
%239 = phi i32 [ %129, %233 ], [ 1000, %235 ], [ %129, %127 ]
%240 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.16, i64 0, i64 0))
%241 = call i32 @time(i32* null)
%242 = sub i32 %241, %13
%243 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %242)
%244 = icmp eq i32 %239, 0
br i1 %244, label %245, label %247
245: ; preds = %238
%246 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.19, i64 0, i64 0))
br label %247
247: ; preds = %245, %238
%248 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %239)
%249 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.17, i64 0, i64 0))
store i32 0, i32* %9
%250 = load i32, i32* %5
%251 = icmp eq i32 %250, 0
br i1 %251, label %268, label %252
252: ; preds = %247, %263
%253 = phi i32 [ %264, %263 ], [ %250, %247 ]
%254 = phi i32 [ %266, %263 ], [ 0, %247 ]
%255 = zext i32 %254 to i64
%256 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %255
%257 = load i32, i32* %256
%258 = icmp eq i32 %257, 0
br i1 %258, label %263, label %259
259: ; preds = %252
%260 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i32 %254, i32 %257)
%261 = load i32, i32* %9
%262 = load i32, i32* %5
br label %263
263: ; preds = %252, %259
%264 = phi i32 [ %253, %252 ], [ %262, %259 ]
%265 = phi i32 [ %254, %252 ], [ %261, %259 ]
%266 = add i32 %265, 1
store i32 %266, i32* %9
%267 = icmp ult i32 %266, %264
br i1 %267, label %252, label %268
268: ; preds = %263, %247
%269 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.18, i64 0, i64 0))
store i32 0, i32* %9
%270 = load i32, i32* %5
%271 = icmp eq i32 %270, 0
br i1 %271, label %288, label %272
272: ; preds = %268, %283
%273 = phi i32 [ %284, %283 ], [ %270, %268 ]
%274 = phi i32 [ %286, %283 ], [ 0, %268 ]
%275 = zext i32 %274 to i64
%276 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 %275
%277 = load i32, i32* %276
%278 = icmp eq i32 %277, 0
br i1 %278, label %283, label %279
279: ; preds = %272
%280 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), i32 %274, i32 %277)
%281 = load i32, i32* %9
%282 = load i32, i32* %5
br label %283
283: ; preds = %272, %279
%284 = phi i32 [ %273, %272 ], [ %282, %279 ]
%285 = phi i32 [ %274, %272 ], [ %281, %279 ]
%286 = add i32 %285, 1
store i32 %286, i32* %9
%287 = icmp ult i32 %286, %284
br i1 %287, label %272, label %288
288: ; preds = %283, %268
%289 = load i32, i32* @EXIT_SUCCESS
br label %290
290: ; preds = %288, %108, %85, %62, %45, %40
%291 = phi i32 [ -1, %40 ], [ -1, %45 ], [ -1, %62 ], [ -1, %85 ], [ -1, %108 ], [ %289, %288 ]
ret i32 %291
}