#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int rm_so;
  int rm_eo;
};
typedef TYPE_1__ regmatch_t;
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
scalar_t__ regexec(int /*<<< orphan*/ *, char *, int, TYPE_1__ *,
                   int /*<<< orphan*/);
int strlen(char *);
int replace(char *buf, int size, regex_t *regex, char *replacement) {
  char *position;
  int match_length = 0;
  regmatch_t match[200];
  int rep_offset, exp_length;
  if (regexec(regex, buf, 200, match, 0))
    return 0;
  for (position = replacement; *position; position++)
    if (*position == '\\' && *(position + 1) > '0' && *(position + 1) <= '9') {
      rep_offset = match[*(position + 1) - 48].rm_so;
      exp_length = match[*(position + 1) - 48].rm_eo - rep_offset;
      if (rep_offset < 0 || strlen(replacement) + exp_length - 1 > size)
        break;
      memmove(position + exp_length, position + 2, strlen(position) - 1);
      memmove(position, buf + rep_offset, exp_length);
      position = position + exp_length - 2;
    }
  for (position = buf; !regexec(regex, position, 1, match, 0);) {
    match_length = match[0].rm_eo - match[0].rm_so;
    position += match[0].rm_so;
    memmove(position + strlen(replacement), position + match_length,
            strlen(position) - match_length + 1);
    memmove(position, replacement, strlen(replacement));
    position += strlen(replacement);
  }
  if (match_length > 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6c0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x680(%rbp),%rcx
mov    $0xc8,%edx
xor    %r8d,%r8d
call   1040 <regexec@plt>
cmp    $0x0,%rax
je     1183 <replace+0x53>
movl   $0x0,-0x4(%rbp)
jmp    13eb <replace+0x2bb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     12bf <replace+0x18f>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    12a9 <replace+0x179>
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
jle    12a9 <replace+0x179>
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x39,%eax
jg     12a9 <replace+0x179>
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x30,%eax
cltq
mov    -0x680(%rbp,%rax,8),%eax
mov    %eax,-0x684(%rbp)
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x30,%eax
cltq
mov    -0x67c(%rbp,%rax,8),%eax
sub    -0x684(%rbp),%eax
mov    %eax,-0x688(%rbp)
cmpl   $0x0,-0x684(%rbp)
jl     122c <replace+0xfc>
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x688(%rbp),%eax
sub    $0x1,%eax
cmp    -0x14(%rbp),%eax
jle    1231 <replace+0x101>
jmp    12bf <replace+0x18f>
mov    -0x30(%rbp),%rax
movslq -0x688(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x698(%rbp)
mov    -0x30(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x690(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x698(%rbp),%rdi
mov    -0x690(%rbp),%rsi
mov    %eax,%edx
sub    $0x1,%edx
call   1050 <memmove@plt>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x684(%rbp),%rax
add    %rax,%rsi
mov    -0x688(%rbp),%edx
call   1050 <memmove@plt>
mov    -0x30(%rbp),%rax
movslq -0x688(%rbp),%rcx
add    %rcx,%rax
add    $0xfffffffffffffffe,%rax
mov    %rax,-0x30(%rbp)
jmp    12ae <replace+0x17e>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    118b <replace+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x680(%rbp),%rcx
mov    $0x1,%edx
xor    %r8d,%r8d
call   1040 <regexec@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12f9 <replace+0x1c9>
jmp    13ce <replace+0x29e>
mov    -0x67c(%rbp),%eax
sub    -0x680(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x680(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x6c0(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x6c0(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x6b8(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x6b0(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x6b8(%rbp),%rdi
mov    -0x6b0(%rbp),%rsi
mov    %eax,%edx
sub    -0x34(%rbp),%edx
add    $0x1,%edx
call   1050 <memmove@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x6a8(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x6a0(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x6a8(%rbp),%rdi
mov    -0x6a0(%rbp),%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    12c7 <replace+0x197>
cmpl   $0x0,-0x34(%rbp)
jle    13e4 <replace+0x2b4>
movl   $0x1,-0x4(%rbp)
jmp    13eb <replace+0x2bb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x668,%rsp
mov    %rcx,%r12
mov    %rdx,%rbp
mov    %esi,%r15d
mov    %rdi,%r13
lea    0x20(%rsp),%rcx
xor    %ebx,%ebx
mov    %rdx,%rdi
mov    %r13,%rsi
mov    $0xc8,%edx
xor    %r8d,%r8d
call   1040 <regexec@plt>
test   %rax,%rax
jne    12d2 <replace+0x1a2>
mov    %rbp,0x10(%rsp)
mov    %r12,%rbp
mov    %r12,0x18(%rsp)
mov    %r15d,0xc(%rsp)
jmp    119c <replace+0x6c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %al,%al
je     121e <replace+0xee>
add    $0x1,%rbp
movzbl 0x0(%rbp),%eax
cmp    $0x5c,%al
jne    1190 <replace+0x60>
movzbl 0x1(%rbp),%eax
lea    -0x31(%rax),%ecx
cmp    $0x8,%cl
ja     1198 <replace+0x68>
add    $0xffffffd0,%eax
movslq 0x20(%rsp,%rax,8),%r14
test   %r14,%r14
js     121e <replace+0xee>
movslq 0x24(%rsp,%rax,8),%rbx
sub    %r14,%rbx
mov    %r12,%rdi
call   1030 <strlen@plt>
add    %ebx,%eax
add    $0xffffffff,%eax
cmp    %r15d,%eax
jg     121e <replace+0xee>
mov    %r14d,%r12d
lea    (%rbx,%rbp,1),%r14
lea    0x2(%rbp),%r15
mov    %rbp,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %r14,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%r15d
call   1050 <memmove@plt>
add    %r13,%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    0x18(%rsp),%r12
mov    %ebx,%edx
call   1050 <memmove@plt>
add    %rbx,%rbp
add    $0xfffffffffffffffe,%rbp
jmp    1198 <replace+0x68>
lea    0x20(%rsp),%rcx
xor    %ebx,%ebx
mov    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x1,%edx
xor    %r8d,%r8d
call   1040 <regexec@plt>
test   %rax,%rax
jne    12d2 <replace+0x1a2>
cs nopw 0x0(%rax,%rax,1)
movslq 0x24(%rsp),%rbp
movslq 0x20(%rsp),%rax
sub    %rax,%rbp
add    %rax,%r13
mov    %r12,%rdi
call   1030 <strlen@plt>
movslq %eax,%r15
add    %r13,%r15
mov    %rbp,%rbx
add    %r13,%rbx
mov    %r13,%rdi
call   1030 <strlen@plt>
sub    %ebp,%eax
lea    0x1(%rax),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <memmove@plt>
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
add    %rax,%r13
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x1,%edx
lea    0x20(%rsp),%rcx
xor    %r8d,%r8d
call   1040 <regexec@plt>
test   %rax,%rax
je     1250 <replace+0x120>
xor    %ebx,%ebx
test   %ebp,%ebp
setg   %bl
mov    %ebx,%eax
add    $0x668,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i32 @replace(i8* %0, i32 %1, i32* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca [200 x %struct.TYPE_3__]
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i8* %3, i8** %9
store i32 0, i32* %11
%15 = load i32*, i32** %8
%16 = load i8*, i8** %6
%17 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 0
%18 = call i64 @regexec(i32* %15, i8* %16, i32 200, %struct.TYPE_3__* %17, i32 0)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %4
store i32 0, i32* %5
br label %156
21: ; preds = %4
%22 = load i8*, i8** %9
store i8* %22, i8** %10
br label %23
23: ; preds = %100, %21
%24 = load i8*, i8** %10
%25 = load i8, i8* %24
%26 = icmp ne i8 %25, 0
br i1 %26, label %27, label %103
27: ; preds = %23
%28 = load i8*, i8** %10
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 92
br i1 %31, label %32, label %99
32: ; preds = %27
%33 = load i8*, i8** %10
%34 = getelementptr inbounds i8, i8* %33, i64 1
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp sgt i32 %36, 48
br i1 %37, label %38, label %99
38: ; preds = %32
%39 = load i8*, i8** %10
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp sle i32 %42, 57
br i1 %43, label %44, label %99
44: ; preds = %38
%45 = load i8*, i8** %10
%46 = getelementptr inbounds i8, i8* %45, i64 1
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = sub nsw i32 %48, 48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 %50
%52 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %51, i32 0, i32 0
%53 = load i32, i32* %52
store i32 %53, i32* %13
%54 = load i8*, i8** %10
%55 = getelementptr inbounds i8, i8* %54, i64 1
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = sub nsw i32 %57, 48
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 %59
%61 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %60, i32 0, i32 1
%62 = load i32, i32* %61
%63 = load i32, i32* %13
%64 = sub nsw i32 %62, %63
store i32 %64, i32* %14
%65 = load i32, i32* %13
%66 = icmp slt i32 %65, 0
br i1 %66, label %75, label %67
67: ; preds = %44
%68 = load i8*, i8** %9
%69 = call i32 @strlen(i8* %68)
%70 = load i32, i32* %14
%71 = add nsw i32 %69, %70
%72 = sub nsw i32 %71, 1
%73 = load i32, i32* %7
%74 = icmp sgt i32 %72, %73
br i1 %74, label %75, label %76
75: ; preds = %67, %44
br label %103
76: ; preds = %67
%77 = load i8*, i8** %10
%78 = load i32, i32* %14
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8, i8* %77, i64 %79
%81 = load i8*, i8** %10
%82 = getelementptr inbounds i8, i8* %81, i64 2
%83 = load i8*, i8** %10
%84 = call i32 @strlen(i8* %83)
%85 = sub nsw i32 %84, 1
%86 = call i32 @memmove(i8* %80, i8* %82, i32 %85)
%87 = load i8*, i8** %10
%88 = load i8*, i8** %6
%89 = load i32, i32* %13
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i32, i32* %14
%93 = call i32 @memmove(i8* %87, i8* %91, i32 %92)
%94 = load i8*, i8** %10
%95 = load i32, i32* %14
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %94, i64 %96
%98 = getelementptr inbounds i8, i8* %97, i64 -2
store i8* %98, i8** %10
br label %99
99: ; preds = %76, %38, %32, %27
br label %100
100: ; preds = %99
%101 = load i8*, i8** %10
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %10
br label %23
103: ; preds = %75, %23
%104 = load i8*, i8** %6
store i8* %104, i8** %10
br label %105
105: ; preds = %112, %103
%106 = load i32*, i32** %8
%107 = load i8*, i8** %10
%108 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 0
%109 = call i64 @regexec(i32* %106, i8* %107, i32 1, %struct.TYPE_3__* %108, i32 0)
%110 = icmp ne i64 %109, 0
%111 = xor i1 %110, true
br i1 %111, label %112, label %151
112: ; preds = %105
%113 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 0
%114 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %113, i32 0, i32 1
%115 = load i32, i32* %114
%116 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 0
%117 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %116, i32 0, i32 0
%118 = load i32, i32* %117
%119 = sub nsw i32 %115, %118
store i32 %119, i32* %11
%120 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %12, i64 0, i64 0
%121 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %120, i32 0, i32 0
%122 = load i32, i32* %121
%123 = load i8*, i8** %10
%124 = sext i32 %122 to i64
%125 = getelementptr inbounds i8, i8* %123, i64 %124
store i8* %125, i8** %10
%126 = load i8*, i8** %10
%127 = load i8*, i8** %9
%128 = call i32 @strlen(i8* %127)
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i8, i8* %126, i64 %129
%131 = load i8*, i8** %10
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %131, i64 %133
%135 = load i8*, i8** %10
%136 = call i32 @strlen(i8* %135)
%137 = load i32, i32* %11
%138 = sub nsw i32 %136, %137
%139 = add nsw i32 %138, 1
%140 = call i32 @memmove(i8* %130, i8* %134, i32 %139)
%141 = load i8*, i8** %10
%142 = load i8*, i8** %9
%143 = load i8*, i8** %9
%144 = call i32 @strlen(i8* %143)
%145 = call i32 @memmove(i8* %141, i8* %142, i32 %144)
%146 = load i8*, i8** %9
%147 = call i32 @strlen(i8* %146)
%148 = load i8*, i8** %10
%149 = sext i32 %147 to i64
%150 = getelementptr inbounds i8, i8* %148, i64 %149
store i8* %150, i8** %10
br label %105
151: ; preds = %105
%152 = load i32, i32* %11
%153 = icmp sgt i32 %152, 0
br i1 %153, label %154, label %155
154: ; preds = %151
store i32 1, i32* %5
br label %156
155: ; preds = %151
store i32 0, i32* %5
br label %156
156: ; preds = %155, %154, %20
%157 = load i32, i32* %5
ret i32 %157
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
define i32 @replace(i8* %0, i32 %1, i32* %2, i8* %3) {
%5 = alloca [200 x %struct.TYPE_3__]
%6 = bitcast [200 x %struct.TYPE_3__]* %5 to i8*
%7 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %5, i64 0, i64 0
%8 = call i64 @regexec(i32* %2, i8* %0, i32 200, %struct.TYPE_3__* %7, i32 0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %79
10: ; preds = %4, %44
%11 = phi i8* [ %46, %44 ], [ %3, %4 ]
%12 = load i8, i8* %11
switch i8 %12, label %44 [
i8 0, label %47
i8 92, label %13
]
13: ; preds = %10
%14 = getelementptr inbounds i8, i8* %11, i64 1
%15 = load i8, i8* %14
%16 = add i8 %15, -49
%17 = icmp ult i8 %16, 9
br i1 %17, label %18, label %44
18: ; preds = %13
%19 = zext i8 %15 to i64
%20 = add nuw nsw i64 %19, 4294967248
%21 = and i64 %20, 4294967295
%22 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %5, i64 0, i64 %21, i32 0
%23 = load i32, i32* %22
%24 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %5, i64 0, i64 %21, i32 1
%25 = load i32, i32* %24
%26 = sub nsw i32 %25, %23
%27 = icmp slt i32 %23, 0
br i1 %27, label %47, label %28
28: ; preds = %18
%29 = call i32 @strlen(i8* %3)
%30 = add i32 %26, -1
%31 = add i32 %30, %29
%32 = icmp sgt i32 %31, %1
br i1 %32, label %47, label %33
33: ; preds = %28
%34 = sext i32 %26 to i64
%35 = getelementptr inbounds i8, i8* %11, i64 %34
%36 = getelementptr inbounds i8, i8* %11, i64 2
%37 = call i32 @strlen(i8* %11)
%38 = add nsw i32 %37, -1
%39 = call i32 @memmove(i8* %35, i8* %36, i32 %38)
%40 = zext i32 %23 to i64
%41 = getelementptr inbounds i8, i8* %0, i64 %40
%42 = call i32 @memmove(i8* %11, i8* %41, i32 %26)
%43 = getelementptr inbounds i8, i8* %35, i64 -2
br label %44
44: ; preds = %10, %13, %33
%45 = phi i8* [ %43, %33 ], [ %11, %13 ], [ %11, %10 ]
%46 = getelementptr inbounds i8, i8* %45, i64 1
br label %10
47: ; preds = %10, %18, %28
%48 = call i64 @regexec(i32* %2, i8* %0, i32 1, %struct.TYPE_3__* %7, i32 0)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %79
50: ; preds = %47
%51 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %5, i64 0, i64 0, i32 1
%52 = getelementptr inbounds [200 x %struct.TYPE_3__], [200 x %struct.TYPE_3__]* %5, i64 0, i64 0, i32 0
br label %53
53: ; preds = %50, %53
%54 = phi i8* [ %0, %50 ], [ %73, %53 ]
%55 = load i32, i32* %51
%56 = load i32, i32* %52
%57 = sub nsw i32 %55, %56
%58 = sext i32 %56 to i64
%59 = getelementptr inbounds i8, i8* %54, i64 %58
%60 = call i32 @strlen(i8* %3)
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %59, i64 %61
%63 = sext i32 %57 to i64
%64 = getelementptr inbounds i8, i8* %59, i64 %63
%65 = call i32 @strlen(i8* %59)
%66 = sub i32 1, %57
%67 = add i32 %66, %65
%68 = call i32 @memmove(i8* %62, i8* %64, i32 %67)
%69 = call i32 @strlen(i8* %3)
%70 = call i32 @memmove(i8* %59, i8* %3, i32 %69)
%71 = call i32 @strlen(i8* %3)
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %59, i64 %72
%74 = call i64 @regexec(i32* %2, i8* %73, i32 1, %struct.TYPE_3__* %7, i32 0)
%75 = icmp eq i64 %74, 0
br i1 %75, label %53, label %76
76: ; preds = %53
%77 = icmp sgt i32 %57, 0
%78 = zext i1 %77 to i32
br label %79
79: ; preds = %47, %76, %4
%80 = phi i32 [ 0, %4 ], [ 0, %47 ], [ %78, %76 ]
ret i32 %80
}