; LLVM IR from hanzohasashi33/Competetive_programming :: Snippets/DSA_PROBLEMS (String_Mapping_using_Rollinghash)

; 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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @stringmatch(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %11 = call noalias ptr @malloc(i64 noundef 1000000) #6
  store ptr %11, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %14 = call noalias ptr @malloc(i64 noundef 1000000) #6
  store ptr %14, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = call i64 @strlen(ptr noundef %17) #7
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call i64 @strlen(ptr noundef %20) #7
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %40, %0
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %27, label %43

27:                                               ; preds = %23
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %28, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = sub nsw i32 %33, 48
  %35 = trunc i32 %34 to i8
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i8, ptr %36, i64 %38
  store i8 %35, ptr %39, align 1, !tbaa !11
  br label %40

40:                                               ; preds = %27
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !9
  br label %23, !llvm.loop !12

43:                                               ; preds = %23
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %61, %43
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %64

48:                                               ; preds = %44
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = sub nsw i32 %54, 48
  %56 = trunc i32 %55 to i8
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !11
  br label %61

61:                                               ; preds = %48
  %62 = load i32, ptr %6, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %6, align 4, !tbaa !9
  br label %44, !llvm.loop !14

64:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 2, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 0
  %67 = load i8, ptr %66, align 1, !tbaa !11
  %68 = sext i8 %67 to i32
  store i32 %68, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 0
  %71 = load i8, ptr %70, align 1, !tbaa !11
  %72 = sext i8 %71 to i32
  store i32 %72, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %98, %64
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %101

77:                                               ; preds = %73
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = mul nsw i32 %78, 2
  store i32 %79, ptr %8, align 4, !tbaa !9
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = mul nsw i32 %80, 2
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %82, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = sext i8 %86 to i32
  %88 = add nsw i32 %81, %87
  store i32 %88, ptr %10, align 4, !tbaa !9
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = mul nsw i32 %89, 2
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !11
  %96 = sext i8 %95 to i32
  %97 = add nsw i32 %90, %96
  store i32 %97, ptr %9, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %77
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %6, align 4, !tbaa !9
  br label %73, !llvm.loop !15

101:                                              ; preds = %73
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = icmp eq i32 %102, %103
  br i1 %104, label %105, label %116

105:                                              ; preds = %101
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = load i32, ptr %4, align 4, !tbaa !9
  %109 = load i32, ptr %5, align 4, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !9
  %111 = call i32 @stringmatch(ptr noundef %106, ptr noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef %110)
  %112 = icmp eq i32 %111, 1
  br i1 %112, label %113, label %115

113:                                              ; preds = %105
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %115

115:                                              ; preds = %113, %105
  br label %116

116:                                              ; preds = %115, %101
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %163, %116
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = load i32, ptr %5, align 4, !tbaa !9
  %121 = sub nsw i32 %119, %120
  %122 = add nsw i32 %121, 1
  %123 = icmp slt i32 %118, %122
  br i1 %123, label %124, label %166

124:                                              ; preds = %117
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = mul nsw i32 %125, 2
  %127 = load ptr, ptr %2, align 8, !tbaa !5
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = add nsw i32 %128, %129
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i8, ptr %127, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = sext i8 %134 to i32
  %136 = add nsw i32 %126, %135
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = load i32, ptr %6, align 4, !tbaa !9
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i8, ptr %137, i64 %140
  %142 = load i8, ptr %141, align 1, !tbaa !11
  %143 = sext i8 %142 to i32
  %144 = load i32, ptr %8, align 4, !tbaa !9
  %145 = mul nsw i32 %143, %144
  %146 = sub nsw i32 %136, %145
  store i32 %146, ptr %9, align 4, !tbaa !9
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = icmp eq i32 %147, %148
  br i1 %149, label %150, label %162

150:                                              ; preds = %124
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = load i32, ptr %4, align 4, !tbaa !9
  %154 = load i32, ptr %5, align 4, !tbaa !9
  %155 = load i32, ptr %6, align 4, !tbaa !9
  %156 = call i32 @stringmatch(ptr noundef %151, ptr noundef %152, i32 noundef %153, i32 noundef %154, i32 noundef %155)
  %157 = icmp eq i32 %156, 1
  br i1 %157, label %158, label %161

158:                                              ; preds = %150
  %159 = load i32, ptr %6, align 4, !tbaa !9
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %159)
  br label %161

161:                                              ; preds = %158, %150
  br label %162

162:                                              ; preds = %161, %124
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %6, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %6, align 4, !tbaa !9
  br label %117, !llvm.loop !16

166:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

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

declare i32 @printf(ptr noundef, ...) #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 = { "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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !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 = distinct !{!16, !13}


; 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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @stringmatch(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noalias dereferenceable_or_null(1000000) ptr @malloc(i64 noundef 1000000) #4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %1)
  %3 = tail call noalias dereferenceable_or_null(1000000) ptr @malloc(i64 noundef 1000000) #4
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %3)
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #5
  %6 = trunc i64 %5 to i32
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #5
  %8 = trunc i64 %7 to i32
  %9 = icmp sgt i32 %6, 0
  br i1 %9, label %iter.check, label %.preheader

iter.check:                                       ; preds = %0
  %wide.trip.count = and i64 %5, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check107 = icmp ult i64 %wide.trip.count, 32
  br i1 %min.iters.check107, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.mod.vf = and i64 %5, 31
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %10 = getelementptr inbounds i8, ptr %1, i64 %index
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %wide.load = load <16 x i8>, ptr %10, align 1, !tbaa !5
  %wide.load108 = load <16 x i8>, ptr %11, align 1, !tbaa !5
  %12 = add <16 x i8> %wide.load, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %13 = add <16 x i8> %wide.load108, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <16 x i8> %12, ptr %10, align 1, !tbaa !5
  store <16 x i8> %13, ptr %11, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %14 = icmp eq i64 %index.next, %n.vec
  br i1 %14, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %.preheader, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %min.epilog.iters.check = icmp ult i64 %n.mod.vf, 8
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec110, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.mod.vf109 = and i64 %5, 7
  %n.vec110 = sub nsw i64 %wide.trip.count, %n.mod.vf109
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index111 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next113, %vec.epilog.vector.body ]
  %15 = getelementptr inbounds i8, ptr %1, i64 %index111
  %wide.load112 = load <8 x i8>, ptr %15, align 1, !tbaa !5
  %16 = add <8 x i8> %wide.load112, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <8 x i8> %16, ptr %15, align 1, !tbaa !5
  %index.next113 = add nuw i64 %index111, 8
  %17 = icmp eq i64 %index.next113, %n.vec110
  br i1 %17, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n114 = icmp eq i64 %n.mod.vf109, 0
  br i1 %cmp.n114, label %.preheader, label %.lr.ph.preheader

.preheader:                                       ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %0
  %18 = icmp sgt i32 %8, 0
  br i1 %18, label %iter.check118, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader
  %19 = load i8, ptr %1, align 1, !tbaa !5
  %20 = sext i8 %19 to i32
  %21 = load i8, ptr %3, align 1, !tbaa !5
  %22 = sext i8 %21 to i32
  br label %._crit_edge70

iter.check118:                                    ; preds = %.preheader
  %wide.trip.count89 = and i64 %7, 2147483647
  %min.iters.check116 = icmp ult i64 %wide.trip.count89, 8
  br i1 %min.iters.check116, label %.lr.ph63.preheader, label %vector.main.loop.iter.check120

vector.main.loop.iter.check120:                   ; preds = %iter.check118
  %min.iters.check119 = icmp ult i64 %wide.trip.count89, 32
  br i1 %min.iters.check119, label %vec.epilog.ph132, label %vector.ph121

vector.ph121:                                     ; preds = %vector.main.loop.iter.check120
  %n.mod.vf122 = and i64 %7, 31
  %n.vec123 = sub nsw i64 %wide.trip.count89, %n.mod.vf122
  br label %vector.body124

vector.body124:                                   ; preds = %vector.body124, %vector.ph121
  %index125 = phi i64 [ 0, %vector.ph121 ], [ %index.next128, %vector.body124 ]
  %23 = getelementptr inbounds i8, ptr %3, i64 %index125
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load126 = load <16 x i8>, ptr %23, align 1, !tbaa !5
  %wide.load127 = load <16 x i8>, ptr %24, align 1, !tbaa !5
  %25 = add <16 x i8> %wide.load126, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %26 = add <16 x i8> %wide.load127, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <16 x i8> %25, ptr %23, align 1, !tbaa !5
  store <16 x i8> %26, ptr %24, align 1, !tbaa !5
  %index.next128 = add nuw i64 %index125, 32
  %27 = icmp eq i64 %index.next128, %n.vec123
  br i1 %27, label %middle.block115, label %vector.body124, !llvm.loop !13

middle.block115:                                  ; preds = %vector.body124
  %cmp.n129 = icmp eq i64 %n.mod.vf122, 0
  br i1 %cmp.n129, label %._crit_edge, label %vec.epilog.iter.check133

vec.epilog.iter.check133:                         ; preds = %middle.block115
  %min.epilog.iters.check135 = icmp ult i64 %n.mod.vf122, 8
  br i1 %min.epilog.iters.check135, label %.lr.ph63.preheader, label %vec.epilog.ph132

.lr.ph63.preheader:                               ; preds = %vec.epilog.middle.block130, %iter.check118, %vec.epilog.iter.check133
  %indvars.iv86.ph = phi i64 [ 0, %iter.check118 ], [ %n.vec123, %vec.epilog.iter.check133 ], [ %n.vec138, %vec.epilog.middle.block130 ]
  br label %.lr.ph63

vec.epilog.ph132:                                 ; preds = %vector.main.loop.iter.check120, %vec.epilog.iter.check133
  %vec.epilog.resume.val136 = phi i64 [ %n.vec123, %vec.epilog.iter.check133 ], [ 0, %vector.main.loop.iter.check120 ]
  %n.mod.vf137 = and i64 %7, 7
  %n.vec138 = sub nsw i64 %wide.trip.count89, %n.mod.vf137
  br label %vec.epilog.vector.body140

vec.epilog.vector.body140:                        ; preds = %vec.epilog.vector.body140, %vec.epilog.ph132
  %index141 = phi i64 [ %vec.epilog.resume.val136, %vec.epilog.ph132 ], [ %index.next143, %vec.epilog.vector.body140 ]
  %28 = getelementptr inbounds i8, ptr %3, i64 %index141
  %wide.load142 = load <8 x i8>, ptr %28, align 1, !tbaa !5
  %29 = add <8 x i8> %wide.load142, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <8 x i8> %29, ptr %28, align 1, !tbaa !5
  %index.next143 = add nuw i64 %index141, 8
  %30 = icmp eq i64 %index.next143, %n.vec138
  br i1 %30, label %vec.epilog.middle.block130, label %vec.epilog.vector.body140, !llvm.loop !14

vec.epilog.middle.block130:                       ; preds = %vec.epilog.vector.body140
  %cmp.n144 = icmp eq i64 %n.mod.vf137, 0
  br i1 %cmp.n144, label %._crit_edge, label %.lr.ph63.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %31 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = add i8 %32, -48
  store i8 %33, ptr %31, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !15

.lr.ph63:                                         ; preds = %.lr.ph63.preheader, %.lr.ph63
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph63 ], [ %indvars.iv86.ph, %.lr.ph63.preheader ]
  %34 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv86
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = add i8 %35, -48
  store i8 %36, ptr %34, align 1, !tbaa !5
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge, label %.lr.ph63, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph63, %vec.epilog.middle.block130, %middle.block115
  %37 = load i8, ptr %1, align 1, !tbaa !5
  %38 = sext i8 %37 to i32
  %39 = load i8, ptr %3, align 1, !tbaa !5
  %40 = sext i8 %39 to i32
  %.not = icmp eq i32 %8, 1
  br i1 %.not, label %._crit_edge70, label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %._crit_edge
  %wide.trip.count94 = and i64 %7, 2147483647
  %41 = add nsw i64 %wide.trip.count94, -1
  %xtraiter = and i64 %41, 1
  %42 = icmp eq i64 %wide.trip.count94, 2
  br i1 %42, label %._crit_edge70.loopexit.unr-lcssa, label %.lr.ph69.preheader.new

