; LLVM IR from thekyria/elabtsaot2 :: emulator_hw/hardware_model (sliceanalog)

; 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.elabtsaot::SliceAnalog" = type { double, double, %"class.elabtsaot::DAC", %"class.elabtsaot::DAC", %"class.std::vector" }
%"class.elabtsaot::DAC" = type <{ double, double, i32, i32, i32, [4 x i8], double, double, double, double, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<elabtsaot::Atom>, std::allocator<std::vector<elabtsaot::Atom>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<elabtsaot::Atom>, std::allocator<std::vector<elabtsaot::Atom>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<elabtsaot::Atom>, std::allocator<std::vector<elabtsaot::Atom>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<elabtsaot::Atom>, std::allocator<std::vector<elabtsaot::Atom>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.elabtsaot::Atom" = type { %"class.elabtsaot::Node", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.10" }
%"class.elabtsaot::Node" = type { double, double, double, double, i8, i8, i8, i8, double, double, double, double, i8, i8, i8, i8, [4 x i8], %"class.elabtsaot::Potentiometer", %"class.elabtsaot::Potentiometer", %"class.elabtsaot::Potentiometer", %"class.elabtsaot::Potentiometer" }
%"class.elabtsaot::Potentiometer" = type <{ ptr, double, double, i32, [4 x i8], double, i32, i32, i8, i8, [6 x i8] }>
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<elabtsaot::EmulatorBranch, std::allocator<elabtsaot::EmulatorBranch>>::_Vector_impl" }
%"struct.std::_Vector_base<elabtsaot::EmulatorBranch, std::allocator<elabtsaot::EmulatorBranch>>::_Vector_impl" = type { %"struct.std::_Vector_base<elabtsaot::EmulatorBranch, std::allocator<elabtsaot::EmulatorBranch>>::_Vector_impl_data" }
%"struct.std::_Vector_base<elabtsaot::EmulatorBranch, std::allocator<elabtsaot::EmulatorBranch>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>

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

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

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

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

declare void @_ZN9elabtsaot4Node23set_real_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) #2

declare void @_ZN9elabtsaot4Node23set_imag_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) #2

declare noundef i32 @_ZN9elabtsaot4Node25set_real_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) #2

declare noundef i32 @_ZN9elabtsaot4Node25set_imag_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) #2

declare void @_ZN9elabtsaot4Node26set_real_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) #2

declare void @_ZN9elabtsaot4Node26set_imag_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9elabtsaot11SliceAnalog17nodeVoltageSourceEmmd(ptr noundef nonnull align 8 dereferenceable(184) %0, i64 noundef %1, i64 noundef %2, double noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !11
  %10 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !13
  %11 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %12 = load i64, ptr %6, align 8, !tbaa !9
  %13 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #4
  %14 = load i64, ptr %7, align 8, !tbaa !9
  %15 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %14) #4
  %16 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds %"class.elabtsaot::Node", ptr %16, i32 0, i32 4
  store i8 1, ptr %17, align 8, !tbaa !15
  %18 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %19 = load i64, ptr %6, align 8, !tbaa !9
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %19) #4
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %21) #4
  %23 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %"class.elabtsaot::Node", ptr %23, i32 0, i32 12
  store i8 1, ptr %24, align 8, !tbaa !30
  %25 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %26 = load i64, ptr %6, align 8, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %26) #4
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28) #4
  %30 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds %"class.elabtsaot::Node", ptr %30, i32 0, i32 5
  store i8 0, ptr %31, align 1, !tbaa !31
  %32 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %33 = load i64, ptr %6, align 8, !tbaa !9
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %33) #4
  %35 = load i64, ptr %7, align 8, !tbaa !9
  %36 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %35) #4
  %37 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %"class.elabtsaot::Node", ptr %37, i32 0, i32 13
  store i8 0, ptr %38, align 1, !tbaa !32
  %39 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %40 = load i64, ptr %6, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %40) #4
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42) #4
  %44 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %43, i32 0, i32 0
  call void @_ZN9elabtsaot4Node23set_real_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304) %44, i1 noundef zeroext false)
  %45 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %46 = load i64, ptr %6, align 8, !tbaa !9
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #4
  %48 = load i64, ptr %7, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48) #4
  %50 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %49, i32 0, i32 0
  call void @_ZN9elabtsaot4Node23set_imag_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304) %50, i1 noundef zeroext false)
  %51 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %52 = load i64, ptr %6, align 8, !tbaa !9
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52) #4
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #4
  %56 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %"class.elabtsaot::Node", ptr %56, i32 0, i32 6
  store i8 0, ptr %57, align 2, !tbaa !33
  %58 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %59 = load i64, ptr %6, align 8, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #4
  %61 = load i64, ptr %7, align 8, !tbaa !9
  %62 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %61) #4
  %63 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds %"class.elabtsaot::Node", ptr %63, i32 0, i32 14
  store i8 0, ptr %64, align 2, !tbaa !34
  %65 = load double, ptr %8, align 8, !tbaa !11
  %66 = fcmp ogt double %65, 0.000000e+00
  br i1 %66, label %67, label %114

