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

/* Forward declarations */

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintBasis(int /*<<< orphan*/ *, char);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ system(char *);
scalar_t__ time(int /*<<< orphan*/ *);
int main() {
  printf("content-type: text/html\n\n");
  srand((unsigned)time(NULL));
  FILE *result;
  int i, j;
  int len;
  char *str;
  FILE *fp;
  int c;
  char outputText[4][64];
  bool isEve = true, isEavesdrop = false;
  if ((fp = fopen("./output.txt", "r")) == NULL) {
    printf("Error:8");
    return -1;
  }
  for (i = 0; i < 4; i++)
    if (fgets(outputText[i], 64, fp) == NULL || outputText[i][0] == '2') {
      isEve = false;
      break;
    }
  fclose(fp);
  if ((result = fopen("resultTmp", "w")) == NULL) {
    printf("content-type: text/html\n\n");
    printf("Error:4");
    return -1;
  }
  str = (char *)malloc(sizeof(char) * 28);
  str += 7;
  for (i = 0; i < 20; i++) {
    if (outputText[1][i * 2] == outputText[2][i * 2] &&
        (outputText[1][i * 2] == outputText[3][i * 2] || !isEve)) {
      str[i] = outputText[0][i * 2];
    } else {
      char temp[2];
      int tmp = rand() % 2;
      sprintf(temp, "%d", tmp);
      str[i] = temp[0];
    }
  }
  fprintf(result, "\t<div class=\"header\">\n");
  fprintf(result, "\t\t<h1>Result</h1>\n");
  fprintf(result, "\t</div>");
  fprintf(
      result,
      "\t<table class=\"result\" border=\"1\" width=\"528px\" "
      "border=\"1\">\n\t\t<tr><td class=\"resultHead\" colspan=\"2\"></td>\n");
  for (i = 0; i < 20; i++)
    fprintf(result,
            "\t\t\t<td class=\"resultHead\" width=\"15px\"><font "
            "size=\"1\">%d</font></td>\n",
            i);
  fprintf(result, "\t\t</tr>\n");
  int rowspan;
  if (isEve)
    rowspan = 3;
  else
    rowspan = 2;
  for (i = 0; i < 2 + rowspan; i++) {
    if (i == 0)
      fprintf(result,
              "\t\t<tr>\n\t\t\t<td class=\"resultHead\" "
              "rowspan=\"%d\">Basis</td>\n\n\t\t\t<td "
              "class=\"resultHead2\">Alice</td>",
              rowspan);
    else if (i == rowspan)
      fprintf(result, "\n\n\t\t</tr><tr>\n\t\t\t<td class=\"resultHead\" "
                      "rowspan=\"2\">Bit</td>\n\n\t\t\t<td "
                      "class=\"resultHead2\">Alice</td>");
    else if (i == 2)
      fprintf(result,
              "\n\n\t\t</tr><tr>\n\n\t\t\t<td class=\"resultHead2\">Eve</td>");
    else
      fprintf(result,
              "\n\n\t\t</tr><tr>\n\n\t\t\t<td class=\"resultHead2\">Bob</td>");
    for (j = 0; j < 20; j++) {
      if (outputText[1][j * 2] == outputText[2][j * 2]) {
        if (outputText[0][j * 2] == str[j])
          fprintf(result, "\n\t\t\t<td class=\"resultBody\" "
                          "style=\"background-color:#6495ed\">");
        else {
          fprintf(result, "\n\t\t\t<td class=\"resultBody\" "
                          "style=\"background-color:#dc143c\">");
          isEavesdrop = true;
        }
      } else
        fprintf(result, "\n\t\t\t<td class=\"resultBody\">");
      if (i <= 1)
        fprintBasis(result, outputText[i + 1][j * 2]);
      else if (i == rowspan)
        fprintf(result, "%c", outputText[0][j * 2]);
      else if (i == rowspan + 1)
        fprintf(result, "%c", str[j]);
      else
        fprintBasis(result, outputText[3][j * 2]);
      fprintf(result, "</td>");
    }
  }
  fprintf(result, "\n\t\t</tr>\n\t</table>\n");
  if (isEve) {
    if (isEavesdrop)
      fprintf(result,
              "\n\t<h3 style=\"color:#6495ed\">Detection Successful</h3>\n");
    else
      fprintf(result,
              "\n\t<h3 style=\"color:#dc143c\">Detection Failed</h3>\n");
  } else {
    if (isEavesdrop)
      fprintf(result,
              "\n\t<h3 style=\"color:#dc143c\">Distribution Failed</h3>\n");
    else
      fprintf(result,
              "\n\t<h3 style=\"color:#6495ed\">Distribution Successful</h3>\n");
  }
  fclose(result);
  free(str - 7);
  printf("OK!");
  system("./rmTmp resultTmp");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe17(%rip),%rdi
call   1070 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
movl   $0x1,-0x144(%rbp)
movl   $0x0,-0x148(%rbp)
lea    0xe01(%rip),%rdi
lea    0xe07(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    124b <main+0x7b>
lea    0xdef(%rip),%rdi
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    17d3 <main+0x603>
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    12c6 <main+0xf6>
movslq -0x14(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x6,%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rdx
mov    $0x40,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     12a4 <main+0xd4>
movslq -0x14(%rbp),%rcx
lea    -0x140(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movsbl (%rax),%eax
cmp    $0x32,%eax
jne    12b3 <main+0xe3>
movl   $0x0,-0x144(%rbp)
jmp    12c6 <main+0xf6>
jmp    12b8 <main+0xe8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1252 <main+0x82>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
lea    0x1112(%rip),%rdi
lea    0xd54(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1314 <main+0x144>
lea    0xd09(%rip),%rdi
call   1070 <printf@plt>
lea    0xd30(%rip),%rdi
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    17d3 <main+0x603>
mov    $0x1c,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    140c <main+0x23c>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x100(%rbp,%rax,1),%eax
ff
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0xc0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    13ba <main+0x1ea>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x100(%rbp,%rax,1),%eax
ff
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0x80(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     139b <main+0x1cb>
cmpl   $0x0,-0x144(%rbp)
jne    13ba <main+0x1ea>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x140(%rbp,%rax,1),%dl
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    13f9 <main+0x229>
mov    $0x0,%al
call   10f0 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x150(%rbp)
lea    -0x14a(%rbp),%rdi
mov    -0x150(%rbp),%edx
lea    0xc58(%rip),%rsi
call   10e0 <sprintf@plt>
mov    -0x14a(%rbp),%dl
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    13fe <main+0x22e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1335 <main+0x165>
mov    -0x10(%rbp),%rdi
lea    0xc27(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xc2c(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xc2d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xc23(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1488 <main+0x2b8>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc69(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    145b <main+0x28b>
mov    -0x10(%rbp),%rdi
lea    0xc8f(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpl   $0x0,-0x144(%rbp)
je     14b6 <main+0x2e6>
movl   $0x3,-0x154(%rbp)
jmp    14c0 <main+0x2f0>
movl   $0x2,-0x154(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x154(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1709 <main+0x539>
cmpl   $0x0,-0x14(%rbp)
jne    1502 <main+0x332>
mov    -0x10(%rbp),%rdi
mov    -0x154(%rbp),%edx
lea    0xc35(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1565 <main+0x395>
mov    -0x14(%rbp),%eax
cmp    -0x154(%rbp),%eax
jne    1528 <main+0x358>
mov    -0x10(%rbp),%rdi
lea    0xc6f(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1560 <main+0x390>
cmpl   $0x2,-0x14(%rbp)
jne    1549 <main+0x379>
mov    -0x10(%rbp),%rdi
lea    0xcb2(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    155b <main+0x38b>
mov    -0x10(%rbp),%rdi
lea    0xcce(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1560 <main+0x390>
jmp    1565 <main+0x395>
movl   $0x0,-0x18(%rbp)
cmpl   $0x14,-0x18(%rbp)
jge    16f6 <main+0x526>
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x100(%rbp,%rax,1),%eax
ff
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0xc0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    15fb <main+0x42b>
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x140(%rbp,%rax,1),%eax
ff
mov    -0x28(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    15da <main+0x40a>
mov    -0x10(%rbp),%rdi
lea    0xc87(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    15f6 <main+0x426>
mov    -0x10(%rbp),%rdi
lea    0xcad(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x148(%rbp)
jmp    160d <main+0x43d>
mov    -0x10(%rbp),%rdi
lea    0xcc9(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpl   $0x1,-0x14(%rbp)
jg     1649 <main+0x479>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x140(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%esi
call   1050 <fprintBasis@plt>
jmp    16d6 <main+0x506>
mov    -0x14(%rbp),%eax
cmp    -0x154(%rbp),%eax
jne    167f <main+0x4af>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x140(%rbp,%rax,1),%edx
ff
lea    0xc78(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    16d1 <main+0x501>
mov    -0x14(%rbp),%eax
mov    -0x154(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    16b6 <main+0x4e6>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0xc41(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    16cc <main+0x4fc>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
cltq
movsbl -0x80(%rbp,%rax,1),%esi
call   1050 <fprintBasis@plt>
jmp    16d1 <main+0x501>
jmp    16d6 <main+0x506>
mov    -0x10(%rbp),%rdi
lea    0xb6e(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    156c <main+0x39c>
jmp    16fb <main+0x52b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14c7 <main+0x2f7>
mov    -0x10(%rbp),%rdi
lea    0xbda(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
cmpl   $0x0,-0x144(%rbp)
je     1763 <main+0x593>
cmpl   $0x0,-0x148(%rbp)
je     174c <main+0x57c>
mov    -0x10(%rbp),%rdi
lea    0xbc2(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    175e <main+0x58e>
mov    -0x10(%rbp),%rdi
lea    0xbe2(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    179e <main+0x5ce>
cmpl   $0x0,-0x148(%rbp)
je     1787 <main+0x5b7>
mov    -0x10(%rbp),%rdi
lea    0xbf1(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1799 <main+0x5c9>
mov    -0x10(%rbp),%rdi
lea    0xc10(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    179e <main+0x5ce>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x28(%rbp),%rdi
add    $0xfffffffffffffff9,%rdi
call   1030 <free@plt>
lea    0xc21(%rip),%rdi
call   1070 <printf@plt>
lea    0xc19(%rip),%rdi
call   1060 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
lea    0x11bd(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
lea    0xdce(%rip),%rdi
lea    0xdd4(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     17a2 <main+0x5a2>
mov    %rax,%rbx
lea    0x30(%rsp),%rdi
mov    $0x40,%esi
mov    %rax,%rdx
call   10b0 <fgets@plt>
mov    $0x1,%r13b
test   %rax,%rax
je     12d7 <main+0xd7>
cmpb   $0x32,0x30(%rsp)
je     12d7 <main+0xd7>
lea    0x70(%rsp),%rdi
mov    $0x40,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     12d7 <main+0xd7>
cmpb   $0x32,0x70(%rsp)
je     12d7 <main+0xd7>
lea    0xb0(%rsp),%rdi
mov    $0x40,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     12d7 <main+0xd7>
cmpb   $0x32,0xb0(%rsp)
32
je     12d7 <main+0xd7>
lea    0xf0(%rsp),%rdi
mov    $0x40,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
sete   %al
cmpb   $0x32,0xf0(%rsp)
32
sete   %r13b
or     %al,%r13b
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0x10e5(%rip),%rdi
lea    0xd2a(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     17ab <main+0x5ab>
mov    %rax,%rbx
mov    $0x1c,%edi
call   10e0 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %r13d,%r14d
not    %r14b
lea    0xd07(%rip),%r15
lea    0xe(%rsp),%r12
xor    %ebp,%ebp
jmp    1368 <main+0x168>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1120 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
mov    %r12,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1100 <sprintf@plt>
movzbl 0xe(%rsp),%eax
mov    0x10(%rsp),%rcx
mov    %al,0x7(%rcx,%rbp,1)
add    $0x1,%rbp
cmp    $0x14,%rbp
je     138c <main+0x18c>
movzbl 0x70(%rsp,%rbp,2),%eax
cmp    0xb0(%rsp,%rbp,2),%al
jne    1330 <main+0x130>
cmp    0xf0(%rsp,%rbp,2),%al
setne  %al
test   %al,%r14b
jne    1330 <main+0x130>
movzbl 0x30(%rsp,%rbp,2),%eax
jmp    1355 <main+0x155>
lea    0xc91(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
lea    0xc8f(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
lea    0xc89(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
lea    0xc78(%rip),%rdi
mov    $0x6b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
lea    0xccb(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0x4,%ebp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xa,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xd,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xe,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xf,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x10,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x11,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x12,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x13,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0xba0(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
mov    %r13b,0x7(%rsp)
movzbl %r13b,%eax
mov    %eax,%r15d
xor    $0x3,%r15d
sub    %eax,%ebp
mov    %rbp,0x28(%rsp)
xor    $0x5,%eax
mov    %rax,0x18(%rsp)
lea    0x70(%rsp),%rbp
lea    0xc90(%rip),%r12
xor    %r13d,%r13d
movl   $0x0,0x8(%rsp)
jmp    15d7 <main+0x3d7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x40,%rbp
mov    0x20(%rsp),%rax
mov    %rax,%r13
cmp    0x18(%rsp),%rax
je     176d <main+0x56d>
test   %r13,%r13
je     1600 <main+0x400>
cmp    %r15,%r13
jne    1620 <main+0x420>
mov    $0x63,%esi
mov    $0x1,%edx
lea    0xb7f(%rip),%rdi
jmp    1640 <main+0x440>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
lea    0xb07(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    1648 <main+0x448>
cs nopw 0x0(%rax,%rax,1)
mov    $0x32,%esi
mov    $0x1,%edx
cmp    $0x2,%r13
jne    1639 <main+0x439>
lea    0xb9e(%rip),%rdi
jmp    1640 <main+0x440>
lea    0xbc8(%rip),%rdi
mov    %rbx,%rcx
call   1110 <fwrite@plt>
lea    0x1(%r13),%rax
mov    %rax,0x20(%rsp)
xor    %r14d,%r14d
jmp    1691 <main+0x491>
cs nopw 0x0(%rax,%rax,1)
movsbl 0x0(%rbp,%r14,2),%esi
mov    %rbx,%rdi
call   1060 <fprintBasis@plt>
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %rbx,%rcx
call   1110 <fwrite@plt>
add    $0x1,%r14
cmp    $0x14,%r14
je     15c0 <main+0x3c0>
movzbl 0x70(%rsp,%r14,2),%eax
cmp    0xb0(%rsp,%r14,2),%al
jne    16d0 <main+0x4d0>
movzbl 0x30(%rsp,%r14,2),%eax
mov    0x10(%rsp),%rcx
cmp    0x7(%rcx,%r14,1),%al
jne    1700 <main+0x500>
mov    $0x3c,%esi
mov    $0x1,%edx
lea    0xb77(%rip),%rdi
jmp    16e1 <main+0x4e1>
cs nopw 0x0(%rax,%rax,1)
mov    $0x1b,%esi
mov    $0x1,%edx
lea    0xbd4(%rip),%rdi
mov    %rbx,%rcx
call   1110 <fwrite@plt>
cmp    $0x1,%r13
jbe    1660 <main+0x460>
jmp    172b <main+0x52b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3c,%esi
mov    $0x1,%edx
lea    0xb67(%rip),%rdi
mov    %rbx,%rcx
call   1110 <fwrite@plt>
movl   $0x1,0x8(%rsp)
cmp    $0x1,%r13
jbe    1660 <main+0x460>
cmp    %r15,%r13
jne    1740 <main+0x540>
movsbl 0x30(%rsp,%r14,2),%edi
jmp    1752 <main+0x552>
nopl   0x0(%rax,%rax,1)
cmp    0x28(%rsp),%r13
jne    175f <main+0x55f>
mov    0x10(%rsp),%rax
movsbl 0x7(%rax,%r14,1),%edi
mov    %rbx,%rsi
call   1090 <fputc@plt>
jmp    166e <main+0x46e>
movsbl 0xf0(%rsp,%r14,2),%esi
jmp    1666 <main+0x466>
lea    0xb5d(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
cmpb   $0x0,0x7(%rsp)
je     17ca <main+0x5ca>
cmpl   $0x0,0x8(%rsp)
je     17df <main+0x5df>
lea    0xbb4(%rip),%rdi
mov    $0x35,%esi
jmp    17f9 <main+0x5f9>
lea    0x866(%rip),%rdi
jmp    17be <main+0x5be>
lea    0xc23(%rip),%rdi
call   1040 <puts@plt>
lea    0x85b(%rip),%rdi
call   1080 <printf@plt>
mov    $0xffffffff,%eax
jmp    1832 <main+0x632>
cmpl   $0x0,0x8(%rsp)
je     17ed <main+0x5ed>
lea    0xb0d(%rip),%rdi
mov    $0x36,%esi
jmp    17f9 <main+0x5f9>
lea    0xb9f(%rip),%rdi
mov    $0x39,%esi
jmp    17f9 <main+0x5f9>
lea    0xb28(%rip),%rdi
mov    $0x32,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
lea    0xba0(%rip),%rdi
call   1080 <printf@plt>
lea    0xb98(%rip),%rdi
call   1070 <system@plt>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"content-type: text/html\0A\0A\00"
@.str.1 = [13 x i8] c"./output.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [8 x i8] c"Error:8\00"
@.str.4 = [10 x i8] c"resultTmp\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [8 x i8] c"Error:4\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [23 x i8] c"\09<div class=\22header\22>\0A\00"
@.str.9 = [19 x i8] c"\09\09<h1>Result</h1>\0A\00"
@.str.10 = [8 x i8] c"\09</div>\00"
@.str.11 = [108 x i8] c"\09<table class=\22result\22 border=\221\22 width=\22528px\22 border=\221\22>\0A\09\09<tr><td class=\22resultHead\22 colspan=\222\22></td>\0A\00"
@.str.12 = [70 x i8] c"\09\09\09<td class=\22resultHead\22 width=\2215px\22><font size=\221\22>%d</font></td>\0A\00"
@.str.13 = [9 x i8] c"\09\09</tr>\0A\00"
@.str.14 = [96 x i8] c"\09\09<tr>\0A\09\09\09<td class=\22resultHead\22 rowspan=\22%d\22>Basis</td>\0A\0A\09\09\09<td class=\22resultHead2\22>Alice</td>\00"
@.str.15 = [100 x i8] c"\0A\0A\09\09</tr><tr>\0A\09\09\09<td class=\22resultHead\22 rowspan=\222\22>Bit</td>\0A\0A\09\09\09<td class=\22resultHead2\22>Alice</td>\00"
@.str.16 = [51 x i8] c"\0A\0A\09\09</tr><tr>\0A\0A\09\09\09<td class=\22resultHead2\22>Eve</td>\00"
@.str.17 = [51 x i8] c"\0A\0A\09\09</tr><tr>\0A\0A\09\09\09<td class=\22resultHead2\22>Bob</td>\00"
@.str.18 = [61 x i8] c"\0A\09\09\09<td class=\22resultBody\22 style=\22background-color:ed\22>\00"
@.str.19 = [61 x i8] c"\0A\09\09\09<td class=\22resultBody\22 style=\22background-color:#dc143c\22>\00"
@.str.20 = [28 x i8] c"\0A\09\09\09<td class=\22resultBody\22>\00"
@.str.21 = [3 x i8] c"%c\00"
@.str.22 = [6 x i8] c"</td>\00"
@.str.23 = [20 x i8] c"\0A\09\09</tr>\0A\09</table>\0A\00"
@.str.24 = [55 x i8] c"\0A\09<h3 style=\22color:ed\22>Detection Successful</h3>\0A\00"
@.str.25 = [51 x i8] c"\0A\09<h3 style=\22color:#dc143c\22>Detection Failed</h3>\0A\00"
@.str.26 = [54 x i8] c"\0A\09<h3 style=\22color:#dc143c\22>Distribution Failed</h3>\0A\00"
@.str.27 = [58 x i8] c"\0A\09<h3 style=\22color:ed\22>Distribution Successful</h3>\0A\00"
@.str.28 = [4 x i8] c"OK!\00"
@.str.29 = [18 x i8] c"./rmTmp resultTmp\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [4 x [64 x i8]]
%10 = alloca i32
%11 = alloca i32
%12 = alloca [2 x i8]
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%16 = call i64 @time(i32* null)
%17 = trunc i64 %16 to i32
%18 = call i32 @srand(i32 %17)
store i32 1, i32* %10
store i32 0, i32* %11
%19 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %19, i32** %7
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %23
21: ; preds = %0
%22 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %1
br label %325
23: ; preds = %0
store i32 0, i32* %3
br label %24
24: ; preds = %45, %23
%25 = load i32, i32* %3
%26 = icmp slt i32 %25, 4
br i1 %26, label %27, label %48
27: ; preds = %24
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 %29
%31 = getelementptr inbounds [64 x i8], [64 x i8]* %30, i64 0, i64 0
%32 = load i32*, i32** %7
%33 = call i32* @fgets(i8* %31, i32 64, i32* %32)
%34 = icmp eq i32* %33, null
br i1 %34, label %43, label %35
35: ; preds = %27
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 %37
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %38, i64 0, i64 0
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 50
br i1 %42, label %43, label %44
43: ; preds = %35, %27
store i32 0, i32* %10
br label %48
44: ; preds = %35
br label %45
45: ; preds = %44
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %24
48: ; preds = %43, %24
%49 = load i32*, i32** %7
%50 = call i32 @fclose(i32* %49)
%51 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %51, i32** %2
%52 = icmp eq i32* %51, null
br i1 %52, label %53, label %56
53: ; preds = %48
%54 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%55 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %1
br label %325
56: ; preds = %48
%57 = call i64 @malloc(i32 28)
%58 = inttoptr i64 %57 to i8*
store i8* %58, i8** %6
%59 = load i8*, i8** %6
%60 = getelementptr inbounds i8, i8* %59, i64 7
store i8* %60, i8** %6
store i32 0, i32* %3
br label %61
61: ; preds = %123, %56
%62 = load i32, i32* %3
%63 = icmp slt i32 %62, 20
br i1 %63, label %64, label %126
64: ; preds = %61
%65 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 1
%66 = load i32, i32* %3
%67 = mul nsw i32 %66, 2
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [64 x i8], [64 x i8]* %65, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 2
%73 = load i32, i32* %3
%74 = mul nsw i32 %73, 2
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [64 x i8], [64 x i8]* %72, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %71, %78
br i1 %79, label %80, label %110
80: ; preds = %64
%81 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 1
%82 = load i32, i32* %3
%83 = mul nsw i32 %82, 2
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [64 x i8], [64 x i8]* %81, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 3
%89 = load i32, i32* %3
%90 = mul nsw i32 %89, 2
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [64 x i8], [64 x i8]* %88, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = icmp eq i32 %87, %94
br i1 %95, label %99, label %96
96: ; preds = %80
%97 = load i32, i32* %10
%98 = icmp ne i32 %97, 0
br i1 %98, label %110, label %99
99: ; preds = %96, %80
%100 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 0
%101 = load i32, i32* %3
%102 = mul nsw i32 %101, 2
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [64 x i8], [64 x i8]* %100, i64 0, i64 %103
%105 = load i8, i8* %104
%106 = load i8*, i8** %6
%107 = load i32, i32* %3
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %106, i64 %108
store i8 %105, i8* %109
br label %122
110: ; preds = %96, %64
%111 = call i32 (...) @rand()
%112 = srem i32 %111, 2
store i32 %112, i32* %13
%113 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%114 = load i32, i32* %13
%115 = call i32 @sprintf(i8* %113, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %114)
%116 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%117 = load i8, i8* %116
%118 = load i8*, i8** %6
%119 = load i32, i32* %3
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %118, i64 %120
store i8 %117, i8* %121
br label %122
122: ; preds = %110, %99
br label %123
123: ; preds = %122
%124 = load i32, i32* %3
%125 = add nsw i32 %124, 1
store i32 %125, i32* %3
br label %61
126: ; preds = %61
%127 = load i32*, i32** %2
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %127, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%129 = load i32*, i32** %2
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%131 = load i32*, i32** %2
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%133 = load i32*, i32** %2
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %133, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
br label %135
135: ; preds = %142, %126
%136 = load i32, i32* %3
%137 = icmp slt i32 %136, 20
br i1 %137, label %138, label %145
138: ; preds = %135
%139 = load i32*, i32** %2
%140 = load i32, i32* %3
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %139, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 %140)
br label %142
142: ; preds = %138
%143 = load i32, i32* %3
%144 = add nsw i32 %143, 1
store i32 %144, i32* %3
br label %135
145: ; preds = %135
%146 = load i32*, i32** %2
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %146, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%148 = load i32, i32* %10
%149 = icmp ne i32 %148, 0
br i1 %149, label %150, label %151
150: ; preds = %145
store i32 3, i32* %14
br label %152
151: ; preds = %145
store i32 2, i32* %14
br label %152
152: ; preds = %151, %150
store i32 0, i32* %3
br label %153
153: ; preds = %289, %152
%154 = load i32, i32* %3
%155 = load i32, i32* %14
%156 = add nsw i32 2, %155
%157 = icmp slt i32 %154, %156
br i1 %157, label %158, label %292
158: ; preds = %153
%159 = load i32, i32* %3
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %165
161: ; preds = %158
%162 = load i32*, i32** %2
%163 = load i32, i32* %14
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.14, i64 0, i64 0), i32 %163)
br label %183
165: ; preds = %158
%166 = load i32, i32* %3
%167 = load i32, i32* %14
%168 = icmp eq i32 %166, %167
br i1 %168, label %169, label %172
169: ; preds = %165
%170 = load i32*, i32** %2
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.15, i64 0, i64 0))
br label %182
172: ; preds = %165
%173 = load i32, i32* %3
%174 = icmp eq i32 %173, 2
br i1 %174, label %175, label %178
175: ; preds = %172
%176 = load i32*, i32** %2
%177 = call i32 (i32*, i8*, ...) @fprintf(i32* %176, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0))
br label %181
178: ; preds = %172
%179 = load i32*, i32** %2
%180 = call i32 (i32*, i8*, ...) @fprintf(i32* %179, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0))
br label %181
181: ; preds = %178, %175
br label %182
182: ; preds = %181, %169
br label %183
183: ; preds = %182, %161
store i32 0, i32* %4
br label %184
184: ; preds = %285, %183
%185 = load i32, i32* %4
%186 = icmp slt i32 %185, 20
br i1 %186, label %187, label %288
187: ; preds = %184
%188 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 1
%189 = load i32, i32* %4
%190 = mul nsw i32 %189, 2
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds [64 x i8], [64 x i8]* %188, i64 0, i64 %191
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 2
%196 = load i32, i32* %4
%197 = mul nsw i32 %196, 2
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [64 x i8], [64 x i8]* %195, i64 0, i64 %198
%200 = load i8, i8* %199
%201 = sext i8 %200 to i32
%202 = icmp eq i32 %194, %201
br i1 %202, label %203, label %225
203: ; preds = %187
%204 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 0
%205 = load i32, i32* %4
%206 = mul nsw i32 %205, 2
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds [64 x i8], [64 x i8]* %204, i64 0, i64 %207
%209 = load i8, i8* %208
%210 = sext i8 %209 to i32
%211 = load i8*, i8** %6
%212 = load i32, i32* %4
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i8, i8* %211, i64 %213
%215 = load i8, i8* %214
%216 = sext i8 %215 to i32
%217 = icmp eq i32 %210, %216
br i1 %217, label %218, label %221
218: ; preds = %203
%219 = load i32*, i32** %2
%220 = call i32 (i32*, i8*, ...) @fprintf(i32* %219, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.18, i64 0, i64 0))
br label %224
221: ; preds = %203
%222 = load i32*, i32** %2
%223 = call i32 (i32*, i8*, ...) @fprintf(i32* %222, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.19, i64 0, i64 0))
store i32 1, i32* %11
br label %224
224: ; preds = %221, %218
br label %228
225: ; preds = %187
%226 = load i32*, i32** %2
%227 = call i32 (i32*, i8*, ...) @fprintf(i32* %226, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.20, i64 0, i64 0))
br label %228
228: ; preds = %225, %224
%229 = load i32, i32* %3
%230 = icmp sle i32 %229, 1
br i1 %230, label %231, label %243
231: ; preds = %228
%232 = load i32*, i32** %2
%233 = load i32, i32* %3
%234 = add nsw i32 %233, 1
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 %235
%237 = load i32, i32* %4
%238 = mul nsw i32 %237, 2
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds [64 x i8], [64 x i8]* %236, i64 0, i64 %239
%241 = load i8, i8* %240
%242 = call i32 @fprintBasis(i32* %232, i8 signext %241)
br label %282
243: ; preds = %228
%244 = load i32, i32* %3
%245 = load i32, i32* %14
%246 = icmp eq i32 %244, %245
br i1 %246, label %247, label %257
247: ; preds = %243
%248 = load i32*, i32** %2
%249 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 0
%250 = load i32, i32* %4
%251 = mul nsw i32 %250, 2
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds [64 x i8], [64 x i8]* %249, i64 0, i64 %252
%254 = load i8, i8* %253
%255 = sext i8 %254 to i32
%256 = call i32 (i32*, i8*, ...) @fprintf(i32* %248, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i32 %255)
br label %281
257: ; preds = %243
%258 = load i32, i32* %3
%259 = load i32, i32* %14
%260 = add nsw i32 %259, 1
%261 = icmp eq i32 %258, %260
br i1 %261, label %262, label %271
262: ; preds = %257
%263 = load i32*, i32** %2
%264 = load i8*, i8** %6
%265 = load i32, i32* %4
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds i8, i8* %264, i64 %266
%268 = load i8, i8* %267
%269 = sext i8 %268 to i32
%270 = call i32 (i32*, i8*, ...) @fprintf(i32* %263, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i32 %269)
br label %280
271: ; preds = %257
%272 = load i32*, i32** %2
%273 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %9, i64 0, i64 3
%274 = load i32, i32* %4
%275 = mul nsw i32 %274, 2
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [64 x i8], [64 x i8]* %273, i64 0, i64 %276
%278 = load i8, i8* %277
%279 = call i32 @fprintBasis(i32* %272, i8 signext %278)
br label %280
280: ; preds = %271, %262
br label %281
281: ; preds = %280, %247
br label %282
282: ; preds = %281, %231
%283 = load i32*, i32** %2
%284 = call i32 (i32*, i8*, ...) @fprintf(i32* %283, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
br label %285
285: ; preds = %282
%286 = load i32, i32* %4
%287 = add nsw i32 %286, 1
store i32 %287, i32* %4
br label %184
288: ; preds = %184
br label %289
289: ; preds = %288
%290 = load i32, i32* %3
%291 = add nsw i32 %290, 1
store i32 %291, i32* %3
br label %153
292: ; preds = %153
%293 = load i32*, i32** %2
%294 = call i32 (i32*, i8*, ...) @fprintf(i32* %293, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.23, i64 0, i64 0))
%295 = load i32, i32* %10
%296 = icmp ne i32 %295, 0
br i1 %296, label %297, label %307
297: ; preds = %292
%298 = load i32, i32* %11
%299 = icmp ne i32 %298, 0
br i1 %299, label %300, label %303
300: ; preds = %297
%301 = load i32*, i32** %2
%302 = call i32 (i32*, i8*, ...) @fprintf(i32* %301, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.24, i64 0, i64 0))
br label %306
303: ; preds = %297
%304 = load i32*, i32** %2
%305 = call i32 (i32*, i8*, ...) @fprintf(i32* %304, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.25, i64 0, i64 0))
br label %306
306: ; preds = %303, %300
br label %317
307: ; preds = %292
%308 = load i32, i32* %11
%309 = icmp ne i32 %308, 0
br i1 %309, label %310, label %313
310: ; preds = %307
%311 = load i32*, i32** %2
%312 = call i32 (i32*, i8*, ...) @fprintf(i32* %311, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.26, i64 0, i64 0))
br label %316
313: ; preds = %307
%314 = load i32*, i32** %2
%315 = call i32 (i32*, i8*, ...) @fprintf(i32* %314, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.27, i64 0, i64 0))
br label %316
316: ; preds = %313, %310
br label %317
317: ; preds = %316, %306
%318 = load i32*, i32** %2
%319 = call i32 @fclose(i32* %318)
%320 = load i8*, i8** %6
%321 = getelementptr inbounds i8, i8* %320, i64 -7
%322 = call i32 @free(i8* %321)
%323 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0))
%324 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0))
store i32 0, i32* %1
br label %325
325: ; preds = %317, %53, %21
%326 = load i32, i32* %1
ret i32 %326
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"./output.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [8 x i8] c"Error:8\00"
@.str.4 = [10 x i8] c"resultTmp\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [8 x i8] c"Error:4\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [23 x i8] c"\09<div class=\22header\22>\0A\00"
@.str.9 = [19 x i8] c"\09\09<h1>Result</h1>\0A\00"
@.str.10 = [8 x i8] c"\09</div>\00"
@.str.11 = [108 x i8] c"\09<table class=\22result\22 border=\221\22 width=\22528px\22 border=\221\22>\0A\09\09<tr><td class=\22resultHead\22 colspan=\222\22></td>\0A\00"
@.str.12 = [70 x i8] c"\09\09\09<td class=\22resultHead\22 width=\2215px\22><font size=\221\22>%d</font></td>\0A\00"
@.str.13 = [9 x i8] c"\09\09</tr>\0A\00"
@.str.14 = [96 x i8] c"\09\09<tr>\0A\09\09\09<td class=\22resultHead\22 rowspan=\22%d\22>Basis</td>\0A\0A\09\09\09<td class=\22resultHead2\22>Alice</td>\00"
@.str.15 = [100 x i8] c"\0A\0A\09\09</tr><tr>\0A\09\09\09<td class=\22resultHead\22 rowspan=\222\22>Bit</td>\0A\0A\09\09\09<td class=\22resultHead2\22>Alice</td>\00"
@.str.16 = [51 x i8] c"\0A\0A\09\09</tr><tr>\0A\0A\09\09\09<td class=\22resultHead2\22>Eve</td>\00"
@.str.17 = [51 x i8] c"\0A\0A\09\09</tr><tr>\0A\0A\09\09\09<td class=\22resultHead2\22>Bob</td>\00"
@.str.18 = [61 x i8] c"\0A\09\09\09<td class=\22resultBody\22 style=\22background-color:ed\22>\00"
@.str.19 = [61 x i8] c"\0A\09\09\09<td class=\22resultBody\22 style=\22background-color:#dc143c\22>\00"
@.str.20 = [28 x i8] c"\0A\09\09\09<td class=\22resultBody\22>\00"
@.str.22 = [6 x i8] c"</td>\00"
@.str.23 = [20 x i8] c"\0A\09\09</tr>\0A\09</table>\0A\00"
@.str.24 = [55 x i8] c"\0A\09<h3 style=\22color:ed\22>Detection Successful</h3>\0A\00"
@.str.25 = [51 x i8] c"\0A\09<h3 style=\22color:#dc143c\22>Detection Failed</h3>\0A\00"
@.str.26 = [54 x i8] c"\0A\09<h3 style=\22color:#dc143c\22>Distribution Failed</h3>\0A\00"
@.str.27 = [58 x i8] c"\0A\09<h3 style=\22color:ed\22>Distribution Successful</h3>\0A\00"
@.str.28 = [4 x i8] c"OK!\00"
@.str.29 = [18 x i8] c"./rmTmp resultTmp\00"
@str.30 = [25 x i8] c"content-type: text/html\0A\00"
define i32 @main() {
%1 = alloca [4 x [64 x i8]]
%2 = alloca [2 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.30, i64 0, i64 0))
%4 = tail call i64 @time(i32* null)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @srand(i32 %5)
%7 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 0, i64 0
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %16, label %10
10: ; preds = %0
%11 = call i32* @fgets(i8* %7, i32 64, i32* %8)
%12 = icmp eq i32* %11, null
%13 = load i8, i8* %7
%14 = icmp eq i8 %13, 50
%15 = select i1 %12, i1 true, i1 %14
br i1 %15, label %39, label %18
16: ; preds = %0
%17 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %198
18: ; preds = %10
%19 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 1, i64 0
%20 = call i32* @fgets(i8* %19, i32 64, i32* %8)
%21 = icmp eq i32* %20, null
%22 = load i8, i8* %19
%23 = icmp eq i8 %22, 50
%24 = select i1 %21, i1 true, i1 %23
br i1 %24, label %39, label %25
25: ; preds = %18
%26 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 2, i64 0
%27 = call i32* @fgets(i8* %26, i32 64, i32* %8)
%28 = icmp eq i32* %27, null
%29 = load i8, i8* %26
%30 = icmp eq i8 %29, 50
%31 = select i1 %28, i1 true, i1 %30
br i1 %31, label %39, label %32
32: ; preds = %25
%33 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 3, i64 0
%34 = call i32* @fgets(i8* %33, i32 64, i32* %8)
%35 = icmp eq i32* %34, null
%36 = load i8, i8* %33
%37 = icmp eq i8 %36, 50
%38 = select i1 %35, i1 true, i1 %37
br label %39
39: ; preds = %32, %25, %18, %10
%40 = phi i1 [ true, %10 ], [ true, %18 ], [ true, %25 ], [ %38, %32 ]
%41 = call i32 @fclose(i32* %8)
%42 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%43 = icmp eq i32* %42, null
br i1 %43, label %44, label %47
44: ; preds = %39
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.30, i64 0, i64 0))
%46 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %198
47: ; preds = %39
%48 = call i64 @malloc(i32 28)
%49 = inttoptr i64 %48 to i8*
%50 = getelementptr inbounds i8, i8* %49, i64 7
%51 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
br label %52
52: ; preds = %47, %75
%53 = phi i64 [ 0, %47 ], [ %76, %75 ]
%54 = shl nuw nsw i64 %53, 1
%55 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 1, i64 %54
%56 = load i8, i8* %55
%57 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 2, i64 %54
%58 = load i8, i8* %57
%59 = icmp eq i8 %56, %58
br i1 %59, label %60, label %69
60: ; preds = %52
%61 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 3, i64 %54
%62 = load i8, i8* %61
%63 = icmp eq i8 %56, %62
%64 = or i1 %40, %63
br i1 %64, label %65, label %69
65: ; preds = %60
%66 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 0, i64 %54
%67 = load i8, i8* %66
%68 = getelementptr inbounds i8, i8* %50, i64 %53
store i8 %67, i8* %68
br label %75
69: ; preds = %60, %52
%70 = call i32 (...) @rand()
%71 = srem i32 %70, 2
%72 = call i32 @sprintf(i8* %51, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %71)
%73 = load i8, i8* %51
%74 = getelementptr inbounds i8, i8* %50, i64 %53
store i8 %73, i8* %74
br label %75
75: ; preds = %65, %69
%76 = add nuw nsw i64 %53, 1
%77 = icmp eq i64 %76, 20
br i1 %77, label %78, label %52
78: ; preds = %75
%79 = call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i64 22, i64 1, i32* %42)
%80 = call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i64 18, i64 1, i32* %42)
%81 = call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i64 7, i64 1, i32* %42)
%82 = call i64 @fwrite(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0), i64 107, i64 1, i32* %42)
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 0)
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 1)
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 2)
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 3)
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 4)
%88 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 5)
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 6)
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 7)
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 8)
%92 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 9)
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 10)
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 11)
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 12)
%96 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 13)
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 14)
%98 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 15)
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 16)
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 17)
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 18)
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0), i32 19)
%103 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i64 8, i64 1, i32* %42)
%104 = select i1 %40, i32 2, i32 3
%105 = add nuw nsw i32 %104, 2
%106 = add nuw nsw i32 %104, 1
%107 = zext i32 %106 to i64
%108 = zext i32 %104 to i64
%109 = zext i32 %105 to i64
br label %110
110: ; preds = %78, %178
%111 = phi i64 [ 0, %78 ], [ %130, %178 ]
%112 = phi i32 [ 0, %78 ], [ %153, %178 ]
%113 = icmp eq i64 %111, 0
br i1 %113, label %114, label %116
114: ; preds = %110
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.14, i64 0, i64 0), i32 %104)
br label %126
116: ; preds = %110
%117 = icmp eq i64 %111, %108
br i1 %117, label %118, label %120
118: ; preds = %116
%119 = call i64 @fwrite(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.15, i64 0, i64 0), i64 99, i64 1, i32* %42)
br label %126
120: ; preds = %116
%121 = icmp eq i64 %111, 2
br i1 %121, label %122, label %124
122: ; preds = %120
%123 = call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0), i64 50, i64 1, i32* %42)
br label %126
124: ; preds = %120
%125 = call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0), i64 50, i64 1, i32* %42)
br label %126
126: ; preds = %118, %124, %122, %114
%127 = icmp ult i64 %111, 2
%128 = icmp eq i64 %111, %108
%129 = icmp eq i64 %111, %107
%130 = add nuw nsw i64 %111, 1
br label %131
131: ; preds = %126, %174
%132 = phi i64 [ 0, %126 ], [ %176, %174 ]
%133 = phi i32 [ %112, %126 ], [ %153, %174 ]
%134 = shl nuw nsw i64 %132, 1
%135 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 1, i64 %134
%136 = load i8, i8* %135
%137 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 2, i64 %134
%138 = load i8, i8* %137
%139 = icmp eq i8 %136, %138
br i1 %139, label %140, label %150
140: ; preds = %131
%141 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 0, i64 %134
%142 = load i8, i8* %141
%143 = getelementptr inbounds i8, i8* %50, i64 %132
%144 = load i8, i8* %143
%145 = icmp eq i8 %142, %144
br i1 %145, label %146, label %148
146: ; preds = %140
%147 = call i64 @fwrite(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.18, i64 0, i64 0), i64 60, i64 1, i32* %42)
br label %152
148: ; preds = %140
%149 = call i64 @fwrite(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.19, i64 0, i64 0), i64 60, i64 1, i32* %42)
br label %152
150: ; preds = %131
%151 = call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.20, i64 0, i64 0), i64 27, i64 1, i32* %42)
br label %152
152: ; preds = %146, %148, %150
%153 = phi i32 [ %133, %146 ], [ 1, %148 ], [ %133, %150 ]
br i1 %127, label %154, label %158
154: ; preds = %152
%155 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 %130, i64 %134
%156 = load i8, i8* %155
%157 = call i32 @fprintBasis(i32* %42, i8 signext %156)
br label %174
158: ; preds = %152
br i1 %128, label %159, label %164
159: ; preds = %158
%160 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 0, i64 %134
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = call i32 @fputc(i32 %162, i32* %42)
br label %174
164: ; preds = %158
br i1 %129, label %165, label %170
165: ; preds = %164
%166 = getelementptr inbounds i8, i8* %50, i64 %132
%167 = load i8, i8* %166
%168 = sext i8 %167 to i32
%169 = call i32 @fputc(i32 %168, i32* %42)
br label %174
170: ; preds = %164
%171 = getelementptr inbounds [4 x [64 x i8]], [4 x [64 x i8]]* %1, i64 0, i64 3, i64 %134
%172 = load i8, i8* %171
%173 = call i32 @fprintBasis(i32* %42, i8 signext %172)
br label %174
174: ; preds = %159, %170, %165, %154
%175 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i64 5, i64 1, i32* %42)
%176 = add nuw nsw i64 %132, 1
%177 = icmp eq i64 %176, 20
br i1 %177, label %178, label %131
178: ; preds = %174
%179 = icmp eq i64 %130, %109
br i1 %179, label %180, label %110
180: ; preds = %178
%181 = call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.23, i64 0, i64 0), i64 19, i64 1, i32* %42)
%182 = icmp eq i32 %153, 0
br i1 %40, label %188, label %183
183: ; preds = %180
br i1 %182, label %186, label %184
184: ; preds = %183
%185 = call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.24, i64 0, i64 0), i64 54, i64 1, i32* %42)
br label %193
186: ; preds = %183
%187 = call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.25, i64 0, i64 0), i64 50, i64 1, i32* %42)
br label %193
188: ; preds = %180
br i1 %182, label %191, label %189
189: ; preds = %188
%190 = call i64 @fwrite(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.26, i64 0, i64 0), i64 53, i64 1, i32* %42)
br label %193
191: ; preds = %188
%192 = call i64 @fwrite(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.27, i64 0, i64 0), i64 57, i64 1, i32* %42)
br label %193
193: ; preds = %189, %191, %184, %186
%194 = call i32 @fclose(i32* %42)
%195 = call i32 @free(i8* %49)
%196 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0))
%197 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0))
br label %198
198: ; preds = %193, %44, %16
%199 = phi i32 [ -1, %16 ], [ -1, %44 ], [ 0, %193 ]
ret i32 %199
}