; LLVM IR from ahampriyanshu/algo-ds-101 :: Algorithms/String/Rabin-Karp (Rabin_karp)

; 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 [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [10000 x i8], align 16
  %3 = alloca [1000 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 10000, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 1000, ptr %3) #5
  %14 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %15 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 0
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %15)
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %18 = getelementptr inbounds [10000 x i8], ptr %2, i64 0, i64 0
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %20 = getelementptr inbounds [10000 x i8], ptr %2, i64 0, i64 0
  %21 = call i64 @strlen(ptr noundef %20) #6
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %23 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 0
  %24 = call i64 @strlen(ptr noundef %23) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 1, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %26 = call i32 @rand() #5
  %27 = srem i32 %26, 1000000006
  %28 = add nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  store i64 %29, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %66, %0
  %31 = load i32, ptr %10, align 4, !tbaa !5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %69

35:                                               ; preds = %30
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load i64, ptr %6, align 8, !tbaa !9
  %38 = mul nsw i64 %36, %37
  %39 = srem i64 %38, 1000000007
  store i64 %39, ptr %6, align 8, !tbaa !9
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = mul nsw i64 %40, %41
  %43 = srem i64 %42, 1000000007
  store i64 %43, ptr %7, align 8, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [10000 x i8], ptr %2, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = sext i8 %47 to i64
  %49 = load i64, ptr %6, align 8, !tbaa !9
  %50 = add nsw i64 %49, %48
  store i64 %50, ptr %6, align 8, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %52
  %54 = load i8, ptr %53, align 1, !tbaa !11
  %55 = sext i8 %54 to i64
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = add nsw i64 %56, %55
  store i64 %57, ptr %7, align 8, !tbaa !9
  %58 = load i64, ptr %6, align 8, !tbaa !9
  %59 = srem i64 %58, 1000000007
  store i64 %59, ptr %6, align 8, !tbaa !9
  %60 = load i64, ptr %7, align 8, !tbaa !9
  %61 = srem i64 %60, 1000000007
  store i64 %61, ptr %7, align 8, !tbaa !9
  %62 = load i64, ptr %8, align 8, !tbaa !9
  %63 = load i64, ptr %9, align 8, !tbaa !9
  %64 = mul nsw i64 %62, %63
  %65 = srem i64 %64, 1000000007
  store i64 %65, ptr %8, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %35
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %10, align 4, !tbaa !5
  br label %30, !llvm.loop !12

69:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %145, %69
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sub nsw i32 %71, %72
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = sub nsw i32 %73, %74
  %76 = icmp sge i32 %75, 0
  br i1 %76, label %78, label %77

77:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %148

78:                                               ; preds = %70
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %108

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %82 = load i64, ptr %9, align 8, !tbaa !9
  %83 = load i64, ptr %7, align 8, !tbaa !9
  %84 = mul nsw i64 %82, %83
  %85 = load i64, ptr %8, align 8, !tbaa !9
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = sext i8 %90 to i64
  %92 = mul nsw i64 %85, %91
  %93 = sub nsw i64 %84, %92
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = sext i8 %100 to i64
  %102 = add nsw i64 %93, %101
  %103 = srem i64 %102, 1000000007
  store i64 %103, ptr %12, align 8, !tbaa !9
  %104 = load i64, ptr %12, align 8, !tbaa !9
  %105 = add nsw i64 %104, 1000000007
  %106 = srem i64 %105, 1000000007
  store i64 %106, ptr %12, align 8, !tbaa !9
  %107 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %107, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %108

108:                                              ; preds = %81, %78
  %109 = load i64, ptr %6, align 8, !tbaa !9
  %110 = load i64, ptr %7, align 8, !tbaa !9
  %111 = icmp eq i64 %109, %110
  br i1 %111, label %112, label %144

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %133, %112
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = load i32, ptr %4, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %136

117:                                              ; preds = %113
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = add nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !11
  %124 = sext i8 %123 to i32
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [10000 x i8], ptr %2, i64 0, i64 %126
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = sext i8 %128 to i32
  %130 = icmp ne i32 %124, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %117
  br label %136

