; LLVM IR from div-bargali/Data-Structures-and-Algorithms :: C++/Algorithms/Dynamic-Programming (LongestPalindromicSubstring)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30findLongestPalindromeSubstringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i1, align 1
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %5, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = add nsw i32 %26, 1
  %28 = zext i32 %27 to i64
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %6, align 8
  %33 = mul nuw i64 %28, %31
  %34 = alloca i8, i64 %33, align 16
  store i64 %28, ptr %7, align 8
  store i64 %31, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %35

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

39:                                               ; preds = %35
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %61

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %54, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %57

46:                                               ; preds = %41
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %31
  %50 = getelementptr inbounds i8, ptr %34, i64 %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %50, i64 %52
  store i8 0, ptr %53, align 1, !tbaa !11
  br label %54

54:                                               ; preds = %46
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !13

57:                                               ; preds = %45
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %9, align 4, !tbaa !9
  br label %35, !llvm.loop !15

61:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 -1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 -1, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %83, %61
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %86

67:                                               ; preds = %62
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = mul nsw i64 %70, %31
  %72 = getelementptr inbounds i8, ptr %34, i64 %71
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %72, i64 %75
  store i8 1, ptr %76, align 1, !tbaa !11
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 1
  br i1 %78, label %79, label %82

79:                                               ; preds = %67
  store i32 1, ptr %12, align 4, !tbaa !9
  %80 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %81, ptr %14, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %79, %67
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %15, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %15, align 4, !tbaa !9
  br label %62, !llvm.loop !16

86:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %124, %86
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = load i32, ptr %5, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  %91 = icmp slt i32 %88, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %87
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %127

93:                                               ; preds = %87
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %95)
  %97 = load i8, ptr %96, align 1, !tbaa !17
  %98 = sext i8 %97 to i32
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %101)
  %103 = load i8, ptr %102, align 1, !tbaa !17
  %104 = sext i8 %103 to i32
  %105 = icmp eq i32 %98, %104
  br i1 %105, label %106, label %123

106:                                              ; preds = %93
  %107 = load i32, ptr %16, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = mul nsw i64 %109, %31
  %111 = getelementptr inbounds i8, ptr %34, i64 %110
  %112 = load i32, ptr %16, align 4, !tbaa !9
  %113 = add nsw i32 %112, 2
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %111, i64 %114
  store i8 1, ptr %115, align 1, !tbaa !11
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = icmp slt i32 %116, 2
  br i1 %117, label %118, label %122

118:                                              ; preds = %106
  store i32 2, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %119, ptr %13, align 4, !tbaa !9
  %120 = load i32, ptr %16, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %14, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %118, %106
  br label %123

123:                                              ; preds = %122, %93
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %16, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %16, align 4, !tbaa !9
  br label %87, !llvm.loop !18

127:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %165, %127
  %129 = load i32, ptr %17, align 4, !tbaa !9
  %130 = load i32, ptr %5, align 4, !tbaa !9
  %131 = sub nsw i32 %130, 2
  %132 = icmp slt i32 %129, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %128
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %168

134:                                              ; preds = %128
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %136)
  %138 = load i8, ptr %137, align 1, !tbaa !17
  %139 = sext i8 %138 to i32
  %140 = load i32, ptr %17, align 4, !tbaa !9
  %141 = add nsw i32 %140, 2
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %142)
  %144 = load i8, ptr %143, align 1, !tbaa !17
  %145 = sext i8 %144 to i32
  %146 = icmp eq i32 %139, %145
  br i1 %146, label %147, label %164

147:                                              ; preds = %134
  %148 = load i32, ptr %17, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = mul nsw i64 %150, %31
  %152 = getelementptr inbounds i8, ptr %34, i64 %151
  %153 = load i32, ptr %17, align 4, !tbaa !9
  %154 = add nsw i32 %153, 3
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %152, i64 %155
  store i8 1, ptr %156, align 1, !tbaa !11
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = icmp slt i32 %157, 3
  br i1 %158, label %159, label %163

159:                                              ; preds = %147
  store i32 3, ptr %12, align 4, !tbaa !9
  %160 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %160, ptr %13, align 4, !tbaa !9
  %161 = load i32, ptr %17, align 4, !tbaa !9
  %162 = add nsw i32 %161, 2
  store i32 %162, ptr %14, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %159, %147
  br label %164

164:                                              ; preds = %163, %134
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %17, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %17, align 4, !tbaa !9
  br label %128, !llvm.loop !19

168:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 4, ptr %18, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %239, %168
  %170 = load i32, ptr %18, align 4, !tbaa !9
  %171 = load i32, ptr %5, align 4, !tbaa !9
  %172 = icmp sle i32 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %242

174:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %235, %174
  %176 = load i32, ptr %19, align 4, !tbaa !9
  %177 = load i32, ptr %5, align 4, !tbaa !9
  %178 = load i32, ptr %18, align 4, !tbaa !9
  %179 = sub nsw i32 %177, %178
  %180 = add nsw i32 %179, 1
  %181 = icmp slt i32 %176, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %175
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %238

183:                                              ; preds = %175
  %184 = load i32, ptr %19, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %185)
  %187 = load i8, ptr %186, align 1, !tbaa !17
  %188 = sext i8 %187 to i32
  %189 = load i32, ptr %19, align 4, !tbaa !9
  %190 = load i32, ptr %18, align 4, !tbaa !9
  %191 = add nsw i32 %189, %190
  %192 = sub nsw i32 %191, 1
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %193)
  %195 = load i8, ptr %194, align 1, !tbaa !17
  %196 = sext i8 %195 to i32
  %197 = icmp eq i32 %188, %196
  br i1 %197, label %198, label %234

198:                                              ; preds = %183
  %199 = load i32, ptr %19, align 4, !tbaa !9
  %200 = add nsw i32 %199, 2
  %201 = sext i32 %200 to i64
  %202 = mul nsw i64 %201, %31
  %203 = getelementptr inbounds i8, ptr %34, i64 %202
  %204 = load i32, ptr %19, align 4, !tbaa !9
  %205 = load i32, ptr %18, align 4, !tbaa !9
  %206 = add nsw i32 %204, %205
  %207 = sub nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds i8, ptr %203, i64 %208
  %210 = load i8, ptr %209, align 1, !tbaa !11, !range !20, !noundef !21
  %211 = trunc i8 %210 to i1
  br i1 %211, label %212, label %234

212:                                              ; preds = %198
  %213 = load i32, ptr %19, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = mul nsw i64 %215, %31
  %217 = getelementptr inbounds i8, ptr %34, i64 %216
  %218 = load i32, ptr %19, align 4, !tbaa !9
  %219 = load i32, ptr %18, align 4, !tbaa !9
  %220 = add nsw i32 %218, %219
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i8, ptr %217, i64 %221
  store i8 1, ptr %222, align 1, !tbaa !11
  %223 = load i32, ptr %12, align 4, !tbaa !9
  %224 = load i32, ptr %18, align 4, !tbaa !9
  %225 = icmp slt i32 %223, %224
  br i1 %225, label %226, label %233

226:                                              ; preds = %212
  %227 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %227, ptr %12, align 4, !tbaa !9
  %228 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %228, ptr %13, align 4, !tbaa !9
  %229 = load i32, ptr %19, align 4, !tbaa !9
  %230 = load i32, ptr %18, align 4, !tbaa !9
  %231 = add nsw i32 %229, %230
  %232 = sub nsw i32 %231, 1
  store i32 %232, ptr %14, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %226, %212
  br label %234

234:                                              ; preds = %233, %198, %183
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %19, align 4, !tbaa !9
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %19, align 4, !tbaa !9
  br label %175, !llvm.loop !22

238:                                              ; preds = %182
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %18, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %18, align 4, !tbaa !9
  br label %169, !llvm.loop !23

242:                                              ; preds = %173
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %243, i32 noundef %244)
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %245, ptr noundef @.str.1)
  store i1 false, ptr %20, align 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %247 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %247, ptr %21, align 4, !tbaa !9
  br label %248

248:                                              ; preds = %261, %242
  %249 = load i32, ptr %21, align 4, !tbaa !9
  %250 = load i32, ptr %14, align 4, !tbaa !9
  %251 = icmp sle i32 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %268

253:                                              ; preds = %248
  %254 = load i32, ptr %21, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %255)
          to label %257 unwind label %264

257:                                              ; preds = %253
  %258 = load i8, ptr %256, align 1, !tbaa !17
  %259 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %258)
          to label %260 unwind label %264

260:                                              ; preds = %257
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %21, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %21, align 4, !tbaa !9
  br label %248, !llvm.loop !24

264:                                              ; preds = %257, %253
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %22, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %273

268:                                              ; preds = %252
  store i1 true, ptr %20, align 1
  store i32 1, ptr %10, align 4
  %269 = load i1, ptr %20, align 1
  br i1 %269, label %271, label %270

270:                                              ; preds = %268
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %271

271:                                              ; preds = %270, %268
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %272 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %272)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

273:                                              ; preds = %264
  %274 = load ptr, ptr %22, align 8
  %275 = load i32, ptr %23, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277
}

; 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_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 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: 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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #0 align 2

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

; 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 = { 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 willreturn }
attributes #4 = { inlinehint 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30findLongestPalindromeSubstringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %4 = trunc i64 %3 to i32
  %5 = add i64 %3, 1
  %6 = and i64 %5, 4294967295
  %7 = mul nuw i64 %6, %6
  %8 = alloca i8, i64 %7, align 16
  %.not111 = icmp slt i32 %4, 0
  br i1 %.not111, label %._crit_edge149, label %.preheader107

.preheader107:                                    ; preds = %2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %8, i8 0, i64 %7, i1 false), !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge149, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader107
  %wide.trip.count = and i64 %3, 2147483647
  %9 = getelementptr inbounds i8, ptr %8, i64 %6
  %10 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 1, ptr %10, align 1, !tbaa !5
  %exitcond.peel.not = icmp eq i64 %wide.trip.count, 1
  br i1 %exitcond.peel.not, label %.preheader106, label %.lr.ph.preheader198

.lr.ph.preheader198:                              ; preds = %.lr.ph.preheader
  %11 = add nsw i64 %wide.trip.count, -1
  %12 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %11, 3
  %13 = icmp ult i64 %12, 3
  br i1 %13, label %.preheader106.loopexit.unr-lcssa, label %.lr.ph.preheader198.new

.lr.ph.preheader198.new:                          ; preds = %.lr.ph.preheader198
  %unroll_iter = and i64 %11, -4
  br label %.lr.ph

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

.lr.ph.epil:                                      ; preds = %.preheader106.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader106.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader106.loopexit.unr-lcssa ]
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %14 = mul nuw nsw i64 %6, %indvars.iv.next.epil
  %15 = getelementptr inbounds i8, ptr %8, i64 %14
  %16 = getelementptr inbounds i8, ptr %15, i64 %indvars.iv.next.epil
  store i8 1, ptr %16, align 1, !tbaa !5
  %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 %.preheader106, label %.lr.ph.epil, !llvm.loop !9

.preheader106:                                    ; preds = %.preheader106.loopexit.unr-lcssa, %.lr.ph.epil, %.lr.ph.preheader
  %17 = icmp sgt i32 %4, 1
  br i1 %17, label %.lr.ph122.preheader, label %._crit_edge149

.lr.ph122.preheader:                              ; preds = %.preheader106
  %18 = add i64 %3, 4294967295
  %wide.trip.count164 = and i64 %18, 4294967295
  br label %.lr.ph122

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader198.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader198.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader198.new ], [ %niter.next.3, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = mul nuw nsw i64 %6, %indvars.iv.next
  %20 = getelementptr inbounds i8, ptr %8, i64 %19
  %21 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv.next
  store i8 1, ptr %21, align 1, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %22 = mul nuw nsw i64 %6, %indvars.iv.next.1
  %23 = getelementptr inbounds i8, ptr %8, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.next.1
  store i8 1, ptr %24, align 1, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %25 = mul nuw nsw i64 %6, %indvars.iv.next.2
  %26 = getelementptr inbounds i8, ptr %8, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 %indvars.iv.next.2
  store i8 1, ptr %27, align 1, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %28 = mul nuw nsw i64 %6, %indvars.iv.next.3
  %29 = getelementptr inbounds i8, ptr %8, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv.next.3
  store i8 1, ptr %30, align 1, !tbaa !5
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader106.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

.preheader105:                                    ; preds = %45
  %.not196 = icmp eq i32 %4, 2
  br i1 %.not196, label %._crit_edge149, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %.preheader105
  %31 = add i64 %3, 4294967294
  %wide.trip.count169 = and i64 %31, 4294967295
  br label %.lr.ph130

.lr.ph122:                                        ; preds = %.lr.ph122.preheader, %45
  %indvars.iv161 = phi i64 [ 0, %.lr.ph122.preheader ], [ %indvars.iv.next162, %45 ]
  %.2120 = phi i32 [ 0, %.lr.ph122.preheader ], [ %.3, %45 ]
  %.278119 = phi i32 [ 0, %.lr.ph122.preheader ], [ %.379, %45 ]
  %.287118 = phi i32 [ 1, %.lr.ph122.preheader ], [ %.388, %45 ]
  %32 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv161)
  %33 = load i8, ptr %32, align 1, !tbaa !14
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %34 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next162)
  %35 = load i8, ptr %34, align 1, !tbaa !14
  %36 = icmp eq i8 %33, %35
  br i1 %36, label %37, label %45

37:                                               ; preds = %.lr.ph122
  %38 = mul nuw nsw i64 %6, %indvars.iv.next162
  %39 = getelementptr inbounds i8, ptr %8, i64 %38
  %40 = getelementptr inbounds i8, ptr %39, i64 %indvars.iv161
  %41 = getelementptr inbounds i8, ptr %40, i64 2
  store i8 1, ptr %41, align 1, !tbaa !5
  %42 = icmp slt i32 %.287118, 2
  %43 = trunc nuw nsw i64 %indvars.iv161 to i32
  %spec.select102 = select i1 %42, i32 %43, i32 %.278119
  %44 = trunc nuw nsw i64 %indvars.iv.next162 to i32
  %spec.select103 = select i1 %42, i32 %44, i32 %.2120
  br label %45

45:                                               ; preds = %37, %.lr.ph122
  %.388 = phi i32 [ %.287118, %.lr.ph122 ], [ 2, %37 ]
  %.379 = phi i32 [ %.278119, %.lr.ph122 ], [ %spec.select102, %37 ]
  %.3 = phi i32 [ %.2120, %.lr.ph122 ], [ %spec.select103, %37 ]
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %.preheader105, label %.lr.ph122, !llvm.loop !15

.preheader104:                                    ; preds = %.lr.ph130._crit_edge
  %.not97144 = icmp slt i32 %4, 4
  br i1 %.not97144, label %._crit_edge149, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader104
  %46 = add nsw i32 %4, -3
  %47 = and i64 %3, 2147483647
  %48 = add nuw nsw i64 %3, 1
  %wide.trip.count181 = and i64 %48, 4294967295
  br label %.preheader

.lr.ph130:                                        ; preds = %.lr.ph130.preheader, %.lr.ph130._crit_edge
  %indvars.iv166 = phi i64 [ 0, %.lr.ph130.preheader ], [ %55, %.lr.ph130._crit_edge ]
  %.4128 = phi i32 [ %.3, %.lr.ph130.preheader ], [ %.5, %.lr.ph130._crit_edge ]
  %.480127 = phi i32 [ %.379, %.lr.ph130.preheader ], [ %.581, %.lr.ph130._crit_edge ]
  %.489126 = phi i32 [ %.388, %.lr.ph130.preheader ], [ %.590, %.lr.ph130._crit_edge ]
  %49 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv166)
  %50 = load i8, ptr %49, align 1, !tbaa !14
  %51 = add nuw nsw i64 %indvars.iv166, 2
  %52 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51)
  %53 = load i8, ptr %52, align 1, !tbaa !14
  %54 = icmp eq i8 %50, %53
  %55 = add nuw nsw i64 %indvars.iv166, 1
  br i1 %54, label %56, label %.lr.ph130._crit_edge

56:                                               ; preds = %.lr.ph130
  %57 = mul nuw nsw i64 %6, %55
  %58 = getelementptr inbounds i8, ptr %8, i64 %57
  %59 = getelementptr inbounds i8, ptr %58, i64 %indvars.iv166
  %60 = getelementptr inbounds i8, ptr %59, i64 3
  store i8 1, ptr %60, align 1, !tbaa !5
  %61 = icmp slt i32 %.489126, 3
  br i1 %61, label %62, label %.lr.ph130._crit_edge

62:                                               ; preds = %56
  %63 = trunc nuw i64 %51 to i32
  %64 = trunc nuw nsw i64 %indvars.iv166 to i32
  br label %.lr.ph130._crit_edge

.lr.ph130._crit_edge:                             ; preds = %.lr.ph130, %62, %56
  %.590 = phi i32 [ 3, %62 ], [ %.489126, %56 ], [ %.489126, %.lr.ph130 ]
  %.581 = phi i32 [ %64, %62 ], [ %.480127, %56 ], [ %.480127, %.lr.ph130 ]
  %.5 = phi i32 [ %63, %62 ], [ %.4128, %56 ], [ %.4128, %.lr.ph130 ]
  %exitcond170.not = icmp eq i64 %55, %wide.trip.count169
  br i1 %exitcond170.not, label %.preheader104, label %.lr.ph130, !llvm.loop !16

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge140
  %indvars.iv178 = phi i64 [ 4, %.preheader.preheader ], [ %indvars.iv.next179, %._crit_edge140 ]
  %indvars.iv174 = phi i32 [ %46, %.preheader.preheader ], [ %indvars.iv.next175, %._crit_edge140 ]
  %.6147 = phi i32 [ %.5, %.preheader.preheader ], [ %.7.lcssa, %._crit_edge140 ]
  %.682146 = phi i32 [ %.581, %.preheader.preheader ], [ %.783.lcssa, %._crit_edge140 ]
  %.691145 = phi i32 [ %.590, %.preheader.preheader ], [ %.792.lcssa, %._crit_edge140 ]
  %.not99134 = icmp ult i64 %47, %indvars.iv178
  br i1 %.not99134, label %._crit_edge140, label %.lr.ph139.preheader

.lr.ph139.preheader:                              ; preds = %.preheader
  %wide.trip.count176 = zext i32 %indvars.iv174 to i64
  %65 = trunc nuw nsw i64 %indvars.iv178 to i32
  br label %.lr.ph139

._crit_edge149:                                   ; preds = %._crit_edge140, %2, %.preheader107, %.preheader106, %.preheader105, %.preheader104
  %.691.lcssa = phi i32 [ %.590, %.preheader104 ], [ %.388, %.preheader105 ], [ 1, %.preheader106 ], [ 0, %.preheader107 ], [ 0, %2 ], [ %.792.lcssa, %._crit_edge140 ]
  %.682.lcssa = phi i32 [ %.581, %.preheader104 ], [ %.379, %.preheader105 ], [ 0, %.preheader106 ], [ -1, %.preheader107 ], [ -1, %2 ], [ %.783.lcssa, %._crit_edge140 ]
  %.6.lcssa = phi i32 [ %.5, %.preheader104 ], [ %.3, %.preheader105 ], [ 0, %.preheader106 ], [ -1, %.preheader107 ], [ -1, %2 ], [ %.7.lcssa, %._crit_edge140 ]
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %66, i32 noundef %.691.lcssa)
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @.str.1)
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %.not98153 = icmp sgt i32 %.682.lcssa, %.6.lcssa
  br i1 %.not98153, label %._crit_edge157, label %.lr.ph156.preheader

.lr.ph156.preheader:                              ; preds = %._crit_edge149
  %69 = sext i32 %.682.lcssa to i64
  %70 = add i32 %.6.lcssa, 1
  br label %.lr.ph156

._crit_edge140:                                   ; preds = %95, %.preheader
  %.792.lcssa = phi i32 [ %.691145, %.preheader ], [ %.893, %95 ]
  %.783.lcssa = phi i32 [ %.682146, %.preheader ], [ %.884, %95 ]
  %.7.lcssa = phi i32 [ %.6147, %.preheader ], [ %.8, %95 ]
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %indvars.iv.next175 = add i32 %indvars.iv174, -1
  %exitcond182.not = icmp eq i64 %indvars.iv.next179, %wide.trip.count181
  br i1 %exitcond182.not, label %._crit_edge149, label %.preheader, !llvm.loop !17

.lr.ph139:                                        ; preds = %.lr.ph139.preheader, %95
  %indvars.iv171 = phi i64 [ 0, %.lr.ph139.preheader ], [ %indvars.iv.next172, %95 ]
  %.7137 = phi i32 [ %.6147, %.lr.ph139.preheader ], [ %.8, %95 ]
  %.783136 = phi i32 [ %.682146, %.lr.ph139.preheader ], [ %.884, %95 ]
  %.792135 = phi i32 [ %.691145, %.lr.ph139.preheader ], [ %.893, %95 ]
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv171)
  %72 = load i8, ptr %71, align 1, !tbaa !14
  %73 = add nuw nsw i64 %indvars.iv171, %indvars.iv178
  %74 = add nsw i64 %73, -1
  %75 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %74)
  %76 = load i8, ptr %75, align 1, !tbaa !14
  %77 = icmp eq i8 %72, %76
  br i1 %77, label %78, label %95

78:                                               ; preds = %.lr.ph139
  %79 = add nuw nsw i64 %indvars.iv171, 2
  %80 = mul nuw nsw i64 %6, %79
  %81 = getelementptr inbounds i8, ptr %8, i64 %80
  %82 = getelementptr inbounds i8, ptr %81, i64 %74
  %83 = load i8, ptr %82, align 1, !tbaa !5, !range !18, !noundef !19
  %84 = trunc nuw i8 %83 to i1
  br i1 %84, label %85, label %95

85:                                               ; preds = %78
  %86 = add nuw nsw i64 %indvars.iv171, 1
  %87 = mul nuw nsw i64 %6, %86
  %88 = getelementptr inbounds i8, ptr %8, i64 %87
  %89 = getelementptr inbounds i8, ptr %88, i64 %73
  store i8 1, ptr %89, align 1, !tbaa !5
  %90 = sext i32 %.792135 to i64
  %91 = icmp sgt i64 %indvars.iv178, %90
  br i1 %91, label %92, label %95

92:                                               ; preds = %85
  %93 = trunc nsw i64 %74 to i32
  %94 = trunc nuw nsw i64 %indvars.iv171 to i32
  br label %95

95:                                               ; preds = %.lr.ph139, %78, %92, %85
  %.893 = phi i32 [ %65, %92 ], [ %.792135, %85 ], [ %.792135, %78 ], [ %.792135, %.lr.ph139 ]
  %.884 = phi i32 [ %94, %92 ], [ %.783136, %85 ], [ %.783136, %78 ], [ %.783136, %.lr.ph139 ]
  %.8 = phi i32 [ %93, %92 ], [ %.7137, %85 ], [ %.7137, %78 ], [ %.7137, %.lr.ph139 ]
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %exitcond177.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count176
  br i1 %exitcond177.not, label %._crit_edge140, label %.lr.ph139, !llvm.loop !20

.lr.ph156:                                        ; preds = %.lr.ph156.preheader, %99
  %indvars.iv183 = phi i64 [ %69, %.lr.ph156.preheader ], [ %indvars.iv.next184, %99 ]
  %96 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv183)
  %97 = load i8, ptr %96, align 1, !tbaa !14
  %98 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %97)
          to label %99 unwind label %100

99:                                               ; preds = %.lr.ph156
  %indvars.iv.next184 = add nsw i64 %indvars.iv183, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next184 to i32
  %exitcond186.not = icmp eq i32 %70, %lftr.wideiv
  br i1 %exitcond186.not, label %._crit_edge157, label %.lr.ph156, !llvm.loop !21

100:                                              ; preds = %.lr.ph156
  %101 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  resume { ptr, i32 } %101

._crit_edge157:                                   ; preds = %99, %._crit_edge149
  ret void
}

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

; 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { 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 #2 = { inlinehint 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"bool", !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}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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