; LLVM IR from BlueBrain/CoreNeuron :: coreneuron/permute (cellorder2)

; 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.coreneuron::TNode" = type <{ ptr, ptr, %"class.std::vector", i64, i64, i64, i64, i64, i64, i64, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<coreneuron::TNode *, std::allocator<coreneuron::TNode *>>::_Vector_impl" }
%"struct.std::_Vector_base<coreneuron::TNode *, std::allocator<coreneuron::TNode *>>::_Vector_impl" = type { %"struct.std::_Vector_base<coreneuron::TNode *, std::allocator<coreneuron::TNode *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<coreneuron::TNode *, std::allocator<coreneuron::TNode *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10coreneuron12group_order2ERSt6vectorIPNS_5TNodeESaIS2_EEmm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, i64 noundef %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef i64 @_ZN10coreneuron15level_from_rootERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %28)
  store i64 %29, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call noundef i64 @_ZN10coreneuron12warp_balanceEmRSt6vectorIPNS_5TNodeESaIS2_EE(i64 noundef %30, ptr noundef nonnull align 8 dereferenceable(24) %31)
  store i64 %32, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %33 = load i64, ptr %8, align 8, !tbaa !9
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %3
  %36 = load i64, ptr %8, align 8, !tbaa !9
  br label %49

37:                                               ; preds = %3
  %38 = load i64, ptr %6, align 8, !tbaa !9
  %39 = load i64, ptr %5, align 8, !tbaa !9
  %40 = udiv i64 %38, %39
  %41 = load i64, ptr %6, align 8, !tbaa !9
  %42 = load i64, ptr %5, align 8, !tbaa !9
  %43 = urem i64 %41, %42
  %44 = icmp ne i64 %43, 0
  %45 = zext i1 %44 to i64
  %46 = select i1 %44, i32 1, i32 0
  %47 = sext i32 %46 to i64
  %48 = add i64 %40, %47
  br label %49

49:                                               ; preds = %37, %35
  %50 = phi i64 [ %36, %35 ], [ %48, %37 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaISt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EEC2EmRKS7_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %50, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %51 unwind label %61

51:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IPN10coreneuron5TNodeESaIS3_EESaIS5_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr %9, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #6
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %14, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #6
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %15, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  br label %58

58:                                               ; preds = %71, %51
  %59 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %59, label %65, label %60

60:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %77

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %11, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IPN10coreneuron5TNodeESaIS3_EESaIS5_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  br label %156

65:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  store ptr %66, ptr %16, align 8, !tbaa !5
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = load i64, ptr %7, align 8, !tbaa !9
  %69 = add i64 %68, 1
  invoke void @_ZNSt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69)
          to label %70 unwind label %73

70:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %71

71:                                               ; preds = %70
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %58

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %11, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %155

77:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %78, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %79) #6
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #6
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  br label %85

85:                                               ; preds = %102, %77
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br i1 %86, label %88, label %87

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %108

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  store ptr %89, ptr %20, align 8, !tbaa !5
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.coreneuron::TNode", ptr %91, i32 0, i32 9
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %93) #6
  %95 = load ptr, ptr %20, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.coreneuron::TNode", ptr %96, i32 0, i32 7
  %98 = load i64, ptr %97, align 8, !tbaa !18
  %99 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %98) #6
  %100 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 8 dereferenceable(8) %100)
          to label %101 unwind label %104

101:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %102

102:                                              ; preds = %101
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br label %85

104:                                              ; preds = %88
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %11, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %155

108:                                              ; preds = %87
  call void @_ZN10coreneuron11prgroupsizeERSt6vectorIS0_IS0_IPNS_5TNodeESaIS2_EESaIS4_EESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  %110 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %109) #6
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %22, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #6
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %23, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  br label %115

115:                                              ; preds = %124, %108
  %116 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %116, label %118, label %117

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %130

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  store ptr %119, ptr %24, align 8, !tbaa !5
  %120 = load ptr, ptr %24, align 8, !tbaa !5
  invoke void @_ZN10coreneuronL7analyzeERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %120)
          to label %121 unwind label %126

121:                                              ; preds = %118
  %122 = load ptr, ptr %24, align 8, !tbaa !5
  invoke void @_ZN10coreneuronL9question2ERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %122)
          to label %123 unwind label %126

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %124

124:                                              ; preds = %123
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %115

126:                                              ; preds = %121, %118
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %11, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %155

130:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #6
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  %134 = load i64, ptr %6, align 8, !tbaa !9
  %135 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %26, i64 noundef %134) #6
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #6
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8
  %142 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS4_SaIS4_EEEEPFbS4_S4_EEvT_SC_T0_(ptr %141, ptr %143, ptr noundef @_ZN10coreneuronL17final_nodevec_cmpEPNS_5TNodeES1_)
          to label %144 unwind label %147

144:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN10coreneuronL13set_nodeindexERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %145)
          to label %146 unwind label %151

146:                                              ; preds = %144
  call void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void

147:                                              ; preds = %130
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %11, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %155

151:                                              ; preds = %144
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %11, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %12, align 4
  br label %155

155:                                              ; preds = %151, %147, %126, %104, %73
  call void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %156

156:                                              ; preds = %155, %61
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr %11, align 8
  %159 = load i32, ptr %12, align 4
  %160 = insertvalue { ptr, i32 } poison, ptr %158, 0
  %161 = insertvalue { ptr, i32 } %160, i32 %159, 1
  resume { ptr, i32 } %161
}

declare noundef i64 @_ZN10coreneuron15level_from_rootERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) #4

declare noundef i64 @_ZN10coreneuron12warp_balanceEmRSt6vectorIPNS_5TNodeESaIS2_EE(i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN10coreneuronL7analyzeERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN10coreneuronL9question2ERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS4_SaIS4_EEEEPFbS4_S4_EEvT_SC_T0_(ptr, ptr, ptr noundef) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN10coreneuronL17final_nodevec_cmpEPNS_5TNodeES1_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN10coreneuronL13set_nodeindexERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 #5 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 88}
!12 = !{!"_ZTSN10coreneuron5TNodeE", !6, i64 8, !13, i64 16, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !17, i64 96}
!13 = !{!"_ZTSSt6vectorIPN10coreneuron5TNodeESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"int", !7, i64 0}
!18 = !{!12, !10, i64 72}


; 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::vector<coreneuron::TNode *>>, std::allocator<std::vector<std::vector<coreneuron::TNode *>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) 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) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10coreneuron12group_order2ERSt6vectorIPNS_5TNodeESaIS2_EEmm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = tail call noundef i64 @_ZN10coreneuron15level_from_rootERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %14 = tail call noundef i64 @_ZN10coreneuron12warp_balanceEmRSt6vectorIPNS_5TNodeESaIS2_EE(i64 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %15, label %20

15:                                               ; preds = %3
  %16 = udiv i64 %2, %1
  %17 = urem i64 %2, %1
  %.not32 = icmp ne i64 %17, 0
  %18 = zext i1 %.not32 to i64
  %19 = add i64 %16, %18
  br label %20

20:                                               ; preds = %3, %15
  %21 = phi i64 [ %19, %15 ], [ %14, %3 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaISt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EEC2EmRKS7_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %30

22:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IPN10coreneuron5TNodeESaIS3_EESaIS5_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %23 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  store ptr %23, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %24 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  store ptr %24, ptr %7, align 8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %22
  %26 = add i64 %13, 1
  br label %32

._crit_edge:                                      ; preds = %34, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %27 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %27, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %28 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %28, ptr %9, align 8
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %29, label %.lr.ph36, label %._crit_edge37

30:                                               ; preds = %20
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IPN10coreneuron5TNodeESaIS3_EESaIS5_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %70

32:                                               ; preds = %.lr.ph, %34
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  invoke void @_ZNSt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %26)
          to label %34 unwind label %37

34:                                               ; preds = %32
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %36, label %32, label %._crit_edge

37:                                               ; preds = %32
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %69

._crit_edge37:                                    ; preds = %51, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN10coreneuron11prgroupsizeERSt6vectorIS0_IS0_IPNS_5TNodeESaIS2_EESaIS4_EESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %39 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  store ptr %39, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %40 = call ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  store ptr %40, ptr %11, align 8
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %41, label %.lr.ph39, label %._crit_edge40

.lr.ph36:                                         ; preds = %._crit_edge, %51
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 88
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %45) #6
  %47 = load ptr, ptr %42, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 72
  %49 = load i64, ptr %48, align 8, !tbaa !17
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %49) #6
  invoke void @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %51 unwind label %54

51:                                               ; preds = %.lr.ph36
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %53 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %53, label %.lr.ph36, label %._crit_edge37

54:                                               ; preds = %.lr.ph36
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %69

._crit_edge40:                                    ; preds = %61, %._crit_edge37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %56 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %56, ptr %12, align 8
  %57 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef %2) #6
  %58 = call ptr @_ZNSt6vectorIPN10coreneuron5TNodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS4_SaIS4_EEEEPFbS4_S4_EEvT_SC_T0_(ptr %57, ptr %58, ptr noundef nonnull @_ZN10coreneuronL17final_nodevec_cmpEPNS_5TNodeES1_)
          to label %66 unwind label %67

.lr.ph39:                                         ; preds = %._crit_edge37, %61
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  invoke void @_ZN10coreneuronL7analyzeERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %59)
          to label %60 unwind label %64

60:                                               ; preds = %.lr.ph39
  invoke void @_ZN10coreneuronL9question2ERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %59)
          to label %61 unwind label %64

61:                                               ; preds = %60
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %63 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIS1_IPN10coreneuron5TNodeESaIS4_EESaIS6_EES1_IS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %63, label %.lr.ph39, label %._crit_edge40

64:                                               ; preds = %60, %.lr.ph39
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %69

66:                                               ; preds = %._crit_edge40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @_ZN10coreneuronL13set_nodeindexERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret void

67:                                               ; preds = %._crit_edge40
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %69

69:                                               ; preds = %67, %64, %54, %37
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %55, %54 ], [ %65, %64 ], [ %68, %67 ]
  call void @_ZNSt6vectorIS_IS_IPN10coreneuron5TNodeESaIS2_EESaIS4_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %70

70:                                               ; preds = %69, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %69 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn
}

declare noundef i64 @_ZN10coreneuron15level_from_rootERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

declare noundef i64 @_ZN10coreneuron12warp_balanceEmRSt6vectorIPNS_5TNodeESaIS2_EE(i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN10coreneuronL7analyzeERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN10coreneuronL9question2ERSt6vectorIS0_IPNS_5TNodeESaIS2_EESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN10coreneuron5TNodeESt6vectorIS4_SaIS4_EEEEPFbS4_S4_EEvT_SC_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN10coreneuronL17final_nodevec_cmpEPNS_5TNodeES1_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN10coreneuronL13set_nodeindexERSt6vectorIPNS_5TNodeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 #5 = { 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 #6 = { 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, !15, i64 88}
!10 = !{!"_ZTSN10coreneuron5TNodeE", !6, i64 8, !11, i64 16, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !16, i64 96}
!11 = !{!"_ZTSSt6vectorIPN10coreneuron5TNodeESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN10coreneuron5TNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!10, !15, i64 72}


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