132:                                              ; preds = %117
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %13, align 4, !tbaa !5
  br label %113, !llvm.loop !14

136:                                              ; preds = %131, %113
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = icmp eq i32 %137, %138
  br i1 %139, label %140, label %143

140:                                              ; preds = %136
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %141)
  br label %143

143:                                              ; preds = %140, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %144

144:                                              ; preds = %143, %108
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %11, align 4, !tbaa !5
  br label %70, !llvm.loop !15

148:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 1000, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 10000, ptr %2) #5
  ret i32 0
}

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

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

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

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

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

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

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 = { "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 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 #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 }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !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 [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [10000 x i8], align 16
  %2 = alloca [1000 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %2) #5
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %7 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %.fr = freeze i64 %7
  %8 = trunc i64 %.fr to i32
  %9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #6
  %10 = trunc i64 %9 to i32
  %11 = call i32 @rand() #5
  %12 = srem i32 %11, 1000000006
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = icmp slt i32 %8, 1
  br i1 %15, label %.preheader49.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = and i64 %.fr, 2147483647
  br label %.lr.ph

.preheader49:                                     ; preds = %.lr.ph
  %16 = sub i32 %10, %8
  %17 = icmp slt i32 %16, 0
  %brmerge = or i1 %17, %15
  br i1 %brmerge, label %._crit_edge64, label %.lr.ph63.split.us.preheader

.preheader49.thread:                              ; preds = %0
  %18 = sub i32 %10, %8
  %19 = icmp sgt i32 %18, -1
  %20 = icmp eq i32 %8, 0
  %or.cond = and i1 %19, %20
  br i1 %or.cond, label %.preheader.us72.peel, label %._crit_edge64

.lr.ph63.split.us.preheader:                      ; preds = %.preheader49
  %21 = and i64 %.fr, 2147483647
  %22 = add i64 %9, 1
  %23 = sub i64 %22, %.fr
  %wide.trip.count95 = and i64 %23, 4294967295
  br label %.lr.ph63.split.us

.lr.ph63.split.us:                                ; preds = %.lr.ph63.split.us.preheader, %53
  %indvars.iv91 = phi i64 [ 0, %.lr.ph63.split.us.preheader ], [ %indvars.iv.next92, %53 ]
  %.161.us = phi i64 [ %.sext47, %.lr.ph63.split.us.preheader ], [ %.2.us, %53 ]
  %.not.us = icmp eq i64 %indvars.iv91, 0
  br i1 %.not.us, label %42, label %24

24:                                               ; preds = %.lr.ph63.split.us
  %25 = add i64 %indvars.iv91, %.fr
  %26 = mul nsw i64 %.161.us, %14
  %27 = add nsw i64 %indvars.iv91, -1
  %28 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = sext i8 %29 to i64
  %31 = mul nsw i64 %83, %30
  %32 = shl i64 %25, 32
  %sext = add i64 %32, -4294967296
  %33 = ashr exact i64 %sext, 32
  %34 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = sext i8 %35 to i64
  %37 = add i64 %26, %36
  %38 = sub i64 %37, %31
  %.fr48.us = freeze i64 %38
  %39 = srem i64 %.fr48.us, 1000000007
  %40 = add nsw i64 %39, 1000000007
  %.cmp.us = icmp ugt i64 %39, -1000000008
  %41 = select i1 %.cmp.us, i64 %40, i64 %39
  br label %42

42:                                               ; preds = %24, %.lr.ph63.split.us
  %.2.us = phi i64 [ %41, %24 ], [ %.161.us, %.lr.ph63.split.us ]
  %43 = icmp eq i64 %.2.us, %.sext
  br i1 %43, label %.preheader.us, label %53

.preheader.us:                                    ; preds = %42, %54
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %54 ], [ 0, %42 ]
  %44 = add nuw nsw i64 %indvars.iv85, %indvars.iv91
  %45 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !5
  %47 = getelementptr inbounds [10000 x i8], ptr %1, i64 0, i64 %indvars.iv85
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %.not45.us = icmp eq i8 %46, %48
  br i1 %.not45.us, label %54, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.preheader.us
  %49 = trunc nuw nsw i64 %indvars.iv85 to i32
  %50 = icmp eq i32 %49, %8
  br i1 %50, label %._crit_edge.us.thread, label %53

._crit_edge.us.thread:                            ; preds = %54, %._crit_edge.us
  %51 = trunc nuw nsw i64 %indvars.iv91 to i32
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %51)
  br label %53

53:                                               ; preds = %._crit_edge.us.thread, %._crit_edge.us, %42
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count95
  br i1 %exitcond96.not, label %._crit_edge64, label %.lr.ph63.split.us, !llvm.loop !8

54:                                               ; preds = %.preheader.us
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next86, %21
  br i1 %exitcond90.not, label %._crit_edge.us.thread, label %.preheader.us, !llvm.loop !10

.preheader.us72.peel:                             ; preds = %.preheader49.thread
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 0)
  %56 = add i32 %10, -1
  %57 = icmp sgt i32 %56, -1
  br i1 %57, label %.lr.ph63.split.split.us.peel.next, label %._crit_edge64

.lr.ph63.split.split.us.peel.next:                ; preds = %.preheader.us72.peel, %63
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %63 ], [ 1, %.preheader.us72.peel ]
  %.161.us66 = phi i64 [ %61, %63 ], [ 0, %.preheader.us72.peel ]
  %58 = mul nsw i64 %.161.us66, %14
  %.fr48.us69 = freeze i64 %58
  %59 = srem i64 %.fr48.us69, 1000000007
  %60 = add nsw i64 %59, 1000000007
  %.cmp.us70 = icmp ugt i64 %59, -1000000008
  %61 = select i1 %.cmp.us70, i64 %60, i64 %59
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %.preheader.us72, label %63

63:                                               ; preds = %.preheader.us72, %.lr.ph63.split.split.us.peel.next
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %indvars = trunc i64 %indvars.iv.next82 to i32
  %64 = sub i32 %10, %indvars
  %65 = icmp sgt i32 %64, -1
  br i1 %65, label %.lr.ph63.split.split.us.peel.next, label %._crit_edge64, !llvm.loop !11

.preheader.us72:                                  ; preds = %.lr.ph63.split.split.us.peel.next
  %66 = trunc nuw nsw i64 %indvars.iv81 to i32
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %66)
  br label %63

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.03953 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sext, %.lr.ph ]
  %.04251 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sext47, %.lr.ph ]
  %.04350 = phi i64 [ 1, %.lr.ph.preheader ], [ %83, %.lr.ph ]
  %68 = mul nsw i64 %.03953, %14
  %69 = srem i64 %68, 1000000007
  %70 = mul nsw i64 %.04251, %14
  %71 = srem i64 %70, 1000000007
  %72 = getelementptr inbounds [10000 x i8], ptr %1, i64 0, i64 %indvars.iv
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %74 = sext i8 %73 to i64
  %75 = add nsw i64 %69, %74
  %76 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %indvars.iv
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %78 = sext i8 %77 to i64
  %79 = add nsw i64 %71, %78
  %.lhs.trunc = trunc nsw i64 %75 to i32
  %80 = srem i32 %.lhs.trunc, 1000000007
  %.sext = sext i32 %80 to i64
  %.lhs.trunc46 = trunc nsw i64 %79 to i32
  %81 = srem i32 %.lhs.trunc46, 1000000007
  %.sext47 = sext i32 %81 to i64
  %82 = mul nsw i64 %.04350, %14
  %83 = srem i64 %82, 1000000007
  %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 %.preheader49, label %.lr.ph, !llvm.loop !13

._crit_edge64:                                    ; preds = %63, %53, %.preheader49, %.preheader.us72.peel, %.preheader49.thread
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %1) #5
  ret i32 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; 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: nounwind
declare i32 @rand() 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

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 = { 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 "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 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}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9, !12}
!12 = !{!"llvm.loop.peeled.count", i32 1}
!13 = distinct !{!13, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass