; LLVM IR from davidesantangelo/krep :: test (test_multiple_patterns)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.search_params = type { ptr, i64, ptr, ptr, i64, i8, i8, i8, i8, i8, i8, ptr, ptr, i64 }

@tests_failed = external global i32, align 4
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@tests_passed = external global i32, align 4
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [48 x i8], align 1
@__const.test_multipattern_performance.patterns = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.54 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [53 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @ac_trie_build(ptr noundef) #0

declare i64 @aho_corasick_search(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

declare void @ac_trie_free(ptr noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @test_multipattern_performance() #4 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca [5 x ptr], align 16
  %6 = alloca [5 x i64], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.search_params, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca %struct.search_params, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.47)
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  store i64 1048576, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %23 = call noalias ptr @malloc(i64 noundef 1048577) #8
  store ptr %23, ptr %2, align 8, !tbaa !9
  %24 = load ptr, ptr %2, align 8, !tbaa !9
  %25 = icmp ne ptr %24, null
  br i1 %25, label %28, label %26

26:                                               ; preds = %0
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  store i32 1, ptr %3, align 4
  br label %235

28:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %41, %28
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = icmp ult i64 %30, 1048576
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %44

33:                                               ; preds = %29
  %34 = load i64, ptr %4, align 8, !tbaa !5
  %35 = urem i64 %34, 26
  %36 = add i64 97, %35
  %37 = trunc i64 %36 to i8
  %38 = load ptr, ptr %2, align 8, !tbaa !9
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %38, i64 %39
  store i8 %37, ptr %40, align 1, !tbaa !11
  br label %41

41:                                               ; preds = %33
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = add i64 %42, 1
  store i64 %43, ptr %4, align 8, !tbaa !5
  br label %29, !llvm.loop !12

44:                                               ; preds = %32
  %45 = load ptr, ptr %2, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 1048576
  store i8 0, ptr %46, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.test_multipattern_performance.patterns, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #7
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 40, i1 false)
  %47 = getelementptr inbounds [5 x i64], ptr %6, i32 0, i32 0
  store i64 8, ptr %47, align 16
  %48 = getelementptr inbounds [5 x i64], ptr %6, i32 0, i32 1
  store i64 8, ptr %48, align 8
  %49 = getelementptr inbounds [5 x i64], ptr %6, i32 0, i32 2
  store i64 8, ptr %49, align 16
  %50 = getelementptr inbounds [5 x i64], ptr %6, i32 0, i32 3
  store i64 8, ptr %50, align 8
  %51 = getelementptr inbounds [5 x i64], ptr %6, i32 0, i32 4
  store i64 8, ptr %51, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 5, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %94, %44
  %53 = load i64, ptr %8, align 8, !tbaa !5
  %54 = load i64, ptr %7, align 8, !tbaa !5
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %97

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %90, %57
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = icmp ult i64 %59, 10
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %93

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %63 = load i64, ptr %8, align 8, !tbaa !5
  %64 = mul i64 %63, 10
  %65 = load i64, ptr %9, align 8, !tbaa !5
  %66 = add i64 %64, %65
  %67 = add i64 %66, 1
  %68 = mul i64 %67, 1048576
  %69 = load i64, ptr %7, align 8, !tbaa !5
  %70 = mul i64 %69, 10
  %71 = add i64 %70, 1
  %72 = udiv i64 %68, %71
  store i64 %72, ptr %10, align 8, !tbaa !5
  %73 = load i64, ptr %10, align 8, !tbaa !5
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds [5 x i64], ptr %6, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = add i64 %73, %76
  %78 = icmp ult i64 %77, 1048576
  br i1 %78, label %79, label %89

79:                                               ; preds = %62
  %80 = load ptr, ptr %2, align 8, !tbaa !9
  %81 = load i64, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %80, i64 %81
  %83 = load i64, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = load i64, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds [5 x i64], ptr %6, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %82, ptr align 1 %85, i64 %88, i1 false)
  br label %89

89:                                               ; preds = %79, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %9, align 8, !tbaa !5
  %92 = add i64 %91, 1
  store i64 %92, ptr %9, align 8, !tbaa !5
  br label %58, !llvm.loop !14

93:                                               ; preds = %61
  br label %94

94:                                               ; preds = %93
  %95 = load i64, ptr %8, align 8, !tbaa !5
  %96 = add i64 %95, 1
  store i64 %96, ptr %8, align 8, !tbaa !5
  br label %52, !llvm.loop !15

97:                                               ; preds = %56
  %98 = load i64, ptr %7, align 8, !tbaa !5
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.54, i64 noundef 1, i64 noundef %98)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %100 = call i64 @clock() #7
  store i64 %100, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %135, %97
  %102 = load i64, ptr %13, align 8, !tbaa !5
  %103 = load i64, ptr %7, align 8, !tbaa !5
  %104 = icmp ult i64 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %138

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #7
  %107 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 0
  %108 = load i64, ptr %13, align 8, !tbaa !5
  %109 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  store ptr %110, ptr %107, align 8, !tbaa !16
  %111 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 1
  %112 = load i64, ptr %13, align 8, !tbaa !5
  %113 = getelementptr inbounds [5 x i64], ptr %6, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !5
  store i64 %114, ptr %111, align 8, !tbaa !19
  %115 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 2
  %116 = load i64, ptr %13, align 8, !tbaa !5
  %117 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %116
  store ptr %117, ptr %115, align 8, !tbaa !20
  %118 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 3
  %119 = load i64, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds [5 x i64], ptr %6, i64 0, i64 %119
  store ptr %120, ptr %118, align 8, !tbaa !21
  %121 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 4
  store i64 1, ptr %121, align 8, !tbaa !22
  %122 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 5
  store i8 1, ptr %122, align 8, !tbaa !23
  %123 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 6
  store i8 0, ptr %123, align 1, !tbaa !24
  %124 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 7
  store i8 0, ptr %124, align 2, !tbaa !25
  %125 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 8
  store i8 1, ptr %125, align 1, !tbaa !26
  %126 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 9
  store i8 0, ptr %126, align 4, !tbaa !27
  %127 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 10
  store i8 0, ptr %127, align 1, !tbaa !28
  %128 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 11
  store ptr null, ptr %128, align 8, !tbaa !29
  %129 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 12
  store ptr null, ptr %129, align 8, !tbaa !30
  %130 = getelementptr inbounds %struct.search_params, ptr %14, i32 0, i32 13
  store i64 -1, ptr %130, align 8, !tbaa !31
  %131 = load ptr, ptr %2, align 8, !tbaa !9
  %132 = call i64 @boyer_moore_search(ptr noundef %14, ptr noundef %131, i64 noundef 1048576, ptr noundef null)
  %133 = load i64, ptr %12, align 8, !tbaa !5
  %134 = add i64 %133, %132
  store i64 %134, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #7
  br label %135

135:                                              ; preds = %106
  %136 = load i64, ptr %13, align 8, !tbaa !5
  %137 = add i64 %136, 1
  store i64 %137, ptr %13, align 8, !tbaa !5
  br label %101, !llvm.loop !32

138:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %139 = call i64 @clock() #7
  store i64 %139, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %140 = load i64, ptr %15, align 8, !tbaa !5
  %141 = load i64, ptr %11, align 8, !tbaa !5
  %142 = sub nsw i64 %140, %141
  %143 = sitofp i64 %142 to double
  %144 = fdiv double %143, 1.000000e+06
  store double %144, ptr %16, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %145 = call i64 @clock() #7
  store i64 %145, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %18) #7
  %146 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 0
  store ptr null, ptr %146, align 8, !tbaa !16
  %147 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 1
  store i64 0, ptr %147, align 8, !tbaa !19
  %148 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 2
  %149 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 0
  store ptr %149, ptr %148, align 8, !tbaa !20
  %150 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 3
  %151 = getelementptr inbounds [5 x i64], ptr %6, i64 0, i64 0
  store ptr %151, ptr %150, align 8, !tbaa !21
  %152 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 4
  %153 = load i64, ptr %7, align 8, !tbaa !5
  store i64 %153, ptr %152, align 8, !tbaa !22
  %154 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 5
  store i8 1, ptr %154, align 8, !tbaa !23
  %155 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 6
  store i8 0, ptr %155, align 1, !tbaa !24
  %156 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 7
  store i8 0, ptr %156, align 2, !tbaa !25
  %157 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 8
  store i8 1, ptr %157, align 1, !tbaa !26
  %158 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 9
  store i8 0, ptr %158, align 4, !tbaa !27
  %159 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 10
  store i8 0, ptr %159, align 1, !tbaa !28
  %160 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 11
  store ptr null, ptr %160, align 8, !tbaa !29
  %161 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 12
  store ptr null, ptr %161, align 8, !tbaa !30
  %162 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 13
  store i64 -1, ptr %162, align 8, !tbaa !31
  %163 = call ptr @ac_trie_build(ptr noundef %18)
  %164 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 12
  store ptr %163, ptr %164, align 8, !tbaa !30
  %165 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 12
  %166 = load ptr, ptr %165, align 8, !tbaa !30
  %167 = icmp ne ptr %166, null
  br i1 %167, label %173, label %168

