; LLVM IR from CRAFT-THU/BSim :: test/gpu (array_gpu_unit_test)

; 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.Network = type { %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", i32, i32, i32, float, float, %"class.std::vector.10", %"class.std::vector.10", i32, %"class.std::vector.15", %"class.std::vector.15", %"class.std::vector.15" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = 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 }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = 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.CompositeNeuron = type { %class.ArrayNeuron, float, float }
%class.ArrayNeuron = type { %class.NeuronBase.base, %"class.std::vector.15", i32, ptr }
%class.NeuronBase.base = type <{ %class.Base, %"class.std::vector.5", i8, i8, [2 x i8], i32, float }>
%class.Base = type { ptr, i32, i32 }
%class.CompositeNeuron.20 = type { %class.LIFENeuron, float, float }
%class.LIFENeuron = type { %class.NeuronBase.base, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float }
%class.SingleThreadSimulator = type { %class.SimulatorBase.base, [4 x i8] }
%class.SimulatorBase.base = type <{ ptr, ptr, float }>
%class.SingleGPUSimulator = type { %class.SimulatorBase.base, [4 x i8] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@__const.main.array = external hidden unnamed_addr constant [30 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca %class.Network, align 8
  %9 = alloca [30 x i32], align 16
  %10 = alloca ptr, align 8
  %11 = alloca %class.CompositeNeuron, align 8
  %12 = alloca %class.ArrayNeuron, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %class.CompositeNeuron.20, align 8
  %17 = alloca %class.LIFENeuron, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %class.CompositeNeuron.20, align 8
  %20 = alloca %class.LIFENeuron, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %class.SingleThreadSimulator, align 8
  %25 = alloca %class.SingleGPUSimulator, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 0, ptr %6, align 1, !tbaa !11
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 1
  br i1 %27, label %28, label %35

28:                                               ; preds = %2
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 1
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call i32 @strcmp(ptr noundef %31, ptr noundef @.str) #8
  %33 = icmp eq i32 0, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %28
  store i8 1, ptr %6, align 1, !tbaa !11
  br label %35

35:                                               ; preds = %34, %28, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 224, ptr %8) #7
  call void @_ZN7NetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %8)
  call void @llvm.lifetime.start.p0(i64 120, ptr %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.main.array, i64 120, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr %12) #7
  %36 = getelementptr inbounds [30 x i32], ptr %9, i64 0, i64 0
  invoke void @_ZN11ArrayNeuronC1EPii(ptr noundef nonnull align 8 dereferenceable(96) %12, ptr noundef %36, i32 noundef 30)
          to label %37 unwind label %62

37:                                               ; preds = %35
  invoke void @_ZN15CompositeNeuronI11ArrayNeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef nonnull align 8 dereferenceable(96) %12, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000)
          to label %38 unwind label %66

38:                                               ; preds = %37
  %39 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI11ArrayNeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %8, i32 noundef 0, i32 noundef 2, ptr noundef %11, i1 noundef zeroext false)
          to label %40 unwind label %70

40:                                               ; preds = %38
  call void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #7
  call void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %12) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #7
  store ptr %39, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr %17) #7
  invoke void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144) %17, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef 0x3F747AE140000000, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3F8EB851E0000000, float noundef 0.000000e+00)
          to label %41 unwind label %76

41:                                               ; preds = %40
  invoke void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152) %16, ptr noundef nonnull align 8 dereferenceable(144) %17, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %42 unwind label %80

42:                                               ; preds = %41
  %43 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %8, i32 noundef 1, i32 noundef 2, ptr noundef %16, i1 noundef zeroext false)
          to label %44 unwind label %84

44:                                               ; preds = %42
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %16) #7
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %17) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %17) #7
  store ptr %43, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr %20) #7
  invoke void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144) %20, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef 0x3F747AE140000000, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3F8EB851E0000000, float noundef 0.000000e+00)
          to label %45 unwind label %90

45:                                               ; preds = %44
  invoke void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152) %19, ptr noundef nonnull align 8 dereferenceable(144) %20, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %46 unwind label %94

46:                                               ; preds = %45
  %47 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %8, i32 noundef 2, i32 noundef 2, ptr noundef %19, i1 noundef zeroext false)
          to label %48 unwind label %98

48:                                               ; preds = %46
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %19) #7
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %20) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %20) #7
  store ptr %47, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store ptr null, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store ptr null, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr null, ptr %23, align 8, !tbaa !9
  %49 = load i8, ptr %6, align 1, !tbaa !11, !range !13, !noundef !14
  %50 = trunc i8 %49 to i1
  br i1 %50, label %51, label %108

51:                                               ; preds = %48
  %52 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1)
          to label %53 unwind label %104

53:                                               ; preds = %51
  %54 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef @.str.2, i32 noundef 4)
          to label %55 unwind label %104

55:                                               ; preds = %53
  store ptr %54, ptr %21, align 8, !tbaa !9
  %56 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef @.str.3, i32 noundef 4)
          to label %57 unwind label %104

57:                                               ; preds = %55
  store ptr %56, ptr %22, align 8, !tbaa !9
  %58 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef @.str.4, i32 noundef 4)
          to label %59 unwind label %104

59:                                               ; preds = %57
  store ptr %58, ptr %23, align 8, !tbaa !9
  %60 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5)
          to label %61 unwind label %104

61:                                               ; preds = %59
  br label %119

62:                                               ; preds = %35
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %13, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %14, align 4
  br label %75

66:                                               ; preds = %37
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %13, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %14, align 4
  br label %74

70:                                               ; preds = %38
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %13, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %14, align 4
  call void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #7
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %12) #7
  br label %75

75:                                               ; preds = %74, %62
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #7
  br label %173

76:                                               ; preds = %40
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %13, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %14, align 4
  br label %89

80:                                               ; preds = %41
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %13, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %14, align 4
  br label %88

84:                                               ; preds = %42
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %13, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %14, align 4
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %16) #7
  br label %88

88:                                               ; preds = %84, %80
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %17) #7
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 144, ptr %17) #7
  br label %172

90:                                               ; preds = %44
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %13, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %14, align 4
  br label %103

94:                                               ; preds = %45
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %13, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %14, align 4
  br label %102

98:                                               ; preds = %46
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %13, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %14, align 4
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %19) #7
  br label %102

102:                                              ; preds = %98, %94
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %20) #7
  br label %103

103:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 144, ptr %20) #7
  br label %171

104:                                              ; preds = %125, %119, %116, %114, %112, %110, %108, %59, %57, %55, %53, %51
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %13, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %14, align 4
  br label %170

108:                                              ; preds = %48
  %109 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6)
          to label %110 unwind label %104

110:                                              ; preds = %108
  %111 = invoke noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef 0x3F947AE140000000, i32 noundef 4)
          to label %112 unwind label %104

112:                                              ; preds = %110
  store ptr %111, ptr %21, align 8, !tbaa !9
  %113 = invoke noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef 0x3F947AE140000000, i32 noundef 4)
          to label %114 unwind label %104

114:                                              ; preds = %112
  store ptr %113, ptr %22, align 8, !tbaa !9
  %115 = invoke noundef ptr @_Z13getConstArrayIfEPT_S0_i(float noundef 0x3F50624DE0000000, i32 noundef 4)
          to label %116 unwind label %104

116:                                              ; preds = %114
  store ptr %115, ptr %23, align 8, !tbaa !9
  %117 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7)
          to label %118 unwind label %104

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118, %61
  %120 = load ptr, ptr %10, align 8, !tbaa !9
  %121 = load ptr, ptr %15, align 8, !tbaa !9
  %122 = load ptr, ptr %21, align 8, !tbaa !9
  %123 = load ptr, ptr %23, align 8, !tbaa !9
  %124 = invoke noundef i32 @_ZN7Network7connectI15CompositeNeuronI11ArrayNeuron13StaticSynapseES1_I10LIFENeuronS3_EEEiP10PopulationIT_EPS7_IT0_EPfSE_P9SpikeTypei(ptr noundef nonnull align 8 dereferenceable(224) %8, ptr noundef %120, ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef null, i32 noundef 4)
          to label %125 unwind label %104

125:                                              ; preds = %119
  %126 = load ptr, ptr %15, align 8, !tbaa !9
  %127 = load ptr, ptr %18, align 8, !tbaa !9
  %128 = load ptr, ptr %22, align 8, !tbaa !9
  %129 = load ptr, ptr %23, align 8, !tbaa !9
  %130 = invoke noundef i32 @_ZN7Network7connectI15CompositeNeuronI10LIFENeuron13StaticSynapseES4_EEiP10PopulationIT_EPS5_IT0_EPfSC_P9SpikeTypei(ptr noundef nonnull align 8 dereferenceable(224) %8, ptr noundef %126, ptr noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef null, i32 noundef 4)
          to label %131 unwind label %104

131:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #7
  invoke void @_ZN21SingleThreadSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20) %24, ptr noundef %8, float noundef 0x3F50624DE0000000)
          to label %132 unwind label %154

132:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  invoke void @_ZN18SingleGPUSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20) %25, ptr noundef %8, float noundef 0x3F50624DE0000000)
          to label %133 unwind label %158

133:                                              ; preds = %132
  %134 = invoke noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20) %24, float noundef 0x3FB99999A0000000)
          to label %135 unwind label %162

135:                                              ; preds = %133
  %136 = invoke noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20) %25, float noundef 0x3FB99999A0000000)
          to label %137 unwind label %162

137:                                              ; preds = %135
  %138 = load i8, ptr %6, align 1, !tbaa !11, !range !13, !noundef !14
  %139 = trunc i8 %138 to i1
  br i1 %139, label %166, label %140

140:                                              ; preds = %137
  %141 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8)
          to label %142 unwind label %162

142:                                              ; preds = %140
  %143 = load ptr, ptr %21, align 8, !tbaa !9
  %144 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef @.str.2, ptr noundef %143, i32 noundef 4)
          to label %145 unwind label %162

145:                                              ; preds = %142
  %146 = load ptr, ptr %22, align 8, !tbaa !9
  %147 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef @.str.3, ptr noundef %146, i32 noundef 4)
          to label %148 unwind label %162

148:                                              ; preds = %145
  %149 = load ptr, ptr %23, align 8, !tbaa !9
  %150 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef @.str.4, ptr noundef %149, i32 noundef 4)
          to label %151 unwind label %162

151:                                              ; preds = %148
  %152 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9)
          to label %153 unwind label %162

153:                                              ; preds = %151
  br label %166

154:                                              ; preds = %131
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %13, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %14, align 4
  br label %169

158:                                              ; preds = %132
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %13, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %14, align 4
  br label %168

162:                                              ; preds = %151, %148, %145, %142, %140, %135, %133
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %13, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %14, align 4
  call void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %25) #7
  br label %168

166:                                              ; preds = %153, %137
  store i32 0, ptr %3, align 4
  call void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #7
  call void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224) %8) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %167 = load i32, ptr %3, align 4
  ret i32 %167

168:                                              ; preds = %162, %158
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %24) #7
  br label %169

169:                                              ; preds = %168, %154
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  br label %170

170:                                              ; preds = %169, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %171

171:                                              ; preds = %170, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %172

172:                                              ; preds = %171, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %173

173:                                              ; preds = %172, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #7
  call void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224) %8) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %13, align 8
  %176 = load i32, ptr %14, align 4
  %177 = insertvalue { ptr, i32 } poison, ptr %175, 0
  %178 = insertvalue { ptr, i32 } %177, i32 %176, 1
  resume { ptr, i32 } %178
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

declare void @_ZN7NetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI11ArrayNeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224), i32 noundef, i32 noundef, ptr noundef, i1 noundef zeroext) #5 align 2

declare void @_ZN11ArrayNeuronC1EPii(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CompositeNeuronI11ArrayNeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(96), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224), i32 noundef, i32 noundef, ptr noundef, i1 noundef zeroext) #5 align 2

declare void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(144), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #6

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

declare noundef ptr @_Z9loadArrayPKci(ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13getConstArrayIfEPT_S0_i(float noundef, i32 noundef) #5

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

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

declare void @_ZN21SingleThreadSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, float noundef) unnamed_addr #3

declare void @_ZN18SingleGPUSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, float noundef) unnamed_addr #3

declare noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20), float noundef) #3

declare noundef i32 @_Z9saveArrayPKcPfi(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #6

attributes #0 = { mustprogress norecurse 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 = { nounwind willreturn memory(read) "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 "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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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.Network = type { %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", i32, i32, i32, float, float, %"class.std::vector.10", %"class.std::vector.10", i32, %"class.std::vector.15", %"class.std::vector.15", %"class.std::vector.15" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = 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 }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = 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.CompositeNeuron = type { %class.ArrayNeuron, float, float }
%class.ArrayNeuron = type { %class.NeuronBase.base, %"class.std::vector.15", i32, ptr }
%class.NeuronBase.base = type <{ %class.Base, %"class.std::vector.5", i8, i8, [2 x i8], i32, float }>
%class.Base = type { ptr, i32, i32 }
%class.CompositeNeuron.20 = type { %class.LIFENeuron, float, float }
%class.LIFENeuron = type { %class.NeuronBase.base, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float }
%class.SingleThreadSimulator = type { %class.SimulatorBase.base, [4 x i8] }
%class.SimulatorBase.base = type <{ ptr, ptr, float }>
%class.SingleGPUSimulator = type { %class.SimulatorBase.base, [4 x i8] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@__const.main.array = external hidden unnamed_addr constant [30 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.Network, align 8
  %4 = alloca [30 x i32], align 16
  %5 = alloca %class.CompositeNeuron, align 8
  %6 = alloca %class.ArrayNeuron, align 8
  %7 = alloca %class.CompositeNeuron.20, align 8
  %8 = alloca %class.LIFENeuron, align 8
  %9 = alloca %class.CompositeNeuron.20, align 8
  %10 = alloca %class.LIFENeuron, align 8
  %11 = alloca %class.SingleThreadSimulator, align 8
  %12 = alloca %class.SingleGPUSimulator, align 8
  %13 = icmp sgt i32 %0, 1
  br i1 %13, label %14, label %19

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str) #8
  %18 = icmp eq i32 %17, 0
  br label %19

19:                                               ; preds = %14, %2
  %.019 = phi i1 [ false, %2 ], [ %18, %14 ]
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %3) #9
  call void @_ZN7NetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(120) %4, ptr noundef nonnull align 16 dereferenceable(120) @__const.main.array, i64 120, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #9
  invoke void @_ZN11ArrayNeuronC1EPii(ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull %4, i32 noundef 30)
          to label %20 unwind label %39

20:                                               ; preds = %19
  invoke void @_ZN15CompositeNeuronI11ArrayNeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(104) %5, ptr noundef nonnull align 8 dereferenceable(96) %6, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000)
          to label %21 unwind label %41

21:                                               ; preds = %20
  %22 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI11ArrayNeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %3, i32 noundef 0, i32 noundef 2, ptr noundef nonnull %5, i1 noundef zeroext false)
          to label %23 unwind label %43

23:                                               ; preds = %21
  call void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %5) #9
  call void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %6) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %8) #9
  invoke void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144) %8, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef 0x3F747AE140000000, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3F8EB851E0000000, float noundef 0.000000e+00)
          to label %24 unwind label %47

24:                                               ; preds = %23
  invoke void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152) %7, ptr noundef nonnull align 8 dereferenceable(144) %8, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %25 unwind label %49

25:                                               ; preds = %24
  %26 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %3, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %7, i1 noundef zeroext false)
          to label %27 unwind label %51

27:                                               ; preds = %25
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %7) #9
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %8) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %10) #9
  invoke void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144) %10, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef 0x3F747AE140000000, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0x3F8EB851E0000000, float noundef 0.000000e+00)
          to label %28 unwind label %55

28:                                               ; preds = %27
  invoke void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152) %9, ptr noundef nonnull align 8 dereferenceable(144) %10, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %29 unwind label %57

29:                                               ; preds = %28
  %30 = invoke noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224) %3, i32 noundef 2, i32 noundef 2, ptr noundef nonnull %9, i1 noundef zeroext false)
          to label %31 unwind label %59

31:                                               ; preds = %29
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %9) #9
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %10) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %10) #9
  br i1 %.019, label %32, label %65

32:                                               ; preds = %31
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %34 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef nonnull @.str.2, i32 noundef 4)
          to label %35 unwind label %63

35:                                               ; preds = %32
  %36 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef nonnull @.str.3, i32 noundef 4)
          to label %37 unwind label %63

37:                                               ; preds = %35
  %38 = invoke noundef ptr @_Z9loadArrayPKci(ptr noundef nonnull @.str.4, i32 noundef 4)
          to label %72 unwind label %63

39:                                               ; preds = %19
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %46

41:                                               ; preds = %20
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %21
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %5) #9
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %6) #9
  br label %46

46:                                               ; preds = %45, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %45 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #9
  br label %102

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %54

49:                                               ; preds = %24
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %53

51:                                               ; preds = %25
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %7) #9
  br label %53

53:                                               ; preds = %51, %49
  %.pn35 = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %8) #9
  br label %54

54:                                               ; preds = %53, %47
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %53 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #9
  br label %102

55:                                               ; preds = %27
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %62

57:                                               ; preds = %28
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %29
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %9) #9
  br label %61

61:                                               ; preds = %59, %57
  %.pn38 = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %10) #9
  br label %62

62:                                               ; preds = %61, %55
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %61 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %10) #9
  br label %102

63:                                               ; preds = %75, %72, %70, %68, %65, %37, %35, %32
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %102

65:                                               ; preds = %31
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %67 = invoke noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef 0x3F947AE140000000, i32 noundef 4)
          to label %68 unwind label %63

68:                                               ; preds = %65
  %69 = invoke noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef 0x3F947AE140000000, i32 noundef 4)
          to label %70 unwind label %63

70:                                               ; preds = %68
  %71 = invoke noundef ptr @_Z13getConstArrayIfEPT_S0_i(float noundef 0x3F50624DE0000000, i32 noundef 4)
          to label %72 unwind label %63

72:                                               ; preds = %70, %37
  %.str.7.sink = phi ptr [ @.str.5, %37 ], [ @.str.7, %70 ]
  %.018 = phi ptr [ %34, %37 ], [ %67, %70 ]
  %.017 = phi ptr [ %36, %37 ], [ %69, %70 ]
  %.0 = phi ptr [ %38, %37 ], [ %71, %70 ]
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7.sink)
  %74 = invoke noundef i32 @_ZN7Network7connectI15CompositeNeuronI11ArrayNeuron13StaticSynapseES1_I10LIFENeuronS3_EEEiP10PopulationIT_EPS7_IT0_EPfSE_P9SpikeTypei(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef %22, ptr noundef %26, ptr noundef %.018, ptr noundef %.0, ptr noundef null, i32 noundef 4)
          to label %75 unwind label %63

75:                                               ; preds = %72
  %76 = invoke noundef i32 @_ZN7Network7connectI15CompositeNeuronI10LIFENeuron13StaticSynapseES4_EEiP10PopulationIT_EPS5_IT0_EPfSC_P9SpikeTypei(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef %26, ptr noundef %30, ptr noundef %.017, ptr noundef %.0, ptr noundef null, i32 noundef 4)
          to label %77 unwind label %63

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  invoke void @_ZN21SingleThreadSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20) %11, ptr noundef nonnull %3, float noundef 0x3F50624DE0000000)
          to label %78 unwind label %93

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #9
  invoke void @_ZN18SingleGPUSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20) %12, ptr noundef nonnull %3, float noundef 0x3F50624DE0000000)
          to label %79 unwind label %95

79:                                               ; preds = %78
  %80 = invoke noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20) %11, float noundef 0x3FB99999A0000000)
          to label %81 unwind label %97

81:                                               ; preds = %79
  %82 = invoke noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20) %12, float noundef 0x3FB99999A0000000)
          to label %83 unwind label %97

83:                                               ; preds = %81
  br i1 %.019, label %99, label %84

84:                                               ; preds = %83
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %86 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef nonnull @.str.2, ptr noundef %.018, i32 noundef 4)
          to label %87 unwind label %97

87:                                               ; preds = %84
  %88 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef nonnull @.str.3, ptr noundef %.017, i32 noundef 4)
          to label %89 unwind label %97

89:                                               ; preds = %87
  %90 = invoke noundef i32 @_Z9saveArrayPKcPfi(ptr noundef nonnull @.str.4, ptr noundef %.0, i32 noundef 4)
          to label %91 unwind label %97

91:                                               ; preds = %89
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %99

93:                                               ; preds = %77
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %101

95:                                               ; preds = %78
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %100

97:                                               ; preds = %89, %87, %84, %81, %79
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %12) #9
  br label %100

99:                                               ; preds = %91, %83
  call void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  call void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #9
  call void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #9
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #9
  ret i32 0

100:                                              ; preds = %97, %95
  %.pn41 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  call void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %11) #9
  br label %101

101:                                              ; preds = %100, %93
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %100 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %102

102:                                              ; preds = %54, %63, %101, %62, %46
  %.pn41.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %46 ], [ %.pn35.pn, %54 ], [ %.pn38.pn, %62 ], [ %.pn41.pn, %101 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #9
  call void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #9
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn41.pn.pn.pn.pn.pn
}

; 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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

declare void @_ZN7NetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI11ArrayNeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224), i32 noundef, i32 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #5 align 2

declare void @_ZN11ArrayNeuronC1EPii(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CompositeNeuronI11ArrayNeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(96), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @_ZN11ArrayNeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN11ArrayNeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7Network16createPopulationI15CompositeNeuronI10LIFENeuron13StaticSynapseEEEP10PopulationIT_EiiS6_b(ptr noundef nonnull align 8 dereferenceable(224), i32 noundef, i32 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #5 align 2

declare void @_ZN10LIFENeuronC1Effffffffff(ptr noundef nonnull align 8 dereferenceable(144), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CompositeNeuronI10LIFENeuron13StaticSynapseEC2ERKS0_ff(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(144), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @_ZN10LIFENeuronD2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN10LIFENeuronD1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #6

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

declare noundef ptr @_Z9loadArrayPKci(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14getRandomArrayIfEPT_S0_i(float noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13getConstArrayIfEPT_S0_i(float noundef, i32 noundef) local_unnamed_addr #5

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

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

declare void @_ZN21SingleThreadSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, float noundef) unnamed_addr #3

declare void @_ZN18SingleGPUSimulatorC1EP7Networkf(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, float noundef) unnamed_addr #3

declare noundef i32 @_ZN13SimulatorBase3runEf(ptr noundef nonnull align 8 dereferenceable(20), float noundef) local_unnamed_addr #3

declare noundef i32 @_Z9saveArrayPKcPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN18SingleGPUSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN21SingleThreadSimulatorD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7NetworkD1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #6

attributes #0 = { mustprogress norecurse 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 nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 "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 #7 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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"}


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