; LLVM IR from Mohammed-Shoaib/Coding-Problems :: HackerRank/Algorithms/Medium (M0022)

; 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] }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.3" = type { i8 }
%"class.std::allocator" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22highestValuePalindromeRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, i32 noundef %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator.3", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %22 unwind label %51

22:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = sub nsw i32 %23, 1
  store i32 %24, ptr %10, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %117, %22
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = sdiv i32 %27, 2
  %29 = icmp slt i32 %26, %28
  br i1 %29, label %30, label %122

30:                                               ; preds = %25
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %31, i64 noundef %33)
          to label %35 unwind label %55

35:                                               ; preds = %30
  %36 = load i8, ptr %34, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %40)
          to label %42 unwind label %55

42:                                               ; preds = %35
  %43 = load i8, ptr %41, align 1, !tbaa !11
  %44 = sext i8 %43 to i32
  %45 = icmp ne i32 %37, %44
  br i1 %45, label %46, label %116

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %63

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %50 unwind label %59

50:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  store i32 1, ptr %16, align 4
  br label %214

51:                                               ; preds = %4
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %13, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  br label %216

55:                                               ; preds = %211, %195, %190, %175, %170, %144, %135, %81, %75, %73, %68, %63, %35, %30
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %13, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %14, align 4
  br label %215

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %13, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %215

63:                                               ; preds = %46
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %64, i64 noundef %66)
          to label %68 unwind label %55

68:                                               ; preds = %63
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %69, i64 noundef %71)
          to label %73 unwind label %55

73:                                               ; preds = %68
  %74 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 1 dereferenceable(1) %72)
          to label %75 unwind label %55

75:                                               ; preds = %73
  %76 = load i8, ptr %74, align 1, !tbaa !11
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %77, i64 noundef %79)
          to label %81 unwind label %55

81:                                               ; preds = %75
  store i8 %76, ptr %80, align 1, !tbaa !11
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %82, i64 noundef %84)
          to label %86 unwind label %55

86:                                               ; preds = %81
  store i8 %76, ptr %85, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %88)
          to label %90 unwind label %107

90:                                               ; preds = %86
  %91 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %92 = extractvalue { ptr, i64 } %89, 0
  store ptr %92, ptr %91, align 8
  %93 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %94 = extractvalue { ptr, i64 } %89, 1
  store i64 %94, ptr %93, align 8
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext true) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %97)
          to label %99 unwind label %111

99:                                               ; preds = %90
  %100 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %101 = extractvalue { ptr, i64 } %98, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %103 = extractvalue { ptr, i64 } %98, 1
  store i64 %103, ptr %102, align 8
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %95) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %8, align 4, !tbaa !9
  br label %116

107:                                              ; preds = %86
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %13, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %14, align 4
  br label %115

111:                                              ; preds = %90
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %13, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  br label %115

115:                                              ; preds = %111, %107
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  br label %215

116:                                              ; preds = %99, %42
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %9, align 4, !tbaa !9
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %10, align 4, !tbaa !9
  br label %25, !llvm.loop !12

122:                                              ; preds = %25
  store i32 0, ptr %9, align 4, !tbaa !9
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = sub nsw i32 %123, 1
  store i32 %124, ptr %10, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %206, %122
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = sdiv i32 %127, 2
  %129 = icmp sle i32 %126, %128
  br i1 %129, label %130, label %133

130:                                              ; preds = %125
  %131 = load i32, ptr %8, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  br label %133

133:                                              ; preds = %130, %125
  %134 = phi i1 [ false, %125 ], [ %132, %130 ]
  br i1 %134, label %135, label %211

135:                                              ; preds = %133
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %136, i64 noundef %138)
          to label %140 unwind label %55

140:                                              ; preds = %135
  %141 = load i8, ptr %139, align 1, !tbaa !11
  %142 = sext i8 %141 to i32
  %143 = icmp eq i32 %142, 57
  br i1 %143, label %144, label %154

144:                                              ; preds = %140
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %145, i64 noundef %147)
          to label %149 unwind label %55

149:                                              ; preds = %144
  %150 = load i8, ptr %148, align 1, !tbaa !11
  %151 = sext i8 %150 to i32
  %152 = icmp eq i32 %151, 57
  br i1 %152, label %153, label %154

153:                                              ; preds = %149
  br label %206

154:                                              ; preds = %149, %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %156)
          to label %158 unwind label %183

158:                                              ; preds = %154
  %159 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %160 = extractvalue { ptr, i64 } %157, 0
  store ptr %160, ptr %159, align 8
  %161 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %162 = extractvalue { ptr, i64 } %157, 1
  store i64 %162, ptr %161, align 8
  %163 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #4
  br i1 %163, label %168, label %164

164:                                              ; preds = %158
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = load i32, ptr %10, align 4, !tbaa !9
  %167 = icmp eq i32 %165, %166
  br label %168

168:                                              ; preds = %164, %158
  %169 = phi i1 [ true, %158 ], [ %167, %164 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br i1 %169, label %170, label %187

170:                                              ; preds = %168
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %171, i64 noundef %173)
          to label %175 unwind label %55

175:                                              ; preds = %170
  store i8 57, ptr %174, align 1, !tbaa !11
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = load i32, ptr %9, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %176, i64 noundef %178)
          to label %180 unwind label %55

180:                                              ; preds = %175
  store i8 57, ptr %179, align 1, !tbaa !11
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = add nsw i32 %181, -1
  store i32 %182, ptr %8, align 4, !tbaa !9
  br label %204

183:                                              ; preds = %154
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %13, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %215

187:                                              ; preds = %168
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = icmp sgt i32 %188, 1
  br i1 %189, label %190, label %203

190:                                              ; preds = %187
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = load i32, ptr %10, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %191, i64 noundef %193)
          to label %195 unwind label %55

195:                                              ; preds = %190
  store i8 57, ptr %194, align 1, !tbaa !11
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = load i32, ptr %9, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %196, i64 noundef %198)
          to label %200 unwind label %55

200:                                              ; preds = %195
  store i8 57, ptr %199, align 1, !tbaa !11
  %201 = load i32, ptr %8, align 4, !tbaa !9
  %202 = sub nsw i32 %201, 2
  store i32 %202, ptr %8, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %200, %187
  br label %204

204:                                              ; preds = %203, %180
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205, %153
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %9, align 4, !tbaa !9
  %209 = load i32, ptr %10, align 4, !tbaa !9
  %210 = add nsw i32 %209, -1
  store i32 %210, ptr %10, align 4, !tbaa !9
  br label %125, !llvm.loop !14

211:                                              ; preds = %133
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %212)
          to label %213 unwind label %55

213:                                              ; preds = %211
  store i32 1, ptr %16, align 4
  br label %214

214:                                              ; preds = %213, %50
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void

215:                                              ; preds = %183, %115, %59, %55
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #4
  br label %216

216:                                              ; preds = %215, %51
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %217

217:                                              ; preds = %216
  %218 = load ptr, ptr %13, align 8
  %219 = load i32, ptr %14, align 4
  %220 = insertvalue { ptr, i32 } poison, ptr %218, 0
  %221 = insertvalue { ptr, i32 } %220, i32 %219, 1
  resume { ptr, i32 } %221
}

; 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 dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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] }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.3" = type { i8 }
%"class.std::allocator" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22highestValuePalindromeRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator.3", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  %11 = sext i32 %2 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %11, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %12 unwind label %31

12:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  %13 = sdiv i32 %2, 2
  %14 = icmp sgt i32 %2, 1
  br i1 %14, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %12
  %15 = getelementptr inbounds i8, ptr %8, i64 8
  %16 = getelementptr inbounds i8, ptr %9, i64 8
  %wide.trip.count = zext nneg i32 %13 to i64
  br label %22

.preheader:                                       ; preds = %60, %12
  %.055.lcssa = phi i32 [ %3, %12 ], [ %.156, %60 ]
  %17 = icmp sgt i32 %2, -2
  %18 = icmp ne i32 %.055.lcssa, 0
  %19 = select i1 %17, i1 %18, i1 false
  br i1 %19, label %.lr.ph76, label %._crit_edge

.lr.ph76:                                         ; preds = %.preheader
  %20 = getelementptr inbounds i8, ptr %10, i64 8
  %21 = sext i32 %13 to i64
  br label %61

22:                                               ; preds = %.lr.ph, %60
  %indvars.iv77 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next78, %60 ]
  %indvars.iv.in = phi i64 [ %11, %.lr.ph ], [ %indvars.iv, %60 ]
  %.05569 = phi i32 [ %3, %.lr.ph ], [ %.156, %60 ]
  %indvars.iv = add nsw i64 %indvars.iv.in, -1
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv77)
  %24 = load i8, ptr %23, align 1, !tbaa !5
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %26 = load i8, ptr %25, align 1, !tbaa !5
  %.not = icmp eq i8 %24, %26
  br i1 %.not, label %60, label %27

27:                                               ; preds = %22
  %28 = icmp eq i32 %.05569, 0
  br i1 %28, label %29, label %37

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %35

30:                                               ; preds = %29
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %89

31:                                               ; preds = %4
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br label %91

33:                                               ; preds = %._crit_edge
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %90

35:                                               ; preds = %29
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %90

37:                                               ; preds = %27
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv77)
  %39 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %38, ptr noundef nonnull align 1 dereferenceable(1) %39)
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  store i8 %41, ptr %42, align 1, !tbaa !5
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv77)
  store i8 %41, ptr %43, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %44 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %indvars.iv)
          to label %45 unwind label %55

45:                                               ; preds = %37
  %46 = extractvalue { ptr, i64 } %44, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i64 } %44, 1
  store i64 %47, ptr %15, align 8
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext true) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  %49 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %indvars.iv77)
          to label %50 unwind label %57

50:                                               ; preds = %45
  %51 = extractvalue { ptr, i64 } %49, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i64 } %49, 1
  store i64 %52, ptr %16, align 8
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %48) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %54 = add nsw i32 %.05569, -1
  br label %60

55:                                               ; preds = %37
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %45
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %59

59:                                               ; preds = %57, %55
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %90

60:                                               ; preds = %22, %50
  %.156 = phi i32 [ %54, %50 ], [ %.05569, %22 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %22, !llvm.loop !8

61:                                               ; preds = %.lr.ph76, %85
  %indvars.iv84 = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next85, %85 ]
  %indvars.iv82.in = phi i64 [ %11, %.lr.ph76 ], [ %indvars.iv82, %85 ]
  %.25773 = phi i32 [ %.055.lcssa, %.lr.ph76 ], [ %.3, %85 ]
  %indvars.iv82 = add nsw i64 %indvars.iv82.in, -1
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv84)
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = icmp eq i8 %63, 57
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv82)
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %68 = icmp eq i8 %67, 57
  br i1 %68, label %85, label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  %70 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %indvars.iv84)
          to label %71 unwind label %78

71:                                               ; preds = %69
  %72 = extractvalue { ptr, i64 } %70, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i64 } %70, 1
  store i64 %73, ptr %20, align 8
  %74 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  %75 = and i64 %indvars.iv82, 4294967295
  %76 = icmp eq i64 %indvars.iv84, %75
  %77 = select i1 %74, i1 true, i1 %76
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br i1 %77, label %.sink.split, label %80

78:                                               ; preds = %69
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br label %90

80:                                               ; preds = %71
  %81 = icmp sgt i32 %.25773, 1
  br i1 %81, label %.sink.split, label %85

.sink.split:                                      ; preds = %80, %71
  %.sink = phi i32 [ -1, %71 ], [ -2, %80 ]
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv82)
  store i8 57, ptr %82, align 1, !tbaa !5
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv84)
  store i8 57, ptr %83, align 1, !tbaa !5
  %84 = add nsw i32 %.25773, %.sink
  br label %85

85:                                               ; preds = %.sink.split, %80, %65
  %.3 = phi i32 [ %.25773, %65 ], [ %.25773, %80 ], [ %84, %.sink.split ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %86 = icmp slt i64 %indvars.iv84, %21
  %87 = icmp ne i32 %.3, 0
  %88 = select i1 %86, i1 %87, i1 false
  br i1 %88, label %61, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %85, %.preheader
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %89 unwind label %33

89:                                               ; preds = %._crit_edge, %30
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  ret void

90:                                               ; preds = %78, %59, %35, %33
  %.pn60 = phi { ptr, i32 } [ %36, %35 ], [ %.pn, %59 ], [ %79, %78 ], [ %34, %33 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  br label %91

91:                                               ; preds = %90, %31
  %.pn60.pn = phi { ptr, i32 } [ %.pn60, %90 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn60.pn
}

; 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 dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 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 #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = { mustprogress 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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