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

; 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_passed = external dso_local global i32, align 4
@tests_failed = external dso_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @create_literal_params(ptr dead_on_unwind noalias writable sret(%struct.search_params) align 8, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #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 allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @cleanup_params(ptr noundef) #0

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @test_bridge_boyer_moore(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @test_bridge_kmp(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @test_performance_new() #0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %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 ptr, align 8
  %15 = alloca %struct.search_params, align 8
  %16 = alloca %struct.search_params, align 8
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.57)
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  store i64 10485760, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %18 = call noalias ptr @malloc(i64 noundef 10485761) #9
  store ptr %18, ptr %2, align 8, !tbaa !9
  %19 = load ptr, ptr %2, align 8, !tbaa !9
  %20 = icmp ne ptr %19, null
  br i1 %20, label %25, label %21

21:                                               ; preds = %0
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %23 = load i32, ptr @tests_failed, align 4, !tbaa !11
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr @tests_failed, align 4, !tbaa !11
  store i32 1, ptr %3, align 4
  br label %118

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

26:                                               ; preds = %38, %25
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = icmp ult i64 %27, 10485760
  br i1 %28, label %30, label %29

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

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

38:                                               ; preds = %30
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = add i64 %39, 1
  store i64 %40, ptr %4, align 8, !tbaa !5
  br label %26, !llvm.loop !14

41:                                               ; preds = %29
  %42 = load ptr, ptr %2, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 10485760
  store i8 0, ptr %43, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store ptr @.str.59, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = call i64 @strlen(ptr noundef %44) #10
  store i64 %45, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 2621440, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store i64 7864320, ptr %8, align 8, !tbaa !5
  %46 = load ptr, ptr %2, align 8, !tbaa !9
  %47 = load i64, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %46, i64 %47
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = load i64, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %48, ptr align 1 %49, i64 %50, i1 false)
  %51 = load ptr, ptr %2, align 8, !tbaa !9
  %52 = load i64, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %51, i64 %52
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = load i64, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %53, ptr align 1 %54, i64 %55, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store i64 2, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = load i64, ptr %6, align 8, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.60, i64 noundef 10, ptr noundef %56, i64 noundef %57)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %15) #8
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  call void @create_literal_params(ptr dead_on_unwind writable sret(%struct.search_params) align 8 %15, ptr noundef %59, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %60 = call i64 @clock() #8
  store i64 %60, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %2, align 8, !tbaa !9
  %62 = load ptr, ptr %14, align 8, !tbaa !9
  %63 = call i64 @test_bridge_boyer_moore(ptr noundef %15, ptr noundef %61, i64 noundef 10485760, ptr noundef %62)
  store i64 %63, ptr %13, align 8, !tbaa !5
  %64 = call i64 @clock() #8
  store i64 %64, ptr %11, align 8, !tbaa !5
  %65 = load i64, ptr %11, align 8, !tbaa !5
  %66 = load i64, ptr %10, align 8, !tbaa !5
  %67 = sub nsw i64 %65, %66
  %68 = sitofp i64 %67 to double
  %69 = fdiv double %68, 1.000000e+06
  store double %69, ptr %12, align 8, !tbaa !16
  %70 = load double, ptr %12, align 8, !tbaa !16
  %71 = load i64, ptr %13, align 8, !tbaa !5
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.61, double noundef %70, i64 noundef %71)
  br label %73

73:                                               ; preds = %41
  %74 = load i64, ptr %13, align 8, !tbaa !5
  %75 = load i64, ptr %9, align 8, !tbaa !5
  %76 = icmp eq i64 %74, %75
  br i1 %76, label %77, label %81

77:                                               ; preds = %73
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef @.str.62)
  %79 = load i32, ptr @tests_passed, align 4, !tbaa !11
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr @tests_passed, align 4, !tbaa !11
  br label %85

81:                                               ; preds = %73
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @.str.62)
  %83 = load i32, ptr @tests_failed, align 4, !tbaa !11
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr @tests_failed, align 4, !tbaa !11
  br label %85

85:                                               ; preds = %81, %77
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  call void @cleanup_params(ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 72, ptr %16) #8
  %88 = load ptr, ptr %5, align 8, !tbaa !9
  call void @create_literal_params(ptr dead_on_unwind writable sret(%struct.search_params) align 8 %16, ptr noundef %88, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %89 = call i64 @clock() #8
  store i64 %89, ptr %10, align 8, !tbaa !5
  %90 = load ptr, ptr %2, align 8, !tbaa !9
  %91 = load ptr, ptr %14, align 8, !tbaa !9
  %92 = call i64 @test_bridge_kmp(ptr noundef %16, ptr noundef %90, i64 noundef 10485760, ptr noundef %91)
  store i64 %92, ptr %13, align 8, !tbaa !5
  %93 = call i64 @clock() #8
  store i64 %93, ptr %11, align 8, !tbaa !5
  %94 = load i64, ptr %11, align 8, !tbaa !5
  %95 = load i64, ptr %10, align 8, !tbaa !5
  %96 = sub nsw i64 %94, %95
  %97 = sitofp i64 %96 to double
  %98 = fdiv double %97, 1.000000e+06
  store double %98, ptr %12, align 8, !tbaa !16
  %99 = load double, ptr %12, align 8, !tbaa !16
  %100 = load i64, ptr %13, align 8, !tbaa !5
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.63, double noundef %99, i64 noundef %100)
  br label %102

102:                                              ; preds = %87
  %103 = load i64, ptr %13, align 8, !tbaa !5
  %104 = load i64, ptr %9, align 8, !tbaa !5
  %105 = icmp eq i64 %103, %104
  br i1 %105, label %106, label %110

106:                                              ; preds = %102
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef @.str.64)
  %108 = load i32, ptr @tests_passed, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr @tests_passed, align 4, !tbaa !11
  br label %114

110:                                              ; preds = %102
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @.str.64)
  %112 = load i32, ptr @tests_failed, align 4, !tbaa !11
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr @tests_failed, align 4, !tbaa !11
  br label %114

114:                                              ; preds = %110, %106
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  call void @cleanup_params(ptr noundef %16)
  %117 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %117) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  store i32 0, ptr %3, align 4
  br label %118

118:                                              ; preds = %116, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  %119 = load i32, ptr %3, align 4
  switch i32 %119, label %121 [
    i32 0, label %120
    i32 1, label %120
  ]

120:                                              ; preds = %118, %118
  ret void

121:                                              ; preds = %118
  unreachable
}

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { 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 #6 = { inlinehint 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !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_passed = external dso_local local_unnamed_addr global i32, align 4
@tests_failed = external dso_local local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @create_literal_params(ptr dead_on_unwind noalias writable sret(%struct.search_params) align 8, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) 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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture 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: nounwind uwtable
declare dso_local void @cleanup_params(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @test_bridge_boyer_moore(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @test_bridge_kmp(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
define dso_local void @test_performance_new() local_unnamed_addr #0 {
  %1 = alloca %struct.search_params, align 8
  %2 = alloca %struct.search_params, align 8
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57)
  %4 = tail call noalias dereferenceable_or_null(10485761) ptr @malloc(i64 noundef 10485761) #9
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %14, 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 ]
  %5 = 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>
  %6 = trunc nuw nsw <16 x i32> %5 to <16 x i8>
  %7 = add nuw nsw <16 x i8> %6, <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>
  %8 = getelementptr inbounds i8, ptr %4, i64 %index
  store <16 x i8> %7, ptr %8, 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>
  %9 = 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>
  %10 = trunc nuw nsw <16 x i32> %9 to <16 x i8>
  %11 = add nuw nsw <16 x i8> %10, <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>
  %12 = getelementptr inbounds i8, ptr %4, i64 %index.next
  store <16 x i8> %11, ptr %12, 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>
  %13 = icmp eq i64 %index.next.1, 10485760
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !8

14:                                               ; preds = %0
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %16 = load i32, ptr @tests_failed, align 4, !tbaa !12
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr @tests_failed, align 4, !tbaa !12
  br label %45

middle.block:                                     ; preds = %vector.body
  %18 = getelementptr inbounds i8, ptr %4, i64 10485760
  store i8 0, ptr %18, align 1, !tbaa !5
  %19 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str.59) #10
  %20 = getelementptr inbounds i8, ptr %4, i64 2621440
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 @.str.59, i64 %19, i1 false)
  %21 = getelementptr inbounds i8, ptr %4, i64 7864320
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %21, ptr nonnull align 1 @.str.59, i64 %19, i1 false)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60, i64 noundef 10, ptr noundef nonnull @.str.59, i64 noundef %19)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %1) #11
  call void @create_literal_params(ptr dead_on_unwind nonnull writable sret(%struct.search_params) align 8 %1, ptr noundef nonnull @.str.59, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %23 = call i64 @clock() #11
  %24 = call i64 @test_bridge_boyer_moore(ptr noundef nonnull %1, ptr noundef nonnull %4, i64 noundef 10485760, ptr noundef null)
  %25 = call i64 @clock() #11
  %26 = sub nsw i64 %25, %23
  %27 = sitofp i64 %26 to double
  %28 = fdiv double %27, 1.000000e+06
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61, double noundef %28, i64 noundef %24)
  %30 = icmp eq i64 %24, 2
  %.str.5..str.7 = select i1 %30, ptr @.str.5, ptr @.str.7
  %tests_passed.tests_failed = select i1 %30, ptr @tests_passed, ptr @tests_failed
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5..str.7, ptr noundef nonnull @.str.62)
  %32 = load i32, ptr %tests_passed.tests_failed, align 4, !tbaa !12
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %tests_passed.tests_failed, align 4, !tbaa !12
  call void @cleanup_params(ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #11
  call void @create_literal_params(ptr dead_on_unwind nonnull writable sret(%struct.search_params) align 8 %2, ptr noundef nonnull @.str.59, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %34 = call i64 @clock() #11
  %35 = call i64 @test_bridge_kmp(ptr noundef nonnull %2, ptr noundef nonnull %4, i64 noundef 10485760, ptr noundef null)
  %36 = call i64 @clock() #11
  %37 = sub nsw i64 %36, %34
  %38 = sitofp i64 %37 to double
  %39 = fdiv double %38, 1.000000e+06
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.63, double noundef %39, i64 noundef %35)
  %41 = icmp eq i64 %35, 2
  %.str.7.sink43 = select i1 %41, ptr @.str.5, ptr @.str.7
  %tests_failed.sink42 = select i1 %41, ptr @tests_passed, ptr @tests_failed
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7.sink43, ptr noundef nonnull @.str.64)
  %43 = load i32, ptr %tests_failed.sink42, align 4, !tbaa !12
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %tests_failed.sink42, align 4, !tbaa !12
  call void @cleanup_params(ptr noundef nonnull %2)
  call void @free(ptr noundef nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %1) #11
  br label %45

45:                                               ; preds = %middle.block, %14
  ret void
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { inlinehint 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!"int", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass