; LLVM IR from b00dle/libpcc :: src/BitVec.ll (ZNK6BitVec15getPackedBitsetEv)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6BitVec15getPackedBitsetEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #3
  %15 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds ptr, ptr %17, i64 2
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef i32 %19(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %21 unwind label %52

21:                                               ; preds = %2
  %22 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds ptr, ptr %24, i64 2
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef i32 %26(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %28 unwind label %52

28:                                               ; preds = %21
  %29 = add nsw i32 %20, %27
  %30 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds ptr, ptr %32, i64 2
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %36 unwind label %52

36:                                               ; preds = %28
  %37 = add nsw i32 %29, %35
  %38 = sext i32 %37 to i64
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %38, i1 noundef zeroext false)
          to label %39 unwind label %52

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !15
  br label %40

40:                                               ; preds = %77, %39
  %41 = load i64, ptr %8, align 8, !tbaa !15
  %42 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds ptr, ptr %44, i64 2
  %46 = load ptr, ptr %45, align 8
  %47 = invoke noundef i32 %46(ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %48 unwind label %56

48:                                               ; preds = %40
  %49 = zext i32 %47 to i64
  %50 = icmp ult i64 %41, %49
  br i1 %50, label %60, label %51

51:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %85

52:                                               ; preds = %36, %28, %21, %2
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %199

56:                                               ; preds = %60, %40
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  br label %84

60:                                               ; preds = %48
  %61 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load i64, ptr %8, align 8, !tbaa !15
  %64 = load ptr, ptr %62, align 8, !tbaa !11
  %65 = getelementptr inbounds ptr, ptr %64, i64 5
  %66 = load ptr, ptr %65, align 8
  %67 = invoke noundef zeroext i1 %66(ptr noundef nonnull align 8 dereferenceable(8) %62, i64 noundef %63)
          to label %68 unwind label %56

68:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %69 = load i64, ptr %8, align 8, !tbaa !15
  %70 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %69)
          to label %71 unwind label %80

71:                                               ; preds = %68
  %72 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %73 = extractvalue { ptr, i64 } %70, 0
  store ptr %73, ptr %72, align 8
  %74 = getelementptr inbounds { ptr, i64 }, ptr %9, 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) %9, i1 noundef zeroext %67) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  br label %77

77:                                               ; preds = %71
  %78 = load i64, ptr %8, align 8, !tbaa !15
  %79 = add i64 %78, 1
  store i64 %79, ptr %8, align 8, !tbaa !15
  br label %40, !llvm.loop !17

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %6, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  br label %84

84:                                               ; preds = %80, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %199

85:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !15
  br label %86

86:                                               ; preds = %128, %85
  %87 = load i64, ptr %10, align 8, !tbaa !15
  %88 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = getelementptr inbounds ptr, ptr %90, i64 2
  %92 = load ptr, ptr %91, align 8
  %93 = invoke noundef i32 %92(ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %94 unwind label %98

94:                                               ; preds = %86
  %95 = zext i32 %93 to i64
  %96 = icmp ult i64 %87, %95
  br i1 %96, label %102, label %97

97:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %136

98:                                               ; preds = %102, %86
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %6, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %7, align 4
  br label %135

102:                                              ; preds = %94
  %103 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !13
  %105 = load i64, ptr %10, align 8, !tbaa !15
  %106 = load ptr, ptr %104, align 8, !tbaa !11
  %107 = getelementptr inbounds ptr, ptr %106, i64 5
  %108 = load ptr, ptr %107, align 8
  %109 = invoke noundef zeroext i1 %108(ptr noundef nonnull align 8 dereferenceable(8) %104, i64 noundef %105)
          to label %110 unwind label %98

110:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  %111 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !13
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds ptr, ptr %113, i64 2
  %115 = load ptr, ptr %114, align 8
  %116 = invoke noundef i32 %115(ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %117 unwind label %131

117:                                              ; preds = %110
  %118 = zext i32 %116 to i64
  %119 = load i64, ptr %10, align 8, !tbaa !15
  %120 = add i64 %118, %119
  %121 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %120)
          to label %122 unwind label %131

122:                                              ; preds = %117
  %123 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %124 = extractvalue { ptr, i64 } %121, 0
  store ptr %124, ptr %123, align 8
  %125 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %126 = extractvalue { ptr, i64 } %121, 1
  store i64 %126, ptr %125, align 8
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext %109) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br label %128

128:                                              ; preds = %122
  %129 = load i64, ptr %10, align 8, !tbaa !15
  %130 = add i64 %129, 1
  store i64 %130, ptr %10, align 8, !tbaa !15
  br label %86, !llvm.loop !19

131:                                              ; preds = %117, %110
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %6, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br label %135

135:                                              ; preds = %131, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %199

136:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %137

137:                                              ; preds = %187, %136
  %138 = load i64, ptr %12, align 8, !tbaa !15
  %139 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !14
  %141 = load ptr, ptr %140, align 8, !tbaa !11
  %142 = getelementptr inbounds ptr, ptr %141, i64 2
  %143 = load ptr, ptr %142, align 8
  %144 = invoke noundef i32 %143(ptr noundef nonnull align 8 dereferenceable(8) %140)
          to label %145 unwind label %149

145:                                              ; preds = %137
  %146 = zext i32 %144 to i64
  %147 = icmp ult i64 %138, %146
  br i1 %147, label %153, label %148

148:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %195

149:                                              ; preds = %153, %137
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %6, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %7, align 4
  br label %194

153:                                              ; preds = %145
  %154 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !14
  %156 = load i64, ptr %12, align 8, !tbaa !15
  %157 = load ptr, ptr %155, align 8, !tbaa !11
  %158 = getelementptr inbounds ptr, ptr %157, i64 5
  %159 = load ptr, ptr %158, align 8
  %160 = invoke noundef zeroext i1 %159(ptr noundef nonnull align 8 dereferenceable(8) %155, i64 noundef %156)
          to label %161 unwind label %149

161:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  %162 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds ptr, ptr %164, i64 2
  %166 = load ptr, ptr %165, align 8
  %167 = invoke noundef i32 %166(ptr noundef nonnull align 8 dereferenceable(8) %163)
          to label %168 unwind label %190

168:                                              ; preds = %161
  %169 = getelementptr inbounds %class.BitVec, ptr %14, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !13
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = getelementptr inbounds ptr, ptr %171, i64 2
  %173 = load ptr, ptr %172, align 8
  %174 = invoke noundef i32 %173(ptr noundef nonnull align 8 dereferenceable(8) %170)
          to label %175 unwind label %190

175:                                              ; preds = %168
  %176 = add nsw i32 %167, %174
  %177 = sext i32 %176 to i64
  %178 = load i64, ptr %12, align 8, !tbaa !15
  %179 = add i64 %177, %178
  %180 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %179)
          to label %181 unwind label %190

181:                                              ; preds = %175
  %182 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %183 = extractvalue { ptr, i64 } %180, 0
  store ptr %183, ptr %182, align 8
  %184 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %185 = extractvalue { ptr, i64 } %180, 1
  store i64 %185, ptr %184, align 8
  %186 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext %160) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  br label %187

187:                                              ; preds = %181
  %188 = load i64, ptr %12, align 8, !tbaa !15
  %189 = add i64 %188, 1
  store i64 %189, ptr %12, align 8, !tbaa !15
  br label %137, !llvm.loop !20

190:                                              ; preds = %175, %168, %161
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %6, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  br label %194

194:                                              ; preds = %190, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %199

195:                                              ; preds = %148
  store i1 true, ptr %5, align 1
  %196 = load i1, ptr %5, align 1
  br i1 %196, label %198, label %197

197:                                              ; preds = %195
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #3
  br label %198

198:                                              ; preds = %197, %195
  ret void

199:                                              ; preds = %194, %135, %84, %52
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #3
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr %6, align 8
  %202 = load i32, ptr %7, align 4
  %203 = insertvalue { ptr, i32 } poison, ptr %201, 0
  %204 = insertvalue { ptr, i32 } %203, i32 %202, 1
  resume { ptr, i32 } %204
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6BitVec15getPackedBitsetEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.std::_Bit_reference", align 8
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  tail call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #3
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = load ptr, ptr %6, align 8, !tbaa !10
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %9 = load ptr, ptr %8, align 8
  %10 = invoke noundef i32 %9(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %11 unwind label %40

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8
  %17 = invoke noundef i32 %16(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %18 unwind label %40

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = load ptr, ptr %20, align 8, !tbaa !10
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = load ptr, ptr %22, align 8
  %24 = invoke noundef i32 %23(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %25 unwind label %40

25:                                               ; preds = %18
  %26 = add nsw i32 %17, %10
  %27 = add nsw i32 %26, %24
  %28 = sext i32 %27 to i64
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %28, i1 noundef zeroext false)
          to label %.preheader29 unwind label %40

.preheader29:                                     ; preds = %25
  %29 = getelementptr inbounds i8, ptr %3, i64 8
  br label %30

30:                                               ; preds = %.preheader29, %52
  %.016 = phi i64 [ %56, %52 ], [ 0, %.preheader29 ]
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !10
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %36 unwind label %42

36:                                               ; preds = %30
  %37 = zext i32 %35 to i64
  %38 = icmp ult i64 %.016, %37
  br i1 %38, label %44, label %.preheader28

.preheader28:                                     ; preds = %36
  %39 = getelementptr inbounds i8, ptr %4, i64 8
  br label %59

40:                                               ; preds = %25, %18, %11, %2
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %136

42:                                               ; preds = %44, %30
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %136

44:                                               ; preds = %36
  %45 = load ptr, ptr %1, align 8, !tbaa !5
  %46 = load ptr, ptr %45, align 8, !tbaa !10
  %47 = getelementptr inbounds i8, ptr %46, i64 40
  %48 = load ptr, ptr %47, align 8
  %49 = invoke noundef zeroext i1 %48(ptr noundef nonnull align 8 dereferenceable(8) %45, i64 noundef %.016)
          to label %50 unwind label %42

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %51 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %.016)
          to label %52 unwind label %57

52:                                               ; preds = %50
  %53 = extractvalue { ptr, i64 } %51, 0
  store ptr %53, ptr %3, align 8
  %54 = extractvalue { ptr, i64 } %51, 1
  store i64 %54, ptr %29, align 8
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %3, i1 noundef zeroext %49) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  %56 = add nuw nsw i64 %.016, 1
  br label %30, !llvm.loop !14

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

59:                                               ; preds = %.preheader28, %87
  %.015 = phi i64 [ %91, %87 ], [ 0, %.preheader28 ]
  %60 = load ptr, ptr %12, align 8, !tbaa !12
  %61 = load ptr, ptr %60, align 8, !tbaa !10
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8
  %64 = invoke noundef i32 %63(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %65 unwind label %69

65:                                               ; preds = %59
  %66 = zext i32 %64 to i64
  %67 = icmp ult i64 %.015, %66
  br i1 %67, label %71, label %.preheader

.preheader:                                       ; preds = %65
  %68 = getelementptr inbounds i8, ptr %5, i64 8
  br label %94

69:                                               ; preds = %71, %59
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %136

71:                                               ; preds = %65
  %72 = load ptr, ptr %12, align 8, !tbaa !12
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = getelementptr inbounds i8, ptr %73, i64 40
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef zeroext i1 %75(ptr noundef nonnull align 8 dereferenceable(8) %72, i64 noundef %.015)
          to label %77 unwind label %69

77:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %78 = load ptr, ptr %12, align 8, !tbaa !12
  %79 = load ptr, ptr %78, align 8, !tbaa !10
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef i32 %81(ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %83 unwind label %92

83:                                               ; preds = %77
  %84 = zext i32 %82 to i64
  %85 = add nuw nsw i64 %.015, %84
  %86 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %85)
          to label %87 unwind label %92

87:                                               ; preds = %83
  %88 = extractvalue { ptr, i64 } %86, 0
  store ptr %88, ptr %4, align 8
  %89 = extractvalue { ptr, i64 } %86, 1
  store i64 %89, ptr %39, align 8
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext %76) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  %91 = add nuw nsw i64 %.015, 1
  br label %59, !llvm.loop !16

92:                                               ; preds = %83, %77
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  br label %136

94:                                               ; preds = %.preheader, %128
  %.0 = phi i64 [ %132, %128 ], [ 0, %.preheader ]
  %95 = load ptr, ptr %19, align 8, !tbaa !13
  %96 = load ptr, ptr %95, align 8, !tbaa !10
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  %98 = load ptr, ptr %97, align 8
  %99 = invoke noundef i32 %98(ptr noundef nonnull align 8 dereferenceable(8) %95)
          to label %100 unwind label %103

100:                                              ; preds = %94
  %101 = zext i32 %99 to i64
  %102 = icmp ult i64 %.0, %101
  br i1 %102, label %105, label %135

103:                                              ; preds = %105, %94
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %136

105:                                              ; preds = %100
  %106 = load ptr, ptr %19, align 8, !tbaa !13
  %107 = load ptr, ptr %106, align 8, !tbaa !10
  %108 = getelementptr inbounds i8, ptr %107, i64 40
  %109 = load ptr, ptr %108, align 8
  %110 = invoke noundef zeroext i1 %109(ptr noundef nonnull align 8 dereferenceable(8) %106, i64 noundef %.0)
          to label %111 unwind label %103

111:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %112 = load ptr, ptr %1, align 8, !tbaa !5
  %113 = load ptr, ptr %112, align 8, !tbaa !10
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %115 = load ptr, ptr %114, align 8
  %116 = invoke noundef i32 %115(ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %117 unwind label %133

117:                                              ; preds = %111
  %118 = load ptr, ptr %12, align 8, !tbaa !12
  %119 = load ptr, ptr %118, align 8, !tbaa !10
  %120 = getelementptr inbounds i8, ptr %119, i64 16
  %121 = load ptr, ptr %120, align 8
  %122 = invoke noundef i32 %121(ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %123 unwind label %133

123:                                              ; preds = %117
  %124 = add nsw i32 %122, %116
  %125 = sext i32 %124 to i64
  %126 = add nsw i64 %.0, %125
  %127 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %126)
          to label %128 unwind label %133

128:                                              ; preds = %123
  %129 = extractvalue { ptr, i64 } %127, 0
  store ptr %129, ptr %5, align 8
  %130 = extractvalue { ptr, i64 } %127, 1
  store i64 %130, ptr %68, align 8
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext %110) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %132 = add nuw nsw i64 %.0, 1
  br label %94, !llvm.loop !17

133:                                              ; preds = %123, %117, %111
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %136

135:                                              ; preds = %100
  ret void

136:                                              ; preds = %103, %133, %69, %92, %42, %57, %40
  %.pn25.pn = phi { ptr, i32 } [ %41, %40 ], [ %58, %57 ], [ %43, %42 ], [ %93, %92 ], [ %70, %69 ], [ %134, %133 ], [ %104, %103 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #3
  resume { ptr, i32 } %.pn25.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass