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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strstr(char *, char *);
int count_matches_v1(char *upstream_sequence, char *motif, int *pos,
                     int mism_pos) {
  char *search_string;
  char current_string[10000];
  int n = 0;
  int motif_length;
  char orig_motif[10];
  int i;
  char alphabet[5];
  alphabet[1] = 97;
  alphabet[2] = 99;
  alphabet[3] = 103;
  alphabet[4] = 116;
  sprintf(orig_motif, motif);
  motif_length = strlen(motif);
  if (mism_pos == 0) {
    strcpy(current_string, upstream_sequence);
    search_string = strstr(current_string, motif);
    while (search_string != NULL) {
      search_string = strstr(current_string, motif);
      if (search_string != NULL) {
        n++;
        pos[n] = strlen(search_string);
        strcpy(current_string, search_string + motif_length);
      }
    }
    return n;
  } else {
    for (i = 1; i <= 4; i++) {
      sprintf(motif, orig_motif);
      motif[motif_length - mism_pos] = alphabet[i];
      strcpy(current_string, upstream_sequence);
      search_string = strstr(current_string, motif);
      while (search_string != NULL) {
        search_string = strstr(current_string, motif);
        if (search_string != NULL) {
          n++;
          pos[n] = strlen(search_string);
          strcpy(current_string, search_string + motif_length);
        }
      }
    }
    return n;
  }
}


x86 assembly (clang, -O0):
<count_matches_v1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2760,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x0,-0x2744(%rbp)
movb   $0x61,-0x275c(%rbp)
movb   $0x63,-0x275b(%rbp)
movb   $0x67,-0x275a(%rbp)
movb   $0x74,-0x2759(%rbp)
lea    -0x2752(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x2748(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    124c <count_matches_v1+0x10c>
lea    -0x2740(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x2740(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     123e <count_matches_v1+0xfe>
lea    -0x2740(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1239 <count_matches_v1+0xf9>
mov    -0x2744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2744(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
mov    -0x20(%rbp),%rax
movslq -0x2744(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2740(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x2748(%rbp),%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
jmp    11cd <count_matches_v1+0x8d>
mov    -0x2744(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    134b <count_matches_v1+0x20b>
movl   $0x1,-0x2758(%rbp)
cmpl   $0x4,-0x2758(%rbp)
jg     1342 <count_matches_v1+0x202>
mov    -0x18(%rbp),%rdi
lea    -0x2752(%rbp),%rsi
call   1050 <sprintf@plt>
movslq -0x2758(%rbp),%rax
mov    -0x275d(%rbp,%rax,1),%dl
mov    -0x18(%rbp),%rax
mov    -0x2748(%rbp),%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
lea    -0x2740(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x2740(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1329 <count_matches_v1+0x1e9>
lea    -0x2740(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1324 <count_matches_v1+0x1e4>
mov    -0x2744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2744(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
mov    -0x20(%rbp),%rax
movslq -0x2744(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
lea    -0x2740(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x2748(%rbp),%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
jmp    12b8 <count_matches_v1+0x178>
jmp    132e <count_matches_v1+0x1ee>
mov    -0x2758(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2758(%rbp)
jmp    1256 <count_matches_v1+0x116>
mov    -0x2744(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2760,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_matches_v1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2748,%rsp
mov    %ecx,%ebx
mov    %rdx,0x8(%rsp)
mov    %rsi,%r15
mov    %rdi,%r12
lea    0x26(%rsp),%rdi
call   1050 <sprintf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %eax,%r13d
test   %ebx,%ebx
je     13e6 <count_matches_v1+0x2a6>
movslq %r13d,%r14
sub    %ebx,%r13d
movslq %r13d,%rbx
lea    0x26(%rsp),%rsi
mov    %r15,%rdi
call   1050 <sprintf@plt>
mov    %rbx,0x18(%rsp)
movb   $0x61,(%r15,%rbx,1)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
xor    %ebx,%ebx
test   %rax,%rax
mov    %r12,0x10(%rsp)
je     1227 <count_matches_v1+0xe7>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1227 <count_matches_v1+0xe7>
mov    %rax,%rbp
xor    %ebx,%ebx
lea    0x30(%rsp),%r13
mov    0x8(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %eax,0x4(%r12,%rbx,4)
add    %r14,%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
add    $0x1,%rbx
test   %rax,%rax
jne    11f0 <count_matches_v1+0xb0>
mov    0x10(%rsp),%r12
lea    0x26(%rsp),%rsi
mov    %r15,%rdi
call   1050 <sprintf@plt>
mov    0x18(%rsp),%rax
movb   $0x63,(%r15,%rax,1)
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     12b0 <count_matches_v1+0x170>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     12b0 <count_matches_v1+0x170>
mov    %rax,%rbp
lea    0x30(%rsp),%r13
mov    0x8(%rsp),%r12
nopl   (%rax)
add    $0x1,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %eax,(%r12,%rbx,4)
add    %r14,%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1280 <count_matches_v1+0x140>
lea    0x26(%rsp),%rsi
mov    %r15,%rdi
call   1050 <sprintf@plt>
mov    0x18(%rsp),%rax
movb   $0x67,(%r15,%rax,1)
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    0x10(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1343 <count_matches_v1+0x203>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1343 <count_matches_v1+0x203>
mov    %rax,%rbp
lea    0x30(%rsp),%r13
mov    0x8(%rsp),%r12
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
movslq %ebx,%rcx
mov    %eax,(%r12,%rcx,4)
add    %r14,%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1310 <count_matches_v1+0x1d0>
lea    0x26(%rsp),%rsi
mov    %r15,%rdi
call   1050 <sprintf@plt>
mov    0x18(%rsp),%rax
movb   $0x74,(%r15,%rax,1)
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    0x10(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1462 <count_matches_v1+0x322>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1462 <count_matches_v1+0x322>
mov    %rax,%rbp
lea    0x30(%rsp),%r12
mov    0x8(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
movslq %ebx,%rcx
mov    %eax,0x0(%r13,%rcx,4)
add    %r14,%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    13b0 <count_matches_v1+0x270>
jmp    1462 <count_matches_v1+0x322>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1462 <count_matches_v1+0x322>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
test   %rax,%rax
mov    0x8(%rsp),%rax
je     1462 <count_matches_v1+0x322>
movslq %r13d,%r14
xor    %ebx,%ebx
lea    0x30(%rsp),%r12
mov    %rax,%r13
nop
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %eax,0x4(%r13,%rbx,4)
add    %r14,%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <strstr@plt>
mov    %rax,%rbp
add    $0x1,%rbx
test   %rax,%rax
jne    1430 <count_matches_v1+0x2f0>
mov    %ebx,%eax
add    $0x2748,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @count_matches_v1(i8* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca [10000 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca [10 x i8]
%15 = alloca i32
%16 = alloca [5 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 0, i32* %12
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 1
store i8 97, i8* %17
%18 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 2
store i8 99, i8* %18
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 3
store i8 103, i8* %19
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 4
store i8 116, i8* %20
%21 = getelementptr inbounds [10 x i8], [10 x i8]* %14, i64 0, i64 0
%22 = load i8*, i8** %7
%23 = call i32 @sprintf(i8* %21, i8* %22)
%24 = load i8*, i8** %7
%25 = call i32 @strlen(i8* %24)
store i32 %25, i32* %13
%26 = load i32, i32* %9
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %62
28: ; preds = %4
%29 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%30 = load i8*, i8** %6
%31 = call i32 @strcpy(i8* %29, i8* %30)
%32 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%33 = load i8*, i8** %7
%34 = call i8* @strstr(i8* %32, i8* %33)
store i8* %34, i8** %10
br label %35
35: ; preds = %59, %28
%36 = load i8*, i8** %10
%37 = icmp ne i8* %36, null
br i1 %37, label %38, label %60
38: ; preds = %35
%39 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%40 = load i8*, i8** %7
%41 = call i8* @strstr(i8* %39, i8* %40)
store i8* %41, i8** %10
%42 = load i8*, i8** %10
%43 = icmp ne i8* %42, null
br i1 %43, label %44, label %59
44: ; preds = %38
%45 = load i32, i32* %12
%46 = add nsw i32 %45, 1
store i32 %46, i32* %12
%47 = load i8*, i8** %10
%48 = call i32 @strlen(i8* %47)
%49 = load i32*, i32** %8
%50 = load i32, i32* %12
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i32, i32* %49, i64 %51
store i32 %48, i32* %52
%53 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%54 = load i8*, i8** %10
%55 = load i32, i32* %13
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %54, i64 %56
%58 = call i32 @strcpy(i8* %53, i8* %57)
br label %59
59: ; preds = %44, %38
br label %35
60: ; preds = %35
%61 = load i32, i32* %12
store i32 %61, i32* %5
br label %117
62: ; preds = %4
store i32 1, i32* %15
br label %63
63: ; preds = %112, %62
%64 = load i32, i32* %15
%65 = icmp sle i32 %64, 4
br i1 %65, label %66, label %115
66: ; preds = %63
%67 = load i8*, i8** %7
%68 = getelementptr inbounds [10 x i8], [10 x i8]* %14, i64 0, i64 0
%69 = call i32 @sprintf(i8* %67, i8* %68)
%70 = load i32, i32* %15
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 %71
%73 = load i8, i8* %72
%74 = load i8*, i8** %7
%75 = load i32, i32* %13
%76 = load i32, i32* %9
%77 = sub nsw i32 %75, %76
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8, i8* %74, i64 %78
store i8 %73, i8* %79
%80 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%81 = load i8*, i8** %6
%82 = call i32 @strcpy(i8* %80, i8* %81)
%83 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%84 = load i8*, i8** %7
%85 = call i8* @strstr(i8* %83, i8* %84)
store i8* %85, i8** %10
br label %86
86: ; preds = %110, %66
%87 = load i8*, i8** %10
%88 = icmp ne i8* %87, null
br i1 %88, label %89, label %111
89: ; preds = %86
%90 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%91 = load i8*, i8** %7
%92 = call i8* @strstr(i8* %90, i8* %91)
store i8* %92, i8** %10
%93 = load i8*, i8** %10
%94 = icmp ne i8* %93, null
br i1 %94, label %95, label %110
95: ; preds = %89
%96 = load i32, i32* %12
%97 = add nsw i32 %96, 1
store i32 %97, i32* %12
%98 = load i8*, i8** %10
%99 = call i32 @strlen(i8* %98)
%100 = load i32*, i32** %8
%101 = load i32, i32* %12
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i32, i32* %100, i64 %102
store i32 %99, i32* %103
%104 = getelementptr inbounds [10000 x i8], [10000 x i8]* %11, i64 0, i64 0
%105 = load i8*, i8** %10
%106 = load i32, i32* %13
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %105, i64 %107
%109 = call i32 @strcpy(i8* %104, i8* %108)
br label %110
110: ; preds = %95, %89
br label %86
111: ; preds = %86
br label %112
112: ; preds = %111
%113 = load i32, i32* %15
%114 = add nsw i32 %113, 1
store i32 %114, i32* %15
br label %63
115: ; preds = %63
%116 = load i32, i32* %12
store i32 %116, i32* %5
br label %117
117: ; preds = %115, %60
%118 = load i32, i32* %5
ret i32 %118
}

LLVM IR (-O2):
define i32 @count_matches_v1(i8* %0, i8* %1, i32* nocapture writeonly %2, i32 %3) {
%5 = alloca [10000 x i8]
%6 = alloca [10 x i8]
%7 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%9 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) %1)
%10 = tail call i32 @strlen(i8* %1)
%11 = icmp eq i32 %3, 0
br i1 %11, label %24, label %12
12: ; preds = %4
%13 = sub nsw i32 %10, %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %1, i64 %14
%16 = sext i32 %10 to i64
%17 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* %8)
store i8 97, i8* %15
%18 = call i32 @strcpy(i8* %7, i8* %0)
%19 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%20 = icmp eq i8* %19, null
br i1 %20, label %54, label %21
21: ; preds = %12
%22 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%23 = icmp eq i8* %22, null
br i1 %23, label %54, label %43
24: ; preds = %4
%25 = call i32 @strcpy(i8* %7, i8* %0)
%26 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%27 = icmp eq i8* %26, null
br i1 %27, label %114, label %28
28: ; preds = %24
%29 = sext i32 %10 to i64
%30 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%31 = icmp eq i8* %30, null
br i1 %31, label %114, label %32
32: ; preds = %28, %32
%33 = phi i8* [ %41, %32 ], [ %30, %28 ]
%34 = phi i32 [ %35, %32 ], [ 0, %28 ]
%35 = add nuw nsw i32 %34, 1
%36 = call i32 @strlen(i8* %33)
%37 = zext i32 %35 to i64
%38 = getelementptr inbounds i32, i32* %2, i64 %37
store i32 %36, i32* %38
%39 = getelementptr inbounds i8, i8* %33, i64 %29
%40 = call i32 @strcpy(i8* %7, i8* %39)
%41 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%42 = icmp eq i8* %41, null
br i1 %42, label %114, label %32
43: ; preds = %21, %43
%44 = phi i8* [ %52, %43 ], [ %22, %21 ]
%45 = phi i32 [ %46, %43 ], [ 0, %21 ]
%46 = add nuw nsw i32 %45, 1
%47 = call i32 @strlen(i8* %44)
%48 = zext i32 %46 to i64
%49 = getelementptr inbounds i32, i32* %2, i64 %48
store i32 %47, i32* %49
%50 = getelementptr inbounds i8, i8* %44, i64 %16
%51 = call i32 @strcpy(i8* %7, i8* %50)
%52 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%53 = icmp eq i8* %52, null
br i1 %53, label %54, label %43
54: ; preds = %43, %21, %12
%55 = phi i32 [ 0, %12 ], [ 0, %21 ], [ %46, %43 ]
%56 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* %8)
store i8 99, i8* %15
%57 = call i32 @strcpy(i8* %7, i8* %0)
%58 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%59 = icmp eq i8* %58, null
br i1 %59, label %74, label %60
60: ; preds = %54
%61 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%62 = icmp eq i8* %61, null
br i1 %62, label %74, label %63
63: ; preds = %60, %63
%64 = phi i8* [ %72, %63 ], [ %61, %60 ]
%65 = phi i32 [ %66, %63 ], [ %55, %60 ]
%66 = add nuw nsw i32 %65, 1
%67 = call i32 @strlen(i8* %64)
%68 = zext i32 %66 to i64
%69 = getelementptr inbounds i32, i32* %2, i64 %68
store i32 %67, i32* %69
%70 = getelementptr inbounds i8, i8* %64, i64 %16
%71 = call i32 @strcpy(i8* %7, i8* %70)
%72 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%73 = icmp eq i8* %72, null
br i1 %73, label %74, label %63
74: ; preds = %63, %60, %54
%75 = phi i32 [ %55, %54 ], [ %55, %60 ], [ %66, %63 ]
%76 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* %8)
store i8 103, i8* %15
%77 = call i32 @strcpy(i8* %7, i8* %0)
%78 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%79 = icmp eq i8* %78, null
br i1 %79, label %94, label %80
80: ; preds = %74
%81 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%82 = icmp eq i8* %81, null
br i1 %82, label %94, label %83
83: ; preds = %80, %83
%84 = phi i8* [ %92, %83 ], [ %81, %80 ]
%85 = phi i32 [ %86, %83 ], [ %75, %80 ]
%86 = add nsw i32 %85, 1
%87 = call i32 @strlen(i8* %84)
%88 = sext i32 %86 to i64
%89 = getelementptr inbounds i32, i32* %2, i64 %88
store i32 %87, i32* %89
%90 = getelementptr inbounds i8, i8* %84, i64 %16
%91 = call i32 @strcpy(i8* %7, i8* %90)
%92 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%93 = icmp eq i8* %92, null
br i1 %93, label %94, label %83
94: ; preds = %83, %80, %74
%95 = phi i32 [ %75, %74 ], [ %75, %80 ], [ %86, %83 ]
%96 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* %8)
store i8 116, i8* %15
%97 = call i32 @strcpy(i8* %7, i8* %0)
%98 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%99 = icmp eq i8* %98, null
br i1 %99, label %114, label %100
100: ; preds = %94
%101 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%102 = icmp eq i8* %101, null
br i1 %102, label %114, label %103
103: ; preds = %100, %103
%104 = phi i8* [ %112, %103 ], [ %101, %100 ]
%105 = phi i32 [ %106, %103 ], [ %95, %100 ]
%106 = add nsw i32 %105, 1
%107 = call i32 @strlen(i8* %104)
%108 = sext i32 %106 to i64
%109 = getelementptr inbounds i32, i32* %2, i64 %108
store i32 %107, i32* %109
%110 = getelementptr inbounds i8, i8* %104, i64 %16
%111 = call i32 @strcpy(i8* %7, i8* %110)
%112 = call i8* @strstr(i8* %7, i8* dereferenceable(1) %1)
%113 = icmp eq i8* %112, null
br i1 %113, label %114, label %103
114: ; preds = %103, %32, %100, %28, %94, %24
%115 = phi i32 [ 0, %24 ], [ %95, %94 ], [ 0, %28 ], [ %95, %100 ], [ %35, %32 ], [ %106, %103 ]
ret i32 %115
}