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

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

%"struct.std::_Bit_reference" = type { ptr, i64 }
%"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 uwtable
define dso_local noundef i32 @_ZN9elabtsaot11SliceAnalog5resetEb(ptr noundef nonnull align 8 dereferenceable(184) %0, i1 noundef zeroext %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %13 = zext i1 %1 to i8
  store i8 %13, ptr %4, align 1, !tbaa !9
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !11
  %15 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %16 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %17 = icmp ugt i64 %16, 1
  br i1 %17, label %18, label %42

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !13
  br label %19

19:                                               ; preds = %38, %18
  %20 = load i64, ptr %6, align 8, !tbaa !13
  %21 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %22 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #4
  %23 = sub i64 %22, 1
  %24 = icmp ne i64 %20, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %41

26:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  %27 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %28 = load i64, ptr %6, align 8, !tbaa !13
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28) #4
  %30 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0) #4
  %31 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %30, i32 0, i32 3
  %32 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %31, i64 noundef 6)
  %33 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %34 = extractvalue { ptr, i64 } %32, 0
  store ptr %34, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %36 = extractvalue { ptr, i64 } %32, 1
  store i64 %36, ptr %35, align 8
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  br label %38

38:                                               ; preds = %26
  %39 = load i64, ptr %6, align 8, !tbaa !13
  %40 = add i64 %39, 1
  store i64 %40, ptr %6, align 8, !tbaa !13
  br label %19, !llvm.loop !15

41:                                               ; preds = %25
  br label %42

42:                                               ; preds = %41, %2
  %43 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %44 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef 0) #4
  %45 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #4
  %46 = icmp ugt i64 %45, 2
  br i1 %46, label %47, label %72

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 1, ptr %8, align 8, !tbaa !13
  br label %48

48:                                               ; preds = %68, %47
  %49 = load i64, ptr %8, align 8, !tbaa !13
  %50 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef 0) #4
  %52 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #4
  %53 = sub i64 %52, 1
  %54 = icmp ne i64 %49, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %71

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  %57 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef 0) #4
  %59 = load i64, ptr %8, align 8, !tbaa !13
  %60 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #4
  %61 = getelementptr inbounds %"class.elabtsaot::Atom", ptr %60, i32 0, i32 3
  %62 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %61, i64 noundef 4)
  %63 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %64 = extractvalue { ptr, i64 } %62, 0
  store ptr %64, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %66 = extractvalue { ptr, i64 } %62, 1
  store i64 %66, ptr %65, align 8
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %68

68:                                               ; preds = %56
  %69 = load i64, ptr %8, align 8, !tbaa !13
  %70 = add i64 %69, 1
  store i64 %70, ptr %8, align 8, !tbaa !13
  br label %48, !llvm.loop !17

71:                                               ; preds = %55
  br label %72

72:                                               ; preds = %71, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %73

73:                                               ; preds = %103, %72
  %74 = load i64, ptr %10, align 8, !tbaa !13
  %75 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %76 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #4
  %77 = icmp ne i64 %74, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %73
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %106

79:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %80

80:                                               ; preds = %99, %79
  %81 = load i64, ptr %12, align 8, !tbaa !13
  %82 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %83 = load i64, ptr %10, align 8, !tbaa !13
  %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 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #4
  %86 = icmp ne i64 %81, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %80
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %102

88:                                               ; preds = %80
  %89 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 4
  %90 = load i64, ptr %10, align 8, !tbaa !13
  %91 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %90) #4
  %92 = load i64, ptr %12, align 8, !tbaa !13
  %93 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %92) #4
  %94 = load i8, ptr %4, align 1, !tbaa !9, !range !18, !noundef !19
  %95 = trunc i8 %94 to i1
  %96 = call noundef i32 @_ZN9elabtsaot4Atom5resetEb(ptr noundef nonnull align 8 dereferenceable(392) %93, i1 noundef zeroext %95)
  %97 = load i32, ptr %5, align 4, !tbaa !11
  %98 = or i32 %97, %96
  store i32 %98, ptr %5, align 4, !tbaa !11
  br label %99

99:                                               ; preds = %88
  %100 = load i64, ptr %12, align 8, !tbaa !13
  %101 = add i64 %100, 1
  store i64 %101, ptr %12, align 8, !tbaa !13
  br label %80, !llvm.loop !20

102:                                              ; preds = %87
  br label %103

103:                                              ; preds = %102
  %104 = load i64, ptr %10, align 8, !tbaa !13
  %105 = add i64 %104, 1
  store i64 %105, ptr %10, align 8, !tbaa !13
  br label %73, !llvm.loop !21

106:                                              ; preds = %78
  %107 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 0
  store double 1.250000e+00, ptr %107, align 8, !tbaa !22
  %108 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 1
  store double 2.500000e+00, ptr %108, align 8, !tbaa !30
  %109 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 2
  %110 = load i8, ptr %4, align 1, !tbaa !9, !range !18, !noundef !19
  %111 = trunc i8 %110 to i1
  %112 = call noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68) %109, i1 noundef zeroext false, i1 noundef zeroext %111)
  %113 = load i32, ptr %5, align 4, !tbaa !11
  %114 = or i32 %113, %112
  store i32 %114, ptr %5, align 4, !tbaa !11
  %115 = getelementptr inbounds %"class.elabtsaot::SliceAnalog", ptr %14, i32 0, i32 3
  %116 = load i8, ptr %4, align 1, !tbaa !9, !range !18, !noundef !19
  %117 = trunc i8 %116 to i1
  %118 = call noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68) %115, i1 noundef zeroext false, i1 noundef zeroext %117)
  %119 = load i32, ptr %5, align 4, !tbaa !11
  %120 = or i32 %119, %118
  store i32 %120, ptr %5, align 4, !tbaa !11
  %121 = load i32, ptr %5, align 4, !tbaa !11
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %121
}

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

; 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) #2 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) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

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

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

declare noundef i32 @_ZN9elabtsaot4Atom5resetEb(ptr noundef nonnull align 8 dereferenceable(392), i1 noundef zeroext) #3

declare noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68), i1 noundef zeroext, i1 noundef zeroext) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTSN9elabtsaot11SliceAnalogE", !24, i64 0, !24, i64 8, !25, i64 16, !25, i64 88, !26, i64 160}
!24 = !{!"double", !7, i64 0}
!25 = !{!"_ZTSN9elabtsaot3DACE", !24, i64 0, !24, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !24, i64 32, !24, i64 40, !24, i64 48, !24, i64 56, !12, i64 64}
!26 = !{!"_ZTSSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseISt6vectorIN9elabtsaot4AtomESaIS2_EESaIS4_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN9elabtsaot4AtomESaIS2_EESaIS4_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN9elabtsaot4AtomESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!23, !24, i64 8}


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

%"struct.std::_Bit_reference" = type { ptr, i64 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9elabtsaot11SliceAnalog5resetEb(ptr noundef nonnull align 8 dereferenceable(184) %0, i1 noundef zeroext %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"struct.std::_Bit_reference", align 8
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 160
  %6 = tail call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %7 = icmp ugt i64 %6, 1
  br i1 %7, label %.preheader28, label %.loopexit29

.preheader28:                                     ; preds = %2
  %8 = tail call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.not30 = icmp eq i64 %8, 1
  br i1 %.not30, label %.loopexit29, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader28
  %9 = getelementptr inbounds i8, ptr %3, i64 8
  br label %10

10:                                               ; preds = %.lr.ph, %10
  %.02231 = phi i64 [ 0, %.lr.ph ], [ %18, %10 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %11 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.02231) #4
  %12 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 352
  %14 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef 6)
  %15 = extractvalue { ptr, i64 } %14, 0
  store ptr %15, ptr %3, align 8
  %16 = extractvalue { ptr, i64 } %14, 1
  store i64 %16, ptr %9, align 8
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %3, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  %18 = add i64 %.02231, 1
  %19 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %20 = add i64 %19, -2
  %.not = icmp eq i64 %.02231, %20
  br i1 %.not, label %.loopexit29, label %10, !llvm.loop !5

.loopexit29:                                      ; preds = %10, %.preheader28, %2
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #4
  %22 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #4
  %23 = icmp ugt i64 %22, 2
  br i1 %23, label %.preheader27, label %.loopexit

.preheader27:                                     ; preds = %.loopexit29
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #4
  %25 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  %.not2432 = icmp eq i64 %25, 2
  br i1 %.not2432, label %.loopexit, label %.lr.ph34

.lr.ph34:                                         ; preds = %.preheader27
  %26 = getelementptr inbounds i8, ptr %4, i64 8
  br label %27

27:                                               ; preds = %.lr.ph34, %27
  %.02133 = phi i64 [ 1, %.lr.ph34 ], [ %35, %27 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #4
  %29 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %.02133) #4
  %30 = getelementptr inbounds i8, ptr %29, i64 352
  %31 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %30, i64 noundef 4)
  %32 = extractvalue { ptr, i64 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i64 } %31, 1
  store i64 %33, ptr %26, align 8
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %35 = add i64 %.02133, 1
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #4
  %37 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %38 = add i64 %37, -2
  %.not24 = icmp eq i64 %.02133, %38
  br i1 %.not24, label %.loopexit, label %27, !llvm.loop !7

.loopexit:                                        ; preds = %27, %.preheader27, %.loopexit29
  %39 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.not2539 = icmp eq i64 %39, 0
  br i1 %.not2539, label %._crit_edge42, label %.preheader

.preheader:                                       ; preds = %.loopexit, %._crit_edge
  %.02041 = phi i64 [ %48, %._crit_edge ], [ 0, %.loopexit ]
  %.02340 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 0, %.loopexit ]
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.02041) #4
  %41 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #4
  %.not2635 = icmp eq i64 %41, 0
  br i1 %.not2635, label %._crit_edge, label %.lr.ph38

._crit_edge42:                                    ; preds = %._crit_edge, %.loopexit
  %.023.lcssa = phi i32 [ 0, %.loopexit ], [ %.1.lcssa, %._crit_edge ]
  store <2 x double> <double 1.250000e+00, double 2.500000e+00>, ptr %0, align 8, !tbaa !8
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  %43 = call noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68) %42, i1 noundef zeroext false, i1 noundef zeroext %1)
  %44 = getelementptr inbounds i8, ptr %0, i64 88
  %45 = call noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68) %44, i1 noundef zeroext false, i1 noundef zeroext %1)
  %46 = or i32 %43, %.023.lcssa
  %47 = or i32 %46, %45
  ret i32 %47

._crit_edge:                                      ; preds = %.lr.ph38, %.preheader
  %.1.lcssa = phi i32 [ %.02340, %.preheader ], [ %53, %.lr.ph38 ]
  %48 = add i64 %.02041, 1
  %49 = call noundef i64 @_ZNKSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.not25 = icmp eq i64 %48, %49
  br i1 %.not25, label %._crit_edge42, label %.preheader, !llvm.loop !12

.lr.ph38:                                         ; preds = %.preheader, %.lr.ph38
  %.037 = phi i64 [ %54, %.lr.ph38 ], [ 0, %.preheader ]
  %.136 = phi i32 [ %53, %.lr.ph38 ], [ %.02340, %.preheader ]
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.02041) #4
  %51 = call noundef nonnull align 8 dereferenceable(392) ptr @_ZNSt6vectorIN9elabtsaot4AtomESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %.037) #4
  %52 = call noundef i32 @_ZN9elabtsaot4Atom5resetEb(ptr noundef nonnull align 8 dereferenceable(392) %51, i1 noundef zeroext %1)
  %53 = or i32 %52, %.136
  %54 = add i64 %.037, 1
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.02041) #4
  %56 = call noundef i64 @_ZNKSt6vectorIN9elabtsaot4AtomESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %.not26 = icmp eq i64 %54, %56
  br i1 %.not26, label %._crit_edge, label %.lr.ph38, !llvm.loop !13
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN9elabtsaot4AtomESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 align 2

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

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

declare noundef i32 @_ZN9elabtsaot4Atom5resetEb(ptr noundef nonnull align 8 dereferenceable(392), i1 noundef zeroext) local_unnamed_addr #3

declare noundef i32 @_ZN9elabtsaot3DAC5resetEbb(ptr noundef nonnull align 8 dereferenceable(68), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass