; LLVM IR from CRAFT-THU/BSim :: src/sim (SingleThreadSimulator)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.1" = type { ptr }
%struct.SimInfo = type { i32, float, %"class.std::vector", %"class.std::vector.2" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.timeval = type { i64, i64 }
%class.SimulatorBase = type <{ ptr, ptr, float, [4 x i8] }>
%class.Network = type { %"class.std::vector.7", %"class.std::vector.12", %"class.std::vector.17", i32, i32, i32, float, float, %"class.std::vector.22", %"class.std::vector.22", i32, %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl" }
%"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN21SingleThreadSimulator3runEfRSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9ArrayInfoSt4lessIS6_ESaISt4pairIKS6_S7_EEE(ptr noundef nonnull align 8 dereferenceable(20) %0, float noundef %1, ptr noundef nonnull align 1 %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %19 = alloca %struct.SimInfo, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %struct.timeval, align 8
  %23 = alloca %struct.timeval, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store float %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %37 = load float, ptr %6, align 4, !tbaa !9
  %38 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 2
  %39 = load float, ptr %38, align 8, !tbaa !11
  %40 = fdiv float %37, %39
  %41 = call noundef float @_ZSt5roundf(float noundef %40)
  %42 = fptosi float %41 to i32
  store i32 %42, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %43 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %43, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %48

46:                                               ; preds = %3
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %256

48:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %49 = call noalias ptr @fopen(ptr noundef @.str.3, ptr noundef @.str.1)
  store ptr %49, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %255

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %55 = call noalias ptr @fopen(ptr noundef @.str.5, ptr noundef @.str.1)
  store ptr %55, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %60

58:                                               ; preds = %54
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %254

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %61 = call noalias ptr @fopen(ptr noundef @.str.7, ptr noundef @.str.1)
  store ptr %61, ptr %13, align 8, !tbaa !5
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = icmp eq ptr %62, null
  br i1 %63, label %64, label %66

64:                                               ; preds = %60
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %253

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %67 = call noalias ptr @fopen(ptr noundef @.str.9, ptr noundef @.str.1)
  store ptr %67, ptr %14, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %72

70:                                               ; preds = %66
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %252

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %73 = call noalias ptr @fopen(ptr noundef @.str.11, ptr noundef @.str.1)
  store ptr %73, ptr %15, align 8, !tbaa !5
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %251

78:                                               ; preds = %72
  %79 = load ptr, ptr %36, align 8, !tbaa !15
  %80 = getelementptr inbounds ptr, ptr %79, i64 3
  %81 = load ptr, ptr %80, align 8
  %82 = call noundef i32 %81(ptr noundef nonnull align 8 dereferenceable(20) %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP11SynapseBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP10NeuronBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #6
  call void @_ZN7SimInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #6
  %83 = getelementptr inbounds %struct.SimInfo, ptr %19, i32 0, i32 0
  store i32 0, ptr %83, align 8, !tbaa !17
  %84 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 2
  %85 = load float, ptr %84, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.SimInfo, ptr %19, i32 0, i32 1
  store float %85, ptr %86, align 4, !tbaa !27
  %87 = load i32, ptr %8, align 4, !tbaa !13
  %88 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %87)
          to label %89 unwind label %96

89:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %90 = call i32 @gettimeofday(ptr noundef %22, ptr noundef null) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !13
  br label %91

91:                                               ; preds = %112, %89
  %92 = load i32, ptr %24, align 4, !tbaa !13
  %93 = load i32, ptr %8, align 4, !tbaa !13
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %100, label %95

95:                                               ; preds = %91
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %119

96:                                               ; preds = %78
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %20, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %21, align 4
  br label %250

100:                                              ; preds = %91
  %101 = load i32, ptr %24, align 4, !tbaa !13
  %102 = getelementptr inbounds %struct.SimInfo, ptr %19, i32 0, i32 0
  store i32 %101, ptr %102, align 8, !tbaa !17
  %103 = getelementptr inbounds %struct.SimInfo, ptr %19, i32 0, i32 2
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  %104 = getelementptr inbounds %struct.SimInfo, ptr %19, i32 0, i32 3
  call void @_ZNSt6vectorIfSaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #6
  %105 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %107 = invoke noundef i32 @_ZN7Network6updateER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224) %106, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %108 unwind label %115

108:                                              ; preds = %100
  %109 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !28
  invoke void @_ZN7Network7monitorER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224) %110, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %111 unwind label %115

111:                                              ; preds = %108
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %24, align 4, !tbaa !13
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %24, align 4, !tbaa !13
  br label %91, !llvm.loop !29

115:                                              ; preds = %108, %100
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %20, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %249

119:                                              ; preds = %95
  %120 = call i32 @gettimeofday(ptr noundef %23, ptr noundef null) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %121 = getelementptr inbounds %struct.timeval, ptr %23, i32 0, i32 0
  %122 = load i64, ptr %121, align 8, !tbaa !31
  %123 = getelementptr inbounds %struct.timeval, ptr %22, i32 0, i32 0
  %124 = load i64, ptr %123, align 8, !tbaa !31
  %125 = sub nsw i64 %122, %124
  store i64 %125, ptr %25, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %126 = load i64, ptr %25, align 8, !tbaa !34
  %127 = sdiv i64 %126, 3600
  store i64 %127, ptr %26, align 8, !tbaa !34
  %128 = load i64, ptr %25, align 8, !tbaa !34
  %129 = srem i64 %128, 3600
  store i64 %129, ptr %25, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %130 = load i64, ptr %25, align 8, !tbaa !34
  %131 = sdiv i64 %130, 60
  store i64 %131, ptr %27, align 8, !tbaa !34
  %132 = load i64, ptr %25, align 8, !tbaa !34
  %133 = srem i64 %132, 60
  store i64 %133, ptr %25, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %134 = getelementptr inbounds %struct.timeval, ptr %23, i32 0, i32 1
  %135 = load i64, ptr %134, align 8, !tbaa !35
  %136 = getelementptr inbounds %struct.timeval, ptr %22, i32 0, i32 1
  %137 = load i64, ptr %136, align 8, !tbaa !35
  %138 = sub nsw i64 %135, %137
  store i64 %138, ptr %28, align 8, !tbaa !34
  %139 = load i64, ptr %28, align 8, !tbaa !34
  %140 = icmp slt i64 %139, 0
  br i1 %140, label %141, label %146

141:                                              ; preds = %119
  %142 = load i64, ptr %28, align 8, !tbaa !34
  %143 = add nsw i64 %142, 1000000
  store i64 %143, ptr %28, align 8, !tbaa !34
  %144 = load i64, ptr %25, align 8, !tbaa !34
  %145 = sub nsw i64 %144, 1
  store i64 %145, ptr %25, align 8, !tbaa !34
  br label %146

146:                                              ; preds = %141, %119
  %147 = load i64, ptr %26, align 8, !tbaa !34
  %148 = load i64, ptr %27, align 8, !tbaa !34
  %149 = load i64, ptr %25, align 8, !tbaa !34
  %150 = load i64, ptr %28, align 8, !tbaa !34
  %151 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.14, i64 noundef %147, i64 noundef %148, i64 noundef %149, i64 noundef %150)
          to label %152 unwind label %178

152:                                              ; preds = %146
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = invoke i32 @fclose(ptr noundef %153)
          to label %155 unwind label %178

155:                                              ; preds = %152
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = invoke i32 @fclose(ptr noundef %156)
          to label %158 unwind label %178

158:                                              ; preds = %155
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = invoke i32 @fclose(ptr noundef %159)
          to label %161 unwind label %178

161:                                              ; preds = %158
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = invoke i32 @fclose(ptr noundef %162)
          to label %164 unwind label %178

164:                                              ; preds = %161
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = invoke i32 @fclose(ptr noundef %165)
          to label %167 unwind label %178

167:                                              ; preds = %164
  %168 = load ptr, ptr %15, align 8, !tbaa !5
  %169 = invoke i32 @fclose(ptr noundef %168)
          to label %170 unwind label %178

170:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %171 = invoke noalias ptr @fopen(ptr noundef @.str.15, ptr noundef @.str.1)
          to label %172 unwind label %182

172:                                              ; preds = %170
  store ptr %171, ptr %29, align 8, !tbaa !5
  %173 = load ptr, ptr %29, align 8, !tbaa !5
  %174 = icmp eq ptr %173, null
  br i1 %174, label %175, label %186

175:                                              ; preds = %172
  %176 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.16)
          to label %177 unwind label %182

177:                                              ; preds = %175
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %246

178:                                              ; preds = %167, %164, %161, %158, %155, %152, %146
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %20, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %21, align 4
  br label %248

182:                                              ; preds = %242, %175, %170
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %20, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %21, align 4
  br label %247

186:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %187 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 1
  %188 = load ptr, ptr %187, align 8, !tbaa !28
  %189 = getelementptr inbounds %class.Network, ptr %188, i32 0, i32 1
  %190 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %189) #6
  %191 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.1", ptr %30, i32 0, i32 0
  store ptr %190, ptr %191, align 8
  br label %192

192:                                              ; preds = %239, %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %193 = getelementptr inbounds %class.SimulatorBase, ptr %36, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !28
  %195 = getelementptr inbounds %class.Network, ptr %194, i32 0, i32 1
  %196 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %195) #6
  %197 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.1", ptr %31, i32 0, i32 0
  store ptr %196, ptr %197, align 8
  %198 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br i1 %198, label %200, label %199

199:                                              ; preds = %192
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %242

200:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %202 = load ptr, ptr %201, align 8, !tbaa !5
  store ptr %202, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !13
  br label %203

203:                                              ; preds = %230, %200
  %204 = load i32, ptr %33, align 4, !tbaa !13
  %205 = load ptr, ptr %32, align 8, !tbaa !5
  %206 = load ptr, ptr %205, align 8, !tbaa !15
  %207 = getelementptr inbounds ptr, ptr %206, i64 10
  %208 = load ptr, ptr %207, align 8
  %209 = invoke noundef i32 %208(ptr noundef nonnull align 8 dereferenceable(17) %205)
          to label %210 unwind label %213

210:                                              ; preds = %203
  %211 = icmp slt i32 %204, %209
  br i1 %211, label %217, label %212

212:                                              ; preds = %210
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %238

213:                                              ; preds = %203
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %20, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %21, align 4
  br label %237

217:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %218 = load ptr, ptr %32, align 8, !tbaa !5
  %219 = load i32, ptr %33, align 4, !tbaa !13
  %220 = load ptr, ptr %218, align 8, !tbaa !15
  %221 = getelementptr inbounds ptr, ptr %220, i64 12
  %222 = load ptr, ptr %221, align 8
  %223 = invoke noundef ptr %222(ptr noundef nonnull align 8 dereferenceable(17) %218, i32 noundef %219)
          to label %224 unwind label %233

224:                                              ; preds = %217
  %225 = invoke noundef i32 @_ZN10NeuronBase12getFireCountEv(ptr noundef nonnull align 8 dereferenceable(52) %223)
          to label %226 unwind label %233

226:                                              ; preds = %224
  store i32 %225, ptr %34, align 4, !tbaa !13
  %227 = load ptr, ptr %29, align 8, !tbaa !5
  %228 = load i32, ptr %34, align 4, !tbaa !13
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef @.str.17, i32 noundef %228) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %230

230:                                              ; preds = %226
  %231 = load i32, ptr %33, align 4, !tbaa !13
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %33, align 4, !tbaa !13
  br label %203, !llvm.loop !36

233:                                              ; preds = %224, %217
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %20, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %237

237:                                              ; preds = %233, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %247

238:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %239

239:                                              ; preds = %238
  %240 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef 0) #6
  %241 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.1", ptr %35, i32 0, i32 0
  store ptr %240, ptr %241, align 8
  br label %192, !llvm.loop !37

242:                                              ; preds = %199
  %243 = load ptr, ptr %29, align 8, !tbaa !5
  %244 = invoke i32 @fclose(ptr noundef %243)
          to label %245 unwind label %182

245:                                              ; preds = %242
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %246

246:                                              ; preds = %245, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  call void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #6
  call void @llvm.lifetime.end.p0(i64 56, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %251

247:                                              ; preds = %237, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %248

248:                                              ; preds = %247, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %249

249:                                              ; preds = %248, %115
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  br label %250

250:                                              ; preds = %249, %96
  call void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #6
  call void @llvm.lifetime.end.p0(i64 56, 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
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %258

251:                                              ; preds = %246, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %252

252:                                              ; preds = %251, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %253

253:                                              ; preds = %252, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %254

254:                                              ; preds = %253, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %255

255:                                              ; preds = %254, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %256

256:                                              ; preds = %255, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %257 = load i32, ptr %4, align 4
  ret i32 %257

258:                                              ; preds = %250
  %259 = load ptr, ptr %20, align 8
  %260 = load i32, ptr %21, align 4
  %261 = insertvalue { ptr, i32 } poison, ptr %259, 0
  %262 = insertvalue { ptr, i32 } %261, i32 %260, 1
  resume { ptr, i32 } %262
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7SimInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare i32 @gettimeofday(ptr noundef, ptr noundef) #5

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

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

declare noundef i32 @_ZN7Network6updateER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZN7Network7monitorER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(56)) #3

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

declare i32 @fclose(ptr noundef) #3

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

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

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

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

declare noundef i32 @_ZN10NeuronBase12getFireCountEv(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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 #5 = { nounwind "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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTS13SimulatorBase", !6, i64 8, !10, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !14, i64 0}
!18 = !{!"_ZTS7SimInfo", !14, i64 0, !10, i64 4, !19, i64 8, !23, i64 32}
!19 = !{!"_ZTSSt6vectorIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIfSaIfEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!18, !10, i64 4}
!28 = !{!12, !6, i64 8}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!32, !33, i64 0}
!32 = !{!"_ZTS7timeval", !33, i64 0, !33, i64 8}
!33 = !{!"long", !7, i64 0}
!34 = !{!33, !33, i64 0}
!35 = !{!32, !33, i64 8}
!36 = distinct !{!36, !30}
!37 = distinct !{!37, !30}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.1" = type { ptr }
%struct.SimInfo = type { i32, float, %"class.std::vector", %"class.std::vector.2" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.timeval = type { i64, i64 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZN21SingleThreadSimulator3runEfRSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9ArrayInfoSt4lessIS6_ESaISt4pairIKS6_S7_EEE(ptr noundef nonnull align 8 dereferenceable(20) %0, float noundef %1, ptr nocapture noundef nonnull readnone align 1 %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %7 = alloca %struct.SimInfo, align 8
  %8 = alloca %struct.timeval, align 8
  %9 = alloca %struct.timeval, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.1", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load float, ptr %12, align 8, !tbaa !5
  %14 = fdiv float %1, %13
  %15 = tail call noundef float @_ZSt5roundf(float noundef %14)
  %16 = fptosi float %15 to i32
  %17 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %21

19:                                               ; preds = %3
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %136

21:                                               ; preds = %3
  %22 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1)
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %26

24:                                               ; preds = %21
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %136

26:                                               ; preds = %21
  %27 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %26
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %136

31:                                               ; preds = %26
  %32 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1)
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %31
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %136

36:                                               ; preds = %31
  %37 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1)
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %136

41:                                               ; preds = %36
  %42 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1)
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %46

44:                                               ; preds = %41
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %136

46:                                               ; preds = %41
  %47 = load ptr, ptr %0, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %47, i64 24
  %49 = load ptr, ptr %48, align 8
  %50 = tail call noundef i32 %49(ptr noundef nonnull align 8 dereferenceable(20) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP11SynapseBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP10NeuronBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #6
  call void @_ZN7SimInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  store i32 0, ptr %7, align 8, !tbaa !13
  %51 = load float, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %7, i64 4
  store float %51, ptr %52, align 4, !tbaa !24
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %16)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %54 = call i32 @gettimeofday(ptr noundef nonnull %8, ptr noundef null) #6
  %55 = icmp sgt i32 %16, 0
  br i1 %55, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %46
  %56 = getelementptr inbounds i8, ptr %7, i64 8
  %57 = getelementptr inbounds i8, ptr %7, i64 32
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  br label %83

._crit_edge:                                      ; preds = %88, %46
  %59 = call i32 @gettimeofday(ptr noundef nonnull %9, ptr noundef null) #6
  %60 = load i64, ptr %9, align 8, !tbaa !25
  %61 = load i64, ptr %8, align 8, !tbaa !25
  %62 = sub nsw i64 %60, %61
  %63 = sdiv i64 %62, 3600
  %64 = srem i64 %62, 3600
  %.lhs.trunc = trunc nsw i64 %64 to i16
  %65 = sdiv i16 %.lhs.trunc, 60
  %.sext = sext i16 %65 to i64
  %66 = srem i16 %.lhs.trunc, 60
  %.sext62 = sext i16 %66 to i64
  %67 = getelementptr inbounds i8, ptr %9, i64 8
  %68 = load i64, ptr %67, align 8, !tbaa !28
  %69 = getelementptr inbounds i8, ptr %8, i64 8
  %70 = load i64, ptr %69, align 8, !tbaa !28
  %71 = sub nsw i64 %68, %70
  %72 = icmp slt i64 %71, 0
  %73 = add nsw i64 %71, 1000000
  %.lobit = ashr i64 %71, 63
  %.048 = add nsw i64 %.lobit, %.sext62
  %.046 = select i1 %72, i64 %73, i64 %71
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i64 noundef %63, i64 noundef %.sext, i64 noundef %.048, i64 noundef %.046)
  %75 = call i32 @fclose(ptr noundef nonnull %17)
  %76 = call i32 @fclose(ptr noundef nonnull %22)
  %77 = call i32 @fclose(ptr noundef nonnull %27)
  %78 = call i32 @fclose(ptr noundef nonnull %32)
  %79 = call i32 @fclose(ptr noundef nonnull %37)
  %80 = call i32 @fclose(ptr noundef nonnull %42)
  %81 = call noalias ptr @fopen(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1)
  %82 = icmp eq ptr %81, null
  br i1 %82, label %92, label %94

83:                                               ; preds = %.lr.ph, %88
  %.04763 = phi i32 [ 0, %.lr.ph ], [ %89, %88 ]
  store i32 %.04763, ptr %7, align 8, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #6
  call void @_ZNSt6vectorIfSaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #6
  %84 = load ptr, ptr %58, align 8, !tbaa !29
  %85 = invoke noundef i32 @_ZN7Network6updateER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224) %84, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %86 unwind label %90

86:                                               ; preds = %83
  %87 = load ptr, ptr %58, align 8, !tbaa !29
  invoke void @_ZN7Network7monitorER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224) %87, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %88 unwind label %90

88:                                               ; preds = %86
  %89 = add nuw nsw i32 %.04763, 1
  %exitcond.not = icmp eq i32 %89, %16
  br i1 %exitcond.not, label %._crit_edge, label %83, !llvm.loop !30

90:                                               ; preds = %86, %83
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %135

92:                                               ; preds = %._crit_edge
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  br label %134

94:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %95 = getelementptr inbounds i8, ptr %0, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = getelementptr inbounds i8, ptr %96, i64 24
  %98 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #6
  store ptr %98, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %99 = load ptr, ptr %95, align 8, !tbaa !29
  %100 = getelementptr inbounds i8, ptr %99, i64 24
  %101 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %100) #6
  store ptr %101, ptr %11, align 8
  %102 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br i1 %102, label %.lr.ph65, label %._crit_edge66

._crit_edge66:                                    ; preds = %113, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %103 = call i32 @fclose(ptr noundef nonnull %81)
  br label %134

.lr.ph65:                                         ; preds = %94, %113
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %105 = load ptr, ptr %104, align 8, !tbaa !32
  br label %106

106:                                              ; preds = %128, %.lr.ph65
  %.041 = phi i32 [ 0, %.lr.ph65 ], [ %130, %128 ]
  %107 = load ptr, ptr %105, align 8, !tbaa !11
  %108 = getelementptr inbounds i8, ptr %107, i64 80
  %109 = load ptr, ptr %108, align 8
  %110 = invoke noundef i32 %109(ptr noundef nonnull align 8 dereferenceable(17) %105)
          to label %111 unwind label %119

111:                                              ; preds = %106
  %112 = icmp slt i32 %.041, %110
  br i1 %112, label %121, label %113

113:                                              ; preds = %111
  %114 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %115 = load ptr, ptr %95, align 8, !tbaa !29
  %116 = getelementptr inbounds i8, ptr %115, i64 24
  %117 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %116) #6
  store ptr %117, ptr %11, align 8
  %118 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br i1 %118, label %.lr.ph65, label %._crit_edge66, !llvm.loop !33

119:                                              ; preds = %106
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %133

121:                                              ; preds = %111
  %122 = load ptr, ptr %105, align 8, !tbaa !11
  %123 = getelementptr inbounds i8, ptr %122, i64 96
  %124 = load ptr, ptr %123, align 8
  %125 = invoke noundef ptr %124(ptr noundef nonnull align 8 dereferenceable(17) %105, i32 noundef %.041)
          to label %126 unwind label %131

126:                                              ; preds = %121
  %127 = invoke noundef i32 @_ZN10NeuronBase12getFireCountEv(ptr noundef nonnull align 8 dereferenceable(52) %125)
          to label %128 unwind label %131

128:                                              ; preds = %126
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %81, ptr noundef nonnull @.str.17, i32 noundef %127) #6
  %130 = add nuw nsw i32 %.041, 1
  br label %106, !llvm.loop !34

131:                                              ; preds = %126, %121
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %133

133:                                              ; preds = %131, %119
  %.pn = phi { ptr, i32 } [ %132, %131 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %135

134:                                              ; preds = %._crit_edge66, %92
  %.0 = phi i32 [ -1, %92 ], [ 0, %._crit_edge66 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %136

135:                                              ; preds = %133, %90
  %.pn59 = phi { ptr, i32 } [ %91, %90 ], [ %.pn, %133 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn59

136:                                              ; preds = %24, %34, %44, %134, %39, %29, %19
  %.6 = phi i32 [ -1, %19 ], [ -1, %24 ], [ -1, %29 ], [ -1, %34 ], [ -1, %39 ], [ -1, %44 ], [ %.0, %134 ]
  ret i32 %.6
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7SimInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @gettimeofday(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

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

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

declare noundef i32 @_ZN7Network6updateER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

declare void @_ZN7Network7monitorER7SimInfo(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

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

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

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

declare noundef i32 @_ZN10NeuronBase12getFireCountEv(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7SimInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "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 = { 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 #5 = { "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, !10, i64 16}
!6 = !{!"_ZTS13SimulatorBase", !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !9, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS7SimInfo", !15, i64 0, !10, i64 4, !16, i64 8, !20, i64 32}
!15 = !{!"int", !8, i64 0}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"_ZTSSt6vectorIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!24 = !{!14, !10, i64 4}
!25 = !{!26, !27, i64 0}
!26 = !{!"_ZTS7timeval", !27, i64 0, !27, i64 8}
!27 = !{!"long", !8, i64 0}
!28 = !{!26, !27, i64 8}
!29 = !{!6, !7, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}


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