.lr.ph69.preheader.new:                           ; preds = %.lr.ph69.preheader
  %unroll_iter = and i64 %41, -2
  br label %.lr.ph69

.lr.ph69:                                         ; preds = %.lr.ph69, %.lr.ph69.preheader.new
  %indvars.iv91 = phi i64 [ 1, %.lr.ph69.preheader.new ], [ %indvars.iv.next92.1, %.lr.ph69 ]
  %.067 = phi i32 [ %40, %.lr.ph69.preheader.new ], [ %56, %.lr.ph69 ]
  %.05566 = phi i32 [ %38, %.lr.ph69.preheader.new ], [ %63, %.lr.ph69 ]
  %.05665 = phi i32 [ 2, %.lr.ph69.preheader.new ], [ %43, %.lr.ph69 ]
  %niter = phi i64 [ 0, %.lr.ph69.preheader.new ], [ %niter.next.1, %.lr.ph69 ]
  %43 = shl i32 %.05665, 2
  %44 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv91
  %45 = load i8, ptr %44, align 1, !tbaa !5
  %46 = sext i8 %45 to i32
  %47 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv91
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = sext i8 %48 to i32
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %50 = shl i32 %.067, 2
  %51 = shl nsw i32 %46, 1
  %52 = add i32 %50, %51
  %53 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next92
  %54 = load i8, ptr %53, align 1, !tbaa !5
  %55 = sext i8 %54 to i32
  %56 = add nsw i32 %52, %55
  %57 = shl i32 %.05566, 2
  %58 = shl nsw i32 %49, 1
  %59 = add i32 %57, %58
  %60 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next92
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %62 = sext i8 %61 to i32
  %63 = add nsw i32 %59, %62
  %indvars.iv.next92.1 = add nuw nsw i64 %indvars.iv91, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge70.loopexit.unr-lcssa.loopexit, label %.lr.ph69, !llvm.loop !17

._crit_edge70.loopexit.unr-lcssa.loopexit:        ; preds = %.lr.ph69
  %64 = shl i32 %.05665, 3
  br label %._crit_edge70.loopexit.unr-lcssa

._crit_edge70.loopexit.unr-lcssa:                 ; preds = %._crit_edge70.loopexit.unr-lcssa.loopexit, %.lr.ph69.preheader
  %.lcssa146.ph = phi i32 [ poison, %.lr.ph69.preheader ], [ %43, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %.lcssa145.ph = phi i32 [ poison, %.lr.ph69.preheader ], [ %56, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %.lcssa.ph = phi i32 [ poison, %.lr.ph69.preheader ], [ %63, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %indvars.iv91.unr = phi i64 [ 1, %.lr.ph69.preheader ], [ %indvars.iv.next92.1, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %.067.unr = phi i32 [ %40, %.lr.ph69.preheader ], [ %56, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %.05566.unr = phi i32 [ %38, %.lr.ph69.preheader ], [ %63, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %.05665.unr = phi i32 [ 4, %.lr.ph69.preheader ], [ %64, %._crit_edge70.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge70.loopexit, label %.lr.ph69.epil

.lr.ph69.epil:                                    ; preds = %._crit_edge70.loopexit.unr-lcssa
  %65 = shl nsw i32 %.067.unr, 1
  %66 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv91.unr
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %68 = sext i8 %67 to i32
  %69 = add nsw i32 %65, %68
  %70 = shl nsw i32 %.05566.unr, 1
  %71 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv91.unr
  %72 = load i8, ptr %71, align 1, !tbaa !5
  %73 = sext i8 %72 to i32
  %74 = add nsw i32 %70, %73
  br label %._crit_edge70.loopexit

._crit_edge70.loopexit:                           ; preds = %._crit_edge70.loopexit.unr-lcssa, %.lr.ph69.epil
  %.lcssa146 = phi i32 [ %.lcssa146.ph, %._crit_edge70.loopexit.unr-lcssa ], [ %.05665.unr, %.lr.ph69.epil ]
  %.lcssa145 = phi i32 [ %.lcssa145.ph, %._crit_edge70.loopexit.unr-lcssa ], [ %69, %.lr.ph69.epil ]
  %.lcssa = phi i32 [ %.lcssa.ph, %._crit_edge70.loopexit.unr-lcssa ], [ %74, %.lr.ph69.epil ]
  %75 = trunc i64 %7 to i32
  br label %._crit_edge70

._crit_edge70:                                    ; preds = %._crit_edge.thread, %._crit_edge70.loopexit, %._crit_edge
  %.2.lcssa = phi i32 [ 1, %._crit_edge ], [ %75, %._crit_edge70.loopexit ], [ 1, %._crit_edge.thread ]
  %.056.lcssa = phi i32 [ 2, %._crit_edge ], [ %.lcssa146, %._crit_edge70.loopexit ], [ 2, %._crit_edge.thread ]
  %.055.lcssa = phi i32 [ %38, %._crit_edge ], [ %.lcssa, %._crit_edge70.loopexit ], [ %20, %._crit_edge.thread ]
  %.0.lcssa = phi i32 [ %40, %._crit_edge ], [ %.lcssa145, %._crit_edge70.loopexit ], [ %22, %._crit_edge.thread ]
  %76 = icmp eq i32 %.0.lcssa, %.055.lcssa
  br i1 %76, label %77, label %82

77:                                               ; preds = %._crit_edge70
  %78 = tail call i32 @stringmatch(ptr noundef nonnull %1, ptr noundef nonnull %3, i32 noundef %6, i32 noundef %8, i32 noundef %.2.lcssa)
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %82

82:                                               ; preds = %77, %80, %._crit_edge70
  %invariant.gep = getelementptr i8, ptr %1, i64 -1
  %.not76.not = icmp sgt i32 %6, %8
  br i1 %.not76.not, label %.lr.ph80.preheader, label %._crit_edge81

.lr.ph80.preheader:                               ; preds = %82
  %sext = shl i64 %7, 32
  %83 = ashr exact i64 %sext, 32
  %84 = add i64 %5, 1
  %85 = sub i64 %84, %7
  %wide.trip.count99 = and i64 %85, 4294967295
  %invariant.gep103 = getelementptr i8, ptr %invariant.gep, i64 %83
  br label %.lr.ph80

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %101
  %indvars.iv96 = phi i64 [ 1, %.lr.ph80.preheader ], [ %indvars.iv.next97, %101 ]
  %.178 = phi i32 [ %.055.lcssa, %.lr.ph80.preheader ], [ %93, %101 ]
  %86 = shl nsw i32 %.178, 1
  %gep104 = getelementptr i8, ptr %invariant.gep103, i64 %indvars.iv96
  %87 = load i8, ptr %gep104, align 1, !tbaa !5
  %88 = sext i8 %87 to i32
  %89 = add nsw i32 %86, %88
  %gep75 = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv96
  %90 = load i8, ptr %gep75, align 1, !tbaa !5
  %91 = sext i8 %90 to i32
  %92 = mul i32 %.056.lcssa, %91
  %93 = sub i32 %89, %92
  %94 = icmp eq i32 %.0.lcssa, %93
  br i1 %94, label %95, label %101

95:                                               ; preds = %.lr.ph80
  %96 = trunc nuw nsw i64 %indvars.iv96 to i32
  %97 = tail call i32 @stringmatch(ptr noundef nonnull %1, ptr noundef nonnull %3, i32 noundef %6, i32 noundef %8, i32 noundef %96)
  %98 = icmp eq i32 %97, 1
  br i1 %98, label %99, label %101

99:                                               ; preds = %95
  %100 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %96)
  br label %101

101:                                              ; preds = %.lr.ph80, %99, %95
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next97, %wide.trip.count99
  br i1 %exitcond100.not, label %._crit_edge81, label %.lr.ph80, !llvm.loop !18

._crit_edge81:                                    ; preds = %101, %82
  ret i32 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 #1

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

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

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

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 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 #2 = { 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 #3 = { 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 #4 = { nounwind allocsize(0) }
attributes #5 = { 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 = !{!"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 = distinct !{!12, !9, !10, !11}
!13 = distinct !{!13, !9, !10, !11}
!14 = distinct !{!14, !9, !10, !11}
!15 = distinct !{!15, !9, !11, !10}
!16 = distinct !{!16, !9, !11, !10}
!17 = distinct !{!17, !9}
!18 = distinct !{!18, !9}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass