; LLVM IR from CRAFT-THU/BSim :: src/neuron/lif/LIFENeuron.ll (ZN10LIFENeuronC2ERKS_)

; 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.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.NeuronBase.base = type <{ %class.Base, %"class.std::vector", i8, i8, [2 x i8], i32, float }>
%class.Base = type { ptr, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.NeuronBase = type <{ %class.Base, %"class.std::vector", i8, i8, [2 x i8], i32, float, [4 x i8] }>

@_ZTV10LIFENeuron = external dso_local unnamed_addr constant { [19 x ptr] }, align 8

declare void @_ZN10NeuronBaseC2Ei(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef) unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10LIFENeuronC2ERKS_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(144) %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  call void @_ZN10NeuronBaseC2Ei(ptr noundef nonnull align 8 dereferenceable(52) %5, i32 noundef 0)
  store ptr getelementptr inbounds inrange(-16, 136) ({ [19 x ptr] }, ptr @_ZTV10LIFENeuron, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %class.LIFENeuron, ptr %6, i32 0, i32 1
  %8 = load float, ptr %7, align 4, !tbaa !11
  %9 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 1
  store float %8, ptr %9, align 4, !tbaa !11
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %class.LIFENeuron, ptr %10, i32 0, i32 2
  %12 = load float, ptr %11, align 8, !tbaa !22
  %13 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 2
  store float %12, ptr %13, align 8, !tbaa !22
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %class.LIFENeuron, ptr %14, i32 0, i32 3
  %16 = load float, ptr %15, align 4, !tbaa !23
  %17 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 3
  store float %16, ptr %17, align 4, !tbaa !23
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.LIFENeuron, ptr %18, i32 0, i32 4
  %20 = load float, ptr %19, align 8, !tbaa !24
  %21 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 4
  store float %20, ptr %21, align 8, !tbaa !24
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.LIFENeuron, ptr %22, i32 0, i32 5
  %24 = load float, ptr %23, align 4, !tbaa !25
  %25 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 5
  store float %24, ptr %25, align 4, !tbaa !25
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.LIFENeuron, ptr %26, i32 0, i32 12
  %28 = load i32, ptr %27, align 8, !tbaa !26
  %29 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 12
  store i32 %28, ptr %29, align 8, !tbaa !26
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.LIFENeuron, ptr %30, i32 0, i32 13
  %32 = load i32, ptr %31, align 4, !tbaa !27
  %33 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 13
  store i32 %32, ptr %33, align 4, !tbaa !27
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.LIFENeuron, ptr %34, i32 0, i32 6
  %36 = load float, ptr %35, align 8, !tbaa !28
  %37 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 6
  store float %36, ptr %37, align 8, !tbaa !28
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.LIFENeuron, ptr %38, i32 0, i32 7
  %40 = load float, ptr %39, align 4, !tbaa !29
  %41 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 7
  store float %40, ptr %41, align 4, !tbaa !29
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %class.LIFENeuron, ptr %42, i32 0, i32 8
  %44 = load float, ptr %43, align 8, !tbaa !30
  %45 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 8
  store float %44, ptr %45, align 8, !tbaa !30
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.LIFENeuron, ptr %46, i32 0, i32 9
  %48 = load float, ptr %47, align 4, !tbaa !31
  %49 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 9
  store float %48, ptr %49, align 4, !tbaa !31
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %class.LIFENeuron, ptr %50, i32 0, i32 10
  %52 = load float, ptr %51, align 8, !tbaa !32
  %53 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 10
  store float %52, ptr %53, align 8, !tbaa !32
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %class.LIFENeuron, ptr %54, i32 0, i32 11
  %56 = load float, ptr %55, align 4, !tbaa !33
  %57 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 11
  store float %56, ptr %57, align 4, !tbaa !33
  %58 = getelementptr inbounds %class.NeuronBase, ptr %5, i32 0, i32 3
  store i8 0, ptr %58, align 1, !tbaa !34
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %class.LIFENeuron, ptr %59, i32 0, i32 14
  %61 = load float, ptr %60, align 8, !tbaa !35
  %62 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 14
  store float %61, ptr %62, align 8, !tbaa !35
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.LIFENeuron, ptr %63, i32 0, i32 15
  %65 = load float, ptr %64, align 4, !tbaa !36
  %66 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 15
  store float %65, ptr %66, align 4, !tbaa !36
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %class.LIFENeuron, ptr %67, i32 0, i32 16
  %69 = load float, ptr %68, align 8, !tbaa !37
  %70 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 16
  store float %69, ptr %70, align 8, !tbaa !37
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %class.LIFENeuron, ptr %71, i32 0, i32 17
  %73 = load float, ptr %72, align 4, !tbaa !38
  %74 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 17
  store float %73, ptr %74, align 4, !tbaa !38
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.LIFENeuron, ptr %75, i32 0, i32 18
  %77 = load float, ptr %76, align 8, !tbaa !39
  %78 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 18
  store float %77, ptr %78, align 8, !tbaa !39
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.LIFENeuron, ptr %79, i32 0, i32 19
  %81 = load float, ptr %80, align 4, !tbaa !40
  %82 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 19
  store float %81, ptr %82, align 4, !tbaa !40
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.LIFENeuron, ptr %83, i32 0, i32 20
  %85 = load float, ptr %84, align 8, !tbaa !41
  %86 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 20
  store float %85, ptr %86, align 8, !tbaa !41
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.LIFENeuron, ptr %87, i32 0, i32 21
  %89 = load float, ptr %88, align 4, !tbaa !42
  %90 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 21
  store float %89, ptr %90, align 4, !tbaa !42
  %91 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 22
  store float 0.000000e+00, ptr %91, align 8, !tbaa !43
  %92 = getelementptr inbounds %class.LIFENeuron, ptr %5, i32 0, i32 23
  store float 0.000000e+00, ptr %92, align 4, !tbaa !44
  ret void
}

attributes #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 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" }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !21, i64 52}
!12 = !{!"_ZTS10LIFENeuron", !13, i64 0, !21, i64 52, !21, i64 56, !21, i64 60, !21, i64 64, !21, i64 68, !21, i64 72, !21, i64 76, !21, i64 80, !21, i64 84, !21, i64 88, !21, i64 92, !15, i64 96, !15, i64 100, !21, i64 104, !21, i64 108, !21, i64 112, !21, i64 116, !21, i64 120, !21, i64 124, !21, i64 128, !21, i64 132, !21, i64 136, !21, i64 140}
!13 = !{!"_ZTS10NeuronBase", !14, i64 0, !16, i64 16, !20, i64 40, !20, i64 41, !15, i64 44, !21, i64 48}
!14 = !{!"_ZTS4Base", !15, i64 8, !15, i64 12}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIP11SynapseBaseSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIP11SynapseBaseSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!12, !21, i64 56}
!23 = !{!12, !21, i64 60}
!24 = !{!12, !21, i64 64}
!25 = !{!12, !21, i64 68}
!26 = !{!12, !15, i64 96}
!27 = !{!12, !15, i64 100}
!28 = !{!12, !21, i64 72}
!29 = !{!12, !21, i64 76}
!30 = !{!12, !21, i64 80}
!31 = !{!12, !21, i64 84}
!32 = !{!12, !21, i64 88}
!33 = !{!12, !21, i64 92}
!34 = !{!13, !20, i64 41}
!35 = !{!12, !21, i64 104}
!36 = !{!12, !21, i64 108}
!37 = !{!12, !21, i64 112}
!38 = !{!12, !21, i64 116}
!39 = !{!12, !21, i64 120}
!40 = !{!12, !21, i64 124}
!41 = !{!12, !21, i64 128}
!42 = !{!12, !21, i64 132}
!43 = !{!12, !21, i64 136}
!44 = !{!12, !21, i64 140}


; 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"

@_ZTV10LIFENeuron = external dso_local unnamed_addr constant { [19 x ptr] }, align 8

declare void @_ZN10NeuronBaseC2Ei(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef) unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10LIFENeuronC2ERKS_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(144) %1) unnamed_addr #1 align 2 {
  tail call void @_ZN10NeuronBaseC2Ei(ptr noundef nonnull align 8 dereferenceable(52) %0, i32 noundef 0)
  store ptr getelementptr inbounds inrange(-16, 136) (i8, ptr @_ZTV10LIFENeuron, i64 16), ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 52
  %4 = getelementptr inbounds i8, ptr %0, i64 52
  %5 = load <4 x float>, ptr %3, align 4, !tbaa !8
  store <4 x float> %5, ptr %4, align 4, !tbaa !8
  %6 = getelementptr inbounds i8, ptr %1, i64 68
  %7 = getelementptr inbounds i8, ptr %0, i64 68
  %8 = getelementptr inbounds i8, ptr %1, i64 96
  %9 = getelementptr inbounds i8, ptr %0, i64 96
  %10 = load <2 x i32>, ptr %8, align 8, !tbaa !11
  store <2 x i32> %10, ptr %9, align 8, !tbaa !11
  %11 = load <4 x float>, ptr %6, align 4, !tbaa !8
  store <4 x float> %11, ptr %7, align 4, !tbaa !8
  %12 = getelementptr inbounds i8, ptr %1, i64 84
  %13 = getelementptr inbounds i8, ptr %0, i64 84
  %14 = load <2 x float>, ptr %12, align 4, !tbaa !8
  store <2 x float> %14, ptr %13, align 4, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %1, i64 92
  %16 = load float, ptr %15, align 4, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 92
  store float %16, ptr %17, align 4, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %0, i64 41
  store i8 0, ptr %18, align 1, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %1, i64 104
  %20 = getelementptr inbounds i8, ptr %0, i64 104
  %21 = load <4 x float>, ptr %19, align 8, !tbaa !8
  store <4 x float> %21, ptr %20, align 8, !tbaa !8
  %22 = getelementptr inbounds i8, ptr %1, i64 120
  %23 = getelementptr inbounds i8, ptr %0, i64 120
  %24 = load <4 x float>, ptr %22, align 8, !tbaa !8
  store <4 x float> %24, ptr %23, align 8, !tbaa !8
  %25 = getelementptr inbounds i8, ptr %0, i64 136
  store <2 x float> zeroinitializer, ptr %25, align 8, !tbaa !8
  ret void
}

attributes #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 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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !9, i64 92}
!14 = !{!"_ZTS10LIFENeuron", !15, i64 0, !9, i64 52, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !9, i64 72, !9, i64 76, !9, i64 80, !9, i64 84, !9, i64 88, !9, i64 92, !12, i64 96, !12, i64 100, !9, i64 104, !9, i64 108, !9, i64 112, !9, i64 116, !9, i64 120, !9, i64 124, !9, i64 128, !9, i64 132, !9, i64 136, !9, i64 140}
!15 = !{!"_ZTS10NeuronBase", !16, i64 0, !17, i64 16, !22, i64 40, !22, i64 41, !12, i64 44, !9, i64 48}
!16 = !{!"_ZTS4Base", !12, i64 8, !12, i64 12}
!17 = !{!"_ZTSSt6vectorIP11SynapseBaseSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIP11SynapseBaseSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !10, i64 0}
!22 = !{!"bool", !10, i64 0}
!23 = !{!15, !22, i64 41}


; Effective O3 passes: InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass