; 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
@stderr = external global ptr, align 8
@.str.47 = external hidden unnamed_addr constant [44 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.60 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [42 x i8], align 1
@__const.test_multiple_patterns_performance.patterns = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.64 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [42 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: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

; 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) #3

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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_multiple_patterns_performance() #6 {
  %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 i64, align 8
  %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 double, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca %struct.search_params, align 8
  %16 = alloca double, align 8
  %17 = alloca %struct.search_params, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca double, align 8
  %21 = 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
  %22 = call noalias ptr @malloc(i64 noundef 1048577) #8
  store ptr %22, ptr %2, align 8, !tbaa !9
  %23 = load ptr, ptr %2, align 8, !tbaa !9
  %24 = icmp ne ptr %23, null
  br i1 %24, label %28, label %25

25:                                               ; preds = %0
  %26 = load ptr, ptr @stderr, align 8, !tbaa !9
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.63) #7
  store i32 1, ptr %3, align 4
  br label %217

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 = call i32 @rand() #7
  %35 = srem i32 %34, 95
  %36 = add nsw i32 32, %35
  %37 = trunc i32 %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_multiple_patterns_performance.patterns, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 5, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 10, 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 %47

47:                                               ; preds = %77, %44
  %48 = load i64, ptr %8, align 8, !tbaa !5
  %49 = icmp ult i64 %48, 5
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %52 = load i64, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i64 @strlen(ptr noundef %54) #9
  store i64 %55, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %73, %51
  %57 = load i64, ptr %10, align 8, !tbaa !5
  %58 = icmp ult i64 %57, 10
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %61 = call i32 @rand() #7
  %62 = sext i32 %61 to i64
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = sub i64 1048576, %63
  %65 = urem i64 %62, %64
  store i64 %65, ptr %11, align 8, !tbaa !5
  %66 = load ptr, ptr %2, align 8, !tbaa !9
  %67 = load i64, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %66, i64 %67
  %69 = load i64, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = load i64, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %68, ptr align 1 %71, i64 %72, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %73

73:                                               ; preds = %60
  %74 = load i64, ptr %10, align 8, !tbaa !5
  %75 = add i64 %74, 1
  store i64 %75, ptr %10, align 8, !tbaa !5
  br label %56, !llvm.loop !14

76:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %77

77:                                               ; preds = %76
  %78 = load i64, ptr %8, align 8, !tbaa !5
  %79 = add i64 %78, 1
  store i64 %79, ptr %8, align 8, !tbaa !5
  br label %47, !llvm.loop !15

80:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %81 = call i64 @clock() #7
  %82 = sitofp i64 %81 to double
  %83 = fdiv double %82, 1.000000e+06
  store double %83, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %114, %80
  %85 = load i64, ptr %14, align 8, !tbaa !5
  %86 = icmp ult i64 %85, 5
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %117

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 72, ptr %15) #7
  %89 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 0
  %90 = load i64, ptr %14, align 8, !tbaa !5
  %91 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  store ptr %92, ptr %89, align 8, !tbaa !18
  %93 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 1
  %94 = load i64, ptr %14, align 8, !tbaa !5
  %95 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = call i64 @strlen(ptr noundef %96) #9
  store i64 %97, ptr %93, align 8, !tbaa !21
  %98 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 2
  store ptr null, ptr %98, align 8, !tbaa !22
  %99 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 3
  store ptr null, ptr %99, align 8, !tbaa !23
  %100 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 4
  store i64 0, ptr %100, align 8, !tbaa !24
  %101 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 5
  store i8 1, ptr %101, align 8, !tbaa !25
  %102 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 6
  store i8 0, ptr %102, align 1, !tbaa !26
  %103 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 7
  store i8 0, ptr %103, align 2, !tbaa !27
  %104 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 8
  store i8 1, ptr %104, align 1, !tbaa !28
  %105 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 9
  store i8 0, ptr %105, align 4, !tbaa !29
  %106 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 10
  store i8 0, ptr %106, align 1, !tbaa !30
  %107 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 11
  store ptr null, ptr %107, align 8, !tbaa !31
  %108 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 12
  store ptr null, ptr %108, align 8, !tbaa !32
  %109 = getelementptr inbounds %struct.search_params, ptr %15, i32 0, i32 13
  store i64 -1, ptr %109, align 8, !tbaa !33
  %110 = load ptr, ptr %2, align 8, !tbaa !9
  %111 = call i64 @boyer_moore_search(ptr noundef %15, ptr noundef %110, i64 noundef 1048576, ptr noundef null)
  %112 = load i64, ptr %13, align 8, !tbaa !5
  %113 = add i64 %112, %111
  store i64 %113, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 72, ptr %15) #7
  br label %114

114:                                              ; preds = %88
  %115 = load i64, ptr %14, align 8, !tbaa !5
  %116 = add i64 %115, 1
  store i64 %116, ptr %14, align 8, !tbaa !5
  br label %84, !llvm.loop !34

117:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %118 = call i64 @clock() #7
  %119 = sitofp i64 %118 to double
  %120 = fdiv double %119, 1.000000e+06
  %121 = load double, ptr %12, align 8, !tbaa !16
  %122 = fsub double %120, %121
  store double %122, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #7
  %123 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 0
  store ptr null, ptr %123, align 8, !tbaa !18
  %124 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 1
  store i64 0, ptr %124, align 8, !tbaa !21
  %125 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 2
  %126 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 0
  store ptr %126, ptr %125, align 8, !tbaa !22
  %127 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 3
  %128 = call noalias ptr @malloc(i64 noundef 40) #8
  store ptr %128, ptr %127, align 8, !tbaa !23
  %129 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 4
  store i64 5, ptr %129, align 8, !tbaa !24
  %130 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 5
  store i8 1, ptr %130, align 8, !tbaa !25
  %131 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 6
  store i8 0, ptr %131, align 1, !tbaa !26
  %132 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 7
  store i8 0, ptr %132, align 2, !tbaa !27
  %133 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 8
  store i8 1, ptr %133, align 1, !tbaa !28
  %134 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 9
  store i8 0, ptr %134, align 4, !tbaa !29
  %135 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 10
  store i8 0, ptr %135, align 1, !tbaa !30
  %136 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 11
  store ptr null, ptr %136, align 8, !tbaa !31
  %137 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 12
  store ptr null, ptr %137, align 8, !tbaa !32
  %138 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 13
  store i64 -1, ptr %138, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %152, %117
  %140 = load i64, ptr %18, align 8, !tbaa !5
  %141 = icmp ult i64 %140, 5
  br i1 %141, label %143, label %142

142:                                              ; preds = %139
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %155

143:                                              ; preds = %139
  %144 = load i64, ptr %18, align 8, !tbaa !5
  %145 = getelementptr inbounds [5 x ptr], ptr %5, i64 0, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  %147 = call i64 @strlen(ptr noundef %146) #9
  %148 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 3
  %149 = load ptr, ptr %148, align 8, !tbaa !23
  %150 = load i64, ptr %18, align 8, !tbaa !5
  %151 = getelementptr inbounds i64, ptr %149, i64 %150
  store i64 %147, ptr %151, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %143
  %153 = load i64, ptr %18, align 8, !tbaa !5
  %154 = add i64 %153, 1
  store i64 %154, ptr %18, align 8, !tbaa !5
  br label %139, !llvm.loop !35

155:                                              ; preds = %142
  %156 = call ptr @ac_trie_build(ptr noundef %17)
  %157 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 12
  store ptr %156, ptr %157, align 8, !tbaa !32
  %158 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 12
  %159 = load ptr, ptr %158, align 8, !tbaa !32
  %160 = icmp ne ptr %159, null
  br i1 %160, label %168, label %161

161:                                              ; preds = %155
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.64)
  %163 = load i32, ptr @tests_failed, align 4, !tbaa !36
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr @tests_failed, align 4, !tbaa !36
  %165 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 3
  %166 = load ptr, ptr %165, align 8, !tbaa !23
  call void @free(ptr noundef %166) #7
  %167 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %167) #7
  store i32 1, ptr %3, align 4
  br label %216

168:                                              ; preds = %155
  %169 = call i64 @clock() #7
  %170 = sitofp i64 %169 to double
  %171 = fdiv double %170, 1.000000e+06
  store double %171, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %172 = load ptr, ptr %2, align 8, !tbaa !9
  %173 = call i64 @aho_corasick_search(ptr noundef %17, ptr noundef %172, i64 noundef 1048576, ptr noundef null)
  store i64 %173, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %174 = call i64 @clock() #7
  %175 = sitofp i64 %174 to double
  %176 = fdiv double %175, 1.000000e+06
  %177 = load double, ptr %12, align 8, !tbaa !16
  %178 = fsub double %176, %177
  store double %178, ptr %20, align 8, !tbaa !16
  %179 = call i32 (ptr, ...) @printf(ptr noundef @.str.65)
  %180 = load i64, ptr %13, align 8, !tbaa !5
  %181 = load double, ptr %16, align 8, !tbaa !16
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.56, i64 noundef %180, double noundef %181)
  %183 = load i64, ptr %19, align 8, !tbaa !5
  %184 = load double, ptr %20, align 8, !tbaa !16
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.57, i64 noundef %183, double noundef %184)
  %186 = load double, ptr %20, align 8, !tbaa !16
  %187 = fcmp ogt double %186, 0.000000e+00
  br i1 %187, label %188, label %193

188:                                              ; preds = %168
  %189 = load double, ptr %16, align 8, !tbaa !16
  %190 = load double, ptr %20, align 8, !tbaa !16
  %191 = fdiv double %189, %190
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.58, double noundef %191)
  br label %195

193:                                              ; preds = %168
  %194 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  br label %195

195:                                              ; preds = %193, %188
  br label %196

196:                                              ; preds = %195
  %197 = load i64, ptr %19, align 8, !tbaa !5
  %198 = load i64, ptr %13, align 8, !tbaa !5
  %199 = icmp eq i64 %197, %198
  br i1 %199, label %200, label %204

200:                                              ; preds = %196
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @.str.62)
  %202 = load i32, ptr @tests_passed, align 4, !tbaa !36
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr @tests_passed, align 4, !tbaa !36
  br label %208

204:                                              ; preds = %196
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @.str.62)
  %206 = load i32, ptr @tests_failed, align 4, !tbaa !36
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr @tests_failed, align 4, !tbaa !36
  br label %208

208:                                              ; preds = %204, %200
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209
  %211 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 12
  %212 = load ptr, ptr %211, align 8, !tbaa !32
  call void @ac_trie_free(ptr noundef %212)
  %213 = getelementptr inbounds %struct.search_params, ptr %17, i32 0, i32 3
  %214 = load ptr, ptr %213, align 8, !tbaa !23
  call void @free(ptr noundef %214) #7
  %215 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %215) #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 %216

216:                                              ; preds = %210, %161
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #7
  br label %217

217:                                              ; preds = %216, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  %218 = load i32, ptr %3, align 4
  switch i32 %218, label %220 [
    i32 0, label %219
    i32 1, label %219
  ]

219:                                              ; preds = %217, %217
  ret void

220:                                              ; preds = %217
  unreachable
}

; Function Attrs: nounwind
declare i32 @rand() #4

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 = { nounwind willreturn memory(read) "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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind willreturn memory(read) }

!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, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"search_params", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !20, i64 40, !20, i64 41, !20, i64 42, !20, i64 43, !20, i64 44, !20, i64 45, !10, i64 48, !10, i64 56, !6, i64 64}
!20 = !{!"_Bool", !7, i64 0}
!21 = !{!19, !6, i64 8}
!22 = !{!19, !10, i64 16}
!23 = !{!19, !10, i64 24}
!24 = !{!19, !6, i64 32}
!25 = !{!19, !20, i64 40}
!26 = !{!19, !20, i64 41}
!27 = !{!19, !20, i64 42}
!28 = !{!19, !20, i64 43}
!29 = !{!19, !20, i64 44}
!30 = !{!19, !20, i64 45}
!31 = !{!19, !10, i64 48}
!32 = !{!19, !10, i64 56}
!33 = !{!19, !6, i64 64}
!34 = distinct !{!34, !13}
!35 = distinct !{!35, !13}
!36 = !{!37, !37, i64 0}
!37 = !{!"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
@stderr = external local_unnamed_addr global ptr, align 8
@.str.47 = external hidden unnamed_addr constant [44 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.60 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [42 x i8], align 1
@__const.test_multiple_patterns_performance.patterns = external hidden unnamed_addr constant [5 x ptr], align 16
@.str.64 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [42 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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; 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) #3

declare ptr @ac_trie_build(ptr noundef) local_unnamed_addr #4

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

declare void @ac_trie_free(ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

6:                                                ; preds = %0
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.63) #11
  br label %154

9:                                                ; preds = %.preheader
  %10 = getelementptr inbounds i8, ptr %5, i64 1048576
  store i8 0, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %1, ptr noundef nonnull align 16 dereferenceable(40) @__const.test_multiple_patterns_performance.patterns, i64 40, i1 false)
  br label %77

.preheader:                                       ; preds = %0, %.preheader
  %.047 = phi i64 [ %16, %.preheader ], [ 0, %0 ]
  %11 = tail call i32 @rand() #12
  %12 = srem i32 %11, 95
  %13 = trunc nsw i32 %12 to i8
  %14 = add nsw i8 %13, 32
  %15 = getelementptr inbounds i8, ptr %5, i64 %.047
  store i8 %14, ptr %15, align 1, !tbaa !9
  %16 = add nuw nsw i64 %.047, 1
  %exitcond.not = icmp eq i64 %16, 1048576
  br i1 %exitcond.not, label %9, label %.preheader, !llvm.loop !10

17:                                               ; preds = %77
  %18 = tail call i64 @clock() #12
  %19 = sitofp i64 %18 to double
  %20 = getelementptr inbounds i8, ptr %2, i64 8
  %21 = getelementptr inbounds i8, ptr %2, i64 16
  %22 = getelementptr inbounds i8, ptr %2, i64 40
  %23 = getelementptr inbounds i8, ptr %2, i64 44
  %24 = getelementptr inbounds i8, ptr %2, i64 45
  %25 = getelementptr inbounds i8, ptr %2, i64 48
  %26 = getelementptr inbounds i8, ptr %2, i64 64
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #12
  %27 = load ptr, ptr %1, align 16, !tbaa !5
  store ptr %27, ptr %2, align 8, !tbaa !12
  %28 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %27) #13
  store i64 %28, ptr %20, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %22, align 8, !tbaa !17
  store i8 0, ptr %23, align 4, !tbaa !18
  store i8 0, ptr %24, align 1, !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, i8 0, i64 16, i1 false)
  store i64 -1, ptr %26, align 8, !tbaa !20
  %29 = call i64 @boyer_moore_search(ptr noundef nonnull %2, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #12
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #12
  %30 = getelementptr inbounds i8, ptr %1, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %31, ptr %2, align 8, !tbaa !12
  %32 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %31) #13
  store i64 %32, ptr %20, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %22, align 8, !tbaa !17
  store i8 0, ptr %23, align 4, !tbaa !18
  store i8 0, ptr %24, align 1, !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, i8 0, i64 16, i1 false)
  store i64 -1, ptr %26, align 8, !tbaa !20
  %33 = call i64 @boyer_moore_search(ptr noundef nonnull %2, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #12
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #12
  %34 = getelementptr inbounds i8, ptr %1, i64 16
  %35 = load ptr, ptr %34, align 16, !tbaa !5
  store ptr %35, ptr %2, align 8, !tbaa !12
  %36 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %35) #13
  store i64 %36, ptr %20, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %22, align 8, !tbaa !17
  store i8 0, ptr %23, align 4, !tbaa !18
  store i8 0, ptr %24, align 1, !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, i8 0, i64 16, i1 false)
  store i64 -1, ptr %26, align 8, !tbaa !20
  %37 = call i64 @boyer_moore_search(ptr noundef nonnull %2, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #12
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #12
  %38 = getelementptr inbounds i8, ptr %1, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  store ptr %39, ptr %2, align 8, !tbaa !12
  %40 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %39) #13
  store i64 %40, ptr %20, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %22, align 8, !tbaa !17
  store i8 0, ptr %23, align 4, !tbaa !18
  store i8 0, ptr %24, align 1, !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, i8 0, i64 16, i1 false)
  store i64 -1, ptr %26, align 8, !tbaa !20
  %41 = call i64 @boyer_moore_search(ptr noundef nonnull %2, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #12
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #12
  %42 = getelementptr inbounds i8, ptr %1, i64 32
  %43 = load ptr, ptr %42, align 16, !tbaa !5
  store ptr %43, ptr %2, align 8, !tbaa !12
  %44 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %43) #13
  store i64 %44, ptr %20, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %22, align 8, !tbaa !17
  store i8 0, ptr %23, align 4, !tbaa !18
  store i8 0, ptr %24, align 1, !tbaa !19
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, i8 0, i64 16, i1 false)
  store i64 -1, ptr %26, align 8, !tbaa !20
  %45 = call i64 @boyer_moore_search(ptr noundef nonnull %2, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #12
  %46 = call i64 @clock() #12
  %47 = sitofp i64 %46 to double
  %48 = fdiv double %47, 1.000000e+06
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #12
  %49 = getelementptr inbounds i8, ptr %3, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store ptr %1, ptr %49, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %3, i64 24
  %51 = call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #10
  store ptr %51, ptr %50, align 8, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %3, i64 32
  store i64 5, ptr %52, align 8, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %3, i64 40
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %53, align 8, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %3, i64 44
  store i8 0, ptr %54, align 4, !tbaa !18
  %55 = getelementptr inbounds i8, ptr %3, i64 45
  store i8 0, ptr %55, align 1, !tbaa !19
  %56 = getelementptr inbounds i8, ptr %3, i64 48
  %57 = getelementptr inbounds i8, ptr %3, i64 56
  %58 = getelementptr inbounds i8, ptr %3, i64 64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %56, i8 0, i64 16, i1 false)
  store i64 -1, ptr %58, align 8, !tbaa !20
  %59 = load ptr, ptr %1, align 16, !tbaa !5
  %60 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %59) #13
  store i64 %60, ptr %51, align 8, !tbaa !24
  %61 = load ptr, ptr %30, align 8, !tbaa !5
  %62 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %61) #13
  %63 = getelementptr inbounds i8, ptr %51, i64 8
  store i64 %62, ptr %63, align 8, !tbaa !24
  %64 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %35) #13
  %65 = getelementptr inbounds i8, ptr %51, i64 16
  store i64 %64, ptr %65, align 8, !tbaa !24
  %66 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %39) #13
  %67 = getelementptr inbounds i8, ptr %51, i64 24
  store i64 %66, ptr %67, align 8, !tbaa !24
  %68 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %43) #13
  %69 = getelementptr inbounds i8, ptr %51, i64 32
  store i64 %68, ptr %69, align 8, !tbaa !24
  %70 = add i64 %33, %29
  %71 = add i64 %37, %70
  %72 = add i64 %41, %71
  %73 = add i64 %45, %72
  %74 = fdiv double %19, 1.000000e+06
  %75 = fsub double %48, %74
  %76 = call ptr @ac_trie_build(ptr noundef nonnull %3) #12
  store ptr %76, ptr %57, align 8, !tbaa !25
  %.not46 = icmp eq ptr %76, null
  br i1 %.not46, label %123, label %127

77:                                               ; preds = %9, %77
  %.04049 = phi i64 [ 0, %9 ], [ %122, %77 ]
  %78 = getelementptr inbounds [5 x ptr], ptr %1, i64 0, i64 %.04049
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %79) #13
  %81 = sub i64 1048576, %80
  %82 = tail call i32 @rand() #12
  %83 = sext i32 %82 to i64
  %84 = urem i64 %83, %81
  %85 = getelementptr inbounds i8, ptr %5, i64 %84
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %85, ptr align 1 %79, i64 %80, i1 false)
  %86 = tail call i32 @rand() #12
  %87 = sext i32 %86 to i64
  %88 = urem i64 %87, %81
  %89 = getelementptr inbounds i8, ptr %5, i64 %88
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %89, ptr align 1 %79, i64 %80, i1 false)
  %90 = tail call i32 @rand() #12
  %91 = sext i32 %90 to i64
  %92 = urem i64 %91, %81
  %93 = getelementptr inbounds i8, ptr %5, i64 %92
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %93, ptr align 1 %79, i64 %80, i1 false)
  %94 = tail call i32 @rand() #12
  %95 = sext i32 %94 to i64
  %96 = urem i64 %95, %81
  %97 = getelementptr inbounds i8, ptr %5, i64 %96
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %97, ptr align 1 %79, i64 %80, i1 false)
  %98 = tail call i32 @rand() #12
  %99 = sext i32 %98 to i64
  %100 = urem i64 %99, %81
  %101 = getelementptr inbounds i8, ptr %5, i64 %100
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %101, ptr align 1 %79, i64 %80, i1 false)
  %102 = tail call i32 @rand() #12
  %103 = sext i32 %102 to i64
  %104 = urem i64 %103, %81
  %105 = getelementptr inbounds i8, ptr %5, i64 %104
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %105, ptr align 1 %79, i64 %80, i1 false)
  %106 = tail call i32 @rand() #12
  %107 = sext i32 %106 to i64
  %108 = urem i64 %107, %81
  %109 = getelementptr inbounds i8, ptr %5, i64 %108
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %109, ptr align 1 %79, i64 %80, i1 false)
  %110 = tail call i32 @rand() #12
  %111 = sext i32 %110 to i64
  %112 = urem i64 %111, %81
  %113 = getelementptr inbounds i8, ptr %5, i64 %112
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %113, ptr align 1 %79, i64 %80, i1 false)
  %114 = tail call i32 @rand() #12
  %115 = sext i32 %114 to i64
  %116 = urem i64 %115, %81
  %117 = getelementptr inbounds i8, ptr %5, i64 %116
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %117, ptr align 1 %79, i64 %80, i1 false)
  %118 = tail call i32 @rand() #12
  %119 = sext i32 %118 to i64
  %120 = urem i64 %119, %81
  %121 = getelementptr inbounds i8, ptr %5, i64 %120
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %121, ptr align 1 %79, i64 %80, i1 false)
  %122 = add nuw nsw i64 %.04049, 1
  %exitcond54.not = icmp eq i64 %122, 5
  br i1 %exitcond54.not, label %17, label %77, !llvm.loop !26

123:                                              ; preds = %17
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.64)
  %125 = load i32, ptr @tests_failed, align 4, !tbaa !27
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr @tests_failed, align 4, !tbaa !27
  br label %152

127:                                              ; preds = %17
  %128 = call i64 @clock() #12
  %129 = call i64 @aho_corasick_search(ptr noundef nonnull %3, ptr noundef nonnull %5, i64 noundef 1048576, ptr noundef null) #12
  %130 = call i64 @clock() #12
  %131 = insertelement <2 x i64> poison, i64 %130, i64 0
  %132 = insertelement <2 x i64> %131, i64 %128, i64 1
  %133 = sitofp <2 x i64> %132 to <2 x double>
  %134 = fdiv <2 x double> %133, <double 1.000000e+06, double 1.000000e+06>
  %shift = shufflevector <2 x double> %134, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %135 = fsub <2 x double> %134, %shift
  %136 = extractelement <2 x double> %135, i64 0
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.65)
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56, i64 noundef %73, double noundef %75)
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57, i64 noundef %129, double noundef %136)
  %140 = fcmp ogt double %136, 0.000000e+00
  br i1 %140, label %141, label %144

141:                                              ; preds = %127
  %142 = fdiv double %75, %136
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58, double noundef %142)
  br label %146

144:                                              ; preds = %127
  %145 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  br label %146

146:                                              ; preds = %141, %144
  %147 = icmp eq i64 %129, %73
  %.str.7..str.9 = select i1 %147, ptr @.str.7, ptr @.str.9
  %tests_passed.tests_failed = select i1 %147, ptr @tests_passed, ptr @tests_failed
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.9, ptr noundef nonnull @.str.62)
  %149 = load i32, ptr %tests_passed.tests_failed, align 4, !tbaa !27
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %tests_passed.tests_failed, align 4, !tbaa !27
  %151 = load ptr, ptr %57, align 8, !tbaa !25
  call void @ac_trie_free(ptr noundef %151) #12
  br label %152

152:                                              ; preds = %146, %123
  %153 = load ptr, ptr %50, align 8, !tbaa !22
  call void @free(ptr noundef %153) #12
  call void @free(ptr noundef %5) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #12
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #12
  br label %154

154:                                              ; preds = %152, %6
  ret void
}

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #6

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

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 nofree nounwind willreturn memory(argmem: read) "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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 = { 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 #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 = { 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 #8 = { 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 #9 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { cold nounwind }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !6, i64 0}
!13 = !{!"search_params", !6, i64 0, !14, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !15, i64 40, !15, i64 41, !15, i64 42, !15, i64 43, !15, i64 44, !15, i64 45, !6, i64 48, !6, i64 56, !14, i64 64}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!13, !14, i64 8}
!17 = !{!15, !15, i64 0}
!18 = !{!13, !15, i64 44}
!19 = !{!13, !15, i64 45}
!20 = !{!13, !14, i64 64}
!21 = !{!13, !6, i64 16}
!22 = !{!13, !6, i64 24}
!23 = !{!13, !14, i64 32}
!24 = !{!14, !14, i64 0}
!25 = !{!13, !6, i64 56}
!26 = distinct !{!26, !11}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !7, i64 0}


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