; LLVM IR from JayXon/Leanify :: formats/rdb.ll (ZN3Rdb7LeanifyEm)

; 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] }
%"class.std::allocator" = type { i8 }
%class.Format = type { ptr, ptr, i64 }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@depth = external global i32, align 4
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@max_depth = external global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Rdb7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca [256 x i8], align 16
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %25 = load ptr, ptr %4, align 8
  %26 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = icmp ule i64 %27, 32
  br i1 %28, label %29, label %34

29:                                               ; preds = %2
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %32 = load i64, ptr %5, align 8, !tbaa !9
  %33 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %32)
  store i64 %33, ptr %3, align 8
  br label %286

34:                                               ; preds = %2
  %35 = load i32, ptr @depth, align 4, !tbaa !13
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr @depth, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %37 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  store ptr %38, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load i32, ptr %40, align 4, !tbaa !13
  store i32 %41, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 20
  %44 = load i64, ptr %43, align 8, !tbaa !9
  store i64 %44, ptr %9, align 8, !tbaa !9
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = icmp ugt i64 %45, %47
  br i1 %48, label %49, label %56

49:                                               ; preds = %34
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
  %51 = load i64, ptr %9, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %50, i64 noundef %51)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %54 = load i64, ptr %5, align 8, !tbaa !9
  %55 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %54)
  store i64 %55, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %285

56:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %57 = load i64, ptr %9, align 8, !tbaa !9
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 28
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = add i64 %57, %60
  store i64 %61, ptr %11, align 8, !tbaa !9
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = load i64, ptr %9, align 8, !tbaa !9
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %70, label %65

65:                                               ; preds = %56
  %66 = load i64, ptr %11, align 8, !tbaa !9
  %67 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = icmp ugt i64 %66, %68
  br i1 %69, label %70, label %77

70:                                               ; preds = %65, %56
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %71, i64 noundef %72)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %75 = load i64, ptr %5, align 8, !tbaa !9
  %76 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %75)
  store i64 %76, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %284

77:                                               ; preds = %65
  %78 = load i64, ptr %5, align 8, !tbaa !9
  %79 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !15
  %81 = sub i64 0, %78
  %82 = getelementptr inbounds i8, ptr %80, i64 %81
  store ptr %82, ptr %79, align 8, !tbaa !15
  %83 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %84, ptr align 1 %85, i64 %86, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %87 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = load i64, ptr %9, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %88, i64 %89
  store ptr %90, ptr %12, align 8, !tbaa !5
  %91 = load i64, ptr %11, align 8, !tbaa !9
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 %91
  store ptr %93, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %94

94:                                               ; preds = %264, %77
  %95 = load i32, ptr %13, align 4, !tbaa !13
  %96 = load i32, ptr %8, align 4, !tbaa !13
  %97 = icmp ult i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 2, ptr %10, align 4
  br label %267

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %100, ptr %14, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %115, %99
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 2
  %104 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !15
  %106 = load i64, ptr %11, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %105, i64 %106
  %108 = icmp ult ptr %103, %107
  br i1 %108, label %109, label %113

109:                                              ; preds = %101
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load i16, ptr %110, align 2, !tbaa !16
  %112 = icmp ne i16 %111, 0
  br label %113

113:                                              ; preds = %109, %101
  %114 = phi i1 [ false, %101 ], [ %112, %109 ]
  br i1 %114, label %115, label %118

115:                                              ; preds = %113
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %116, i64 2
  store ptr %117, ptr %12, align 8, !tbaa !5
  br label %101, !llvm.loop !18

118:                                              ; preds = %113
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 2
  store ptr %120, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %121 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = load i64, ptr %5, align 8, !tbaa !9
  %124 = getelementptr inbounds i8, ptr %122, i64 %123
  %125 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  %126 = load i64, ptr %125, align 8, !tbaa !11
  %127 = getelementptr inbounds i8, ptr %124, i64 %126
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = ptrtoint ptr %127 to i64
  %130 = ptrtoint ptr %128 to i64
  %131 = sub i64 %129, %130
  store i64 %131, ptr %15, align 8, !tbaa !9
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 8
  %134 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = load i64, ptr %11, align 8, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %135, i64 %136
  %138 = icmp ugt ptr %133, %137
  br i1 %138, label %139, label %154

139:                                              ; preds = %118
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load i64, ptr %7, align 8, !tbaa !9
  %144 = sub i64 0, %143
  %145 = getelementptr inbounds i8, ptr %142, i64 %144
  %146 = load i64, ptr %5, align 8, !tbaa !9
  %147 = sub i64 0, %146
  %148 = getelementptr inbounds i8, ptr %145, i64 %147
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i64, ptr %15, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %148, ptr align 1 %149, i64 %150, i1 false)
  %151 = load i64, ptr %15, align 8, !tbaa !9
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds i8, ptr %152, i64 %151
  store ptr %153, ptr %6, align 8, !tbaa !5
  store i32 2, ptr %10, align 4
  br label %261

154:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 8
  %157 = load i64, ptr %156, align 8, !tbaa !9
  store i64 %157, ptr %16, align 8, !tbaa !9
  %158 = load i64, ptr %16, align 8, !tbaa !9
  %159 = load i64, ptr %15, align 8, !tbaa !9
  %160 = icmp ugt i64 %158, %159
  br i1 %160, label %161, label %178

161:                                              ; preds = %154
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
  %163 = load i64, ptr %16, align 8, !tbaa !9
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %162, i64 noundef %163)
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = load i64, ptr %7, align 8, !tbaa !9
  %168 = sub i64 0, %167
  %169 = getelementptr inbounds i8, ptr %166, i64 %168
  %170 = load i64, ptr %5, align 8, !tbaa !9
  %171 = sub i64 0, %170
  %172 = getelementptr inbounds i8, ptr %169, i64 %171
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = load i64, ptr %15, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %172, ptr align 1 %173, i64 %174, i1 false)
  %175 = load i64, ptr %15, align 8, !tbaa !9
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %176, i64 %175
  store ptr %177, ptr %6, align 8, !tbaa !5
  store i32 2, ptr %10, align 4
  br label %260

178:                                              ; preds = %154
  %179 = load i64, ptr %7, align 8, !tbaa !9
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = load i64, ptr %180, align 8, !tbaa !9
  %182 = sub i64 %181, %179
  store i64 %182, ptr %180, align 8, !tbaa !9
  %183 = load i64, ptr %16, align 8, !tbaa !9
  %184 = icmp ne i64 %183, 0
  br i1 %184, label %188, label %185

185:                                              ; preds = %178
  %186 = load ptr, ptr %12, align 8, !tbaa !5
  %187 = getelementptr inbounds i8, ptr %186, i64 16
  store ptr %187, ptr %12, align 8, !tbaa !5
  store i32 4, ptr %10, align 4
  br label %260

188:                                              ; preds = %178
  %189 = load i32, ptr @depth, align 4, !tbaa !13
  %190 = load i32, ptr @max_depth, align 4, !tbaa !13
  %191 = icmp sle i32 %189, %190
  br i1 %191, label %192, label %244

192:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 256, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 256, i1 false)
  %193 = load ptr, ptr %14, align 8, !tbaa !5
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = load ptr, ptr %14, align 8, !tbaa !5
  %196 = ptrtoint ptr %194 to i64
  %197 = ptrtoint ptr %195 to i64
  %198 = sub i64 %196, %197
  %199 = getelementptr inbounds [256 x i8], ptr %17, i64 0, i64 0
  call void @_Z10UTF16toMBSPKwmPcm(ptr noundef %193, i64 noundef %198, ptr noundef %199, i64 noundef 256)
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  %200 = getelementptr inbounds [256 x i8], ptr %17, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %200, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %201 unwind label %224

201:                                              ; preds = %192
  invoke void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %202 unwind label %228

202:                                              ; preds = %201
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = load i64, ptr %16, align 8, !tbaa !9
  %205 = load i64, ptr %7, align 8, !tbaa !9
  %206 = load i64, ptr %5, align 8, !tbaa !9
  %207 = add i64 %205, %206
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  %208 = getelementptr inbounds [256 x i8], ptr %17, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef %208, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %209 unwind label %233

209:                                              ; preds = %202
  %210 = invoke noundef i64 @_Z11LeanifyFilePvmmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %203, i64 noundef %204, i64 noundef %207, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %211 unwind label %237

211:                                              ; preds = %209
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  store i64 %210, ptr %22, align 8, !tbaa !9
  %212 = load i64, ptr %22, align 8, !tbaa !9
  %213 = load i64, ptr %16, align 8, !tbaa !9
  %214 = icmp ne i64 %212, %213
  br i1 %214, label %215, label %242

215:                                              ; preds = %211
  %216 = load i64, ptr %22, align 8, !tbaa !9
  %217 = load ptr, ptr %12, align 8, !tbaa !5
  %218 = getelementptr inbounds i8, ptr %217, i64 8
  store i64 %216, ptr %218, align 8, !tbaa !9
  %219 = load i64, ptr %16, align 8, !tbaa !9
  %220 = load i64, ptr %22, align 8, !tbaa !9
  %221 = sub i64 %219, %220
  %222 = load i64, ptr %7, align 8, !tbaa !9
  %223 = add i64 %222, %221
  store i64 %223, ptr %7, align 8, !tbaa !9
  br label %242

224:                                              ; preds = %192
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %20, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %21, align 4
  br label %232

228:                                              ; preds = %201
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %20, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %232

232:                                              ; preds = %228, %224
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %243

233:                                              ; preds = %202
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %20, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %21, align 4
  br label %241

237:                                              ; preds = %209
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %20, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %241

241:                                              ; preds = %237, %233
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %243

242:                                              ; preds = %215, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #7
  br label %254

243:                                              ; preds = %241, %232
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %288

244:                                              ; preds = %188
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = load i64, ptr %7, align 8, !tbaa !9
  %247 = sub i64 0, %246
  %248 = getelementptr inbounds i8, ptr %245, i64 %247
  %249 = load i64, ptr %5, align 8, !tbaa !9
  %250 = sub i64 0, %249
  %251 = getelementptr inbounds i8, ptr %248, i64 %250
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = load i64, ptr %16, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %251, ptr align 1 %252, i64 %253, i1 false)
  br label %254

254:                                              ; preds = %244, %242
  %255 = load i64, ptr %16, align 8, !tbaa !9
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = getelementptr inbounds i8, ptr %256, i64 %255
  store ptr %257, ptr %6, align 8, !tbaa !5
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = getelementptr inbounds i8, ptr %258, i64 16
  store ptr %259, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  br label %260

260:                                              ; preds = %254, %185, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %261

261:                                              ; preds = %260, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %262 = load i32, ptr %10, align 4
  switch i32 %262, label %267 [
    i32 0, label %263
    i32 4, label %264
  ]

263:                                              ; preds = %261
  br label %264

264:                                              ; preds = %263, %261
  %265 = load i32, ptr %13, align 4, !tbaa !13
  %266 = add i32 %265, 1
  store i32 %266, ptr %13, align 4, !tbaa !13
  br label %94, !llvm.loop !20

267:                                              ; preds = %261, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %268

268:                                              ; preds = %267
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  %270 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 1
  %271 = load ptr, ptr %270, align 8, !tbaa !15
  %272 = ptrtoint ptr %269 to i64
  %273 = ptrtoint ptr %271 to i64
  %274 = sub i64 %272, %273
  %275 = load i64, ptr %5, align 8, !tbaa !9
  %276 = sub i64 %274, %275
  %277 = load i64, ptr %7, align 8, !tbaa !9
  %278 = sub i64 %276, %277
  %279 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  store i64 %278, ptr %279, align 8, !tbaa !11
  %280 = load i32, ptr @depth, align 4, !tbaa !13
  %281 = add nsw i32 %280, -1
  store i32 %281, ptr @depth, align 4, !tbaa !13
  %282 = getelementptr inbounds %class.Format, ptr %25, i32 0, i32 2
  %283 = load i64, ptr %282, align 8, !tbaa !11
  store i64 %283, ptr %3, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %284

284:                                              ; preds = %268, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %285

285:                                              ; preds = %284, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %286

286:                                              ; preds = %285, %29
  %287 = load i64, ptr %3, align 8
  ret i64 %287

288:                                              ; preds = %243
  %289 = load ptr, ptr %20, align 8
  %290 = load i32, ptr %21, align 4
  %291 = insertvalue { ptr, i32 } poison, ptr %289, 0
  %292 = insertvalue { ptr, i32 } %291, i32 %290, 1
  resume { ptr, i32 } %292
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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

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

declare void @_Z10UTF16toMBSPKwmPcm(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #6

declare void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #6

; 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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i64 @_Z11LeanifyFilePvmmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #6

; 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 = { 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 #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 memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 #7 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTS6Format", !6, i64 8, !10, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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] }
%"class.std::allocator" = type { i8 }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@depth = external local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@max_depth = external local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Rdb7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = sub i64 0, %1
  %4 = alloca [256 x i8], align 16
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load i64, ptr %9, align 8, !tbaa !5
  %11 = icmp ult i64 %10, 33
  br i1 %11, label %12, label %16

12:                                               ; preds = %2
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %15 = tail call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %124

16:                                               ; preds = %2
  %17 = load i32, ptr @depth, align 4, !tbaa !11
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr @depth, align 4, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %20, i64 20
  %24 = load i64, ptr %23, align 8, !tbaa !14
  %25 = icmp ugt i64 %24, %10
  br i1 %25, label %26, label %31

26:                                               ; preds = %16
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.1)
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %27, i64 noundef %24)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %30 = tail call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %124

31:                                               ; preds = %16
  %32 = getelementptr inbounds i8, ptr %20, i64 28
  %33 = load i64, ptr %32, align 8, !tbaa !14
  %34 = add i64 %33, %24
  %35 = icmp ult i64 %34, %24
  %36 = icmp ugt i64 %34, %10
  %or.cond = or i1 %35, %36
  br i1 %or.cond, label %37, label %42

37:                                               ; preds = %31
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %38, i64 noundef %34)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %41 = tail call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %124

42:                                               ; preds = %31
  %43 = getelementptr inbounds i8, ptr %20, i64 %3
  store ptr %43, ptr %19, align 8, !tbaa !13
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %43, ptr nonnull align 1 %20, i64 %34, i1 false)
  %44 = getelementptr inbounds i8, ptr %20, i64 %34
  %.not164 = icmp eq i32 %22, 0
  br i1 %.not164, label %.thread, label %.preheader.preheader

.preheader.preheader:                             ; preds = %42
  %45 = load ptr, ptr %19, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %45, i64 %24
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %107
  %47 = phi i64 [ %109, %107 ], [ 0, %.preheader.preheader ]
  %.089162 = phi ptr [ %.291, %107 ], [ %44, %.preheader.preheader ]
  %.092161 = phi i64 [ %.4, %107 ], [ 0, %.preheader.preheader ]
  %.098160 = phi i32 [ %108, %107 ], [ 0, %.preheader.preheader ]
  %.099159 = phi ptr [ %.3102, %107 ], [ %46, %.preheader.preheader ]
  %48 = load ptr, ptr %19, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %48, i64 %34
  br label %50

50:                                               ; preds = %.preheader, %53
  %.1100 = phi ptr [ %51, %53 ], [ %.099159, %.preheader ]
  %51 = getelementptr inbounds i8, ptr %.1100, i64 2
  %52 = icmp ult ptr %51, %49
  br i1 %52, label %53, label %.critedge

53:                                               ; preds = %50
  %54 = load i16, ptr %.1100, align 2, !tbaa !15
  %.not = icmp eq i16 %54, 0
  br i1 %.not, label %.critedge, label %50, !llvm.loop !17

.critedge:                                        ; preds = %50, %53
  %55 = getelementptr inbounds i8, ptr %48, i64 %1
  %56 = load i64, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %55, i64 %56
  %58 = ptrtoint ptr %57 to i64
  %59 = ptrtoint ptr %.089162 to i64
  %60 = sub i64 %58, %59
  %61 = getelementptr inbounds i8, ptr %.1100, i64 10
  %62 = icmp ugt ptr %61, %49
  br i1 %62, label %63, label %65

63:                                               ; preds = %.critedge
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
  br label %.thread.sink.split

65:                                               ; preds = %.critedge
  %66 = load i64, ptr %61, align 8, !tbaa !14
  %67 = icmp ugt i64 %66, %60
  br i1 %67, label %68, label %71

68:                                               ; preds = %65
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %69, i64 noundef %66)
  br label %.thread.sink.split

71:                                               ; preds = %65
  %72 = load i64, ptr %51, align 8, !tbaa !14
  %73 = sub i64 %72, %.092161
  store i64 %73, ptr %51, align 8, !tbaa !14
  %.not113 = icmp eq i64 %66, 0
  br i1 %.not113, label %107, label %74

74:                                               ; preds = %71
  %75 = load i32, ptr @depth, align 4, !tbaa !11
  %76 = load i32, ptr @max_depth, align 4, !tbaa !11
  %.not114 = icmp sgt i32 %75, %76
  br i1 %.not114, label %102, label %77

77:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %4, i8 0, i64 256, i1 false)
  %78 = ptrtoint ptr %51 to i64
  %79 = ptrtoint ptr %.099159 to i64
  %80 = sub i64 %78, %79
  call void @_Z10UTF16toMBSPKwmPcm(ptr noundef %.099159, i64 noundef %80, ptr noundef nonnull %4, i64 noundef 256)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %81 unwind label %90

81:                                               ; preds = %77
  invoke void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %82 unwind label %92

82:                                               ; preds = %81
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull %4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %83 unwind label %95

83:                                               ; preds = %82
  %84 = add i64 %.092161, %1
  %85 = invoke noundef i64 @_Z11LeanifyFilePvmmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %.089162, i64 noundef %66, i64 noundef %84, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %86 unwind label %97

86:                                               ; preds = %83
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %.not119 = icmp eq i64 %85, %66
  br i1 %.not119, label %100, label %87

87:                                               ; preds = %86
  store i64 %85, ptr %61, align 8, !tbaa !14
  %88 = add i64 %66, %.092161
  %89 = sub i64 %88, %85
  br label %100

90:                                               ; preds = %77
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %81
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %94

94:                                               ; preds = %92, %90
  %.pn = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %101

95:                                               ; preds = %82
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %83
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %99

99:                                               ; preds = %97, %95
  %.pn116 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %101

100:                                              ; preds = %87, %86
  %.193 = phi i64 [ %89, %87 ], [ %.092161, %86 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #7
  br label %105

101:                                              ; preds = %99, %94
  %.pn116.pn = phi { ptr, i32 } [ %.pn116, %99 ], [ %.pn, %94 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn116.pn

102:                                              ; preds = %74
  %103 = getelementptr inbounds i8, ptr %.089162, i64 %47
  %104 = getelementptr inbounds i8, ptr %103, i64 %3
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %104, ptr align 1 %.089162, i64 %66, i1 false)
  br label %105

105:                                              ; preds = %102, %100
  %.294 = phi i64 [ %.193, %100 ], [ %.092161, %102 ]
  %106 = getelementptr inbounds i8, ptr %.089162, i64 %66
  br label %107

107:                                              ; preds = %71, %105
  %.4 = phi i64 [ %.294, %105 ], [ %.092161, %71 ]
  %.291 = phi ptr [ %106, %105 ], [ %.089162, %71 ]
  %.3102 = getelementptr inbounds i8, ptr %.1100, i64 18
  %108 = add nuw i32 %.098160, 1
  %109 = sub i64 0, %.4
  %exitcond.not = icmp eq i32 %108, %22
  br i1 %exitcond.not, label %.thread, label %.preheader, !llvm.loop !19

.thread.sink.split:                               ; preds = %63, %68
  %.sink = phi ptr [ %70, %68 ], [ %64, %63 ]
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %111 = sub i64 0, %.092161
  %112 = getelementptr inbounds i8, ptr %.089162, i64 %111
  %113 = getelementptr inbounds i8, ptr %112, i64 %3
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %113, ptr align 1 %.089162, i64 %60, i1 false)
  %114 = getelementptr inbounds i8, ptr %.089162, i64 %60
  br label %.thread

.thread:                                          ; preds = %107, %.thread.sink.split, %42
  %115 = phi i64 [ 0, %42 ], [ %47, %.thread.sink.split ], [ %109, %107 ]
  %.3 = phi ptr [ %44, %42 ], [ %114, %.thread.sink.split ], [ %.291, %107 ]
  %116 = load ptr, ptr %19, align 8, !tbaa !13
  %117 = ptrtoint ptr %.3 to i64
  %118 = ptrtoint ptr %116 to i64
  %119 = add i64 %115, %117
  %120 = add i64 %118, %1
  %121 = sub i64 %119, %120
  store i64 %121, ptr %9, align 8, !tbaa !5
  %122 = load i32, ptr @depth, align 4, !tbaa !11
  %123 = add nsw i32 %122, -1
  store i32 %123, ptr @depth, align 4, !tbaa !11
  br label %124

124:                                              ; preds = %26, %.thread, %37, %12
  %.2 = phi i64 [ %15, %12 ], [ %30, %26 ], [ %41, %37 ], [ %121, %.thread ]
  ret i64 %.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 #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

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

declare void @_Z10UTF16toMBSPKwmPcm(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

declare void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; 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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i64 @_Z11LeanifyFilePvmmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; 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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 #7 = { 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, !10, i64 16}
!6 = !{!"_ZTS6Format", !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!10, !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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