168:                                              ; preds = %138
  %169 = call i32 (ptr, ...) @printf(ptr noundef @.str.55)
  %170 = load i32, ptr @tests_failed, align 4, !tbaa !35
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr @tests_failed, align 4, !tbaa !35
  %172 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %172) #7
  store i32 1, ptr %3, align 4
  br label %234

173:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %174 = load ptr, ptr %2, align 8, !tbaa !9
  %175 = call i64 @aho_corasick_search(ptr noundef %18, ptr noundef %174, i64 noundef 1048576, ptr noundef null)
  store i64 %175, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %176 = call i64 @clock() #7
  store i64 %176, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %177 = load i64, ptr %20, align 8, !tbaa !5
  %178 = load i64, ptr %17, align 8, !tbaa !5
  %179 = sub nsw i64 %177, %178
  %180 = sitofp i64 %179 to double
  %181 = fdiv double %180, 1.000000e+06
  store double %181, ptr %21, align 8, !tbaa !33
  %182 = load i64, ptr %12, align 8, !tbaa !5
  %183 = load double, ptr %16, align 8, !tbaa !33
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.56, i64 noundef %182, double noundef %183)
  %185 = load i64, ptr %19, align 8, !tbaa !5
  %186 = load double, ptr %21, align 8, !tbaa !33
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.57, i64 noundef %185, double noundef %186)
  %188 = load double, ptr %21, align 8, !tbaa !33
  %189 = fcmp ogt double %188, 1.000000e-09
  br i1 %189, label %190, label %198

190:                                              ; preds = %173
  %191 = load double, ptr %16, align 8, !tbaa !33
  %192 = fcmp oge double %191, 0.000000e+00
  br i1 %192, label %193, label %198

193:                                              ; preds = %190
  %194 = load double, ptr %16, align 8, !tbaa !33
  %195 = load double, ptr %21, align 8, !tbaa !33
  %196 = fdiv double %194, %195
  %197 = call i32 (ptr, ...) @printf(ptr noundef @.str.58, double noundef %196)
  br label %215

198:                                              ; preds = %190, %173
  %199 = load double, ptr %16, align 8, !tbaa !33
  %200 = fcmp olt double %199, 1.000000e-09
  br i1 %200, label %201, label %206

201:                                              ; preds = %198
  %202 = load double, ptr %21, align 8, !tbaa !33
  %203 = fcmp olt double %202, 1.000000e-09
  br i1 %203, label %204, label %206

204:                                              ; preds = %201
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  br label %214

206:                                              ; preds = %201, %198
  %207 = load double, ptr %21, align 8, !tbaa !33
  %208 = fcmp olt double %207, 1.000000e-09
  br i1 %208, label %209, label %211

209:                                              ; preds = %206
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  br label %213

211:                                              ; preds = %206
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  br label %213

213:                                              ; preds = %211, %209
  br label %214

214:                                              ; preds = %213, %204
  br label %215

215:                                              ; preds = %214, %193
  br label %216

216:                                              ; preds = %215
  %217 = load i64, ptr %12, align 8, !tbaa !5
  %218 = load i64, ptr %19, align 8, !tbaa !5
  %219 = icmp eq i64 %217, %218
  br i1 %219, label %220, label %224

220:                                              ; preds = %216
  %221 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @.str.62)
  %222 = load i32, ptr @tests_passed, align 4, !tbaa !35
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr @tests_passed, align 4, !tbaa !35
  br label %228

224:                                              ; preds = %216
  %225 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @.str.62)
  %226 = load i32, ptr @tests_failed, align 4, !tbaa !35
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr @tests_failed, align 4, !tbaa !35
  br label %228

228:                                              ; preds = %224, %220
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  %231 = getelementptr inbounds %struct.search_params, ptr %18, i32 0, i32 12
  %232 = load ptr, ptr %231, align 8, !tbaa !30
  call void @ac_trie_free(ptr noundef %232)
  %233 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %233) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  store i32 0, ptr %3, align 4
  br label %234

234:                                              ; preds = %230, %168
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #7
  br label %235

235:                                              ; preds = %234, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  %236 = load i32, ptr %3, align 4
  switch i32 %236, label %238 [
    i32 0, label %237
    i32 1, label %237
  ]

237:                                              ; preds = %235, %235
  ret void

238:                                              ; preds = %235
  unreachable
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind
declare i64 @clock() #6

declare i64 @boyer_moore_search(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !10, i64 0}
!17 = !{!"search_params", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !18, i64 40, !18, i64 41, !18, i64 42, !18, i64 43, !18, i64 44, !18, i64 45, !10, i64 48, !10, i64 56, !6, i64 64}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!17, !6, i64 8}
!20 = !{!17, !10, i64 16}
!21 = !{!17, !10, i64 24}
!22 = !{!17, !6, i64 32}
!23 = !{!17, !18, i64 40}
!24 = !{!17, !18, i64 41}
!25 = !{!17, !18, i64 42}
!26 = !{!17, !18, i64 43}
!27 = !{!17, !18, i64 44}
!28 = !{!17, !18, i64 45}
!29 = !{!17, !10, i64 48}
!30 = !{!17, !10, i64 56}
!31 = !{!17, !6, i64 64}
!32 = distinct !{!32, !13}
!33 = !{!34, !34, i64 0}
!34 = !{!"double", !7, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.search_params = type { ptr, i64, ptr, ptr, i64, i8, i8, i8, i8, i8, i8, ptr, ptr, i64 }

@tests_failed = external local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@tests_passed = external local_unnamed_addr global i32, align 4
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [48 x i8], align 1
@__const.test_multipattern_performance.patterns = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.54 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @ac_trie_build(ptr noundef) local_unnamed_addr #3

declare i64 @aho_corasick_search(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @ac_trie_free(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
define dso_local void @test_multipattern_performance() local_unnamed_addr #5 {
  %1 = alloca [5 x ptr], align 16
  %2 = alloca [5 x i64], align 16
  %3 = alloca %struct.search_params, align 8
  %4 = alloca %struct.search_params, align 8
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  %6 = tail call noalias dereferenceable_or_null(1048577) ptr @malloc(i64 noundef 1048577) #9
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %16, label %vector.body

vector.body:                                      ; preds = %0, %vector.body
  %index = phi i64 [ %index.next.1, %vector.body ], [ 0, %0 ]
  %vec.ind = phi <16 x i32> [ %vec.ind.next.1, %vector.body ], [ <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>, %0 ]
  %7 = urem <16 x i32> %vec.ind, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
  %8 = trunc nuw nsw <16 x i32> %7 to <16 x i8>
  %9 = add nuw nsw <16 x i8> %8, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
  %10 = getelementptr inbounds i8, ptr %6, i64 %index
  store <16 x i8> %9, ptr %10, align 1, !tbaa !5
  %index.next = or disjoint i64 %index, 16
  %vec.ind.next = add <16 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %11 = urem <16 x i32> %vec.ind.next, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
  %12 = trunc nuw nsw <16 x i32> %11 to <16 x i8>
  %13 = add nuw nsw <16 x i8> %12, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
  %14 = getelementptr inbounds i8, ptr %6, i64 %index.next
  store <16 x i8> %13, ptr %14, align 1, !tbaa !5
  %index.next.1 = add nuw nsw i64 %index, 32
  %vec.ind.next.1 = add <16 x i32> %vec.ind, <i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32>
  %15 = icmp eq i64 %index.next.1, 1048576
  br i1 %15, label %middle.block, label %vector.body, !llvm.loop !8

16:                                               ; preds = %0
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  br label %230

middle.block:                                     ; preds = %vector.body
  %18 = getelementptr inbounds i8, ptr %6, i64 1048576
  store i8 0, ptr %18, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %1, ptr noundef nonnull align 16 dereferenceable(40) @__const.test_multipattern_performance.patterns, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #10
  store i64 8, ptr %2, align 16
  %19 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 8, ptr %19, align 8
  %20 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 8, ptr %20, align 16
  %21 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 8, ptr %21, align 8
  %22 = getelementptr inbounds i8, ptr %2, i64 32
  store i64 8, ptr %22, align 16
  %23 = getelementptr inbounds i8, ptr %6, i64 20560
  %24 = load ptr, ptr %1, align 16, !tbaa !12
  %25 = load i64, ptr %24, align 1
  store i64 %25, ptr %23, align 1
  %26 = getelementptr inbounds i8, ptr %6, i64 41120
  %27 = load i64, ptr %24, align 1
  store i64 %27, ptr %26, align 1
  %28 = getelementptr inbounds i8, ptr %6, i64 61680
  %29 = load ptr, ptr %1, align 16, !tbaa !12
  %30 = load i64, ptr %29, align 1
  store i64 %30, ptr %28, align 1
  %31 = getelementptr inbounds i8, ptr %6, i64 82241
  %32 = load i64, ptr %29, align 1
  store i64 %32, ptr %31, align 1
  %33 = getelementptr inbounds i8, ptr %6, i64 102801
  %34 = load ptr, ptr %1, align 16, !tbaa !12
  %35 = load i64, ptr %34, align 1
  store i64 %35, ptr %33, align 1
  %36 = getelementptr inbounds i8, ptr %6, i64 123361
  %37 = load i64, ptr %34, align 1
  store i64 %37, ptr %36, align 1
  %38 = getelementptr inbounds i8, ptr %6, i64 143922
  %39 = load ptr, ptr %1, align 16, !tbaa !12
  %40 = load i64, ptr %39, align 1
  store i64 %40, ptr %38, align 1
  %41 = getelementptr inbounds i8, ptr %6, i64 164482
  %42 = load i64, ptr %39, align 1
  store i64 %42, ptr %41, align 1
  %43 = getelementptr inbounds i8, ptr %6, i64 185042
  %44 = load ptr, ptr %1, align 16, !tbaa !12
  %45 = load i64, ptr %44, align 1
  store i64 %45, ptr %43, align 1
  %46 = getelementptr inbounds i8, ptr %6, i64 205603
  %47 = load i64, ptr %44, align 1
  store i64 %47, ptr %46, align 1
  %48 = getelementptr inbounds i8, ptr %1, i64 8
  %49 = getelementptr inbounds i8, ptr %6, i64 226163
  %50 = load ptr, ptr %48, align 8, !tbaa !12
  %51 = load i64, ptr %50, align 1
  store i64 %51, ptr %49, align 1
  %52 = getelementptr inbounds i8, ptr %6, i64 246723
  %53 = load i64, ptr %50, align 1
  store i64 %53, ptr %52, align 1
  %54 = getelementptr inbounds i8, ptr %6, i64 267284
  %55 = load ptr, ptr %48, align 8, !tbaa !12
  %56 = load i64, ptr %55, align 1
  store i64 %56, ptr %54, align 1
  %57 = getelementptr inbounds i8, ptr %6, i64 287844
  %58 = load i64, ptr %55, align 1
  store i64 %58, ptr %57, align 1
  %59 = getelementptr inbounds i8, ptr %6, i64 308404
  %60 = load ptr, ptr %48, align 8, !tbaa !12
  %61 = load i64, ptr %60, align 1
  store i64 %61, ptr %59, align 1
  %62 = getelementptr inbounds i8, ptr %6, i64 328965
  %63 = load i64, ptr %60, align 1
  store i64 %63, ptr %62, align 1
  %64 = getelementptr inbounds i8, ptr %6, i64 349525
  %65 = load ptr, ptr %48, align 8, !tbaa !12
  %66 = load i64, ptr %65, align 1
  store i64 %66, ptr %64, align 1
  %67 = getelementptr inbounds i8, ptr %6, i64 370085
  %68 = load i64, ptr %65, align 1
  store i64 %68, ptr %67, align 1
  %69 = getelementptr inbounds i8, ptr %6, i64 390645
  %70 = load ptr, ptr %48, align 8, !tbaa !12
  %71 = load i64, ptr %70, align 1
  store i64 %71, ptr %69, align 1
  %72 = getelementptr inbounds i8, ptr %6, i64 411206
  %73 = load i64, ptr %70, align 1
  store i64 %73, ptr %72, align 1
  %74 = getelementptr inbounds i8, ptr %1, i64 16
  %75 = getelementptr inbounds i8, ptr %6, i64 431766
  %76 = load ptr, ptr %74, align 16, !tbaa !12
  %77 = load i64, ptr %76, align 1
  store i64 %77, ptr %75, align 1
  %78 = getelementptr inbounds i8, ptr %6, i64 452326
  %79 = load i64, ptr %76, align 1
  store i64 %79, ptr %78, align 1
  %80 = getelementptr inbounds i8, ptr %6, i64 472887
  %81 = load ptr, ptr %74, align 16, !tbaa !12
  %82 = load i64, ptr %81, align 1
  store i64 %82, ptr %80, align 1
  %83 = getelementptr inbounds i8, ptr %6, i64 493447
  %84 = load i64, ptr %81, align 1
  store i64 %84, ptr %83, align 1
  %85 = getelementptr inbounds i8, ptr %6, i64 514007
  %86 = load ptr, ptr %74, align 16, !tbaa !12
  %87 = load i64, ptr %86, align 1
  store i64 %87, ptr %85, align 1
  %88 = getelementptr inbounds i8, ptr %6, i64 534568
  %89 = load i64, ptr %86, align 1
  store i64 %89, ptr %88, align 1
  %90 = getelementptr inbounds i8, ptr %6, i64 555128
  %91 = load ptr, ptr %74, align 16, !tbaa !12
  %92 = load i64, ptr %91, align 1
  store i64 %92, ptr %90, align 1
  %93 = getelementptr inbounds i8, ptr %6, i64 575688
  %94 = load i64, ptr %91, align 1
  store i64 %94, ptr %93, align 1
  %95 = getelementptr inbounds i8, ptr %6, i64 596249
  %96 = load ptr, ptr %74, align 16, !tbaa !12
  %97 = load i64, ptr %96, align 1
  store i64 %97, ptr %95, align 1
  %98 = getelementptr inbounds i8, ptr %6, i64 616809
  %99 = load i64, ptr %96, align 1
  store i64 %99, ptr %98, align 1
  %100 = getelementptr inbounds i8, ptr %1, i64 24
  %101 = getelementptr inbounds i8, ptr %6, i64 637369
  %102 = load ptr, ptr %100, align 8, !tbaa !12
  %103 = load i64, ptr %102, align 1
  store i64 %103, ptr %101, align 1
  %104 = getelementptr inbounds i8, ptr %6, i64 657930
  %105 = load i64, ptr %102, align 1
  store i64 %105, ptr %104, align 1
  %106 = getelementptr inbounds i8, ptr %6, i64 678490
  %107 = load ptr, ptr %100, align 8, !tbaa !12
  %108 = load i64, ptr %107, align 1
  store i64 %108, ptr %106, align 1
  %109 = getelementptr inbounds i8, ptr %6, i64 699050
  %110 = load i64, ptr %107, align 1
  store i64 %110, ptr %109, align 1
  %111 = getelementptr inbounds i8, ptr %6, i64 719610
  %112 = load ptr, ptr %100, align 8, !tbaa !12
  %113 = load i64, ptr %112, align 1
  store i64 %113, ptr %111, align 1
  %114 = getelementptr inbounds i8, ptr %6, i64 740171
  %115 = load i64, ptr %112, align 1
  store i64 %115, ptr %114, align 1
  %116 = getelementptr inbounds i8, ptr %6, i64 760731
  %117 = load ptr, ptr %100, align 8, !tbaa !12
  %118 = load i64, ptr %117, align 1
  store i64 %118, ptr %116, align 1
  %119 = getelementptr inbounds i8, ptr %6, i64 781291
  %120 = load i64, ptr %117, align 1
  store i64 %120, ptr %119, align 1
  %121 = getelementptr inbounds i8, ptr %6, i64 801852
  %122 = load ptr, ptr %100, align 8, !tbaa !12
  %123 = load i64, ptr %122, align 1
  store i64 %123, ptr %121, align 1
  %124 = getelementptr inbounds i8, ptr %6, i64 822412
  %125 = load i64, ptr %122, align 1
  store i64 %125, ptr %124, align 1
  %126 = getelementptr inbounds i8, ptr %1, i64 32
  %127 = getelementptr inbounds i8, ptr %6, i64 842972
  %128 = load ptr, ptr %126, align 16, !tbaa !12
  %129 = load i64, ptr %128, align 1
  store i64 %129, ptr %127, align 1
  %130 = getelementptr inbounds i8, ptr %6, i64 863533
  %131 = load i64, ptr %128, align 1
  store i64 %131, ptr %130, align 1
  %132 = getelementptr inbounds i8, ptr %6, i64 884093
  %133 = load ptr, ptr %126, align 16, !tbaa !12
  %134 = load i64, ptr %133, align 1
  store i64 %134, ptr %132, align 1
  %135 = getelementptr inbounds i8, ptr %6, i64 904653
  %136 = load i64, ptr %133, align 1
  store i64 %136, ptr %135, align 1
  %137 = getelementptr inbounds i8, ptr %6, i64 925214
  %138 = load ptr, ptr %126, align 16, !tbaa !12
  %139 = load i64, ptr %138, align 1
  store i64 %139, ptr %137, align 1
  %140 = getelementptr inbounds i8, ptr %6, i64 945774
  %141 = load i64, ptr %138, align 1
  store i64 %141, ptr %140, align 1
  %142 = getelementptr inbounds i8, ptr %6, i64 966334
  %143 = load ptr, ptr %126, align 16, !tbaa !12
  %144 = load i64, ptr %143, align 1
  store i64 %144, ptr %142, align 1
  %145 = getelementptr inbounds i8, ptr %6, i64 986895
  %146 = load i64, ptr %143, align 1
  store i64 %146, ptr %145, align 1
  %147 = getelementptr inbounds i8, ptr %6, i64 1007455
  %148 = load ptr, ptr %126, align 16, !tbaa !12
  %149 = load i64, ptr %148, align 1
  store i64 %149, ptr %147, align 1
  %150 = getelementptr inbounds i8, ptr %6, i64 1028015
  %151 = load i64, ptr %148, align 1
  store i64 %151, ptr %150, align 1
  %152 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, i64 noundef 1, i64 noundef 5)
  %153 = tail call i64 @clock() #10
  %154 = getelementptr inbounds i8, ptr %3, i64 8
  %155 = getelementptr inbounds i8, ptr %3, i64 16
  %156 = getelementptr inbounds i8, ptr %3, i64 24
  %157 = getelementptr inbounds i8, ptr %3, i64 32
  %158 = getelementptr inbounds i8, ptr %3, i64 40
  %159 = getelementptr inbounds i8, ptr %3, i64 44
  %160 = getelementptr inbounds i8, ptr %3, i64 45
  %161 = getelementptr inbounds i8, ptr %3, i64 48
  %162 = getelementptr inbounds i8, ptr %3, i64 64
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #10
  %163 = load ptr, ptr %1, align 16, !tbaa !12
  store ptr %163, ptr %3, align 8, !tbaa !14
  store i64 8, ptr %154, align 8, !tbaa !18
  store ptr %1, ptr %155, align 8, !tbaa !19
  store ptr %2, ptr %156, align 8, !tbaa !20
  store i64 1, ptr %157, align 8, !tbaa !21
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %158, align 8, !tbaa !22
  store i8 0, ptr %159, align 4, !tbaa !23
  store i8 0, ptr %160, align 1, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  store i64 -1, ptr %162, align 8, !tbaa !25
  %164 = call i64 @boyer_moore_search(ptr noundef nonnull %3, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #10
  %165 = load ptr, ptr %48, align 8, !tbaa !12
  store ptr %165, ptr %3, align 8, !tbaa !14
  %166 = load i64, ptr %19, align 8, !tbaa !26
  store i64 %166, ptr %154, align 8, !tbaa !18
  store ptr %48, ptr %155, align 8, !tbaa !19
  store ptr %19, ptr %156, align 8, !tbaa !20
  store i64 1, ptr %157, align 8, !tbaa !21
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %158, align 8, !tbaa !22
  store i8 0, ptr %159, align 4, !tbaa !23
  store i8 0, ptr %160, align 1, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  store i64 -1, ptr %162, align 8, !tbaa !25
  %167 = call i64 @boyer_moore_search(ptr noundef nonnull %3, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  %168 = add i64 %167, %164
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #10
  %169 = load ptr, ptr %74, align 16, !tbaa !12
  store ptr %169, ptr %3, align 8, !tbaa !14
  %170 = load i64, ptr %20, align 16, !tbaa !26
  store i64 %170, ptr %154, align 8, !tbaa !18
  store ptr %74, ptr %155, align 8, !tbaa !19
  store ptr %20, ptr %156, align 8, !tbaa !20
  store i64 1, ptr %157, align 8, !tbaa !21
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %158, align 8, !tbaa !22
  store i8 0, ptr %159, align 4, !tbaa !23
  store i8 0, ptr %160, align 1, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  store i64 -1, ptr %162, align 8, !tbaa !25
  %171 = call i64 @boyer_moore_search(ptr noundef nonnull %3, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  %172 = add i64 %171, %168
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #10
  %173 = load ptr, ptr %100, align 8, !tbaa !12
  store ptr %173, ptr %3, align 8, !tbaa !14
  %174 = load i64, ptr %21, align 8, !tbaa !26
  store i64 %174, ptr %154, align 8, !tbaa !18
  store ptr %100, ptr %155, align 8, !tbaa !19
  store ptr %21, ptr %156, align 8, !tbaa !20
  store i64 1, ptr %157, align 8, !tbaa !21
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %158, align 8, !tbaa !22
  store i8 0, ptr %159, align 4, !tbaa !23
  store i8 0, ptr %160, align 1, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  store i64 -1, ptr %162, align 8, !tbaa !25
  %175 = call i64 @boyer_moore_search(ptr noundef nonnull %3, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  %176 = add i64 %175, %172
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #10
  %177 = load ptr, ptr %126, align 16, !tbaa !12
  store ptr %177, ptr %3, align 8, !tbaa !14
  %178 = load i64, ptr %22, align 16, !tbaa !26
  store i64 %178, ptr %154, align 8, !tbaa !18
  store ptr %126, ptr %155, align 8, !tbaa !19
  store ptr %22, ptr %156, align 8, !tbaa !20
  store i64 1, ptr %157, align 8, !tbaa !21
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %158, align 8, !tbaa !22
  store i8 0, ptr %159, align 4, !tbaa !23
  store i8 0, ptr %160, align 1, !tbaa !24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %161, i8 0, i64 16, i1 false)
  store i64 -1, ptr %162, align 8, !tbaa !25
  %179 = call i64 @boyer_moore_search(ptr noundef nonnull %3, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  %180 = add i64 %179, %176
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #10
  %181 = call i64 @clock() #10
  %182 = sub nsw i64 %181, %153
  %183 = sitofp i64 %182 to double
  %184 = fdiv double %183, 1.000000e+06
  %185 = call i64 @clock() #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #10
  %186 = getelementptr inbounds i8, ptr %4, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  store ptr %1, ptr %186, align 8, !tbaa !19
  %187 = getelementptr inbounds i8, ptr %4, i64 24
  store ptr %2, ptr %187, align 8, !tbaa !20
  %188 = getelementptr inbounds i8, ptr %4, i64 32
  store i64 5, ptr %188, align 8, !tbaa !21
  %189 = getelementptr inbounds i8, ptr %4, i64 40
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %189, align 8, !tbaa !22
  %190 = getelementptr inbounds i8, ptr %4, i64 44
  store i8 0, ptr %190, align 4, !tbaa !23
  %191 = getelementptr inbounds i8, ptr %4, i64 45
  store i8 0, ptr %191, align 1, !tbaa !24
  %192 = getelementptr inbounds i8, ptr %4, i64 48
  %193 = getelementptr inbounds i8, ptr %4, i64 56
  %194 = getelementptr inbounds i8, ptr %4, i64 64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %192, i8 0, i64 16, i1 false)
  store i64 -1, ptr %194, align 8, !tbaa !25
  %195 = call ptr @ac_trie_build(ptr noundef nonnull %4) #10
  store ptr %195, ptr %193, align 8, !tbaa !27
  %.not61 = icmp eq ptr %195, null
  br i1 %.not61, label %196, label %200

196:                                              ; preds = %middle.block
  %197 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55)
  %198 = load i32, ptr @tests_failed, align 4, !tbaa !28
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr @tests_failed, align 4, !tbaa !28
  br label %229

200:                                              ; preds = %middle.block
  %201 = call i64 @aho_corasick_search(ptr noundef nonnull %4, ptr noundef nonnull %6, i64 noundef 1048576, ptr noundef null) #10
  %202 = call i64 @clock() #10
  %203 = sub nsw i64 %202, %185
  %204 = sitofp i64 %203 to double
  %205 = fdiv double %204, 1.000000e+06
  %206 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56, i64 noundef %180, double noundef %184)
  %207 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57, i64 noundef %201, double noundef %205)
  %208 = fcmp ogt double %205, 1.000000e-09
  %209 = fcmp oge double %184, 0.000000e+00
  %or.cond = select i1 %208, i1 %209, i1 false
  br i1 %or.cond, label %210, label %213

210:                                              ; preds = %200
  %211 = fdiv double %184, %205
  %212 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58, double noundef %211)
  br label %223

213:                                              ; preds = %200
  %214 = fcmp olt double %184, 1.000000e-09
  %215 = fcmp olt double %205, 1.000000e-09
  %or.cond3 = select i1 %214, i1 %215, i1 false
  br i1 %or.cond3, label %216, label %218

216:                                              ; preds = %213
  %217 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  br label %223

218:                                              ; preds = %213
  br i1 %215, label %219, label %221

219:                                              ; preds = %218
  %220 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  br label %223

221:                                              ; preds = %218
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61)
  br label %223

