; LLVM IR from vmartinv/eldiego :: string/manacher.ll (Z8manacherv)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@d1 = external dso_local global [100100 x i32], align 16
@d2 = external dso_local global [100100 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8manacherv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 -1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #4
  %11 = trunc i64 %10 to i32
  store i32 %11, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %88, %0
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %91

17:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp sgt i32 %18, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  br label %35

22:                                               ; preds = %17
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %23, %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sub nsw i32 %25, %26
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100100 x i32], ptr @d1, i64 0, i64 %28
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sub nsw i32 %30, %31
  store i32 %32, ptr %6, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %34 = load i32, ptr %33, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %22, %21
  %36 = phi i32 [ 1, %21 ], [ %34, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  store i32 %36, ptr %5, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %66, %35
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = add nsw i32 %38, %39
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %64

43:                                               ; preds = %37
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sub nsw i32 %44, %45
  %47 = icmp sge i32 %46, 0
  br i1 %47, label %48, label %64

48:                                               ; preds = %43
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %52)
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %59)
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = sext i8 %61 to i32
  %63 = icmp eq i32 %55, %62
  br label %64

64:                                               ; preds = %48, %43, %37
  %65 = phi i1 [ false, %43 ], [ false, %37 ], [ %63, %48 ]
  br i1 %65, label %66, label %69

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

69:                                               ; preds = %64
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = add nsw i32 %70, -1
  store i32 %71, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100100 x i32], ptr @d1, i64 0, i64 %73
  store i32 %70, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %75, %76
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp sgt i32 %77, %78
  br i1 %79, label %80, label %87

80:                                               ; preds = %69
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sub nsw i32 %81, %82
  store i32 %83, ptr %1, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = add nsw i32 %84, %85
  store i32 %86, ptr %2, align 4, !tbaa !5
  br label %87

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

88:                                               ; preds = %87
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %4, align 4, !tbaa !5
  br label %12, !llvm.loop !12

91:                                               ; preds = %16
  store i32 0, ptr %1, align 4, !tbaa !5
  store i32 -1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %175, %91
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %178

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = icmp sgt i32 %98, %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  br label %117

102:                                              ; preds = %97
  %103 = load i32, ptr %1, align 4, !tbaa !5
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = add nsw i32 %103, %104
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = sub nsw i32 %105, %106
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100100 x i32], ptr @d2, i64 0, i64 %109
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = sub nsw i32 %111, %112
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %9, align 4, !tbaa !5
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %110, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %116 = load i32, ptr %115, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %102, %101
  %118 = phi i32 [ 0, %101 ], [ %116, %102 ]
  %119 = add nsw i32 %118, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  store i32 %119, ptr %8, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %151, %117
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = add nsw i32 %121, %122
  %124 = sub nsw i32 %123, 1
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %149

127:                                              ; preds = %120
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = sub nsw i32 %128, %129
  %131 = icmp sge i32 %130, 0
  br i1 %131, label %132, label %149

132:                                              ; preds = %127
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = add nsw i32 %133, %134
  %136 = sub nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %137)
  %139 = load i8, ptr %138, align 1, !tbaa !9
  %140 = sext i8 %139 to i32
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = load i32, ptr %8, align 4, !tbaa !5
  %143 = sub nsw i32 %141, %142
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %144)
  %146 = load i8, ptr %145, align 1, !tbaa !9
  %147 = sext i8 %146 to i32
  %148 = icmp eq i32 %140, %147
  br label %149

149:                                              ; preds = %132, %127, %120
  %150 = phi i1 [ false, %127 ], [ false, %120 ], [ %148, %132 ]
  br i1 %150, label %151, label %154

151:                                              ; preds = %149
  %152 = load i32, ptr %8, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %8, align 4, !tbaa !5
  br label %120, !llvm.loop !13

154:                                              ; preds = %149
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = add nsw i32 %155, -1
  store i32 %156, ptr %8, align 4, !tbaa !5
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100100 x i32], ptr @d2, i64 0, i64 %158
  store i32 %156, ptr %159, align 4, !tbaa !5
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = add nsw i32 %160, %161
  %163 = sub nsw i32 %162, 1
  %164 = load i32, ptr %2, align 4, !tbaa !5
  %165 = icmp sgt i32 %163, %164
  br i1 %165, label %166, label %174

166:                                              ; preds = %154
  %167 = load i32, ptr %7, align 4, !tbaa !5
  %168 = load i32, ptr %8, align 4, !tbaa !5
  %169 = sub nsw i32 %167, %168
  store i32 %169, ptr %1, align 4, !tbaa !5
  %170 = load i32, ptr %7, align 4, !tbaa !5
  %171 = load i32, ptr %8, align 4, !tbaa !5
  %172 = add nsw i32 %170, %171
  %173 = sub nsw i32 %172, 1
  store i32 %173, ptr %2, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %166, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %7, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %7, align 4, !tbaa !5
  br label %92, !llvm.loop !14

178:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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 = { 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 #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 }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@d1 = external dso_local global [100100 x i32], align 16
@d2 = external dso_local global [100100 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z8manacherv() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #4
  %4 = trunc i64 %3 to i32
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph87.preheader, label %._crit_edge

.lr.ph87.preheader:                               ; preds = %0
  %6 = and i64 %3, 2147483647
  %wide.trip.count = and i64 %3, 2147483647
  br label %.lr.ph87

.preheader:                                       ; preds = %.critedge
  br i1 %5, label %.lr.ph92.preheader, label %._crit_edge

.lr.ph92.preheader:                               ; preds = %.preheader
  %wide.trip.count110 = and i64 %3, 2147483647
  br label %.lr.ph92

.lr.ph87:                                         ; preds = %.lr.ph87.preheader, %.critedge
  %indvars.iv97 = phi i32 [ %4, %.lr.ph87.preheader ], [ %indvars.iv.next98, %.critedge ]
  %indvars.iv = phi i64 [ 0, %.lr.ph87.preheader ], [ %indvars.iv.next, %.critedge ]
  %.06385 = phi i32 [ 0, %.lr.ph87.preheader ], [ %spec.select76, %.critedge ]
  %.06484 = phi i32 [ -1, %.lr.ph87.preheader ], [ %spec.select, %.critedge ]
  %indvars102 = trunc i64 %indvars.iv to i32
  %7 = sext i32 %.06484 to i64
  %8 = icmp sgt i64 %indvars.iv, %7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  br i1 %8, label %17, label %9

9:                                                ; preds = %.lr.ph87
  %10 = add nsw i32 %.06385, %.06484
  %11 = sub i32 %10, %indvars102
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [100100 x i32], ptr @d1, i64 0, i64 %12
  %14 = sub nsw i32 %.06484, %indvars102
  store i32 %14, ptr %1, align 4, !tbaa !5
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %.lr.ph87, %9
  %18 = phi i32 [ %16, %9 ], [ 1, %.lr.ph87 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %19 = add nsw i32 %18, %indvars102
  %20 = icmp slt i32 %19, %4
  br i1 %20, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %17
  %21 = sext i32 %18 to i64
  %22 = add nsw i64 %indvars.iv, %21
  %invariant.op = sub nsw i64 %6, %indvars.iv
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %31
  %indvars.iv95 = phi i64 [ %21, %.lr.ph.preheader ], [ %indvars.iv.next96, %31 ]
  %indvars.iv93 = phi i64 [ %22, %.lr.ph.preheader ], [ %indvars.iv.next94, %31 ]
  %23 = sub nsw i64 %indvars.iv, %indvars.iv95
  %24 = icmp sgt i64 %23, -1
  br i1 %24, label %25, label %.critedge.loopexit.split.loop.exit

25:                                               ; preds = %.lr.ph
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv93)
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %23)
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = icmp eq i8 %27, %29
  br i1 %30, label %31, label %.critedge.loopexit.split.loop.exit116

31:                                               ; preds = %25
  %indvars.iv.next96 = add nsw i64 %indvars.iv95, 1
  %32 = icmp slt i64 %indvars.iv.next96, %invariant.op
  %indvars.iv.next94 = add nsw i64 %indvars.iv93, 1
  br i1 %32, label %.lr.ph, label %.critedge, !llvm.loop !10

.critedge.loopexit.split.loop.exit:               ; preds = %.lr.ph
  %33 = trunc nsw i64 %indvars.iv95 to i32
  br label %.critedge

.critedge.loopexit.split.loop.exit116:            ; preds = %25
  %34 = trunc nsw i64 %indvars.iv95 to i32
  br label %.critedge

.critedge:                                        ; preds = %31, %.critedge.loopexit.split.loop.exit, %.critedge.loopexit.split.loop.exit116, %17
  %.061.lcssa = phi i32 [ %18, %17 ], [ %33, %.critedge.loopexit.split.loop.exit ], [ %34, %.critedge.loopexit.split.loop.exit116 ], [ %indvars.iv97, %31 ]
  %35 = add nsw i32 %.061.lcssa, -1
  %36 = getelementptr inbounds [100100 x i32], ptr @d1, i64 0, i64 %indvars.iv
  store i32 %.061.lcssa, ptr %36, align 4, !tbaa !5
  %37 = add nsw i32 %35, %indvars102
  %38 = icmp sgt i32 %37, %.06484
  %39 = sub nsw i32 %indvars102, %35
  %spec.select = call i32 @llvm.smax.i32(i32 %37, i32 %.06484)
  %spec.select76 = select i1 %38, i32 %39, i32 %.06385
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars.iv.next98 = add i32 %indvars.iv97, -1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph87, !llvm.loop !12

._crit_edge:                                      ; preds = %.critedge2, %0, %.preheader
  ret void

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %.critedge2
  %indvars.iv106 = phi i64 [ 0, %.lr.ph92.preheader ], [ %indvars.iv.next107, %.critedge2 ]
  %.060.neg91 = phi i32 [ 0, %.lr.ph92.preheader ], [ %74, %.critedge2 ]
  %.289 = phi i32 [ 0, %.lr.ph92.preheader ], [ %spec.select78, %.critedge2 ]
  %.26688 = phi i32 [ -1, %.lr.ph92.preheader ], [ %spec.select77, %.critedge2 ]
  %40 = sext i32 %.26688 to i64
  %41 = icmp sgt i64 %indvars.iv106, %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  br i1 %41, label %51, label %42

42:                                               ; preds = %.lr.ph92
  %43 = add nuw i32 %.26688, 1
  %44 = add i32 %43, %.289
  %45 = add i32 %44, %.060.neg91
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100100 x i32], ptr @d2, i64 0, i64 %46
  %48 = add i32 %43, %.060.neg91
  store i32 %48, ptr %2, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %.lr.ph92, %42
  %52 = phi i32 [ %50, %42 ], [ 0, %.lr.ph92 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %53 = sext i32 %52 to i64
  %54 = trunc nuw nsw i64 %indvars.iv106 to i32
  br label %55

55:                                               ; preds = %62, %51
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %62 ], [ %53, %51 ]
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  %56 = trunc nsw i64 %indvars.iv103 to i32
  %57 = add i32 %56, %54
  %58 = icmp slt i32 %57, %4
  br i1 %58, label %59, label %.critedge2

59:                                               ; preds = %55
  %60 = sub nsw i64 %indvars.iv106, %indvars.iv.next104
  %61 = icmp sgt i64 %60, -1
  br i1 %61, label %62, label %.critedge2

62:                                               ; preds = %59
  %63 = sext i32 %57 to i64
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %63)
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %60)
  %67 = load i8, ptr %66, align 1, !tbaa !9
  %68 = icmp eq i8 %65, %67
  br i1 %68, label %55, label %.critedge2, !llvm.loop !13

.critedge2:                                       ; preds = %59, %55, %62
  %69 = getelementptr inbounds [100100 x i32], ptr @d2, i64 0, i64 %indvars.iv106
  store i32 %56, ptr %69, align 4, !tbaa !5
  %70 = add nsw i32 %57, -1
  %71 = icmp sgt i32 %70, %.26688
  %72 = sub nsw i32 %54, %56
  %spec.select77 = call i32 @llvm.smax.i32(i32 %70, i32 %.26688)
  %spec.select78 = select i1 %71, i32 %72, i32 %.289
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %73 = trunc i64 %indvars.iv106 to i32
  %74 = xor i32 %73, -1
  %exitcond111.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge, label %.lr.ph92, !llvm.loop !14
}

; 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 nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; 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 #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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}


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