#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 */
struct Mx1 {
  int dummy;
};

/* Variables and functions */
int Mx1_is_any_wrap(struct Mx1 *, char *, char **, int /*<<< orphan*/);
int /*<<< orphan*/ Mx1_report_error(struct Mx1 *, char *, int /*<<< orphan*/);
int Mx1_rewrap(struct Mx1 *, char **, char **, char *, char *, char *, char *,
               int);
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int Mx1_substitute(struct Mx1 *m, char line_in[256], char line_out[256],
                   int raw, int upto, int flag) {
  char *rpt, *wpt, *found;
  int ret, typ = 0;
  wpt = line_out;
  for (rpt = line_in; rpt - line_in < upto && *rpt != 0; rpt++) {
    if (rpt - line_in < raw) {
      *(wpt++) = *rpt;
      continue;
    }
    if (*rpt == '@') {
      typ = 0;
      if (!(flag & 1))
        typ = Mx1_is_any_wrap(m, rpt, &found, 0);
      if (typ == 1) {
        rpt += strlen(found);
        ret = Mx1_rewrap(m, &rpt, &wpt, line_out, found, "\\fB", "\\fR",
                         flag & 1);
        if (ret <= 0)
          return (ret);
      } else if (typ == 2) {
        rpt += strlen(found);
        ret = Mx1_rewrap(m, &rpt, &wpt, line_out, found, "", "", flag & 1);
        if (ret <= 0)
          return (ret);
      } else if (typ == 3) {
        rpt += strlen(found);
        ret =
            Mx1_rewrap(m, &rpt, &wpt, line_out, found, "", "", (flag & 1) | 2);
        if (ret <= 0)
          return (ret);
      } else if (strncmp(rpt, "@email{", 7) == 0 && !(flag & 1)) {
        rpt += 7;
        ret = Mx1_rewrap(m, &rpt, &wpt, line_out, "@email{", "<", ">", 0);
        if (ret <= 0)
          return (ret);
      } else if (strncmp(rpt, "@minus{}", 8) == 0) {
        if ((wpt - line_out) + 1 > 255)
          goto overflow;
        *(wpt++) = '-';
        rpt += 7;
      } else if (strncmp(rpt, "@@", 2) == 0 || strncmp(rpt, "@{", 2) == 0 ||
                 strncmp(rpt, "@}", 2) == 0) {
        if ((wpt - line_out) + 1 > 255)
          goto overflow;
        *(wpt++) = *(rpt + 1);
        rpt++;
      } else {
        if ((wpt - line_out) + 1 > 255)
          goto overflow;
        *(wpt++) = *(rpt);
      }
    } else if (*rpt == '\\') {
      if ((wpt - line_out) + 2 > 255)
        goto overflow;
      *(wpt++) = '\\';
      *(wpt++) = '\\';
    } else if ((wpt - line_out) + 1 > 255) {
    overflow:;
      Mx1_report_error(m, "Line length overflow while text substitution", 0);
      return (-1);
    } else
      *(wpt++) = *rpt;
  }
  *wpt = 0;
  return (1);
}


x86 assembly (clang, -O0):
<Mx1_substitute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rcx
mov    -0x18(%rbp),%rax
sub    %rax,%rcx
movslq -0x28(%rbp),%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x51(%rbp)
jge    11b3 <Mx1_substitute+0x63>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    11c3 <Mx1_substitute+0x73>
jmp    1648 <Mx1_substitute+0x4f8>
mov    -0x38(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
jge    11f7 <Mx1_substitute+0xa7>
mov    -0x38(%rbp),%rax
mov    (%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
jmp    1637 <Mx1_substitute+0x4e7>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    157a <Mx1_substitute+0x42a>
movl   $0x0,-0x50(%rbp)
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1233 <Mx1_substitute+0xe3>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rsi
lea    -0x48(%rbp),%rdx
xor    %ecx,%ecx
call   1060 <Mx1_is_any_wrap@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x1,-0x50(%rbp)
jne    12a8 <Mx1_substitute+0x158>
mov    -0x48(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xd89(%rip),%r9
lea    0xd86(%rip),%r10
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <Mx1_rewrap@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jg     12a3 <Mx1_substitute+0x153>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1656 <Mx1_substitute+0x506>
jmp    1575 <Mx1_substitute+0x425>
cmpl   $0x2,-0x50(%rbp)
jne    1319 <Mx1_substitute+0x1c9>
mov    -0x48(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xd25(%rip),%r10
mov    %r10,%r9
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <Mx1_rewrap@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jg     1314 <Mx1_substitute+0x1c4>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1656 <Mx1_substitute+0x506>
jmp    1570 <Mx1_substitute+0x420>
cmpl   $0x3,-0x50(%rbp)
jne    138d <Mx1_substitute+0x23d>
mov    -0x48(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
or     $0x2,%eax
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xcb1(%rip),%r10
mov    %r10,%r9
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <Mx1_rewrap@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jg     1388 <Mx1_substitute+0x238>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1656 <Mx1_substitute+0x506>
jmp    156b <Mx1_substitute+0x41b>
mov    -0x38(%rbp),%rdi
lea    0xc70(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    141d <Mx1_substitute+0x2cd>
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    141d <Mx1_substitute+0x2cd>
mov    -0x38(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rcx
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xc2a(%rip),%r8
lea    0xc2b(%rip),%r9
lea    0xc26(%rip),%rax
xor    %r10d,%r10d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1050 <Mx1_rewrap@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jg     1418 <Mx1_substitute+0x2c8>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1656 <Mx1_substitute+0x506>
jmp    1566 <Mx1_substitute+0x416>
mov    -0x38(%rbp),%rdi
lea    0xbec(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    147f <Mx1_substitute+0x32f>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
cmp    $0xff,%rax
jle    145c <Mx1_substitute+0x30c>
jmp    15f3 <Mx1_substitute+0x4a3>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x2d,(%rax)
mov    -0x38(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x38(%rbp)
jmp    1561 <Mx1_substitute+0x411>
mov    -0x38(%rbp),%rdi
lea    0xb93(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     14dc <Mx1_substitute+0x38c>
mov    -0x38(%rbp),%rdi
lea    0xb77(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     14dc <Mx1_substitute+0x38c>
mov    -0x38(%rbp),%rdi
lea    0xb5b(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1525 <Mx1_substitute+0x3d5>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
cmp    $0xff,%rax
jle    14fc <Mx1_substitute+0x3ac>
jmp    15f3 <Mx1_substitute+0x4a3>
mov    -0x38(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    155c <Mx1_substitute+0x40c>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
cmp    $0xff,%rax
jle    1545 <Mx1_substitute+0x3f5>
jmp    15f3 <Mx1_substitute+0x4a3>
mov    -0x38(%rbp),%rax
mov    (%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
jmp    1561 <Mx1_substitute+0x411>
jmp    1566 <Mx1_substitute+0x416>
jmp    156b <Mx1_substitute+0x41b>
jmp    1570 <Mx1_substitute+0x420>
jmp    1575 <Mx1_substitute+0x425>
jmp    1632 <Mx1_substitute+0x4e2>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    15d3 <Mx1_substitute+0x483>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x2,%rax
cmp    $0xff,%rax
jle    15aa <Mx1_substitute+0x45a>
jmp    15f3 <Mx1_substitute+0x4a3>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x5c,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x5c,(%rax)
jmp    162d <Mx1_substitute+0x4dd>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
cmp    $0xff,%rax
jle    1611 <Mx1_substitute+0x4c1>
jmp    15f3 <Mx1_substitute+0x4a3>
mov    -0x10(%rbp),%rdi
lea    0xa28(%rip),%rsi
xor    %edx,%edx
call   1070 <Mx1_report_error@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1656 <Mx1_substitute+0x506>
mov    -0x38(%rbp),%rax
mov    (%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
jmp    162d <Mx1_substitute+0x4dd>
jmp    1632 <Mx1_substitute+0x4e2>
jmp    1637 <Mx1_substitute+0x4e7>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1186 <Mx1_substitute+0x36>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mx1_substitute>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r12
mov    %rdx,0x8(%rsp)
mov    %rsi,0x10(%rsp)
test   %r8d,%r8d
jle    1493 <Mx1_substitute+0x343>
mov    %r9d,%r14d
mov    %rsi,%rbx
mov    %rdi,%r15
movslq %r8d,%rbp
movslq %ecx,%r13
and    $0x1,%r14d
lea    0x2(%r14),%eax
mov    %rax,0x20(%rsp)
xor    %eax,%eax
jmp    11cd <Mx1_substitute+0x7d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
lea    0x1(%rax),%rdx
mov    %rdx,0x8(%rsp)
mov    %cl,(%rax)
mov    0x10(%rsp),%rsi
add    $0x1,%rsi
mov    %rsi,0x10(%rsp)
mov    %rsi,%rax
sub    %rbx,%rax
cmp    %rbp,%rax
jge    148e <Mx1_substitute+0x33e>
movzbl (%rsi),%ecx
test   %cl,%cl
je     148e <Mx1_substitute+0x33e>
cmp    %r13,%rax
jl     11a0 <Mx1_substitute+0x50>
cmp    $0x5c,%cl
je     1259 <Mx1_substitute+0x109>
cmp    $0x40,%cl
jne    1293 <Mx1_substitute+0x143>
test   %r14d,%r14d
jne    12b0 <Mx1_substitute+0x160>
mov    %r15,%rdi
lea    0x18(%rsp),%rdx
xor    %ecx,%ecx
call   1060 <Mx1_is_any_wrap@plt>
cmp    $0x3,%eax
je     13bf <Mx1_substitute+0x26f>
cmp    $0x2,%eax
je     13f2 <Mx1_substitute+0x2a2>
cmp    $0x1,%eax
jne    1425 <Mx1_substitute+0x2d5>
mov    0x18(%rsp),%rdi
call   1040 <strlen@plt>
cltq
add    %rax,0x10(%rsp)
mov    0x18(%rsp),%r8
mov    %r15,%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r12,%rcx
lea    0xdb5(%rip),%r9
push   $0x0
lea    0xdb0(%rip),%rax
jmp    147a <Mx1_substitute+0x32a>
mov    0x8(%rsp),%rax
mov    %rax,%rcx
sub    %r12,%rcx
cmp    $0xfd,%rcx
jg     14ac <Mx1_substitute+0x35c>
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsp)
movb   $0x5c,(%rax)
mov    0x8(%rsp),%rax
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsp)
movb   $0x5c,(%rax)
jmp    11b0 <Mx1_substitute+0x60>
mov    0x8(%rsp),%rax
mov    %rax,%rdx
sub    %r12,%rdx
cmp    $0xff,%rdx
jl     11a5 <Mx1_substitute+0x55>
jmp    14ac <Mx1_substitute+0x35c>
mov    %rsi,%rdi
lea    0xd4e(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
mov    0x10(%rsp),%rdi
lea    0xd44(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1390 <Mx1_substitute+0x240>
mov    0x10(%rsp),%rdi
lea    0xd2e(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1359 <Mx1_substitute+0x209>
mov    0x10(%rsp),%rdi
lea    0xd16(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1359 <Mx1_substitute+0x209>
mov    0x10(%rsp),%rdi
lea    0xcfe(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1359 <Mx1_substitute+0x209>
mov    0x8(%rsp),%rax
mov    %rax,%rcx
sub    %r12,%rcx
cmp    $0xfe,%rcx
jg     14ac <Mx1_substitute+0x35c>
mov    0x10(%rsp),%rcx
movzbl (%rcx),%ecx
jmp    11a5 <Mx1_substitute+0x55>
mov    0x8(%rsp),%rax
mov    %rax,%rcx
sub    %r12,%rcx
cmp    $0xfe,%rcx
jg     14ac <Mx1_substitute+0x35c>
mov    0x10(%rsp),%rcx
movzbl 0x1(%rcx),%ecx
lea    0x1(%rax),%rdx
mov    %rdx,0x8(%rsp)
mov    %cl,(%rax)
addq   $0x1,0x10(%rsp)
jmp    11b0 <Mx1_substitute+0x60>
mov    0x8(%rsp),%rax
mov    %rax,%rcx
sub    %r12,%rcx
cmp    $0xfe,%rcx
jg     14ac <Mx1_substitute+0x35c>
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsp)
movb   $0x2d,(%rax)
addq   $0x7,0x10(%rsp)
jmp    11b0 <Mx1_substitute+0x60>
mov    0x18(%rsp),%rdi
call   1040 <strlen@plt>
cltq
add    %rax,0x10(%rsp)
mov    0x18(%rsp),%r8
mov    %r15,%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r12,%rcx
lea    0xc25(%rip),%r9
push   0x20(%rsp)
jmp    1421 <Mx1_substitute+0x2d1>
mov    0x18(%rsp),%rdi
call   1040 <strlen@plt>
cltq
add    %rax,0x10(%rsp)
mov    0x18(%rsp),%r8
mov    %r15,%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r12,%rcx
lea    0xbf2(%rip),%r9
push   $0x0
push   %r9
jmp    147b <Mx1_substitute+0x32b>
mov    0x10(%rsp),%rdi
lea    0xbd7(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %r14d,%r14d
jne    12c4 <Mx1_substitute+0x174>
test   %rax,%rax
jne    12c4 <Mx1_substitute+0x174>
addq   $0x7,0x10(%rsp)
mov    %r15,%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r12,%rcx
lea    0xb9e(%rip),%r8
lea    0xb9f(%rip),%r9
push   $0x0
lea    0xb98(%rip),%rax
push   %rax
call   1050 <Mx1_rewrap@plt>
add    $0x10,%rsp
test   %eax,%eax
jg     11b0 <Mx1_substitute+0x60>
jmp    149d <Mx1_substitute+0x34d>
mov    0x8(%rsp),%r12
movb   $0x0,(%r12)
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb73(%rip),%rsi
mov    %r15,%rdi
xor    %edx,%edx
call   1070 <Mx1_report_error@plt>
mov    $0xffffffff,%eax
jmp    149d <Mx1_substitute+0x34d>

LLVM IR (-O0):
%struct.Mx1 = type { i32 }
@.str = [4 x i8] c"\\fB\00"
@.str.1 = [4 x i8] c"\\fR\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [8 x i8] c"@email{\00"
@.str.4 = [2 x i8] c"<\00"
@.str.5 = [2 x i8] c">\00"
@.str.6 = [9 x i8] c"@minus{}\00"
@.str.7 = [3 x i8] c"@@\00"
@.str.8 = [3 x i8] c"@{\00"
@.str.9 = [3 x i8] c"@}\00"
@.str.10 = [45 x i8] c"Line length overflow while text substitution\00"
define i32 @Mx1_substitute(%struct.Mx1* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca %struct.Mx1*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i32
store %struct.Mx1* %0, %struct.Mx1** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 0, i32* %18
%19 = load i8*, i8** %10
store i8* %19, i8** %15
%20 = load i8*, i8** %9
store i8* %20, i8** %14
br label %21
21: ; preds = %250, %6
%22 = load i8*, i8** %14
%23 = load i8*, i8** %9
%24 = ptrtoint i8* %22 to i64
%25 = ptrtoint i8* %23 to i64
%26 = sub i64 %24, %25
%27 = load i32, i32* %12
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %26, %28
br i1 %29, label %30, label %35
30: ; preds = %21
%31 = load i8*, i8** %14
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 0
br label %35
35: ; preds = %30, %21
%36 = phi i1 [ false, %21 ], [ %34, %30 ]
br i1 %36, label %37, label %253
37: ; preds = %35
%38 = load i8*, i8** %14
%39 = load i8*, i8** %9
%40 = ptrtoint i8* %38 to i64
%41 = ptrtoint i8* %39 to i64
%42 = sub i64 %40, %41
%43 = load i32, i32* %11
%44 = sext i32 %43 to i64
%45 = icmp slt i64 %42, %44
br i1 %45, label %46, label %51
46: ; preds = %37
%47 = load i8*, i8** %14
%48 = load i8, i8* %47
%49 = load i8*, i8** %15
%50 = getelementptr inbounds i8, i8* %49, i32 1
store i8* %50, i8** %15
store i8 %48, i8* %49
br label %250
51: ; preds = %37
%52 = load i8*, i8** %14
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 64
br i1 %55, label %56, label %211
56: ; preds = %51
store i32 0, i32* %18
%57 = load i32, i32* %13
%58 = and i32 %57, 1
%59 = icmp ne i32 %58, 0
br i1 %59, label %64, label %60
60: ; preds = %56
%61 = load %struct.Mx1*, %struct.Mx1** %8
%62 = load i8*, i8** %14
%63 = call i32 @Mx1_is_any_wrap(%struct.Mx1* %61, i8* %62, i8** %16, i32 0)
store i32 %63, i32* %18
br label %64
64: ; preds = %60, %56
%65 = load i32, i32* %18
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %84
67: ; preds = %64
%68 = load i8*, i8** %16
%69 = call i32 @strlen(i8* %68)
%70 = load i8*, i8** %14
%71 = sext i32 %69 to i64
%72 = getelementptr inbounds i8, i8* %70, i64 %71
store i8* %72, i8** %14
%73 = load %struct.Mx1*, %struct.Mx1** %8
%74 = load i8*, i8** %10
%75 = load i8*, i8** %16
%76 = load i32, i32* %13
%77 = and i32 %76, 1
%78 = call i32 @Mx1_rewrap(%struct.Mx1* %73, i8** %14, i8** %15, i8* %74, i8* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %77)
store i32 %78, i32* %17
%79 = load i32, i32* %17
%80 = icmp sle i32 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %67
%82 = load i32, i32* %17
store i32 %82, i32* %7
br label %255
83: ; preds = %67
br label %210
84: ; preds = %64
%85 = load i32, i32* %18
%86 = icmp eq i32 %85, 2
br i1 %86, label %87, label %104
87: ; preds = %84
%88 = load i8*, i8** %16
%89 = call i32 @strlen(i8* %88)
%90 = load i8*, i8** %14
%91 = sext i32 %89 to i64
%92 = getelementptr inbounds i8, i8* %90, i64 %91
store i8* %92, i8** %14
%93 = load %struct.Mx1*, %struct.Mx1** %8
%94 = load i8*, i8** %10
%95 = load i8*, i8** %16
%96 = load i32, i32* %13
%97 = and i32 %96, 1
%98 = call i32 @Mx1_rewrap(%struct.Mx1* %93, i8** %14, i8** %15, i8* %94, i8* %95, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %97)
store i32 %98, i32* %17
%99 = load i32, i32* %17
%100 = icmp sle i32 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %87
%102 = load i32, i32* %17
store i32 %102, i32* %7
br label %255
103: ; preds = %87
br label %209
104: ; preds = %84
%105 = load i32, i32* %18
%106 = icmp eq i32 %105, 3
br i1 %106, label %107, label %125
107: ; preds = %104
%108 = load i8*, i8** %16
%109 = call i32 @strlen(i8* %108)
%110 = load i8*, i8** %14
%111 = sext i32 %109 to i64
%112 = getelementptr inbounds i8, i8* %110, i64 %111
store i8* %112, i8** %14
%113 = load %struct.Mx1*, %struct.Mx1** %8
%114 = load i8*, i8** %10
%115 = load i8*, i8** %16
%116 = load i32, i32* %13
%117 = and i32 %116, 1
%118 = or i32 %117, 2
%119 = call i32 @Mx1_rewrap(%struct.Mx1* %113, i8** %14, i8** %15, i8* %114, i8* %115, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %118)
store i32 %119, i32* %17
%120 = load i32, i32* %17
%121 = icmp sle i32 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %107
%123 = load i32, i32* %17
store i32 %123, i32* %7
br label %255
124: ; preds = %107
br label %208
125: ; preds = %104
%126 = load i8*, i8** %14
%127 = call i64 @strncmp(i8* %126, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%128 = icmp eq i64 %127, 0
br i1 %128, label %129, label %144
129: ; preds = %125
%130 = load i32, i32* %13
%131 = and i32 %130, 1
%132 = icmp ne i32 %131, 0
br i1 %132, label %144, label %133
133: ; preds = %129
%134 = load i8*, i8** %14
%135 = getelementptr inbounds i8, i8* %134, i64 7
store i8* %135, i8** %14
%136 = load %struct.Mx1*, %struct.Mx1** %8
%137 = load i8*, i8** %10
%138 = call i32 @Mx1_rewrap(%struct.Mx1* %136, i8** %14, i8** %15, i8* %137, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 0)
store i32 %138, i32* %17
%139 = load i32, i32* %17
%140 = icmp sle i32 %139, 0
br i1 %140, label %141, label %143
141: ; preds = %133
%142 = load i32, i32* %17
store i32 %142, i32* %7
br label %255
143: ; preds = %133
br label %207
144: ; preds = %129, %125
%145 = load i8*, i8** %14
%146 = call i64 @strncmp(i8* %145, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%147 = icmp eq i64 %146, 0
br i1 %147, label %148, label %162
148: ; preds = %144
%149 = load i8*, i8** %15
%150 = load i8*, i8** %10
%151 = ptrtoint i8* %149 to i64
%152 = ptrtoint i8* %150 to i64
%153 = sub i64 %151, %152
%154 = add nsw i64 %153, 1
%155 = icmp sgt i64 %154, 255
br i1 %155, label %156, label %157
156: ; preds = %148
br label %239
157: ; preds = %148
%158 = load i8*, i8** %15
%159 = getelementptr inbounds i8, i8* %158, i32 1
store i8* %159, i8** %15
store i8 45, i8* %158
%160 = load i8*, i8** %14
%161 = getelementptr inbounds i8, i8* %160, i64 7
store i8* %161, i8** %14
br label %206
162: ; preds = %144
%163 = load i8*, i8** %14
%164 = call i64 @strncmp(i8* %163, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%165 = icmp eq i64 %164, 0
br i1 %165, label %174, label %166
166: ; preds = %162
%167 = load i8*, i8** %14
%168 = call i64 @strncmp(i8* %167, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%169 = icmp eq i64 %168, 0
br i1 %169, label %174, label %170
170: ; preds = %166
%171 = load i8*, i8** %14
%172 = call i64 @strncmp(i8* %171, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%173 = icmp eq i64 %172, 0
br i1 %173, label %174, label %191
174: ; preds = %170, %166, %162
%175 = load i8*, i8** %15
%176 = load i8*, i8** %10
%177 = ptrtoint i8* %175 to i64
%178 = ptrtoint i8* %176 to i64
%179 = sub i64 %177, %178
%180 = add nsw i64 %179, 1
%181 = icmp sgt i64 %180, 255
br i1 %181, label %182, label %183
182: ; preds = %174
br label %239
183: ; preds = %174
%184 = load i8*, i8** %14
%185 = getelementptr inbounds i8, i8* %184, i64 1
%186 = load i8, i8* %185
%187 = load i8*, i8** %15
%188 = getelementptr inbounds i8, i8* %187, i32 1
store i8* %188, i8** %15
store i8 %186, i8* %187
%189 = load i8*, i8** %14
%190 = getelementptr inbounds i8, i8* %189, i32 1
store i8* %190, i8** %14
br label %205
191: ; preds = %170
%192 = load i8*, i8** %15
%193 = load i8*, i8** %10
%194 = ptrtoint i8* %192 to i64
%195 = ptrtoint i8* %193 to i64
%196 = sub i64 %194, %195
%197 = add nsw i64 %196, 1
%198 = icmp sgt i64 %197, 255
br i1 %198, label %199, label %200
199: ; preds = %191
br label %239
200: ; preds = %191
%201 = load i8*, i8** %14
%202 = load i8, i8* %201
%203 = load i8*, i8** %15
%204 = getelementptr inbounds i8, i8* %203, i32 1
store i8* %204, i8** %15
store i8 %202, i8* %203
br label %205
205: ; preds = %200, %183
br label %206
206: ; preds = %205, %157
br label %207
207: ; preds = %206, %143
br label %208
208: ; preds = %207, %124
br label %209
209: ; preds = %208, %103
br label %210
210: ; preds = %209, %83
br label %249
211: ; preds = %51
%212 = load i8*, i8** %14
%213 = load i8, i8* %212
%214 = sext i8 %213 to i32
%215 = icmp eq i32 %214, 92
br i1 %215, label %216, label %230
216: ; preds = %211
%217 = load i8*, i8** %15
%218 = load i8*, i8** %10
%219 = ptrtoint i8* %217 to i64
%220 = ptrtoint i8* %218 to i64
%221 = sub i64 %219, %220
%222 = add nsw i64 %221, 2
%223 = icmp sgt i64 %222, 255
br i1 %223, label %224, label %225
224: ; preds = %216
br label %239
225: ; preds = %216
%226 = load i8*, i8** %15
%227 = getelementptr inbounds i8, i8* %226, i32 1
store i8* %227, i8** %15
store i8 92, i8* %226
%228 = load i8*, i8** %15
%229 = getelementptr inbounds i8, i8* %228, i32 1
store i8* %229, i8** %15
store i8 92, i8* %228
br label %248
230: ; preds = %211
%231 = load i8*, i8** %15
%232 = load i8*, i8** %10
%233 = ptrtoint i8* %231 to i64
%234 = ptrtoint i8* %232 to i64
%235 = sub i64 %233, %234
%236 = add nsw i64 %235, 1
%237 = icmp sgt i64 %236, 255
br i1 %237, label %238, label %242
238: ; preds = %230
br label %239
239: ; preds = %238, %224, %199, %182, %156
%240 = load %struct.Mx1*, %struct.Mx1** %8
%241 = call i32 @Mx1_report_error(%struct.Mx1* %240, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i32 0)
store i32 -1, i32* %7
br label %255
242: ; preds = %230
%243 = load i8*, i8** %14
%244 = load i8, i8* %243
%245 = load i8*, i8** %15
%246 = getelementptr inbounds i8, i8* %245, i32 1
store i8* %246, i8** %15
store i8 %244, i8* %245
br label %247
247: ; preds = %242
br label %248
248: ; preds = %247, %225
br label %249
249: ; preds = %248, %210
br label %250
250: ; preds = %249, %46
%251 = load i8*, i8** %14
%252 = getelementptr inbounds i8, i8* %251, i32 1
store i8* %252, i8** %14
br label %21
253: ; preds = %35
%254 = load i8*, i8** %15
store i8 0, i8* %254
store i32 1, i32* %7
br label %255
255: ; preds = %253, %239, %141, %122, %101, %81
%256 = load i32, i32* %7
ret i32 %256
}

LLVM IR (-O2):
%struct.Mx1 = type { i32 }
@.str = [4 x i8] c"\\fB\00"
@.str.1 = [4 x i8] c"\\fR\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [8 x i8] c"@email{\00"
@.str.4 = [2 x i8] c"<\00"
@.str.5 = [2 x i8] c">\00"
@.str.6 = [9 x i8] c"@minus{}\00"
@.str.7 = [3 x i8] c"@@\00"
@.str.8 = [3 x i8] c"@{\00"
@.str.9 = [3 x i8] c"@}\00"
@.str.10 = [45 x i8] c"Line length overflow while text substitution\00"
define i32 @Mx1_substitute(%struct.Mx1* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = bitcast i8** %7 to i8*
%11 = bitcast i8** %8 to i8*
%12 = bitcast i8** %9 to i8*
store i8* %2, i8** %8
%13 = ptrtoint i8* %1 to i64
%14 = sext i32 %4 to i64
store i8* %1, i8** %7
%15 = icmp sgt i32 %4, 0
br i1 %15, label %16, label %147
16: ; preds = %6
%17 = sext i32 %3 to i64
%18 = ptrtoint i8* %2 to i64
%19 = and i32 %5, 1
%20 = icmp eq i32 %19, 0
%21 = or i32 %19, 2
br label %22
22: ; preds = %16, %139
%23 = phi i64 [ 0, %16 ], [ %143, %139 ]
%24 = phi i8* [ %1, %16 ], [ %141, %139 ]
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 0
br i1 %26, label %145, label %27
27: ; preds = %22
%28 = icmp slt i64 %23, %17
br i1 %28, label %29, label %32
29: ; preds = %27
%30 = load i8*, i8** %8
%31 = getelementptr inbounds i8, i8* %30, i64 1
store i8* %31, i8** %8
store i8 %25, i8* %30
br label %139
32: ; preds = %27
switch i8 %25, label %130 [
i8 64, label %33
i8 92, label %121
]
33: ; preds = %32
br i1 %20, label %36, label %34
34: ; preds = %33
%35 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
br label %75
36: ; preds = %33
%37 = call i32 @Mx1_is_any_wrap(%struct.Mx1* %0, i8* %24, i8** %9, i32 0)
switch i32 %37, label %65 [
i32 1, label %38
i32 2, label %47
i32 3, label %56
]
38: ; preds = %36
%39 = load i8*, i8** %9
%40 = call i32 @strlen(i8* %39)
%41 = load i8*, i8** %7
%42 = sext i32 %40 to i64
%43 = getelementptr inbounds i8, i8* %41, i64 %42
store i8* %43, i8** %7
%44 = load i8*, i8** %9
%45 = call i32 @Mx1_rewrap(%struct.Mx1* %0, i8** %7, i8** %8, i8* %2, i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%46 = icmp slt i32 %45, 1
br i1 %46, label %149, label %139
47: ; preds = %36
%48 = load i8*, i8** %9
%49 = call i32 @strlen(i8* %48)
%50 = load i8*, i8** %7
%51 = sext i32 %49 to i64
%52 = getelementptr inbounds i8, i8* %50, i64 %51
store i8* %52, i8** %7
%53 = load i8*, i8** %9
%54 = call i32 @Mx1_rewrap(%struct.Mx1* %0, i8** %7, i8** %8, i8* %2, i8* %53, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
%55 = icmp slt i32 %54, 1
br i1 %55, label %149, label %139
56: ; preds = %36
%57 = load i8*, i8** %9
%58 = call i32 @strlen(i8* %57)
%59 = load i8*, i8** %7
%60 = sext i32 %58 to i64
%61 = getelementptr inbounds i8, i8* %59, i64 %60
store i8* %61, i8** %7
%62 = load i8*, i8** %9
%63 = call i32 @Mx1_rewrap(%struct.Mx1* %0, i8** %7, i8** %8, i8* %2, i8* %62, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%64 = icmp slt i32 %63, 1
br i1 %64, label %149, label %139
65: ; preds = %36
%66 = load i8*, i8** %7
%67 = call i64 @strncmp(i8* %66, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%68 = icmp eq i64 %67, 0
%69 = and i1 %20, %68
br i1 %69, label %70, label %75
70: ; preds = %65
%71 = load i8*, i8** %7
%72 = getelementptr inbounds i8, i8* %71, i64 7
store i8* %72, i8** %7
%73 = call i32 @Mx1_rewrap(%struct.Mx1* %0, i8** %7, i8** %8, i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 0)
%74 = icmp slt i32 %73, 1
br i1 %74, label %149, label %139
75: ; preds = %34, %65
%76 = load i8*, i8** %7
%77 = call i64 @strncmp(i8* %76, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %88
79: ; preds = %75
%80 = load i8*, i8** %8
%81 = ptrtoint i8* %80 to i64
%82 = sub i64 %81, %18
%83 = icmp sgt i64 %82, 254
br i1 %83, label %135, label %84
84: ; preds = %79
%85 = getelementptr inbounds i8, i8* %80, i64 1
store i8* %85, i8** %8
store i8 45, i8* %80
%86 = load i8*, i8** %7
%87 = getelementptr inbounds i8, i8* %86, i64 7
store i8* %87, i8** %7
br label %139
88: ; preds = %75
%89 = load i8*, i8** %7
%90 = call i64 @strncmp(i8* %89, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%91 = icmp eq i64 %90, 0
br i1 %91, label %100, label %92
92: ; preds = %88
%93 = load i8*, i8** %7
%94 = call i64 @strncmp(i8* %93, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%95 = icmp eq i64 %94, 0
br i1 %95, label %100, label %96
96: ; preds = %92
%97 = load i8*, i8** %7
%98 = call i64 @strncmp(i8* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %112
100: ; preds = %96, %92, %88
%101 = load i8*, i8** %8
%102 = ptrtoint i8* %101 to i64
%103 = sub i64 %102, %18
%104 = icmp sgt i64 %103, 254
br i1 %104, label %135, label %105
105: ; preds = %100
%106 = load i8*, i8** %7
%107 = getelementptr inbounds i8, i8* %106, i64 1
%108 = load i8, i8* %107
%109 = getelementptr inbounds i8, i8* %101, i64 1
store i8* %109, i8** %8
store i8 %108, i8* %101
%110 = load i8*, i8** %7
%111 = getelementptr inbounds i8, i8* %110, i64 1
store i8* %111, i8** %7
br label %139
112: ; preds = %96
%113 = load i8*, i8** %8
%114 = ptrtoint i8* %113 to i64
%115 = sub i64 %114, %18
%116 = icmp sgt i64 %115, 254
br i1 %116, label %135, label %117
117: ; preds = %112
%118 = load i8*, i8** %7
%119 = load i8, i8* %118
%120 = getelementptr inbounds i8, i8* %113, i64 1
store i8* %120, i8** %8
store i8 %119, i8* %113
br label %139
121: ; preds = %32
%122 = load i8*, i8** %8
%123 = ptrtoint i8* %122 to i64
%124 = sub i64 %123, %18
%125 = icmp sgt i64 %124, 253
br i1 %125, label %135, label %126
126: ; preds = %121
%127 = getelementptr inbounds i8, i8* %122, i64 1
store i8* %127, i8** %8
store i8 92, i8* %122
%128 = load i8*, i8** %8
%129 = getelementptr inbounds i8, i8* %128, i64 1
store i8* %129, i8** %8
store i8 92, i8* %128
br label %139
130: ; preds = %32
%131 = load i8*, i8** %8
%132 = ptrtoint i8* %131 to i64
%133 = sub i64 %132, %18
%134 = icmp sgt i64 %133, 254
br i1 %134, label %135, label %137
135: ; preds = %130, %121, %112, %100, %79
%136 = call i32 @Mx1_report_error(%struct.Mx1* %0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i32 0)
br label %149
137: ; preds = %130
%138 = getelementptr inbounds i8, i8* %131, i64 1
store i8* %138, i8** %8
store i8 %25, i8* %131
br label %139
139: ; preds = %47, %70, %105, %117, %84, %56, %38, %137, %126, %29
%140 = load i8*, i8** %7
%141 = getelementptr inbounds i8, i8* %140, i64 1
store i8* %141, i8** %7
%142 = ptrtoint i8* %141 to i64
%143 = sub i64 %142, %13
%144 = icmp slt i64 %143, %14
br i1 %144, label %22, label %145
145: ; preds = %139, %22
%146 = load i8*, i8** %8
br label %147
147: ; preds = %145, %6
%148 = phi i8* [ %146, %145 ], [ %2, %6 ]
store i8 0, i8* %148
br label %149
149: ; preds = %70, %56, %47, %38, %147, %135
%150 = phi i32 [ -1, %135 ], [ 1, %147 ], [ %73, %70 ], [ %63, %56 ], [ %54, %47 ], [ %45, %38 ]
ret i32 %150
}