; LLVM IR from facebookresearch/baspacho :: baspacho/testing (TestingUtils)

; 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.22" = 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.26" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }
%"struct.BaSpaCho::SparseStructure" = type { %"class.std::vector.5", %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils12printPatternB5cxx11ERKNS_15SparseStructureEb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector.22", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::allocator.26", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  %25 = zext i1 %2 to i8
  store i8 %25, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef i64 @_ZNK8BaSpaCho15SparseStructure5orderEv(ptr noundef nonnull align 8 dereferenceable(48) %26)
  store i64 %27, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #4
  %28 = load i64, ptr %7, align 8, !tbaa !11
  %29 = load i64, ptr %7, align 8, !tbaa !11
  %30 = mul nsw i64 %28, %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %31 unwind label %37

31:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !11
  br label %32

32:                                               ; preds = %106, %31
  %33 = load i64, ptr %13, align 8, !tbaa !11
  %34 = load i64, ptr %7, align 8, !tbaa !11
  %35 = icmp slt i64 %33, %34
  br i1 %35, label %41, label %36

36:                                               ; preds = %32
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %109

37:                                               ; preds = %3
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %11, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %186

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.BaSpaCho::SparseStructure", ptr %42, i32 0, i32 0
  %44 = load i64, ptr %13, align 8, !tbaa !11
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #4
  %46 = load i64, ptr %45, align 8, !tbaa !11
  store i64 %46, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.BaSpaCho::SparseStructure", ptr %47, i32 0, i32 0
  %49 = load i64, ptr %13, align 8, !tbaa !11
  %50 = add nsw i64 %49, 1
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #4
  %52 = load i64, ptr %51, align 8, !tbaa !11
  store i64 %52, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %53 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %53, ptr %17, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %101, %41
  %55 = load i64, ptr %17, align 8, !tbaa !11
  %56 = load i64, ptr %16, align 8, !tbaa !11
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %105

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.BaSpaCho::SparseStructure", ptr %60, i32 0, i32 1
  %62 = load i64, ptr %17, align 8, !tbaa !11
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %62) #4
  %64 = load i64, ptr %63, align 8, !tbaa !11
  store i64 %64, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %65 = load i64, ptr %7, align 8, !tbaa !11
  %66 = load i64, ptr %13, align 8, !tbaa !11
  %67 = mul nsw i64 %65, %66
  %68 = load i64, ptr %18, align 8, !tbaa !11
  %69 = add nsw i64 %67, %68
  %70 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %69)
          to label %71 unwind label %92

71:                                               ; preds = %59
  %72 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %73 = extractvalue { ptr, i64 } %70, 0
  store ptr %73, ptr %72, align 8
  %74 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %75 = extractvalue { ptr, i64 } %70, 1
  store i64 %75, ptr %74, align 8
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  %77 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %100

79:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %80 = load i64, ptr %7, align 8, !tbaa !11
  %81 = load i64, ptr %18, align 8, !tbaa !11
  %82 = mul nsw i64 %80, %81
  %83 = load i64, ptr %13, align 8, !tbaa !11
  %84 = add nsw i64 %82, %83
  %85 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %84)
          to label %86 unwind label %96

86:                                               ; preds = %79
  %87 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %88 = extractvalue { ptr, i64 } %85, 0
  store ptr %88, ptr %87, align 8
  %89 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %90 = extractvalue { ptr, i64 } %85, 1
  store i64 %90, ptr %89, align 8
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %100

92:                                               ; preds = %59
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %104

96:                                               ; preds = %79
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %11, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %104

100:                                              ; preds = %86, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %17, align 8, !tbaa !11
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %17, align 8, !tbaa !11
  br label %54, !llvm.loop !15

104:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %185

105:                                              ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %106

106:                                              ; preds = %105
  %107 = load i64, ptr %13, align 8, !tbaa !11
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %13, align 8, !tbaa !11
  br label %32, !llvm.loop !17

109:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 392, ptr %21) #4
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21)
          to label %110 unwind label %116

110:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store i64 0, ptr %22, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %169, %110
  %112 = load i64, ptr %22, align 8, !tbaa !11
  %113 = load i64, ptr %7, align 8, !tbaa !11
  %114 = icmp slt i64 %112, %113
  br i1 %114, label %120, label %115

115:                                              ; preds = %111
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %177

116:                                              ; preds = %109
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %184

120:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  store i64 0, ptr %23, align 8, !tbaa !11
  br label %121

121:                                              ; preds = %153, %120
  %122 = load i64, ptr %23, align 8, !tbaa !11
  %123 = load i64, ptr %7, align 8, !tbaa !11
  %124 = icmp slt i64 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %165

126:                                              ; preds = %121
  %127 = getelementptr inbounds i8, ptr %21, i64 16
  %128 = load i64, ptr %23, align 8, !tbaa !11
  %129 = icmp sgt i64 %128, 0
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, ptr @.str.6, ptr @.str.2
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef %131)
          to label %133 unwind label %156

133:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #4
  %134 = load i64, ptr %7, align 8, !tbaa !11
  %135 = load i64, ptr %22, align 8, !tbaa !11
  %136 = mul nsw i64 %134, %135
  %137 = load i64, ptr %23, align 8, !tbaa !11
  %138 = add nsw i64 %136, %137
  %139 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %138)
          to label %140 unwind label %160

140:                                              ; preds = %133
  %141 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %142 = extractvalue { ptr, i64 } %139, 0
  store ptr %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %144 = extractvalue { ptr, i64 } %139, 1
  store i64 %144, ptr %143, align 8
  %145 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %24) #4
  br i1 %145, label %146, label %147

146:                                              ; preds = %140
  br label %148

147:                                              ; preds = %140
  br label %148

148:                                              ; preds = %147, %146
  %149 = phi ptr [ @.str.7, %146 ], [ @.str.8, %147 ]
  %150 = getelementptr inbounds [2 x i8], ptr %149, i64 0, i64 0
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef %150)
          to label %152 unwind label %160

152:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  br label %153

153:                                              ; preds = %152
  %154 = load i64, ptr %23, align 8, !tbaa !11
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %23, align 8, !tbaa !11
  br label %121, !llvm.loop !18

156:                                              ; preds = %126
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %11, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %12, align 4
  br label %164

160:                                              ; preds = %148, %133
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %11, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  br label %164

164:                                              ; preds = %160, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %176

165:                                              ; preds = %125
  %166 = getelementptr inbounds i8, ptr %21, i64 16
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef @.str.9)
          to label %168 unwind label %172

168:                                              ; preds = %165
  br label %169

169:                                              ; preds = %168
  %170 = load i64, ptr %22, align 8, !tbaa !11
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %22, align 8, !tbaa !11
  br label %111, !llvm.loop !19

172:                                              ; preds = %165
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %11, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %12, align 4
  br label %176

176:                                              ; preds = %172, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %183

177:                                              ; preds = %115
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %21)
          to label %178 unwind label %179

178:                                              ; preds = %177
  store i32 1, ptr %14, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void

179:                                              ; preds = %177
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %11, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %12, align 4
  br label %183

183:                                              ; preds = %179, %176
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #4
  br label %184

184:                                              ; preds = %183, %116
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #4
  br label %185

185:                                              ; preds = %184, %104
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  br label %186

186:                                              ; preds = %185, %37
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %187

187:                                              ; preds = %186
  %188 = load ptr, ptr %11, align 8
  %189 = load i32, ptr %12, align 4
  %190 = insertvalue { ptr, i32 } poison, ptr %188, 0
  %191 = insertvalue { ptr, i32 } %190, i32 %189, 1
  resume { ptr, i32 } %191
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK8BaSpaCho15SparseStructure5orderEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 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) #3 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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.22" = 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.26" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils12printPatternB5cxx11ERKNS_15SparseStructureEb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.22", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.26", align 1
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = tail call noundef i64 @_ZNK8BaSpaCho15SparseStructure5orderEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  %12 = mul nsw i64 %11, %11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  store i8 0, ptr %5, align 1, !tbaa !5
  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 @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %71

13:                                               ; preds = %3
  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
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  %14 = icmp sgt i64 %11, 0
  br i1 %14, label %.lr.ph61, label %._crit_edge

.lr.ph61:                                         ; preds = %13
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = getelementptr inbounds i8, ptr %7, i64 8
  %17 = getelementptr inbounds i8, ptr %8, i64 8
  br i1 %2, label %.lr.ph61.split.us, label %.lr.ph61.split

.lr.ph61.split.us:                                ; preds = %.lr.ph61, %.loopexit.us
  %.04460.us = phi i64 [ %20, %.loopexit.us ], [ 0, %.lr.ph61 ]
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.04460.us) #4
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = add nuw nsw i64 %.04460.us, 1
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %20) #4
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = icmp slt i64 %19, %22
  br i1 %23, label %.lr.ph.us, label %.loopexit.us

.loopexit.us:                                     ; preds = %37, %.lr.ph61.split.us
  %exitcond81.not = icmp eq i64 %20, %11
  br i1 %exitcond81.not, label %._crit_edge, label %.lr.ph61.split.us, !llvm.loop !11

.lr.ph.us:                                        ; preds = %.lr.ph61.split.us
  %24 = mul nuw nsw i64 %.04460.us, %11
  br label %25

25:                                               ; preds = %37, %.lr.ph.us
  %.03656.us.us = phi i64 [ %19, %.lr.ph.us ], [ %41, %37 ]
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.03656.us.us) #4
  %27 = load i64, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %28 = add nsw i64 %27, %24
  %29 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %28)
          to label %30 unwind label %.split.us.split.us

30:                                               ; preds = %25
  %31 = extractvalue { ptr, i64 } %29, 0
  store ptr %31, ptr %7, align 8
  %32 = extractvalue { ptr, i64 } %29, 1
  store i64 %32, ptr %16, align 8
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %34 = mul nsw i64 %27, %11
  %35 = add nsw i64 %34, %.04460.us
  %36 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %35)
          to label %37 unwind label %.split58.us.split.us

37:                                               ; preds = %30
  %38 = extractvalue { ptr, i64 } %36, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i64 } %36, 1
  store i64 %39, ptr %17, align 8
  %40 = 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.end.p0(i64 16, ptr nonnull %8) #4
  %41 = add i64 %.03656.us.us, 1
  %exitcond80.not = icmp eq i64 %41, %22
  br i1 %exitcond80.not, label %.loopexit.us, label %25, !llvm.loop !13

.split.us.split.us:                               ; preds = %25
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %91

.split58.us.split.us:                             ; preds = %30
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %98

.loopexit:                                        ; preds = %85, %.lr.ph61.split
  %exitcond79.not = icmp eq i64 %75, %11
  br i1 %exitcond79.not, label %._crit_edge, label %.lr.ph61.split, !llvm.loop !11

._crit_edge:                                      ; preds = %.loopexit, %.loopexit.us, %13
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #4
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %.preheader55 unwind label %92

.preheader55:                                     ; preds = %._crit_edge
  br i1 %14, label %.preheader.lr.ph, label %._crit_edge68

.preheader.lr.ph:                                 ; preds = %.preheader55
  %44 = getelementptr inbounds i8, ptr %9, i64 16
  %45 = getelementptr inbounds i8, ptr %10, i64 8
  %exitcond82.peel.not = icmp eq i64 %11, 1
  br label %.preheader.us

.preheader.us:                                    ; preds = %56, %.preheader.lr.ph
  %.03467.us = phi i64 [ 0, %.preheader.lr.ph ], [ %57, %56 ]
  %46 = mul nuw nsw i64 %.03467.us, %11
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.2)
          to label %48 unwind label %.split73.us.loopexit.split-lp

48:                                               ; preds = %.preheader.us
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  %49 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %46)
          to label %50 unwind label %.split76.us.loopexit.split-lp

50:                                               ; preds = %48
  %51 = extractvalue { ptr, i64 } %49, 0
  store ptr %51, ptr %10, align 8
  %52 = extractvalue { ptr, i64 } %49, 1
  store i64 %52, ptr %45, align 8
  %53 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  %.str.7..str.8.us.peel = select i1 %53, ptr @.str.7, ptr @.str.8
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull %.str.7..str.8.us.peel)
          to label %55 unwind label %.split76.us.loopexit.split-lp

55:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br i1 %exitcond82.peel.not, label %._crit_edge66.us, label %.peel.next

56:                                               ; preds = %._crit_edge66.us
  %57 = add nuw nsw i64 %.03467.us, 1
  %exitcond87.not = icmp eq i64 %57, %11
  br i1 %exitcond87.not, label %._crit_edge68, label %.preheader.us, !llvm.loop !14

.peel.next:                                       ; preds = %55, %67
  %.064.us = phi i64 [ %68, %67 ], [ 1, %55 ]
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.6)
          to label %59 unwind label %.split73.us.loopexit

59:                                               ; preds = %.peel.next
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  %60 = add nuw nsw i64 %.064.us, %46
  %61 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %60)
          to label %62 unwind label %.split76.us.loopexit

62:                                               ; preds = %59
  %63 = extractvalue { ptr, i64 } %61, 0
  store ptr %63, ptr %10, align 8
  %64 = extractvalue { ptr, i64 } %61, 1
  store i64 %64, ptr %45, align 8
  %65 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  %.str.7..str.8.us = select i1 %65, ptr @.str.7, ptr @.str.8
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull %.str.7..str.8.us)
          to label %67 unwind label %.split76.us.loopexit

67:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  %68 = add nuw nsw i64 %.064.us, 1
  %exitcond82.not = icmp eq i64 %68, %11
  br i1 %exitcond82.not, label %._crit_edge66.us, label %.peel.next, !llvm.loop !15

._crit_edge66.us:                                 ; preds = %67, %55
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.9)
          to label %56 unwind label %.split70.us

.split70.us:                                      ; preds = %._crit_edge66.us
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %.split73.us

.split73.us.loopexit:                             ; preds = %.peel.next
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.split73.us

.split73.us.loopexit.split-lp:                    ; preds = %.preheader.us
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.split73.us

.split76.us.loopexit:                             ; preds = %59, %62
  %lpad.loopexit84 = landingpad { ptr, i32 }
          cleanup
  br label %.split76.us

.split76.us.loopexit.split-lp:                    ; preds = %48, %50
  %lpad.loopexit.split-lp85 = landingpad { ptr, i32 }
          cleanup
  br label %.split76.us

.split76.us:                                      ; preds = %.split76.us.loopexit.split-lp, %.split76.us.loopexit
  %lpad.phi86 = phi { ptr, i32 } [ %lpad.loopexit84, %.split76.us.loopexit ], [ %lpad.loopexit.split-lp85, %.split76.us.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br label %.split73.us

71:                                               ; preds = %3
  %72 = 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
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %99

.lr.ph61.split:                                   ; preds = %.lr.ph61, %.loopexit
  %.04460 = phi i64 [ %75, %.loopexit ], [ 0, %.lr.ph61 ]
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.04460) #4
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = add nuw nsw i64 %.04460, 1
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %75) #4
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = icmp slt i64 %74, %77
  br i1 %78, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph61.split
  %79 = mul nuw nsw i64 %.04460, %11
  br label %80

80:                                               ; preds = %.lr.ph, %85
  %.03656 = phi i64 [ %74, %.lr.ph ], [ %89, %85 ]
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.03656) #4
  %82 = load i64, ptr %81, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %83 = add nsw i64 %82, %79
  %84 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %83)
          to label %85 unwind label %.split

85:                                               ; preds = %80
  %86 = extractvalue { ptr, i64 } %84, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i64 } %84, 1
  store i64 %87, ptr %16, align 8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %89 = add i64 %.03656, 1
  %exitcond.not = icmp eq i64 %89, %77
  br i1 %exitcond.not, label %.loopexit, label %80, !llvm.loop !13

.split:                                           ; preds = %80
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %91

91:                                               ; preds = %.split.us.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %90, %.split ], [ %42, %.split.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %98

._crit_edge68:                                    ; preds = %56, %.preheader55
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %94 unwind label %95

92:                                               ; preds = %._crit_edge
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %97

94:                                               ; preds = %._crit_edge68
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  ret void

95:                                               ; preds = %._crit_edge68
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %.split73.us

.split73.us:                                      ; preds = %.split73.us.loopexit, %.split73.us.loopexit.split-lp, %.split70.us, %.split76.us, %95
  %.pn.pn.pn = phi { ptr, i32 } [ %96, %95 ], [ %lpad.phi86, %.split76.us ], [ %70, %.split70.us ], [ %lpad.loopexit, %.split73.us.loopexit ], [ %lpad.loopexit.split-lp, %.split73.us.loopexit.split-lp ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #4
  br label %97

97:                                               ; preds = %.split73.us, %92
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %.split73.us ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #4
  br label %98

98:                                               ; preds = %91, %.split58.us.split.us, %97
  %.pn51.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %97 ], [ %43, %.split58.us.split.us ], [ %.us-phi, %91 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  br label %99

99:                                               ; preds = %98, %71
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn, %98 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn51.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK8BaSpaCho15SparseStructure5orderEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 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 #3 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 #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass