; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/dp/shortest_uncommon_subseq.ll (Z11shortestSeqPcS_)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11shortestSeqPcS_(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call i64 @strlen(ptr noundef %19) #6
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call i64 @strlen(ptr noundef %22) #6
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %6, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  %27 = zext i32 %26 to i64
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = add nsw i32 %28, 1
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %7, align 8
  %32 = mul nuw i64 %27, %30
  %33 = alloca i32, i64 %32, align 16
  store i64 %27, ptr %8, align 8
  store i64 %30, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %45, %2
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = mul nsw i64 %41, %30
  %43 = getelementptr inbounds i32, ptr %33, i64 %42
  %44 = getelementptr inbounds i32, ptr %43, i64 0
  store i32 1, ptr %44, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %39
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %10, align 4, !tbaa !9
  br label %34, !llvm.loop !11

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

49:                                               ; preds = %60, %48
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = icmp sle i32 %50, %51
  br i1 %52, label %54, label %53

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

54:                                               ; preds = %49
  %55 = mul nsw i64 0, %30
  %56 = getelementptr inbounds i32, ptr %33, i64 %55
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  store i32 1005, ptr %59, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %54
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %11, align 4, !tbaa !9
  br label %49, !llvm.loop !13

63:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %146, %63
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %149

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

70:                                               ; preds = %142, %69
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %145

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %76, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !14
  store i8 %81, ptr %15, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %82 = load i32, ptr %14, align 4, !tbaa !9
  %83 = sub nsw i32 %82, 1
  store i32 %83, ptr %16, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %99, %75
  %85 = load i32, ptr %16, align 4, !tbaa !9
  %86 = icmp sge i32 %85, 0
  br i1 %86, label %87, label %102

87:                                               ; preds = %84
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !14
  %93 = sext i8 %92 to i32
  %94 = load i8, ptr %15, align 1, !tbaa !14
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %93, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %87
  br label %102

98:                                               ; preds = %87
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %16, align 4, !tbaa !9
  br label %84, !llvm.loop !15

102:                                              ; preds = %97, %84
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = icmp eq i32 %103, -1
  br i1 %104, label %105, label %113

105:                                              ; preds = %102
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = mul nsw i64 %107, %30
  %109 = getelementptr inbounds i32, ptr %33, i64 %108
  %110 = load i32, ptr %14, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  store i32 1, ptr %112, align 4, !tbaa !9
  br label %141

113:                                              ; preds = %102
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = sub nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = mul nsw i64 %116, %30
  %118 = getelementptr inbounds i32, ptr %33, i64 %117
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %118, i64 %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = sub nsw i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = mul nsw i64 %124, %30
  %126 = getelementptr inbounds i32, ptr %33, i64 %125
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %126, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %17, align 4, !tbaa !9
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %121, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = mul nsw i64 %135, %30
  %137 = getelementptr inbounds i32, ptr %33, i64 %136
  %138 = load i32, ptr %14, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  store i32 %133, ptr %140, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %141

141:                                              ; preds = %113, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %14, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %14, align 4, !tbaa !9
  br label %70, !llvm.loop !16

145:                                              ; preds = %74
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %12, align 4, !tbaa !9
  br label %64, !llvm.loop !17

149:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %150 = load i32, ptr %5, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = mul nsw i64 %151, %30
  %153 = getelementptr inbounds i32, ptr %33, i64 %152
  %154 = load i32, ptr %6, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %153, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !9
  store i32 %157, ptr %18, align 4, !tbaa !9
  %158 = load i32, ptr %18, align 4, !tbaa !9
  %159 = icmp sge i32 %158, 1005
  br i1 %159, label %160, label %161

160:                                              ; preds = %149
  store i32 -1, ptr %18, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %160, %149
  %162 = load i32, ptr %18, align 4, !tbaa !9
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %163 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %163)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %162
}

; 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 nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { mustprogress 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 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 nosync nounwind willreturn }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z11shortestSeqPcS_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #4
  %5 = trunc i64 %4 to i32
  %6 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #4
  %7 = trunc i64 %6 to i32
  %8 = add i64 %4, 1
  %9 = and i64 %8, 4294967295
  %10 = add i64 %6, 1
  %11 = and i64 %10, 4294967295
  %12 = mul nuw i64 %11, %9
  %13 = alloca i32, i64 %12, align 16
  %.not54 = icmp slt i32 %5, 0
  br i1 %.not54, label %.preheader50, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2
  %14 = add nuw nsw i64 %4, 1
  %wide.trip.count = and i64 %14, 4294967295
  %15 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %14, 3
  %16 = icmp ult i64 %15, 3
  br i1 %16, label %.preheader50.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %.lr.ph

.preheader50.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader50, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader50.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader50.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader50.loopexit.unr-lcssa ]
  %17 = mul nuw nsw i64 %11, %indvars.iv.epil
  %18 = getelementptr inbounds i32, ptr %13, i64 %17
  store i32 1, ptr %18, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader50, label %.lr.ph.epil, !llvm.loop !9

.preheader50:                                     ; preds = %.preheader50.loopexit.unr-lcssa, %.lr.ph.epil, %2
  %.not4556 = icmp slt i32 %7, 0
  br i1 %.not4556, label %.preheader49, label %.lr.ph58.preheader

.lr.ph58.preheader:                               ; preds = %.preheader50
  %19 = add nuw nsw i64 %6, 1
  %wide.trip.count73 = and i64 %19, 4294967295
  %min.iters.check = icmp ult i64 %wide.trip.count73, 8
  br i1 %min.iters.check, label %.lr.ph58.preheader91, label %vector.ph

.lr.ph58.preheader91:                             ; preds = %middle.block, %.lr.ph58.preheader
  %indvars.iv70.ph = phi i64 [ 0, %.lr.ph58.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph58

vector.ph:                                        ; preds = %.lr.ph58.preheader
  %n.mod.vf = and i64 %19, 7
  %n.vec = sub nsw i64 %wide.trip.count73, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %20 = getelementptr inbounds i32, ptr %13, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  store <4 x i32> <i32 1005, i32 1005, i32 1005, i32 1005>, ptr %20, align 16, !tbaa !5
  store <4 x i32> <i32 1005, i32 1005, i32 1005, i32 1005>, ptr %21, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %.preheader49, label %.lr.ph58.preheader91

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %23 = mul nuw nsw i64 %11, %indvars.iv
  %24 = getelementptr inbounds i32, ptr %13, i64 %23
  store i32 1, ptr %24, align 16, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %25 = mul nuw nsw i64 %11, %indvars.iv.next
  %26 = getelementptr inbounds i32, ptr %13, i64 %25
  store i32 1, ptr %26, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %27 = mul nuw nsw i64 %11, %indvars.iv.next.1
  %28 = getelementptr inbounds i32, ptr %13, i64 %27
  store i32 1, ptr %28, align 8, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %29 = mul nuw nsw i64 %11, %indvars.iv.next.2
  %30 = getelementptr inbounds i32, ptr %13, i64 %29
  store i32 1, ptr %30, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader50.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !15

.preheader49:                                     ; preds = %.lr.ph58, %middle.block, %.preheader50
  %.not4662 = icmp slt i32 %5, 1
  %.not4859 = icmp slt i32 %7, 1
  %or.cond = select i1 %.not4662, i1 true, i1 %.not4859
  br i1 %or.cond, label %._crit_edge64, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader49
  %31 = add nuw nsw i64 %6, 1
  %32 = add nuw nsw i64 %4, 1
  %wide.trip.count87 = and i64 %32, 4294967295
  %wide.trip.count82 = and i64 %31, 4294967295
  br label %.preheader

.lr.ph58:                                         ; preds = %.lr.ph58.preheader91, %.lr.ph58
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph58 ], [ %indvars.iv70.ph, %.lr.ph58.preheader91 ]
  %33 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv70
  store i32 1005, ptr %33, align 4, !tbaa !5
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %.preheader49, label %.lr.ph58, !llvm.loop !16

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv84 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next85, %._crit_edge ]
  %34 = add nsw i64 %indvars.iv84, -1
  %35 = getelementptr inbounds i8, ptr %0, i64 %34
  %36 = mul nuw nsw i64 %11, %indvars.iv84
  %37 = getelementptr inbounds i32, ptr %13, i64 %36
  %38 = mul nuw nsw i64 %11, %34
  %39 = getelementptr inbounds i32, ptr %13, i64 %38
  br label %47

._crit_edge64:                                    ; preds = %._crit_edge, %.preheader49
  %sext = shl i64 %4, 32
  %40 = ashr exact i64 %sext, 32
  %41 = mul nsw i64 %11, %40
  %42 = getelementptr inbounds i32, ptr %13, i64 %41
  %sext47 = shl i64 %6, 32
  %43 = ashr exact i64 %sext47, 30
  %44 = getelementptr inbounds i8, ptr %42, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 1004
  %spec.store.select = select i1 %46, i32 -1, i32 %45
  ret i32 %spec.store.select

._crit_edge:                                      ; preds = %66
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count87
  br i1 %exitcond88.not, label %._crit_edge64, label %.preheader, !llvm.loop !17

47:                                               ; preds = %.preheader, %66
  %indvars.iv75 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next76, %66 ]
  %48 = load i8, ptr %35, align 1, !tbaa !18
  br label %49

49:                                               ; preds = %51, %47
  %indvars.iv77 = phi i64 [ %52, %51 ], [ %indvars.iv75, %47 ]
  %50 = icmp sgt i64 %indvars.iv77, 0
  br i1 %50, label %51, label %56

51:                                               ; preds = %49
  %52 = add nsw i64 %indvars.iv77, -1
  %53 = getelementptr inbounds i8, ptr %1, i64 %52
  %54 = load i8, ptr %53, align 1, !tbaa !18
  %55 = icmp eq i8 %54, %48
  br i1 %55, label %.thread, label %49, !llvm.loop !19

56:                                               ; preds = %49
  %57 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv75
  store i32 1, ptr %57, align 4, !tbaa !5
  br label %66

.thread:                                          ; preds = %51
  %58 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv75
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %sext89 = shl i64 %52, 32
  %59 = ashr exact i64 %sext89, 30
  %60 = getelementptr inbounds i8, ptr %39, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv75
  store i32 %64, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %66

66:                                               ; preds = %.thread, %56
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge, label %47, !llvm.loop !20
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

attributes #0 = { mustprogress 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 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 = { inlinehint mustprogress 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 #4 = { nounwind willreturn memory(read) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !14, !13}
!17 = distinct !{!17, !12}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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