#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*/ xdefn;
typedef int /*<<< orphan*/ stack;
typedef int /*<<< orphan*/ operand;
typedef int /*<<< orphan*/ defn;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ apprintf(char *, int, size_t *, char *, ...);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ mk_operand(char *, int, char *, int);
int /*<<< orphan*/ mk_xoperand(char *, int, char *, int);
int /*<<< orphan*/ stderr;
int write_rop3_func(FILE *out, int irop, const char *ropstr) {
  int stacksz = 0;
  int max_stacksz = 0;
  char stack[32];
  char operand[32];
  char operand2[32];
  const char *c;
  int D_used = 0;
  int S_used = 0;
  int T_used = 0;
  char defn[2048], op;
  size_t defn_len = 0;
  char xdefn[2048];
  size_t xdefn_len = 0;
  int i;
  defn[0] = '\0';
  xdefn[0] = '\0';
  for (c = ropstr; *c; ++c)
    switch (*c) {
    case '0':
    case '1':
      i = (*c == '0') ? 0 : 255;
      max_stacksz = stacksz = 1;
      if (c != ropstr || *(c + 1)) {
        fprintf(stderr, "Misplaced %c in rop string %s.\n", *c, ropstr);
        return -1;
      }
      if (apprintf(defn, sizeof(defn), &defn_len, "  stk1 = %d;\n", i))
        return -1;
      if (apprintf(xdefn, sizeof(xdefn), &xdefn_len, "  stk1 = %s;\n",
                   (*c == '0') ? "0x0000" : "0xffff"))
        return -1;
      break;
    case 'S':
    case 'T':
    case 'D':
      if (stacksz >= sizeof(stack) - 1) {
        fprintf(stderr, "Stack overflow in rop string %s.\n", ropstr);
        return -1;
      }
      stack[stacksz] = *c;
      ++stacksz;
      if (*c == 'D')
        D_used = 1;
      if (*c == 'T')
        T_used = 1;
      if (*c == 'S')
        S_used = 1;
      break;
    case 'o':
    case 'a':
    case 'x':
      if (stacksz < 1) {
        fprintf(stderr, "Stack underflow in rop string %s.\n", ropstr);
        return -1;
      }
      mk_operand(operand, sizeof(operand), stack, stacksz - 2);
      mk_operand(operand2, sizeof(operand), stack, stacksz - 1);
      op = (*c == 'o') ? '|' : ((*c == 'a') ? '&' : '^');
      if (apprintf(defn, sizeof(defn), &defn_len, "  stk%d = %s %c %s;\n",
                   stacksz - 1, operand, op, operand2))
        return -1;
      mk_xoperand(operand, sizeof(operand), stack, stacksz - 2);
      mk_xoperand(operand2, sizeof(operand), stack, stacksz - 1);
      if (apprintf(xdefn, sizeof(xdefn), &xdefn_len, "  stk%d = %s %c %s;\n",
                   stacksz - 1, operand, op, operand2))
        return -1;
      --stacksz;
      if (stacksz > max_stacksz)
        max_stacksz = stacksz;
      stack[stacksz - 1] = '\0';
      break;
    case 'n':
      mk_operand(operand, sizeof(operand), stack, stacksz - 1);
      if (apprintf(defn, sizeof(defn), &defn_len, "  stk%d = ~%s;\n", stacksz,
                   operand))
        return -1;
      mk_xoperand(operand, sizeof(operand), stack, stacksz - 1);
      if (apprintf(xdefn, sizeof(xdefn), &xdefn_len, "  stk%d = ~%s;\n",
                   stacksz, operand))
        return -1;
      if (stacksz > max_stacksz)
        max_stacksz = stacksz;
      stack[stacksz - 1] = '\0';
      break;
    default:
      fprintf(stderr, "Illegal character %c in rop string %s.\n", *c, ropstr);
      return -1;
    }
  if (stacksz != 1) {
    fprintf(stderr, "Unbalanced shift/reduce in rop string %s.\n", ropstr);
    return -1;
  }
  mk_operand(operand, sizeof(operand), stack, 0);
  fprintf(out,
          "/* %s source/pattern opaque. */\n"
          "static void rop3_%d_0_0 (unsigned char *D, unsigned char S, "
          "unsigned char T)\n{\n",
          ropstr, irop);
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned char stk%d;\n", i);
  fputs(defn, out);
  if (stack[0] != 'D')
    fprintf(out, "  *D = %s;\n", operand);
  fprintf(out, "}\n\n");
  fprintf(out,
          "/* %s source opaque/pattern transparent. */\n"
          "static void rop3_%d_0_1 (unsigned char *D, unsigned char S, "
          "unsigned char T)\n{\n",
          ropstr, irop);
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned char stk%d;\n", i);
  fputs(defn, out);
  fprintf(out, "  *D = (%s & S) | (%s & (~T)) | (T & (~S) & *D);\n", operand,
          operand);
  fprintf(out, "}\n\n");
  fprintf(out,
          "/* %s source transparent/pattern opaque. */\n"
          "static void rop3_%d_1_0 (unsigned char *D, unsigned char S, "
          "unsigned char T)\n{\n",
          ropstr, irop);
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned char stk%d;\n", i);
  fputs(defn, out);
  fprintf(out, "  *D = (%s & (~S)) | (*D & S);\n", operand);
  fprintf(out, "}\n\n");
  fprintf(out,
          "/* %s source/pattern transparent. */\n"
          "static void rop3_%d_1_1 (unsigned char *D, unsigned char S, "
          "unsigned char T)\n{\n",
          ropstr, irop);
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned char stk%d;\n", i);
  fputs(defn, out);
  fprintf(out, "  *D = (%s & (~S) & (~T)) | (*D & S) | (*D & T);\n", operand);
  fprintf(out, "}\n\n");
  mk_xoperand(operand, sizeof(operand), stack, 0);
  fprintf(
      out,
      "/* %s source/pattern opaque. */\n"
      "static unsigned xrop3_%d_0_0 (unsigned char s, unsigned char t)\n{\n",
      ropstr, irop);
  if (D_used)
    fprintf(out, "  unsigned D = 0x00ff;\n");
  if (S_used)
    fprintf(out, "  unsigned S = ((unsigned)s << 8) | s;\n");
  if (T_used)
    fprintf(out, "  unsigned T = ((unsigned)t << 8) | t;\n");
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned stk%d;\n", i);
  fputs(xdefn, out);
  fprintf(out, "  return %s;\n", operand);
  fprintf(out, "}\n\n");
  fprintf(
      out,
      "/* %s source opaque/pattern transparent. */\n"
      "static unsigned xrop3_%d_0_1 (unsigned char s, unsigned char t)\n{\n",
      ropstr, irop);
  fprintf(out, "  unsigned D = 0x00ff;\n");
  fprintf(out, "  unsigned S = ((unsigned)s << 8) | s;\n");
  fprintf(out, "  unsigned T = ((unsigned)t << 8) | t;\n");
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned stk%d;\n", i);
  fputs(xdefn, out);
  fprintf(out, "  return (%s & S) | (%s & (~T)) | (T & (~S) & D);\n", operand,
          operand);
  fprintf(out, "}\n\n");
  fprintf(
      out,
      "/* %s source transparent/pattern opaque. */\n"
      "static unsigned xrop3_%d_1_0 (unsigned char s, unsigned char t)\n{\n",
      ropstr, irop);
  fprintf(out, "  unsigned D = 0x00ff;\n");
  fprintf(out, "  unsigned S = ((unsigned)s << 8) | s;\n");
  if (T_used)
    fprintf(out, "  unsigned T = ((unsigned)t << 8) | t;\n");
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned stk%d;\n", i);
  fputs(xdefn, out);
  fprintf(out, "  return (%s & (~S)) | (D & S);\n", operand);
  fprintf(out, "}\n\n");
  fprintf(
      out,
      "/* %s source/pattern transparent. */\n"
      "static unsigned xrop3_%d_1_1 (unsigned char s, unsigned char t)\n{\n",
      ropstr, irop);
  fprintf(out, "  unsigned D = 0x00ff;\n");
  fprintf(out, "  unsigned S = ((unsigned)s << 8) | s;\n");
  fprintf(out, "  unsigned T = ((unsigned)t << 8) | t;\n");
  for (i = 1; i <= max_stacksz; ++i)
    fprintf(out, "  unsigned stk%d;\n", i);
  fputs(xdefn, out);
  fprintf(out, "  return (%s & (~S) & (~T)) | (D & S) | (D & T);\n", operand);
  fprintf(out, "}\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<write_rop3_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10f0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x9c(%rbp)
movl   $0x0,-0xa0(%rbp)
movl   $0x0,-0xa4(%rbp)
movq   $0x0,-0x8c0(%rbp)
movq   $0x0,-0x10c8(%rbp)
movb   $0x0,-0x8b0(%rbp)
movb   $0x0,-0x10c0(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
cmpb   $0x0,(%rax)
je     16b2 <write_rop3_func+0x562>
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10d8(%rbp)
sub    $0x48,%eax
ja     1664 <write_rop3_func+0x514>
mov    -0x10d8(%rbp),%rax
lea    0xe02(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x98(%rbp),%rax
movsbl (%rax),%edx
mov    $0xff,%eax
xor    %ecx,%ecx
cmp    $0x30,%edx
cmove  %ecx,%eax
mov    %eax,-0x10cc(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1257 <write_rop3_func+0x107>
mov    -0x98(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     1289 <write_rop3_func+0x139>
mov    0x2d82(%rip),%rax
movslq (%rax),%rdi
mov    -0x98(%rbp),%rax
movsbl (%rax),%edx
mov    -0x20(%rbp),%rcx
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x8b0(%rbp),%rdi
mov    -0x10cc(%rbp),%r8d
mov    $0x800,%esi
lea    -0x8c0(%rbp),%rdx
lea    0xe9a(%rip),%rcx
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     12c6 <write_rop3_func+0x176>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x10c0(%rbp),%rdi
mov    -0x98(%rbp),%rax
movsbl (%rax),%ecx
lea    0xe89(%rip),%r8
lea    0xe7b(%rip),%rax
cmp    $0x30,%ecx
cmove  %rax,%r8
mov    $0x800,%esi
lea    -0x10c8(%rbp),%rdx
lea    0xe53(%rip),%rcx
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     131b <write_rop3_func+0x1cb>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
jmp    1696 <write_rop3_func+0x546>
movslq -0x24(%rbp),%rax
cmp    $0x1f,%rax
jb     1356 <write_rop3_func+0x206>
mov    0x2cab(%rip),%rax
movslq (%rax),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
mov    -0x98(%rbp),%rax
mov    (%rax),%cl
movslq -0x24(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x44,%eax
jne    138d <write_rop3_func+0x23d>
movl   $0x1,-0x9c(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x54,%eax
jne    13aa <write_rop3_func+0x25a>
movl   $0x1,-0xa4(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    13c7 <write_rop3_func+0x277>
movl   $0x1,-0xa0(%rbp)
jmp    1696 <write_rop3_func+0x546>
cmpl   $0x1,-0x24(%rbp)
jge    13fe <write_rop3_func+0x2ae>
mov    0x2c03(%rip),%rax
movslq (%rax),%rdi
mov    -0x20(%rbp),%rdx
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x2,%ecx
mov    $0x20,%esi
call   1050 <mk_operand@plt>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x20,%esi
call   1050 <mk_operand@plt>
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6f,%eax
jne    1454 <write_rop3_func+0x304>
mov    $0x7c,%eax
mov    %eax,-0x10dc(%rbp)
jmp    1474 <write_rop3_func+0x324>
mov    -0x98(%rbp),%rax
movsbl (%rax),%edx
mov    $0x5e,%eax
mov    $0x26,%ecx
cmp    $0x61,%edx
cmove  %ecx,%eax
mov    %eax,-0x10dc(%rbp)
mov    -0x10dc(%rbp),%eax
mov    %al,-0x8b1(%rbp)
lea    -0x8b0(%rbp),%rdi
mov    -0x24(%rbp),%r8d
sub    $0x1,%r8d
lea    -0x70(%rbp),%r9
movsbl -0x8b1(%rbp),%r10d
ff
lea    -0x90(%rbp),%rax
mov    $0x800,%esi
lea    -0x8c0(%rbp),%rdx
lea    0xcfe(%rip),%rcx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     14da <write_rop3_func+0x38a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x2,%ecx
mov    $0x20,%esi
call   1030 <mk_xoperand@plt>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x20,%esi
call   1030 <mk_xoperand@plt>
lea    -0x10c0(%rbp),%rdi
mov    -0x24(%rbp),%r8d
sub    $0x1,%r8d
lea    -0x70(%rbp),%r9
movsbl -0x8b1(%rbp),%r10d
ff
lea    -0x90(%rbp),%rax
mov    $0x800,%esi
lea    -0x10c8(%rbp),%rdx
lea    0xc71(%rip),%rcx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     1567 <write_rop3_func+0x417>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1582 <write_rop3_func+0x432>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x50(%rbp,%rax,1)
jmp    1696 <write_rop3_func+0x546>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x20,%esi
call   1050 <mk_operand@plt>
lea    -0x8b0(%rbp),%rdi
mov    -0x24(%rbp),%r8d
lea    -0x70(%rbp),%r9
mov    $0x800,%esi
lea    -0x8c0(%rbp),%rdx
lea    0xbfa(%rip),%rcx
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     15ea <write_rop3_func+0x49a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x20,%esi
call   1030 <mk_xoperand@plt>
lea    -0x10c0(%rbp),%rdi
mov    -0x24(%rbp),%r8d
lea    -0x70(%rbp),%r9
mov    $0x800,%esi
lea    -0x10c8(%rbp),%rdx
lea    0xba4(%rip),%rcx
mov    $0x0,%al
call   1070 <apprintf@plt>
cmp    $0x0,%eax
je     1640 <write_rop3_func+0x4f0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1652 <write_rop3_func+0x502>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x50(%rbp,%rax,1)
jmp    1696 <write_rop3_func+0x546>
mov    0x2975(%rip),%rax
movslq (%rax),%rdi
mov    -0x98(%rbp),%rax
movsbl (%rax),%edx
mov    -0x20(%rbp),%rcx
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
jmp    169b <write_rop3_func+0x54b>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
jmp    11c1 <write_rop3_func+0x71>
cmpl   $0x1,-0x24(%rbp)
je     16e4 <write_rop3_func+0x594>
mov    0x291d(%rip),%rax
movslq (%rax),%rdi
mov    -0x20(%rbp),%rdx
lea    0xb2f(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ce4 <write_rop3_func+0xb94>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    $0x20,%esi
xor    %ecx,%ecx
call   1050 <mk_operand@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb21(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1756 <write_rop3_func+0x606>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0xb60(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    171b <write_rop3_func+0x5cb>
lea    -0x8b0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
movsbl -0x50(%rbp),%eax
cmp    $0x44,%eax
je     1789 <write_rop3_func+0x639>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xb31(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xb2b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb16(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     17f9 <write_rop3_func+0x6a9>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0xabd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    17be <write_rop3_func+0x66e>
lea    -0x8b0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    0xb23(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xa91(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb2a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1893 <write_rop3_func+0x743>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0xa23(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    1858 <write_rop3_func+0x708>
lea    -0x8b0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x9fb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb30(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1929 <write_rop3_func+0x7d9>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0x98d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    18ee <write_rop3_func+0x79e>
lea    -0x8b0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xb3a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x965(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    -0x70(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    $0x20,%esi
xor    %ecx,%ecx
call   1030 <mk_xoperand@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb2d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x0,-0x9c(%rbp)
je     19ad <write_rop3_func+0x85d>
mov    -0x10(%rbp),%rdi
lea    0xb71(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x0,-0xa0(%rbp)
je     19cc <write_rop3_func+0x87c>
mov    -0x10(%rbp),%rdi
lea    0xb6a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x0,-0xa4(%rbp)
je     19eb <write_rop3_func+0x89b>
mov    -0x10(%rbp),%rdi
lea    0xb73(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1a30 <write_rop3_func+0x8e0>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0xb6a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    19f5 <write_rop3_func+0x8a5>
lea    -0x10c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xb43(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x85e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xb26(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xa8b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xa91(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xaa7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1afc <write_rop3_func+0x9ac>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0xa9e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    1ac1 <write_rop3_func+0x971>
lea    -0x10c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    0xaf0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x78e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xaf8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x9bb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x9c1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x0,-0xa4(%rbp)
je     1b94 <write_rop3_func+0xa44>
mov    -0x10(%rbp),%rdi
lea    0x9ca(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1bd9 <write_rop3_func+0xa89>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0x9c1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    1b9e <write_rop3_func+0xa4e>
lea    -0x10c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xab9(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x6b5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xaaf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x8e2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x8e8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x8fe(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x10cc(%rbp)
mov    -0x10cc(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1ca5 <write_rop3_func+0xb55>
mov    -0x10(%rbp),%rdi
mov    -0x10cc(%rbp),%edx
lea    0x8f5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10cc(%rbp)
jmp    1c6a <write_rop3_func+0xb1a>
lea    -0x10c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xa76(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x5e9(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_rop3_func>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10b8,%rsp
movq   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movb   $0x0,0x8b0(%rsp)
movb   $0x0,0xb0(%rsp)
mov    %rdx,(%rsp)
mov    (%rdx),%al
test   %al,%al
je     1706 <write_rop3_func+0x5a6>
mov    %esi,0x3c(%rsp)
mov    %rdi,0x88(%rsp)
lea    0xe4c(%rip),%r13
lea    0x40(%rsp),%rbp
lea    0x60(%rsp),%r9
lea    0x90(%rsp),%r10
xor    %ebx,%ebx
movl   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
xor    %esi,%esi
xor    %r14d,%r14d
mov    (%rsp),%r15
jmp    1217 <write_rop3_func+0xb7>
cmp    %esi,%r14d
cmovg  %r14d,%esi
movb   $0x0,0x60(%rsp,%rbp,1)
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%r15,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
lea    0x40(%rsp),%rbp
je     153b <write_rop3_func+0x3db>
movsbl %al,%edx
lea    -0x30(%rdx),%ecx
cmp    $0x48,%ecx
ja     1873 <write_rop3_func+0x713>
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
cmp    $0x1f,%r14d
jae    1733 <write_rop3_func+0x5d3>
mov    %r14d,%ecx
add    $0x1,%r14d
cmp    $0x44,%al
mov    0x14(%rsp),%edx
mov    $0x1,%edi
cmove  %edi,%edx
mov    %edx,0x14(%rsp)
cmp    $0x54,%al
mov    0x10(%rsp),%edx
cmove  %edi,%edx
mov    %edx,0x10(%rsp)
mov    %al,0x60(%rsp,%rcx,1)
cmp    $0x53,%al
mov    0x18(%rsp),%eax
cmove  %edi,%eax
mov    %eax,0x18(%rsp)
jmp    1200 <write_rop3_func+0xa0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %r14d,%r14d
jle    1746 <write_rop3_func+0x5e6>
mov    %esi,0x1c(%rsp)
movslq %r14d,%r12
add    $0xfffffffffffffffe,%r12
mov    %rbp,%rdi
mov    $0x20,%esi
mov    %r9,%rdx
mov    %r12d,%ecx
mov    %r9,%r13
mov    %r10,%r15
call   1050 <mk_operand@plt>
add    $0xffffffff,%r14d
mov    %r15,%rdi
mov    $0x20,%esi
mov    %r13,%rdx
mov    %r14d,%ecx
call   1050 <mk_operand@plt>
mov    %rbx,0x20(%rsp)
mov    (%rsp),%rax
movzbl (%rax,%rbx,1),%eax
mov    %r15,%rbx
cmp    $0x61,%al
mov    $0x5e,%r15d
mov    $0x26,%ecx
cmove  %ecx,%r15d
cmp    $0x6f,%al
mov    $0x7c,%eax
cmove  %eax,%r15d
lea    0x8b0(%rsp),%rdi
mov    $0x800,%esi
lea    0x30(%rsp),%rdx
lea    0xeaa(%rip),%rcx
mov    %rcx,%r13
mov    %r14d,%r8d
mov    %rbp,%r9
xor    %eax,%eax
push   %rbx
push   %r15
call   1070 <apprintf@plt>
add    $0x10,%rsp
movl   $0xffffffff,0x8(%rsp)
ff
test   %eax,%eax
jne    1769 <write_rop3_func+0x609>
mov    %rbp,%rdi
mov    $0x20,%esi
lea    0x60(%rsp),%rdx
mov    %r12d,%ecx
call   1030 <mk_xoperand@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
lea    0x60(%rsp),%rdx
mov    %r14d,%ecx
call   1030 <mk_xoperand@plt>
lea    0xb0(%rsp),%rdi
mov    $0x800,%esi
lea    0x28(%rsp),%rdx
mov    %r13,%rcx
mov    %r14d,%r8d
mov    %rbp,%r9
xor    %eax,%eax
push   %rbx
push   %r15
call   1070 <apprintf@plt>
add    $0x10,%rsp
test   %eax,%eax
mov    (%rsp),%r15
mov    0x1c(%rsp),%esi
lea    0xc6c(%rip),%r13
lea    0x60(%rsp),%r9
mov    %rbx,%r10
mov    0x20(%rsp),%rbx
jne    1769 <write_rop3_func+0x609>
cmp    %esi,%r14d
cmovg  %r14d,%esi
movb   $0x0,0x60(%rsp,%r12,1)
jmp    1200 <write_rop3_func+0xa0>
nopl   0x0(%rax)
cmp    $0x30,%al
mov    $0xff,%r8d
mov    $0x0,%eax
cmove  %eax,%r8d
test   %rbx,%rbx
jne    171d <write_rop3_func+0x5bd>
cmpb   $0x0,0x1(%r15)
jne    171d <write_rop3_func+0x5bd>
mov    %rbx,%rbp
mov    %r9,%rbx
lea    0x8b0(%rsp),%rdi
mov    $0x800,%esi
lea    0x30(%rsp),%rdx
lea    0xd40(%rip),%rcx
xor    %eax,%eax
call   1070 <apprintf@plt>
test   %eax,%eax
jne    1761 <write_rop3_func+0x601>
movl   $0xffffffff,0x8(%rsp)
ff
cmpb   $0x30,(%r15)
lea    0xd41(%rip),%r8
lea    0xd33(%rip),%rax
cmove  %rax,%r8
lea    0xb0(%rsp),%rdi
mov    $0x800,%esi
lea    0x28(%rsp),%rdx
lea    0xd08(%rip),%rcx
xor    %eax,%eax
call   1070 <apprintf@plt>
mov    $0x1,%r14d
mov    $0x1,%esi
test   %eax,%eax
mov    %rbx,%r9
lea    0x90(%rsp),%r10
mov    %rbp,%rbx
je     1200 <write_rop3_func+0xa0>
jmp    1769 <write_rop3_func+0x609>
mov    %rbx,0x20(%rsp)
mov    %esi,0x1c(%rsp)
mov    %rbp,%r13
movslq %r14d,%rax
mov    %rax,0x8(%rsp)
lea    -0x1(%rax),%rbp
mov    %r13,%rdi
mov    $0x20,%esi
mov    %r9,%rdx
mov    %ebp,%ecx
mov    %r9,%rbx
call   1050 <mk_operand@plt>
lea    0x8b0(%rsp),%rdi
mov    $0x800,%esi
lea    0x30(%rsp),%rdx
lea    0xd0b(%rip),%r12
mov    %r12,%rcx
mov    0x8(%rsp),%r8
mov    %r13,%r9
xor    %eax,%eax
call   1070 <apprintf@plt>
test   %eax,%eax
jne    1761 <write_rop3_func+0x601>
movl   $0xffffffff,0x8(%rsp)
ff
mov    %r13,%rdi
mov    $0x20,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <mk_xoperand@plt>
lea    0xb0(%rsp),%rdi
mov    $0x800,%esi
lea    0x28(%rsp),%rdx
mov    %r12,%rcx
mov    %r14d,%r8d
mov    %r13,%r9
xor    %eax,%eax
call   1070 <apprintf@plt>
test   %eax,%eax
mov    0x1c(%rsp),%esi
lea    0xae0(%rip),%r13
mov    %rbx,%r9
lea    0x90(%rsp),%r10
mov    0x20(%rsp),%rbx
je     11eb <write_rop3_func+0x8b>
jmp    1769 <write_rop3_func+0x609>
cmp    $0x1,%r14d
mov    0x88(%rsp),%r15
mov    0x3c(%rsp),%r12d
jne    1706 <write_rop3_func+0x5a6>
lea    0x40(%rsp),%rdi
lea    0x60(%rsp),%rdx
mov    %esi,%ebx
mov    $0x20,%esi
xor    %ecx,%ecx
call   1050 <mk_operand@plt>
lea    0xcba(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebx,%r13d
test   %ebx,%ebx
jle    15c1 <write_rop3_func+0x461>
mov    %r13d,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0xd01(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    15a0 <write_rop3_func+0x440>
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
cmpb   $0x44,0x60(%rsp)
je     15ee <write_rop3_func+0x48e>
lea    0xcd4(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xcca(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xcb5(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rbx
mov    %rbx,%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r13d,%r13d
jle    177f <write_rop3_func+0x61f>
mov    %r13d,%eax
mov    %r13d,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0xc5c(%rip),%r14
nop
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1640 <write_rop3_func+0x4e0>
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xcc7(%rip),%rsi
lea    0x40(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xc2e(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xcc7(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rbp
mov    %rbp,%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r13d,%r13d
jle    1893 <write_rop3_func+0x733>
mov    $0x1,%ebp
lea    0xbc8(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    16e0 <write_rop3_func+0x580>
jmp    17d8 <write_rop3_func+0x678>
mov    0x28d3(%rip),%rax
movslq (%rax),%rdi
lea    0xae9(%rip),%rsi
mov    (%rsp),%rdx
jmp    175a <write_rop3_func+0x5fa>
mov    0x28bc(%rip),%rax
movslq (%rax),%rdi
lea    0x9f6(%rip),%rsi
jmp    1884 <write_rop3_func+0x724>
mov    0x28a6(%rip),%rax
movslq (%rax),%rdi
lea    0xa2a(%rip),%rsi
jmp    1757 <write_rop3_func+0x5f7>
mov    0x2893(%rip),%rax
movslq (%rax),%rdi
lea    0xa39(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
movl   $0xffffffff,0x8(%rsp)
ff
mov    0x8(%rsp),%eax
add    $0x10b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xba9(%rip),%rsi
lea    0x40(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xb10(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xba9(%rip),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xbfe(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xaba(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xbef(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r13d,%r13d
jle    18e9 <write_rop3_func+0x789>
mov    %r13d,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0xa52(%rip),%r14
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1850 <write_rop3_func+0x6f0>
jmp    18e9 <write_rop3_func+0x789>
mov    0x2766(%rip),%rax
movslq (%rax),%rdi
lea    0x954(%rip),%rsi
mov    %r15,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1761 <write_rop3_func+0x601>
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xb43(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x9ff(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xb34(%rip),%rsi
mov    %r15,%rdi
mov    %rbp,%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x8b0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xb82(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x9a6(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x60(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
xor    %ecx,%ecx
call   1030 <mk_xoperand@plt>
lea    0xb6e(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
cmpl   $0x0,0x14(%rsp)
je     1977 <write_rop3_func+0x817>
lea    0xbb2(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmpl   $0x0,0x18(%rsp)
je     1997 <write_rop3_func+0x837>
lea    0xbaa(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmpl   $0x0,0x10(%rsp)
je     19b7 <write_rop3_func+0x857>
lea    0xbb2(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
test   %r13d,%r13d
jle    1ae6 <write_rop3_func+0x986>
mov    %r13d,%eax
mov    %r13d,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0xbab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    19e0 <write_rop3_func+0x880>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xb7a(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x891(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xb59(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xab8(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xab7(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xac6(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
test   %r13d,%r13d
jle    1b88 <write_rop3_func+0xa28>
mov    $0x1,%ebp
lea    0xac7(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1ac0 <write_rop3_func+0x960>
jmp    1b88 <write_rop3_func+0xa28>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xa95(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x7ac(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xa74(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x9d3(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x9d2(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x9e1(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xa70(%rip),%rsi
lea    0x40(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x707(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xa71(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x92e(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x92d(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmpl   $0x0,0x10(%rsp)
je     1c34 <write_rop3_func+0xad4>
lea    0x935(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
test   %r13d,%r13d
jle    1d66 <write_rop3_func+0xc06>
mov    %r13d,%eax
mov    %r13d,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0x92e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1c60 <write_rop3_func+0xb00>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0xa19(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x611(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xa0b(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x838(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x837(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x846(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
test   %r13d,%r13d
jle    1e08 <write_rop3_func+0xca8>
mov    $0x1,%ebp
lea    0x847(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1d40 <write_rop3_func+0xbe0>
jmp    1e08 <write_rop3_func+0xca8>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0x934(%rip),%rsi
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x52c(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x926(%rip),%rsi
mov    %r15,%rdi
mov    (%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x753(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x752(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0x761(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xb0(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
lea    0x91b(%rip),%rsi
movl   $0x0,0x8(%rsp)
lea    0x40(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x482(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
jmp    1769 <write_rop3_func+0x609>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Misplaced %c in rop string %s.\0A\00"
@.str.1 = [14 x i8] c" stk1 = %d;\0A\00"
@.str.2 = [14 x i8] c" stk1 = %s;\0A\00"
@.str.3 = [7 x i8] c"0x0000\00"
@.str.4 = [7 x i8] c"0xffff\00"
@.str.5 = [34 x i8] c"Stack overflow in rop string %s.\0A\00"
@.str.6 = [35 x i8] c"Stack underflow in rop string %s.\0A\00"
@.str.7 = [21 x i8] c" stk%d = %s %c %s;\0A\00"
@.str.8 = [16 x i8] c" stk%d = ~%s;\0A\00"
@.str.9 = [40 x i8] c"Illegal character %c in rop string %s.\0A\00"
@.str.10 = [43 x i8] c"Unbalanced shift/reduce in rop string %s.\0A\00"
@.str.11 = [112 x i8] c"/* %s source/pattern opaque. */\0Astatic void rop3_%d_0_0 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.12 = [24 x i8] c" unsigned char stk%d;\0A\00"
@.str.13 = [12 x i8] c" *D = %s;\0A\00"
@.str.14 = [4 x i8] c"}\0A\0A\00"
@.str.15 = [124 x i8] c"/* %s source opaque/pattern transparent. */\0Astatic void rop3_%d_0_1 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.16 = [50 x i8] c" *D = (%s & S) | (%s & (~T)) | (T & (~S) & *D);\0A\00"
@.str.17 = [124 x i8] c"/* %s source transparent/pattern opaque. */\0Astatic void rop3_%d_1_0 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.18 = [32 x i8] c" *D = (%s & (~S)) | (*D & S);\0A\00"
@.str.19 = [117 x i8] c"/* %s source/pattern transparent. */\0Astatic void rop3_%d_1_1 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.20 = [50 x i8] c" *D = (%s & (~S) & (~T)) | (*D & S) | (*D & T);\0A\00"
@.str.21 = [99 x i8] c"/* %s source/pattern opaque. */\0Astatic unsigned xrop3_%d_0_0 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.22 = [24 x i8] c" unsigned D = 0x00ff;\0A\00"
@.str.23 = [40 x i8] c" unsigned S = ((unsigned)s << 8) | s;\0A\00"
@.str.24 = [40 x i8] c" unsigned T = ((unsigned)t << 8) | t;\0A\00"
@.str.25 = [19 x i8] c" unsigned stk%d;\0A\00"
@.str.26 = [14 x i8] c" return %s;\0A\00"
@.str.27 = [111 x i8] c"/* %s source opaque/pattern transparent. */\0Astatic unsigned xrop3_%d_0_1 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.28 = [51 x i8] c" return (%s & S) | (%s & (~T)) | (T & (~S) & D);\0A\00"
@.str.29 = [111 x i8] c"/* %s source transparent/pattern opaque. */\0Astatic unsigned xrop3_%d_1_0 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.30 = [33 x i8] c" return (%s & (~S)) | (D & S);\0A\00"
@.str.31 = [104 x i8] c"/* %s source/pattern transparent. */\0Astatic unsigned xrop3_%d_1_1 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.32 = [50 x i8] c" return (%s & (~S) & (~T)) | (D & S) | (D & T);\0A\00"
define i32 @write_rop3_func(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [32 x i8]
%11 = alloca [32 x i8]
%12 = alloca [32 x i8]
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [2048 x i8]
%18 = alloca i8
%19 = alloca i64
%20 = alloca [2048 x i8]
%21 = alloca i64
%22 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i64 0, i64* %19
store i64 0, i64* %21
%23 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
store i8 0, i8* %23
%24 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
store i8 0, i8* %24
%25 = load i8*, i8** %7
store i8* %25, i8** %13
br label %26
26: ; preds = %237, %3
%27 = load i8*, i8** %13
%28 = load i8, i8* %27
%29 = icmp ne i8 %28, 0
br i1 %29, label %30, label %240
30: ; preds = %26
%31 = load i8*, i8** %13
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
switch i32 %33, label %227 [
i32 48, label %34
i32 49, label %34
i32 83, label %77
i32 84, label %77
i32 68, label %77
i32 111, label %113
i32 97, label %113
i32 120, label %113
i32 110, label %192
]
34: ; preds = %30, %30
%35 = load i8*, i8** %13
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 48
%39 = zext i1 %38 to i64
%40 = select i1 %38, i32 0, i32 255
store i32 %40, i32* %22
store i32 1, i32* %8
store i32 1, i32* %9
%41 = load i8*, i8** %13
%42 = load i8*, i8** %7
%43 = icmp ne i8* %41, %42
br i1 %43, label %50, label %44
44: ; preds = %34
%45 = load i8*, i8** %13
%46 = getelementptr inbounds i8, i8* %45, i64 1
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %59
50: ; preds = %44, %34
%51 = load i32, i32* @stderr
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i32*
%54 = load i8*, i8** %13
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = load i8*, i8** %7
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %56, i8* %57)
store i32 -1, i32* %4
br label %496
59: ; preds = %44
%60 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%61 = load i32, i32* %22
%62 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %60, i32 2048, i64* %19, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %59
store i32 -1, i32* %4
br label %496
65: ; preds = %59
%66 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%67 = load i8*, i8** %13
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 48
%71 = zext i1 %70 to i64
%72 = select i1 %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%73 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %66, i32 2048, i64* %21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %72)
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %65
store i32 -1, i32* %4
br label %496
76: ; preds = %65
br label %236
77: ; preds = %30, %30, %30
%78 = load i32, i32* %8
%79 = sext i32 %78 to i64
%80 = icmp uge i64 %79, 31
br i1 %80, label %81, label %87
81: ; preds = %77
%82 = load i32, i32* @stderr
%83 = sext i32 %82 to i64
%84 = inttoptr i64 %83 to i32*
%85 = load i8*, i8** %7
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %85)
store i32 -1, i32* %4
br label %496
87: ; preds = %77
%88 = load i8*, i8** %13
%89 = load i8, i8* %88
%90 = load i32, i32* %8
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 %91
store i8 %89, i8* %92
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %8
%95 = load i8*, i8** %13
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 68
br i1 %98, label %99, label %100
99: ; preds = %87
store i32 1, i32* %14
br label %100
100: ; preds = %99, %87
%101 = load i8*, i8** %13
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp eq i32 %103, 84
br i1 %104, label %105, label %106
105: ; preds = %100
store i32 1, i32* %16
br label %106
106: ; preds = %105, %100
%107 = load i8*, i8** %13
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp eq i32 %109, 83
br i1 %110, label %111, label %112
111: ; preds = %106
store i32 1, i32* %15
br label %112
112: ; preds = %111, %106
br label %236
113: ; preds = %30, %30, %30
%114 = load i32, i32* %8
%115 = icmp slt i32 %114, 1
br i1 %115, label %116, label %122
116: ; preds = %113
%117 = load i32, i32* @stderr
%118 = sext i32 %117 to i64
%119 = inttoptr i64 %118 to i32*
%120 = load i8*, i8** %7
%121 = call i32 (i32*, i8*, ...) @fprintf(i32* %119, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* %120)
store i32 -1, i32* %4
br label %496
122: ; preds = %113
%123 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%124 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%125 = load i32, i32* %8
%126 = sub nsw i32 %125, 2
%127 = call i32 @mk_operand(i8* %123, i32 32, i8* %124, i32 %126)
%128 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%129 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%130 = load i32, i32* %8
%131 = sub nsw i32 %130, 1
%132 = call i32 @mk_operand(i8* %128, i32 32, i8* %129, i32 %131)
%133 = load i8*, i8** %13
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = icmp eq i32 %135, 111
br i1 %136, label %137, label %138
137: ; preds = %122
br label %145
138: ; preds = %122
%139 = load i8*, i8** %13
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 97
%143 = zext i1 %142 to i64
%144 = select i1 %142, i32 38, i32 94
br label %145
145: ; preds = %138, %137
%146 = phi i32 [ 124, %137 ], [ %144, %138 ]
%147 = trunc i32 %146 to i8
store i8 %147, i8* %18
%148 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%149 = load i32, i32* %8
%150 = sub nsw i32 %149, 1
%151 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%152 = load i8, i8* %18
%153 = sext i8 %152 to i32
%154 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%155 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %148, i32 2048, i64* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %150, i8* %151, i32 %153, i8* %154)
%156 = icmp ne i32 %155, 0
br i1 %156, label %157, label %158
157: ; preds = %145
store i32 -1, i32* %4
br label %496
158: ; preds = %145
%159 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%160 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%161 = load i32, i32* %8
%162 = sub nsw i32 %161, 2
%163 = call i32 @mk_xoperand(i8* %159, i32 32, i8* %160, i32 %162)
%164 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%165 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%166 = load i32, i32* %8
%167 = sub nsw i32 %166, 1
%168 = call i32 @mk_xoperand(i8* %164, i32 32, i8* %165, i32 %167)
%169 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%170 = load i32, i32* %8
%171 = sub nsw i32 %170, 1
%172 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%173 = load i8, i8* %18
%174 = sext i8 %173 to i32
%175 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%176 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %169, i32 2048, i64* %21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %171, i8* %172, i32 %174, i8* %175)
%177 = icmp ne i32 %176, 0
br i1 %177, label %178, label %179
178: ; preds = %158
store i32 -1, i32* %4
br label %496
179: ; preds = %158
%180 = load i32, i32* %8
%181 = add nsw i32 %180, -1
store i32 %181, i32* %8
%182 = load i32, i32* %8
%183 = load i32, i32* %9
%184 = icmp sgt i32 %182, %183
br i1 %184, label %185, label %187
185: ; preds = %179
%186 = load i32, i32* %8
store i32 %186, i32* %9
br label %187
187: ; preds = %185, %179
%188 = load i32, i32* %8
%189 = sub nsw i32 %188, 1
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 %190
store i8 0, i8* %191
br label %236
192: ; preds = %30
%193 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%194 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%195 = load i32, i32* %8
%196 = sub nsw i32 %195, 1
%197 = call i32 @mk_operand(i8* %193, i32 32, i8* %194, i32 %196)
%198 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%199 = load i32, i32* %8
%200 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%201 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %198, i32 2048, i64* %19, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %199, i8* %200)
%202 = icmp ne i32 %201, 0
br i1 %202, label %203, label %204
203: ; preds = %192
store i32 -1, i32* %4
br label %496
204: ; preds = %192
%205 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%206 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%207 = load i32, i32* %8
%208 = sub nsw i32 %207, 1
%209 = call i32 @mk_xoperand(i8* %205, i32 32, i8* %206, i32 %208)
%210 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%211 = load i32, i32* %8
%212 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%213 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %210, i32 2048, i64* %21, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %211, i8* %212)
%214 = icmp ne i32 %213, 0
br i1 %214, label %215, label %216
215: ; preds = %204
store i32 -1, i32* %4
br label %496
216: ; preds = %204
%217 = load i32, i32* %8
%218 = load i32, i32* %9
%219 = icmp sgt i32 %217, %218
br i1 %219, label %220, label %222
220: ; preds = %216
%221 = load i32, i32* %8
store i32 %221, i32* %9
br label %222
222: ; preds = %220, %216
%223 = load i32, i32* %8
%224 = sub nsw i32 %223, 1
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 %225
store i8 0, i8* %226
br label %236
227: ; preds = %30
%228 = load i32, i32* @stderr
%229 = sext i32 %228 to i64
%230 = inttoptr i64 %229 to i32*
%231 = load i8*, i8** %13
%232 = load i8, i8* %231
%233 = sext i8 %232 to i32
%234 = load i8*, i8** %7
%235 = call i32 (i32*, i8*, ...) @fprintf(i32* %230, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %233, i8* %234)
store i32 -1, i32* %4
br label %496
236: ; preds = %222, %187, %112, %76
br label %237
237: ; preds = %236
%238 = load i8*, i8** %13
%239 = getelementptr inbounds i8, i8* %238, i32 1
store i8* %239, i8** %13
br label %26
240: ; preds = %26
%241 = load i32, i32* %8
%242 = icmp ne i32 %241, 1
br i1 %242, label %243, label %249
243: ; preds = %240
%244 = load i32, i32* @stderr
%245 = sext i32 %244 to i64
%246 = inttoptr i64 %245 to i32*
%247 = load i8*, i8** %7
%248 = call i32 (i32*, i8*, ...) @fprintf(i32* %246, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i8* %247)
store i32 -1, i32* %4
br label %496
249: ; preds = %240
%250 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%251 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%252 = call i32 @mk_operand(i8* %250, i32 32, i8* %251, i32 0)
%253 = load i32*, i32** %5
%254 = load i8*, i8** %7
%255 = load i32, i32* %6
%256 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.11, i64 0, i64 0), i8* %254, i32 %255)
store i32 1, i32* %22
br label %257
257: ; preds = %265, %249
%258 = load i32, i32* %22
%259 = load i32, i32* %9
%260 = icmp sle i32 %258, %259
br i1 %260, label %261, label %268
261: ; preds = %257
%262 = load i32*, i32** %5
%263 = load i32, i32* %22
%264 = call i32 (i32*, i8*, ...) @fprintf(i32* %262, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %263)
br label %265
265: ; preds = %261
%266 = load i32, i32* %22
%267 = add nsw i32 %266, 1
store i32 %267, i32* %22
br label %257
268: ; preds = %257
%269 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%270 = load i32*, i32** %5
%271 = call i32 @fputs(i8* %269, i32* %270)
%272 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%273 = load i8, i8* %272
%274 = sext i8 %273 to i32
%275 = icmp ne i32 %274, 68
br i1 %275, label %276, label %280
276: ; preds = %268
%277 = load i32*, i32** %5
%278 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%279 = call i32 (i32*, i8*, ...) @fprintf(i32* %277, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %278)
br label %280
280: ; preds = %276, %268
%281 = load i32*, i32** %5
%282 = call i32 (i32*, i8*, ...) @fprintf(i32* %281, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%283 = load i32*, i32** %5
%284 = load i8*, i8** %7
%285 = load i32, i32* %6
%286 = call i32 (i32*, i8*, ...) @fprintf(i32* %283, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.15, i64 0, i64 0), i8* %284, i32 %285)
store i32 1, i32* %22
br label %287
287: ; preds = %295, %280
%288 = load i32, i32* %22
%289 = load i32, i32* %9
%290 = icmp sle i32 %288, %289
br i1 %290, label %291, label %298
291: ; preds = %287
%292 = load i32*, i32** %5
%293 = load i32, i32* %22
%294 = call i32 (i32*, i8*, ...) @fprintf(i32* %292, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %293)
br label %295
295: ; preds = %291
%296 = load i32, i32* %22
%297 = add nsw i32 %296, 1
store i32 %297, i32* %22
br label %287
298: ; preds = %287
%299 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%300 = load i32*, i32** %5
%301 = call i32 @fputs(i8* %299, i32* %300)
%302 = load i32*, i32** %5
%303 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%304 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%305 = call i32 (i32*, i8*, ...) @fprintf(i32* %302, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i8* %303, i8* %304)
%306 = load i32*, i32** %5
%307 = call i32 (i32*, i8*, ...) @fprintf(i32* %306, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%308 = load i32*, i32** %5
%309 = load i8*, i8** %7
%310 = load i32, i32* %6
%311 = call i32 (i32*, i8*, ...) @fprintf(i32* %308, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.17, i64 0, i64 0), i8* %309, i32 %310)
store i32 1, i32* %22
br label %312
312: ; preds = %320, %298
%313 = load i32, i32* %22
%314 = load i32, i32* %9
%315 = icmp sle i32 %313, %314
br i1 %315, label %316, label %323
316: ; preds = %312
%317 = load i32*, i32** %5
%318 = load i32, i32* %22
%319 = call i32 (i32*, i8*, ...) @fprintf(i32* %317, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %318)
br label %320
320: ; preds = %316
%321 = load i32, i32* %22
%322 = add nsw i32 %321, 1
store i32 %322, i32* %22
br label %312
323: ; preds = %312
%324 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%325 = load i32*, i32** %5
%326 = call i32 @fputs(i8* %324, i32* %325)
%327 = load i32*, i32** %5
%328 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%329 = call i32 (i32*, i8*, ...) @fprintf(i32* %327, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %328)
%330 = load i32*, i32** %5
%331 = call i32 (i32*, i8*, ...) @fprintf(i32* %330, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%332 = load i32*, i32** %5
%333 = load i8*, i8** %7
%334 = load i32, i32* %6
%335 = call i32 (i32*, i8*, ...) @fprintf(i32* %332, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.19, i64 0, i64 0), i8* %333, i32 %334)
store i32 1, i32* %22
br label %336
336: ; preds = %344, %323
%337 = load i32, i32* %22
%338 = load i32, i32* %9
%339 = icmp sle i32 %337, %338
br i1 %339, label %340, label %347
340: ; preds = %336
%341 = load i32*, i32** %5
%342 = load i32, i32* %22
%343 = call i32 (i32*, i8*, ...) @fprintf(i32* %341, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %342)
br label %344
344: ; preds = %340
%345 = load i32, i32* %22
%346 = add nsw i32 %345, 1
store i32 %346, i32* %22
br label %336
347: ; preds = %336
%348 = getelementptr inbounds [2048 x i8], [2048 x i8]* %17, i64 0, i64 0
%349 = load i32*, i32** %5
%350 = call i32 @fputs(i8* %348, i32* %349)
%351 = load i32*, i32** %5
%352 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%353 = call i32 (i32*, i8*, ...) @fprintf(i32* %351, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.20, i64 0, i64 0), i8* %352)
%354 = load i32*, i32** %5
%355 = call i32 (i32*, i8*, ...) @fprintf(i32* %354, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%356 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%357 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%358 = call i32 @mk_xoperand(i8* %356, i32 32, i8* %357, i32 0)
%359 = load i32*, i32** %5
%360 = load i8*, i8** %7
%361 = load i32, i32* %6
%362 = call i32 (i32*, i8*, ...) @fprintf(i32* %359, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.21, i64 0, i64 0), i8* %360, i32 %361)
%363 = load i32, i32* %14
%364 = icmp ne i32 %363, 0
br i1 %364, label %365, label %368
365: ; preds = %347
%366 = load i32*, i32** %5
%367 = call i32 (i32*, i8*, ...) @fprintf(i32* %366, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
br label %368
368: ; preds = %365, %347
%369 = load i32, i32* %15
%370 = icmp ne i32 %369, 0
br i1 %370, label %371, label %374
371: ; preds = %368
%372 = load i32*, i32** %5
%373 = call i32 (i32*, i8*, ...) @fprintf(i32* %372, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
br label %374
374: ; preds = %371, %368
%375 = load i32, i32* %16
%376 = icmp ne i32 %375, 0
br i1 %376, label %377, label %380
377: ; preds = %374
%378 = load i32*, i32** %5
%379 = call i32 (i32*, i8*, ...) @fprintf(i32* %378, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
br label %380
380: ; preds = %377, %374
store i32 1, i32* %22
br label %381
381: ; preds = %389, %380
%382 = load i32, i32* %22
%383 = load i32, i32* %9
%384 = icmp sle i32 %382, %383
br i1 %384, label %385, label %392
385: ; preds = %381
%386 = load i32*, i32** %5
%387 = load i32, i32* %22
%388 = call i32 (i32*, i8*, ...) @fprintf(i32* %386, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %387)
br label %389
389: ; preds = %385
%390 = load i32, i32* %22
%391 = add nsw i32 %390, 1
store i32 %391, i32* %22
br label %381
392: ; preds = %381
%393 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%394 = load i32*, i32** %5
%395 = call i32 @fputs(i8* %393, i32* %394)
%396 = load i32*, i32** %5
%397 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%398 = call i32 (i32*, i8*, ...) @fprintf(i32* %396, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i8* %397)
%399 = load i32*, i32** %5
%400 = call i32 (i32*, i8*, ...) @fprintf(i32* %399, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%401 = load i32*, i32** %5
%402 = load i8*, i8** %7
%403 = load i32, i32* %6
%404 = call i32 (i32*, i8*, ...) @fprintf(i32* %401, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.27, i64 0, i64 0), i8* %402, i32 %403)
%405 = load i32*, i32** %5
%406 = call i32 (i32*, i8*, ...) @fprintf(i32* %405, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
%407 = load i32*, i32** %5
%408 = call i32 (i32*, i8*, ...) @fprintf(i32* %407, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
%409 = load i32*, i32** %5
%410 = call i32 (i32*, i8*, ...) @fprintf(i32* %409, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
store i32 1, i32* %22
br label %411
411: ; preds = %419, %392
%412 = load i32, i32* %22
%413 = load i32, i32* %9
%414 = icmp sle i32 %412, %413
br i1 %414, label %415, label %422
415: ; preds = %411
%416 = load i32*, i32** %5
%417 = load i32, i32* %22
%418 = call i32 (i32*, i8*, ...) @fprintf(i32* %416, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %417)
br label %419
419: ; preds = %415
%420 = load i32, i32* %22
%421 = add nsw i32 %420, 1
store i32 %421, i32* %22
br label %411
422: ; preds = %411
%423 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%424 = load i32*, i32** %5
%425 = call i32 @fputs(i8* %423, i32* %424)
%426 = load i32*, i32** %5
%427 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%428 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%429 = call i32 (i32*, i8*, ...) @fprintf(i32* %426, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.28, i64 0, i64 0), i8* %427, i8* %428)
%430 = load i32*, i32** %5
%431 = call i32 (i32*, i8*, ...) @fprintf(i32* %430, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%432 = load i32*, i32** %5
%433 = load i8*, i8** %7
%434 = load i32, i32* %6
%435 = call i32 (i32*, i8*, ...) @fprintf(i32* %432, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.29, i64 0, i64 0), i8* %433, i32 %434)
%436 = load i32*, i32** %5
%437 = call i32 (i32*, i8*, ...) @fprintf(i32* %436, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
%438 = load i32*, i32** %5
%439 = call i32 (i32*, i8*, ...) @fprintf(i32* %438, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
%440 = load i32, i32* %16
%441 = icmp ne i32 %440, 0
br i1 %441, label %442, label %445
442: ; preds = %422
%443 = load i32*, i32** %5
%444 = call i32 (i32*, i8*, ...) @fprintf(i32* %443, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
br label %445
445: ; preds = %442, %422
store i32 1, i32* %22
br label %446
446: ; preds = %454, %445
%447 = load i32, i32* %22
%448 = load i32, i32* %9
%449 = icmp sle i32 %447, %448
br i1 %449, label %450, label %457
450: ; preds = %446
%451 = load i32*, i32** %5
%452 = load i32, i32* %22
%453 = call i32 (i32*, i8*, ...) @fprintf(i32* %451, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %452)
br label %454
454: ; preds = %450
%455 = load i32, i32* %22
%456 = add nsw i32 %455, 1
store i32 %456, i32* %22
br label %446
457: ; preds = %446
%458 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%459 = load i32*, i32** %5
%460 = call i32 @fputs(i8* %458, i32* %459)
%461 = load i32*, i32** %5
%462 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%463 = call i32 (i32*, i8*, ...) @fprintf(i32* %461, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i8* %462)
%464 = load i32*, i32** %5
%465 = call i32 (i32*, i8*, ...) @fprintf(i32* %464, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%466 = load i32*, i32** %5
%467 = load i8*, i8** %7
%468 = load i32, i32* %6
%469 = call i32 (i32*, i8*, ...) @fprintf(i32* %466, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.31, i64 0, i64 0), i8* %467, i32 %468)
%470 = load i32*, i32** %5
%471 = call i32 (i32*, i8*, ...) @fprintf(i32* %470, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
%472 = load i32*, i32** %5
%473 = call i32 (i32*, i8*, ...) @fprintf(i32* %472, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
%474 = load i32*, i32** %5
%475 = call i32 (i32*, i8*, ...) @fprintf(i32* %474, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
store i32 1, i32* %22
br label %476
476: ; preds = %484, %457
%477 = load i32, i32* %22
%478 = load i32, i32* %9
%479 = icmp sle i32 %477, %478
br i1 %479, label %480, label %487
480: ; preds = %476
%481 = load i32*, i32** %5
%482 = load i32, i32* %22
%483 = call i32 (i32*, i8*, ...) @fprintf(i32* %481, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %482)
br label %484
484: ; preds = %480
%485 = load i32, i32* %22
%486 = add nsw i32 %485, 1
store i32 %486, i32* %22
br label %476
487: ; preds = %476
%488 = getelementptr inbounds [2048 x i8], [2048 x i8]* %20, i64 0, i64 0
%489 = load i32*, i32** %5
%490 = call i32 @fputs(i8* %488, i32* %489)
%491 = load i32*, i32** %5
%492 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%493 = call i32 (i32*, i8*, ...) @fprintf(i32* %491, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.32, i64 0, i64 0), i8* %492)
%494 = load i32*, i32** %5
%495 = call i32 (i32*, i8*, ...) @fprintf(i32* %494, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %4
br label %496
496: ; preds = %487, %243, %227, %215, %203, %178, %157, %116, %81, %75, %64, %50
%497 = load i32, i32* %4
ret i32 %497
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Misplaced %c in rop string %s.\0A\00"
@.str.1 = [14 x i8] c" stk1 = %d;\0A\00"
@.str.2 = [14 x i8] c" stk1 = %s;\0A\00"
@.str.3 = [7 x i8] c"0x0000\00"
@.str.4 = [7 x i8] c"0xffff\00"
@.str.5 = [34 x i8] c"Stack overflow in rop string %s.\0A\00"
@.str.6 = [35 x i8] c"Stack underflow in rop string %s.\0A\00"
@.str.7 = [21 x i8] c" stk%d = %s %c %s;\0A\00"
@.str.8 = [16 x i8] c" stk%d = ~%s;\0A\00"
@.str.9 = [40 x i8] c"Illegal character %c in rop string %s.\0A\00"
@.str.10 = [43 x i8] c"Unbalanced shift/reduce in rop string %s.\0A\00"
@.str.11 = [112 x i8] c"/* %s source/pattern opaque. */\0Astatic void rop3_%d_0_0 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.12 = [24 x i8] c" unsigned char stk%d;\0A\00"
@.str.13 = [12 x i8] c" *D = %s;\0A\00"
@.str.14 = [4 x i8] c"}\0A\0A\00"
@.str.15 = [124 x i8] c"/* %s source opaque/pattern transparent. */\0Astatic void rop3_%d_0_1 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.16 = [50 x i8] c" *D = (%s & S) | (%s & (~T)) | (T & (~S) & *D);\0A\00"
@.str.17 = [124 x i8] c"/* %s source transparent/pattern opaque. */\0Astatic void rop3_%d_1_0 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.18 = [32 x i8] c" *D = (%s & (~S)) | (*D & S);\0A\00"
@.str.19 = [117 x i8] c"/* %s source/pattern transparent. */\0Astatic void rop3_%d_1_1 (unsigned char *D, unsigned char S, unsigned char T)\0A{\0A\00"
@.str.20 = [50 x i8] c" *D = (%s & (~S) & (~T)) | (*D & S) | (*D & T);\0A\00"
@.str.21 = [99 x i8] c"/* %s source/pattern opaque. */\0Astatic unsigned xrop3_%d_0_0 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.22 = [24 x i8] c" unsigned D = 0x00ff;\0A\00"
@.str.23 = [40 x i8] c" unsigned S = ((unsigned)s << 8) | s;\0A\00"
@.str.24 = [40 x i8] c" unsigned T = ((unsigned)t << 8) | t;\0A\00"
@.str.25 = [19 x i8] c" unsigned stk%d;\0A\00"
@.str.26 = [14 x i8] c" return %s;\0A\00"
@.str.27 = [111 x i8] c"/* %s source opaque/pattern transparent. */\0Astatic unsigned xrop3_%d_0_1 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.28 = [51 x i8] c" return (%s & S) | (%s & (~T)) | (T & (~S) & D);\0A\00"
@.str.29 = [111 x i8] c"/* %s source transparent/pattern opaque. */\0Astatic unsigned xrop3_%d_1_0 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.30 = [33 x i8] c" return (%s & (~S)) | (D & S);\0A\00"
@.str.31 = [104 x i8] c"/* %s source/pattern transparent. */\0Astatic unsigned xrop3_%d_1_1 (unsigned char s, unsigned char t)\0A{\0A\00"
@.str.32 = [50 x i8] c" return (%s & (~S) & (~T)) | (D & S) | (D & T);\0A\00"
define i32 @write_rop3_func(i32* %0, i32 %1, i8* %2) {
%4 = alloca [32 x i8]
%5 = alloca [32 x i8]
%6 = alloca [32 x i8]
%7 = alloca [2048 x i8]
%8 = alloca i64
%9 = alloca [2048 x i8]
%10 = alloca i64
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%15 = bitcast i64* %8 to i8*
store i64 0, i64* %8
%16 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%17 = bitcast i64* %10 to i8*
store i64 0, i64* %10
store i8 0, i8* %14
store i8 0, i8* %16
%18 = load i8, i8* %2
%19 = icmp eq i8 %18, 0
br i1 %19, label %128, label %20
20: ; preds = %3
%21 = getelementptr inbounds i8, i8* %2, i64 1
br label %22
22: ; preds = %20, %117
%23 = phi i8 [ %124, %117 ], [ %18, %20 ]
%24 = phi i32 [ %122, %117 ], [ 0, %20 ]
%25 = phi i32 [ %121, %117 ], [ 0, %20 ]
%26 = phi i32 [ %120, %117 ], [ 0, %20 ]
%27 = phi i8* [ %123, %117 ], [ %2, %20 ]
%28 = phi i32 [ %119, %117 ], [ 0, %20 ]
%29 = phi i32 [ %118, %117 ], [ 0, %20 ]
%30 = sext i8 %23 to i32
switch i32 %30, label %112 [
i32 48, label %31
i32 49, label %31
i32 83, label %52
i32 84, label %52
i32 68, label %52
i32 111, label %69
i32 97, label %69
i32 120, label %69
i32 110, label %98
]
31: ; preds = %22, %22
%32 = icmp eq i8 %23, 48
%33 = select i1 %32, i32 0, i32 255
%34 = icmp eq i8* %27, %2
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load i8, i8* %21
%37 = icmp eq i8 %36, 0
br i1 %37, label %43, label %38
38: ; preds = %35, %31
%39 = load i32, i32* @stderr
%40 = sext i32 %39 to i64
%41 = inttoptr i64 %40 to i32*
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %30, i8* %2)
br label %270
43: ; preds = %35
%44 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %14, i32 2048, i64* %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %270
46: ; preds = %43
%47 = load i8, i8* %2
%48 = icmp eq i8 %47, 48
%49 = select i1 %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%50 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %16, i32 2048, i64* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %49)
%51 = icmp eq i32 %50, 0
br i1 %51, label %117, label %270
52: ; preds = %22, %22, %22
%53 = icmp ugt i32 %29, 30
br i1 %53, label %54, label %59
54: ; preds = %52
%55 = load i32, i32* @stderr
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to i32*
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %2)
br label %270
59: ; preds = %52
%60 = zext i32 %29 to i64
%61 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %60
store i8 %23, i8* %61
%62 = add nuw nsw i32 %29, 1
%63 = icmp eq i8 %23, 68
%64 = select i1 %63, i32 1, i32 %26
%65 = icmp eq i8 %23, 84
%66 = select i1 %65, i32 1, i32 %24
%67 = icmp eq i8 %23, 83
%68 = select i1 %67, i32 1, i32 %25
br label %117
69: ; preds = %22, %22, %22
%70 = icmp slt i32 %29, 1
br i1 %70, label %71, label %76
71: ; preds = %69
%72 = load i32, i32* @stderr
%73 = sext i32 %72 to i64
%74 = inttoptr i64 %73 to i32*
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %270
76: ; preds = %69
%77 = add nsw i32 %29, -2
%78 = call i32 @mk_operand(i8* %12, i32 32, i8* %11, i32 %77)
%79 = add nsw i32 %29, -1
%80 = call i32 @mk_operand(i8* %13, i32 32, i8* %11, i32 %79)
%81 = load i8, i8* %27
%82 = icmp eq i8 %81, 111
%83 = icmp eq i8 %81, 97
%84 = select i1 %83, i32 38, i32 94
%85 = select i1 %82, i32 124, i32 %84
%86 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %14, i32 2048, i64* %8, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %79, i8* %12, i32 %85, i8* %13)
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %270
88: ; preds = %76
%89 = call i32 @mk_xoperand(i8* %12, i32 32, i8* %11, i32 %77)
%90 = call i32 @mk_xoperand(i8* %13, i32 32, i8* %11, i32 %79)
%91 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %16, i32 2048, i64* %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %79, i8* %12, i32 %85, i8* %13)
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %270
93: ; preds = %88
%94 = icmp sgt i32 %79, %28
%95 = select i1 %94, i32 %79, i32 %28
%96 = sext i32 %77 to i64
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %96
store i8 0, i8* %97
br label %117
98: ; preds = %22
%99 = add nsw i32 %29, -1
%100 = call i32 @mk_operand(i8* %12, i32 32, i8* %11, i32 %99)
%101 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %14, i32 2048, i64* %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %29, i8* %12)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %270
103: ; preds = %98
%104 = call i32 @mk_xoperand(i8* %12, i32 32, i8* %11, i32 %99)
%105 = call i32 (i8*, i32, i64*, i8*, ...) @apprintf(i8* %16, i32 2048, i64* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %29, i8* %12)
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %270
107: ; preds = %103
%108 = icmp sgt i32 %29, %28
%109 = select i1 %108, i32 %29, i32 %28
%110 = sext i32 %99 to i64
%111 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %110
store i8 0, i8* %111
br label %117
112: ; preds = %22
%113 = load i32, i32* @stderr
%114 = sext i32 %113 to i64
%115 = inttoptr i64 %114 to i32*
%116 = call i32 (i32*, i8*, ...) @fprintf(i32* %115, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %30, i8* %2)
br label %270
117: ; preds = %59, %93, %107, %46
%118 = phi i32 [ %29, %107 ], [ %79, %93 ], [ 1, %46 ], [ %62, %59 ]
%119 = phi i32 [ %109, %107 ], [ %95, %93 ], [ 1, %46 ], [ %28, %59 ]
%120 = phi i32 [ %26, %107 ], [ %26, %93 ], [ %26, %46 ], [ %64, %59 ]
%121 = phi i32 [ %25, %107 ], [ %25, %93 ], [ %25, %46 ], [ %68, %59 ]
%122 = phi i32 [ %24, %107 ], [ %24, %93 ], [ %24, %46 ], [ %66, %59 ]
%123 = getelementptr inbounds i8, i8* %27, i64 1
%124 = load i8, i8* %123
%125 = icmp eq i8 %124, 0
br i1 %125, label %126, label %22
126: ; preds = %117
%127 = icmp eq i32 %118, 1
br i1 %127, label %133, label %128
128: ; preds = %3, %126
%129 = load i32, i32* @stderr
%130 = sext i32 %129 to i64
%131 = inttoptr i64 %130 to i32*
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i8* %2)
br label %270
133: ; preds = %126
%134 = call i32 @mk_operand(i8* %12, i32 32, i8* %11, i32 0)
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.11, i64 0, i64 0), i8* %2, i32 %1)
%136 = icmp slt i32 %119, 1
br i1 %136, label %142, label %137
137: ; preds = %133, %137
%138 = phi i32 [ %140, %137 ], [ 1, %133 ]
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %138)
%140 = add nuw i32 %138, 1
%141 = icmp eq i32 %138, %119
br i1 %141, label %142, label %137
142: ; preds = %137, %133
%143 = call i32 @fputs(i8* %14, i32* %0)
%144 = load i8, i8* %11
%145 = icmp eq i8 %144, 68
br i1 %145, label %148, label %146
146: ; preds = %142
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %12)
br label %148
148: ; preds = %146, %142
%149 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.15, i64 0, i64 0), i8* %2, i32 %1)
br i1 %136, label %166, label %151
151: ; preds = %148, %151
%152 = phi i32 [ %154, %151 ], [ 1, %148 ]
%153 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %152)
%154 = add nuw i32 %152, 1
%155 = icmp eq i32 %152, %119
br i1 %155, label %156, label %151
156: ; preds = %151
%157 = call i32 @fputs(i8* %14, i32* %0)
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i8* %12, i8* %12)
%159 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%160 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.17, i64 0, i64 0), i8* %2, i32 %1)
br i1 %136, label %181, label %161
161: ; preds = %156, %161
%162 = phi i32 [ %164, %161 ], [ 1, %156 ]
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %162)
%164 = add nuw i32 %162, 1
%165 = icmp eq i32 %162, %119
br i1 %165, label %171, label %161
166: ; preds = %148
%167 = call i32 @fputs(i8* %14, i32* %0)
%168 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i8* %12, i8* %12)
%169 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%170 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.17, i64 0, i64 0), i8* %2, i32 %1)
br label %171
171: ; preds = %161, %166
%172 = call i32 @fputs(i8* %14, i32* %0)
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %12)
%174 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.19, i64 0, i64 0), i8* %2, i32 %1)
br i1 %136, label %186, label %176
176: ; preds = %171, %176
%177 = phi i32 [ %179, %176 ], [ 1, %171 ]
%178 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %177)
%179 = add nuw i32 %177, 1
%180 = icmp eq i32 %177, %119
br i1 %180, label %186, label %176
181: ; preds = %156
%182 = call i32 @fputs(i8* %14, i32* %0)
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %12)
%184 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%185 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.19, i64 0, i64 0), i8* %2, i32 %1)
br label %186
186: ; preds = %176, %181, %171
%187 = call i32 @fputs(i8* %14, i32* %0)
%188 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.20, i64 0, i64 0), i8* %12)
%189 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%190 = call i32 @mk_xoperand(i8* %12, i32 32, i8* %11, i32 0)
%191 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.21, i64 0, i64 0), i8* %2, i32 %1)
%192 = icmp eq i32 %120, 0
br i1 %192, label %195, label %193
193: ; preds = %186
%194 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
br label %195
195: ; preds = %193, %186
%196 = icmp eq i32 %121, 0
br i1 %196, label %199, label %197
197: ; preds = %195
%198 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %199
199: ; preds = %197, %195
%200 = icmp eq i32 %122, 0
br i1 %200, label %203, label %201
201: ; preds = %199
%202 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %203
203: ; preds = %201, %199
br i1 %136, label %222, label %204
204: ; preds = %203, %204
%205 = phi i32 [ %207, %204 ], [ 1, %203 ]
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %205)
%207 = add nuw i32 %205, 1
%208 = icmp eq i32 %205, %119
br i1 %208, label %209, label %204
209: ; preds = %204
%210 = call i32 @fputs(i8* %16, i32* %0)
%211 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i8* %12)
%212 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%213 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.27, i64 0, i64 0), i8* %2, i32 %1)
%214 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
%215 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
%216 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br i1 %136, label %230, label %217
217: ; preds = %209, %217
%218 = phi i32 [ %220, %217 ], [ 1, %209 ]
%219 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %218)
%220 = add nuw i32 %218, 1
%221 = icmp eq i32 %218, %119
br i1 %221, label %230, label %217
222: ; preds = %203
%223 = call i32 @fputs(i8* %16, i32* %0)
%224 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i8* %12)
%225 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%226 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.27, i64 0, i64 0), i8* %2, i32 %1)
%227 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
%228 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
%229 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %230
230: ; preds = %217, %222, %209
%231 = call i32 @fputs(i8* %16, i32* %0)
%232 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.28, i64 0, i64 0), i8* %12, i8* %12)
%233 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%234 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.29, i64 0, i64 0), i8* %2, i32 %1)
%235 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
%236 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
br i1 %200, label %239, label %237
237: ; preds = %230
%238 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %239
239: ; preds = %237, %230
br i1 %136, label %258, label %240
240: ; preds = %239, %240
%241 = phi i32 [ %243, %240 ], [ 1, %239 ]
%242 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %241)
%243 = add nuw i32 %241, 1
%244 = icmp eq i32 %241, %119
br i1 %244, label %245, label %240
245: ; preds = %240
%246 = call i32 @fputs(i8* %16, i32* %0)
%247 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i8* %12)
%248 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%249 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.31, i64 0, i64 0), i8* %2, i32 %1)
%250 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
%251 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
%252 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br i1 %136, label %266, label %253
253: ; preds = %245, %253
%254 = phi i32 [ %256, %253 ], [ 1, %245 ]
%255 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0), i32 %254)
%256 = add nuw i32 %254, 1
%257 = icmp eq i32 %254, %119
br i1 %257, label %266, label %253
258: ; preds = %239
%259 = call i32 @fputs(i8* %16, i32* %0)
%260 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i8* %12)
%261 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
%262 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.31, i64 0, i64 0), i8* %2, i32 %1)
%263 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i64 23, i64 1, i32* %0)
%264 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i64 39, i64 1, i32* %0)
%265 = call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i64 39, i64 1, i32* %0)
br label %266
266: ; preds = %253, %258, %245
%267 = call i32 @fputs(i8* %16, i32* %0)
%268 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.32, i64 0, i64 0), i8* %12)
%269 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %270
270: ; preds = %103, %98, %88, %76, %46, %43, %266, %128, %112, %71, %54, %38
%271 = phi i32 [ -1, %112 ], [ -1, %71 ], [ -1, %54 ], [ -1, %38 ], [ -1, %128 ], [ 0, %266 ], [ -1, %43 ], [ -1, %46 ], [ -1, %76 ], [ -1, %88 ], [ -1, %98 ], [ -1, %103 ]
ret i32 %271
}