223:                                              ; preds = %210, %219, %221, %216
  %224 = icmp eq i64 %180, %201
  %.str.7..str.9 = select i1 %224, ptr @.str.7, ptr @.str.9
  %tests_passed.tests_failed = select i1 %224, ptr @tests_passed, ptr @tests_failed
  %225 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.9, ptr noundef nonnull @.str.62)
  %226 = load i32, ptr %tests_passed.tests_failed, align 4, !tbaa !28
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %tests_passed.tests_failed, align 4, !tbaa !28
  %228 = load ptr, ptr %193, align 8, !tbaa !27
  call void @ac_trie_free(ptr noundef %228) #10
  br label %229

229:                                              ; preds = %223, %196
  call void @free(ptr noundef nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #10
  br label %230

230:                                              ; preds = %229, %16
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #7

declare i64 @boyer_moore_search(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10, !11}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"search_params", !13, i64 0, !16, i64 8, !13, i64 16, !13, i64 24, !16, i64 32, !17, i64 40, !17, i64 41, !17, i64 42, !17, i64 43, !17, i64 44, !17, i64 45, !13, i64 48, !13, i64 56, !16, i64 64}
!16 = !{!"long", !6, i64 0}
!17 = !{!"_Bool", !6, i64 0}
!18 = !{!15, !16, i64 8}
!19 = !{!15, !13, i64 16}
!20 = !{!15, !13, i64 24}
!21 = !{!15, !16, i64 32}
!22 = !{!17, !17, i64 0}
!23 = !{!15, !17, i64 44}
!24 = !{!15, !17, i64 45}
!25 = !{!15, !16, i64 64}
!26 = !{!16, !16, i64 0}
!27 = !{!15, !13, i64 56}
!28 = !{!29, !29, i64 0}
!29 = !{!"int", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass