; LLVM IR from xirc/cp-algorithm :: codeforces/1395/B/main.ll (Z5solveiiii)

; 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::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [2 x i64] }
%"class.std::allocator.2" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::bitset<128>::reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveiiii(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca %"class.std::vector.0", align 8
  %13 = alloca %"class.std::bitset", align 8
  %14 = alloca %"class.std::allocator.2", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca %"class.std::bitset<128>::reference", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair", align 4
  %24 = alloca %"class.std::bitset<128>::reference", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %6, align 8
  store i32 %1, ptr %7, align 4, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !5
  store i1 false, ptr %11, align 1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  call void @_ZNSt6bitsetILm128EEC2Ey(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef 0) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @_ZNSaISt6bitsetILm128EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  invoke void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 128, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %27 unwind label %47

27:                                               ; preds = %5
  call void @_ZNSt15__new_allocatorISt6bitsetILm128EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 16384)
          to label %28 unwind label %51

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %29 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %29, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %30 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %30, ptr %18, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %119, %28
  br label %32

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %33 unwind label %55

33:                                               ; preds = %32
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %34 unwind label %55

34:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  %35 = load i32, ptr %18, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %36) #3
  %38 = load i32, ptr %17, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  invoke void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<128>::reference") align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %37, i64 noundef %39)
          to label %40 unwind label %59

40:                                               ; preds = %34
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %79, %40
  %43 = load i32, ptr %22, align 4, !tbaa !5
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %63, label %46

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  br label %91

47:                                               ; preds = %5
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %15, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %16, align 4
  call void @_ZNSt15__new_allocatorISt6bitsetILm128EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  br label %124

51:                                               ; preds = %27
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %15, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %16, align 4
  br label %123

55:                                               ; preds = %33, %32
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %15, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %122

59:                                               ; preds = %34
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %15, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  br label %122

63:                                               ; preds = %42
  %64 = load i32, ptr %17, align 4, !tbaa !5
  %65 = load i32, ptr %22, align 4, !tbaa !5
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %63
  br label %79

68:                                               ; preds = %63
  %69 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %69, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %70 unwind label %82

70:                                               ; preds = %68
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %71 unwind label %82

71:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #3
  %72 = load i32, ptr %18, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %73) #3
  %75 = load i32, ptr %22, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  invoke void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<128>::reference") align 8 %24, ptr noundef nonnull align 8 dereferenceable(16) %74, i64 noundef %76)
          to label %77 unwind label %86

77:                                               ; preds = %71
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %24, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #3
  br label %79

79:                                               ; preds = %77, %67
  %80 = load i32, ptr %22, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %22, align 4, !tbaa !5
  br label %42, !llvm.loop !9

82:                                               ; preds = %70, %68
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %15, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  br label %90

86:                                               ; preds = %71
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %15, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #3
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %122

91:                                               ; preds = %46
  %92 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %92, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %107, %91
  %94 = load i32, ptr %25, align 4, !tbaa !5
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %110

97:                                               ; preds = %93
  %98 = load i32, ptr %25, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %99) #3
  %101 = call noundef i64 @_ZNKSt6bitsetILm128EE5countEv(ptr noundef nonnull align 8 dereferenceable(16) %100) #3
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = icmp eq i64 %101, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %97
  br label %107

106:                                              ; preds = %97
  br label %110

107:                                              ; preds = %105
  %108 = load i32, ptr %25, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %25, align 4, !tbaa !5
  br label %93, !llvm.loop !11

110:                                              ; preds = %106, %93
  %111 = load i32, ptr %25, align 4, !tbaa !5
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = icmp eq i32 %111, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  store i1 true, ptr %11, align 1
  store i32 1, ptr %26, align 4
  br label %117

115:                                              ; preds = %110
  %116 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %116, ptr %18, align 4, !tbaa !5
  store i32 0, ptr %26, align 4
  br label %117

117:                                              ; preds = %115, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  %118 = load i32, ptr %26, align 4
  switch i32 %118, label %120 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %31, !llvm.loop !12

120:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  %121 = load i1, ptr %11, align 1
  br i1 %121, label %126, label %125

122:                                              ; preds = %90, %59, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %123

123:                                              ; preds = %122, %51
  call void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  br label %124

124:                                              ; preds = %123, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %127

125:                                              ; preds = %120
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %126

126:                                              ; preds = %125, %120
  ret void

127:                                              ; preds = %124
  %128 = load ptr, ptr %15, align 8
  %129 = load i32, ptr %16, align 4
  %130 = insertvalue { ptr, i32 } poison, ptr %128, 0
  %131 = insertvalue { ptr, i32 } %130, i32 %129, 1
  resume { ptr, i32 } %131
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<128>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

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

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

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

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

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

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


; 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::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::bitset<128>, std::allocator<std::bitset<128>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [2 x i64] }
%"class.std::allocator.2" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::bitset<128>::reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveiiii(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca %"class.std::bitset", align 8
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca %"class.std::bitset<128>::reference", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca %"class.std::bitset<128>::reference", align 8
  tail call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @_ZNSt6bitsetILm128EEC2Ey(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef 0) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #3
  call void @_ZNSaISt6bitsetILm128EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  invoke void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 128, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %16 unwind label %82

16:                                               ; preds = %5
  call void @_ZNSt15__new_allocatorISt6bitsetILm128EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 16384)
          to label %17 unwind label %84

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  store i32 %3, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  %18 = icmp sgt i32 %1, 0
  %19 = icmp sgt i32 %2, 0
  %20 = sext i32 %1 to i64
  br i1 %18, label %.split.us.preheader, label %.split

.split.us.preheader:                              ; preds = %17
  %wide.trip.count68 = zext nneg i32 %2 to i64
  br label %.split.us

.split.us:                                        ; preds = %.split.us.preheader, %._crit_edge39.us
  %storemerge32.us = phi i32 [ %.015.lcssa.us, %._crit_edge39.us ], [ %4, %.split.us.preheader ]
  %.016.us = phi i32 [ %.2.us, %._crit_edge39.us ], [ undef, %.split.us.preheader ]
  store i32 %storemerge32.us, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %.lr.ph.us unwind label %.split44.us

.lr.ph.us:                                        ; preds = %.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  %21 = load i32, ptr %10, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %22) #3
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %23, i64 noundef %25)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %32

.lr.ph38.us:                                      ; preds = %._crit_edge.us, %31
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %31 ], [ 0, %._crit_edge.us ]
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv65) #3
  %28 = call noundef i64 @_ZNKSt6bitsetILm128EE5countEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #3
  %29 = icmp eq i64 %28, %20
  br i1 %29, label %31, label %._crit_edge39.us.loopexit

._crit_edge39.us.loopexit:                        ; preds = %.lr.ph38.us
  %30 = trunc nuw nsw i64 %indvars.iv65 to i32
  br label %._crit_edge39.us

._crit_edge39.us:                                 ; preds = %._crit_edge39.us.loopexit, %._crit_edge.us
  %.015.lcssa.us = phi i32 [ 0, %._crit_edge.us ], [ %30, %._crit_edge39.us.loopexit ]
  %.not.us = icmp eq i32 %.015.lcssa.us, %2
  br i1 %.not.us, label %.split46.us, label %.split.us

31:                                               ; preds = %.lr.ph38.us
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %.split46.us, label %.lr.ph38.us, !llvm.loop !9

32:                                               ; preds = %.lr.ph.us, %43
  %.135.us = phi i32 [ %.016.us, %.lr.ph.us ], [ %.2.us, %43 ]
  %storemerge34.us = phi i32 [ 0, %.lr.ph.us ], [ %45, %43 ]
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = icmp eq i32 %33, %storemerge34.us
  br i1 %34, label %43, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %36 unwind label %.split48.us

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #3
  %37 = load i32, ptr %10, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %38) #3
  %40 = load i32, ptr %13, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %39, i64 noundef %41)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #3
  %.pre = load i32, ptr %13, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %36, %32
  %44 = phi i32 [ %storemerge34.us, %32 ], [ %.pre, %36 ]
  %.2.us = phi i32 [ %.135.us, %32 ], [ %storemerge34.us, %36 ]
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %13, align 4, !tbaa !5
  %46 = icmp slt i32 %45, %1
  br i1 %46, label %32, label %._crit_edge.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  store i32 %.2.us, ptr %9, align 4, !tbaa !5
  br i1 %19, label %.lr.ph38.us, label %._crit_edge39.us

.split44.us:                                      ; preds = %.split.us
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %.split44

.split48.us:                                      ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  br label %86

.split:                                           ; preds = %17
  br i1 %19, label %.split.split.us.preheader, label %.split.split

.split.split.us.preheader:                        ; preds = %.split
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.split.split.us

.split.split.us:                                  ; preds = %.split.split.us.preheader, %._crit_edge39.us55
  %storemerge32.us50 = phi i32 [ %59, %._crit_edge39.us55 ], [ %4, %.split.split.us.preheader ]
  store i32 %storemerge32.us50, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %.lr.ph38.us54 unwind label %.split44.split.us

.lr.ph38.us54:                                    ; preds = %.split.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %50) #3
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %51, i64 noundef %53)
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  br label %55

55:                                               ; preds = %.lr.ph38.us54, %60
  %indvars.iv = phi i64 [ 0, %.lr.ph38.us54 ], [ %indvars.iv.next, %60 ]
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #3
  %57 = call noundef i64 @_ZNKSt6bitsetILm128EE5countEv(ptr noundef nonnull align 8 dereferenceable(16) %56) #3
  %58 = icmp eq i64 %57, %20
  br i1 %58, label %60, label %._crit_edge39.us55

._crit_edge39.us55:                               ; preds = %55
  %59 = trunc nuw nsw i64 %indvars.iv to i32
  %.not.us53 = icmp eq i32 %59, %2
  br i1 %.not.us53, label %.split46.us, label %.split.split.us

60:                                               ; preds = %55
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.split46.us, label %55, !llvm.loop !9

.split44.split.us:                                ; preds = %.split.split.us
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %.split44

.split.split:                                     ; preds = %.split
  %.not = icmp eq i32 %2, 0
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br i1 %.not, label %.split.split.split.us, label %.split.split.split.preheader

.split.split.split.preheader:                     ; preds = %.split.split
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %.split.split.split.peel.next unwind label %.split44.split.split.loopexit.split-lp

.split.split.split.peel.next:                     ; preds = %.split.split.split.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %63) #3
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %66)
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  br label %.split.split.split

.split.split.split.us:                            ; preds = %.split.split
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %.split46.split.split.us unwind label %.split44.split.split.us

.split46.split.split.us:                          ; preds = %.split.split.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %69) #3
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %70, i64 noundef %72)
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  br label %.split46.us

.split44.split.split.us:                          ; preds = %.split.split.split.us
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %.split44

.split.split.split:                               ; preds = %.split.split.split.peel.next, %75
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %75 unwind label %.split44.split.split.loopexit

75:                                               ; preds = %.split.split.split
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  %76 = load i32, ptr %10, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %77) #3
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  call void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<128>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %78, i64 noundef %80)
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm128EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #3
  call void @_ZNSt6bitsetILm128EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  br label %.split.split.split, !llvm.loop !12

82:                                               ; preds = %5
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6bitsetILm128EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  br label %88

84:                                               ; preds = %16
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %87

.split44.split.split.loopexit:                    ; preds = %.split.split.split
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.split44

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

.split44:                                         ; preds = %.split44.split.split.loopexit, %.split44.split.split.loopexit.split-lp, %.split44.split.us, %.split44.split.split.us, %.split44.us
  %.us-phi = phi { ptr, i32 } [ %47, %.split44.us ], [ %61, %.split44.split.us ], [ %74, %.split44.split.split.us ], [ %lpad.loopexit, %.split44.split.split.loopexit ], [ %lpad.loopexit.split-lp, %.split44.split.split.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  br label %86

86:                                               ; preds = %.split48.us, %.split44
  %.pn = phi { ptr, i32 } [ %48, %.split48.us ], [ %.us-phi, %.split44 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  br label %87

87:                                               ; preds = %86, %84
  %.pn.pn = phi { ptr, i32 } [ %.pn, %86 ], [ %85, %84 ]
  call void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %88

88:                                               ; preds = %87, %82
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %87 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  resume { ptr, i32 } %.pn.pn.pn

.split46.us:                                      ; preds = %._crit_edge39.us55, %60, %._crit_edge39.us, %31, %.split46.split.split.us
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  ret void
}

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

; 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 nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm128EEC2Ey(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt6bitsetILm128EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) 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.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm128EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<128>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

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


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