67:                                               ; preds = %4
  %68 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %69 = load i64, ptr %6, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %69) #4
  %71 = load i64, ptr %7, align 8, !tbaa !9
  %72 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %71) #4
  %73 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %"class.elabtsaot::Node", ptr %73, i32 0, i32 7
  store i8 1, ptr %74, align 1, !tbaa !35
  %75 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %76 = load i64, ptr %6, align 8, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %76) #4
  %78 = load i64, ptr %7, align 8, !tbaa !9
  %79 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %78) #4
  %80 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds %"class.elabtsaot::Node", ptr %80, i32 0, i32 15
  store i8 1, ptr %81, align 1, !tbaa !36
  %82 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %83 = load i64, ptr %6, align 8, !tbaa !9
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %83) #4
  %85 = load i64, ptr %7, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %85) #4
  %87 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %86, i32 0, i32 0
  %88 = load double, ptr %8, align 8, !tbaa !11
  %89 = call noundef i32 @_ZN9elabtsaot4Node25set_real_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304) %87, double noundef %88)
  %90 = load i32, ptr %9, align 4, !tbaa !13
  %91 = or i32 %90, %89
  store i32 %91, ptr %9, align 4, !tbaa !13
  %92 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %93 = load i64, ptr %6, align 8, !tbaa !9
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %93) #4
  %95 = load i64, ptr %7, align 8, !tbaa !9
  %96 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #4
  %97 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %96, i32 0, i32 0
  %98 = load double, ptr %8, align 8, !tbaa !11
  %99 = call noundef i32 @_ZN9elabtsaot4Node25set_imag_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304) %97, double noundef %98)
  %100 = load i32, ptr %9, align 4, !tbaa !13
  %101 = or i32 %100, %99
  store i32 %101, ptr %9, align 4, !tbaa !13
  %102 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %103 = load i64, ptr %6, align 8, !tbaa !9
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %103) #4
  %105 = load i64, ptr %7, align 8, !tbaa !9
  %106 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %105) #4
  %107 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %106, i32 0, i32 0
  call void @_ZN9elabtsaot4Node26set_real_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %107, i1 noundef zeroext true)
  %108 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %109 = load i64, ptr %6, align 8, !tbaa !9
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %109) #4
  %111 = load i64, ptr %7, align 8, !tbaa !9
  %112 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %111) #4
  %113 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %112, i32 0, i32 0
  call void @_ZN9elabtsaot4Node26set_imag_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %113, i1 noundef zeroext true)
  br label %141

114:                                              ; preds = %4
  %115 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %116 = load i64, ptr %6, align 8, !tbaa !9
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %116) #4
  %118 = load i64, ptr %7, align 8, !tbaa !9
  %119 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %118) #4
  %120 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds %"class.elabtsaot::Node", ptr %120, i32 0, i32 7
  store i8 0, ptr %121, align 1, !tbaa !35
  %122 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %123 = load i64, ptr %6, align 8, !tbaa !9
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %123) #4
  %125 = load i64, ptr %7, align 8, !tbaa !9
  %126 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %125) #4
  %127 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds %"class.elabtsaot::Node", ptr %127, i32 0, i32 15
  store i8 0, ptr %128, align 1, !tbaa !36
  %129 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %130 = load i64, ptr %6, align 8, !tbaa !9
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %130) #4
  %132 = load i64, ptr %7, align 8, !tbaa !9
  %133 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %132) #4
  %134 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %133, i32 0, i32 0
  call void @_ZN9elabtsaot4Node26set_real_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %134, i1 noundef zeroext false)
  %135 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %10, i32 0, i32 4
  %136 = load i64, ptr %6, align 8, !tbaa !9
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %136) #4
  %138 = load i64, ptr %7, align 8, !tbaa !9
  %139 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %138) #4
  %140 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %139, i32 0, i32 0
  call void @_ZN9elabtsaot4Node26set_imag_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %140, i1 noundef zeroext false)
  br label %141

141:                                              ; preds = %114, %67
  %142 = load i32, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret i32 %142
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !18, i64 32}
!16 = !{!"_ZTSN9elabtsaot4AtomE", !17, i64 0, !20, i64 304, !20, i64 328, !24, i64 352}
!17 = !{!"_ZTSN9elabtsaot4NodeE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !18, i64 32, !18, i64 33, !18, i64 34, !18, i64 35, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !18, i64 72, !18, i64 73, !18, i64 74, !18, i64 75, !19, i64 80, !19, i64 136, !19, i64 192, !19, i64 248}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN9elabtsaot13PotentiometerE", !12, i64 8, !12, i64 16, !14, i64 24, !12, i64 32, !14, i64 40, !14, i64 44, !18, i64 48, !18, i64 49}
!20 = !{!"_ZTSSt6vectorIN9elabtsaot14EmulatorBranchESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIbSaIbEE", !25, i64 0}
!25 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !26, i64 0}
!26 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !28, i64 0, !28, i64 16, !6, i64 32}
!28 = !{!"_ZTSSt13_Bit_iterator", !29, i64 0}
!29 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !14, i64 8}
!30 = !{!16, !18, i64 72}
!31 = !{!16, !18, i64 33}
!32 = !{!16, !18, i64 73}
!33 = !{!16, !18, i64 34}
!34 = !{!16, !18, i64 74}
!35 = !{!16, !18, i64 35}
!36 = !{!16, !18, i64 75}


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

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

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

declare void @_ZN9elabtsaot4Node23set_real_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN9elabtsaot4Node23set_imag_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) local_unnamed_addr #1

declare noundef i32 @_ZN9elabtsaot4Node25set_real_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) local_unnamed_addr #1

declare noundef i32 @_ZN9elabtsaot4Node25set_imag_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) local_unnamed_addr #1

declare void @_ZN9elabtsaot4Node26set_real_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN9elabtsaot4Node26set_imag_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304), i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9elabtsaot11SliceAnalog17nodeVoltageSourceEmmd(ptr noundef nonnull align 8 dereferenceable(184) %0, i64 noundef %1, i64 noundef %2, double noundef %3) local_unnamed_addr #2 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 160
  %6 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %7 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %2) #3
  %8 = getelementptr inbounds i8, ptr %7, i64 32
  store i8 1, ptr %8, align 8, !tbaa !5
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %10 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %2) #3
  %11 = getelementptr inbounds i8, ptr %10, i64 72
  store i8 1, ptr %11, align 8, !tbaa !25
  %12 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %13 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %2) #3
  %14 = getelementptr inbounds i8, ptr %13, i64 33
  store i8 0, ptr %14, align 1, !tbaa !26
  %15 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %16 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %2) #3
  %17 = getelementptr inbounds i8, ptr %16, i64 73
  store i8 0, ptr %17, align 1, !tbaa !27
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %19 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %2) #3
  tail call void @_ZN9elabtsaot4Node23set_real_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304) %19, i1 noundef zeroext false)
  %20 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %21 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %2) #3
  tail call void @_ZN9elabtsaot4Node23set_imag_pot_current_swEb(ptr noundef nonnull align 8 dereferenceable(304) %21, i1 noundef zeroext false)
  %22 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %23 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %2) #3
  %24 = getelementptr inbounds i8, ptr %23, i64 34
  store i8 0, ptr %24, align 2, !tbaa !28
  %25 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %26 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %2) #3
  %27 = getelementptr inbounds i8, ptr %26, i64 74
  store i8 0, ptr %27, align 2, !tbaa !29
  %28 = fcmp ogt double %3, 0.000000e+00
  %29 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %30 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %2) #3
  %31 = getelementptr inbounds i8, ptr %30, i64 35
  br i1 %28, label %32, label %43

32:                                               ; preds = %4
  store i8 1, ptr %31, align 1, !tbaa !30
  %33 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %34 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %2) #3
  %35 = getelementptr inbounds i8, ptr %34, i64 75
  store i8 1, ptr %35, align 1, !tbaa !31
  %36 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %37 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %2) #3
  %38 = tail call noundef i32 @_ZN9elabtsaot4Node25set_real_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304) %37, double noundef %3)
  %39 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %40 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %2) #3
  %41 = tail call noundef i32 @_ZN9elabtsaot4Node25set_imag_pot_resistance_rEd(ptr noundef nonnull align 8 dereferenceable(304) %40, double noundef %3)
  %42 = or i32 %41, %38
  br label %47

43:                                               ; preds = %4
  store i8 0, ptr %31, align 1, !tbaa !30
  %44 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %45 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %2) #3
  %46 = getelementptr inbounds i8, ptr %45, i64 75
  store i8 0, ptr %46, align 1, !tbaa !31
  br label %47

47:                                               ; preds = %43, %32
  %.0 = phi i32 [ 0, %43 ], [ %42, %32 ]
  %48 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %49 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %2) #3
  tail call void @_ZN9elabtsaot4Node26set_real_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %49, i1 noundef zeroext %28)
  %50 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #3
  %51 = tail call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %2) #3
  tail call void @_ZN9elabtsaot4Node26set_imag_pot_resistance_swEb(ptr noundef nonnull align 8 dereferenceable(304) %51, i1 noundef zeroext %28)
  ret i32 %.0
}

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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, !11, i64 32}
!6 = !{!"_ZTSN9elabtsaot4AtomE", !7, i64 0, !14, i64 304, !14, i64 328, !19, i64 352}
!7 = !{!"_ZTSN9elabtsaot4NodeE", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !11, i64 32, !11, i64 33, !11, i64 34, !11, i64 35, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !11, i64 72, !11, i64 73, !11, i64 74, !11, i64 75, !12, i64 80, !12, i64 136, !12, i64 192, !12, i64 248}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSN9elabtsaot13PotentiometerE", !8, i64 8, !8, i64 16, !13, i64 24, !8, i64 32, !13, i64 40, !13, i64 44, !11, i64 48, !11, i64 49}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTSSt6vectorIN9elabtsaot14EmulatorBranchESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN9elabtsaot14EmulatorBranchESaIS1_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !9, i64 0}
!19 = !{!"_ZTSSt6vectorIbSaIbEE", !20, i64 0}
!20 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !21, i64 0}
!21 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !23, i64 0, !23, i64 16, !18, i64 32}
!23 = !{!"_ZTSSt13_Bit_iterator", !24, i64 0}
!24 = !{!"_ZTSSt18_Bit_iterator_base", !18, i64 0, !13, i64 8}
!25 = !{!6, !11, i64 72}
!26 = !{!6, !11, i64 33}
!27 = !{!6, !11, i64 73}
!28 = !{!6, !11, i64 34}
!29 = !{!6, !11, i64 74}
!30 = !{!6, !11, i64 35}
!31 = !{!6, !11, i64 75}


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