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

; 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::pair" = type { i32, i32 }
%"class.std::complex" = type { { double, double } }
%"class.elabtsaot::Pipeline" = type { ptr, %"class.std::vector", i64, i64, i64, i64, %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.elabtsaot::TDConstILoadPipeline" = type { %"class.elabtsaot::Pipeline", %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.elabtsaot::Load" = type { i32, i32, double, double, %"class.std::complex", double, double, double, double }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #1 align 2

; 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 @_ZN9elabtsaot20TDConstILoadPipeline14insert_elementEmmRKNS_4LoadEb(ptr noundef nonnull align 8 dereferenceable(112) %0, i64 noundef %1, i64 noundef %2, ptr noundef nonnull align 8 dereferenceable(72) %3, i1 noundef zeroext %4) #2 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::complex", align 8
  %22 = alloca %"class.std::complex", align 8
  %23 = alloca %"class.std::complex", align 8
  %24 = alloca %"class.std::complex", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  %25 = zext i1 %4 to i8
  store i8 %25, ptr %11, align 1, !tbaa !11
  %26 = load ptr, ptr %7, align 8
  %27 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 3
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 2
  %30 = load i64, ptr %29, align 8, !tbaa !23
  %31 = icmp eq i64 %28, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %5
  store i32 1, ptr %6, align 4
  br label %162

33:                                               ; preds = %5
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !24
  %37 = icmp uge i64 %34, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %33
  store i32 2, ptr %6, align 4
  br label %162

39:                                               ; preds = %33
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 5
  %42 = load i64, ptr %41, align 8, !tbaa !25
  %43 = icmp uge i64 %40, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  store i32 3, ptr %6, align 4
  br label %162

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %46 = load i64, ptr %8, align 8, !tbaa !9
  %47 = load i64, ptr %9, align 8, !tbaa !9
  %48 = call noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88) %26, i64 noundef %46, i64 noundef %47)
  store i64 %48, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 0, ptr %16, align 1, !tbaa !11
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %82, %45
  %50 = load i64, ptr %12, align 8, !tbaa !9
  %51 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 3
  %52 = load i64, ptr %51, align 8, !tbaa !13
  %53 = icmp ne i64 %50, %52
  br i1 %53, label %54, label %85

54:                                               ; preds = %49
  %55 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 6
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56) #6
  %58 = getelementptr inbounds %"struct.std::pair", ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 4, !tbaa !26
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 6
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %62) #6
  %64 = getelementptr inbounds %"struct.std::pair", ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !29
  %66 = sext i32 %65 to i64
  %67 = call noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88) %26, i64 noundef %60, i64 noundef %66)
  store i64 %67, ptr %15, align 8, !tbaa !9
  %68 = load i64, ptr %14, align 8, !tbaa !9
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = icmp eq i64 %68, %69
  br i1 %70, label %71, label %76

71:                                               ; preds = %54
  %72 = load i8, ptr %11, align 1, !tbaa !11, !range !30, !noundef !31
  %73 = trunc i8 %72 to i1
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  store i32 4, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %161

75:                                               ; preds = %71
  store i8 1, ptr %16, align 1, !tbaa !11
  br label %85

76:                                               ; preds = %54
  %77 = load i64, ptr %14, align 8, !tbaa !9
  %78 = load i64, ptr %15, align 8, !tbaa !9
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  br label %85

81:                                               ; preds = %76
  br label %82

82:                                               ; preds = %81
  %83 = load i64, ptr %12, align 8, !tbaa !9
  %84 = add i64 %83, 1
  store i64 %84, ptr %12, align 8, !tbaa !9
  br label %49, !llvm.loop !32

85:                                               ; preds = %80, %75, %49
  %86 = load i8, ptr %16, align 1, !tbaa !11, !range !30, !noundef !31
  %87 = trunc i8 %86 to i1
  br i1 %87, label %115, label %88

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 3
  %90 = load i64, ptr %89, align 8, !tbaa !13
  store i64 %90, ptr %13, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %111, %88
  %92 = load i64, ptr %13, align 8, !tbaa !9
  %93 = load i64, ptr %12, align 8, !tbaa !9
  %94 = icmp ne i64 %92, %93
  br i1 %94, label %95, label %114

95:                                               ; preds = %91
  %96 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 6
  %97 = load i64, ptr %13, align 8, !tbaa !9
  %98 = sub i64 %97, 1
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #6
  %100 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 6
  %101 = load i64, ptr %13, align 8, !tbaa !9
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #6
  %103 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %102, ptr noundef nonnull align 4 dereferenceable(8) %99)
  %104 = getelementptr inbounds %"class.elabtsaot::TDConstILoadPipeline", ptr %26, i32 0, i32 1
  %105 = load i64, ptr %13, align 8, !tbaa !9
  %106 = sub i64 %105, 1
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #6
  %108 = getelementptr inbounds %"class.elabtsaot::TDConstILoadPipeline", ptr %26, i32 0, i32 1
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %109) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %110, ptr align 8 %107, i64 16, i1 false), !tbaa.struct !34
  br label %111

111:                                              ; preds = %95
  %112 = load i64, ptr %13, align 8, !tbaa !9
  %113 = add i64 %112, -1
  store i64 %113, ptr %13, align 8, !tbaa !9
  br label %91, !llvm.loop !36

114:                                              ; preds = %91
  br label %115

115:                                              ; preds = %114, %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %116 = load i64, ptr %8, align 8, !tbaa !9
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr %19, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %118 = load i64, ptr %9, align 8, !tbaa !9
  %119 = trunc i64 %118 to i32
  store i32 %119, ptr %20, align 4, !tbaa !37
  %120 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %120, ptr %18, align 4
  %121 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 6
  %122 = load i64, ptr %12, align 8, !tbaa !9
  %123 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %122) #6
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %123, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.elabtsaot::Load", ptr %125, i32 0, i32 2
  %127 = load double, ptr %126, align 8, !tbaa !38
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.elabtsaot::Load", ptr %128, i32 0, i32 3
  %130 = load double, ptr %129, align 8, !tbaa !42
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %21, double noundef %127, double noundef %130)
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %131 = call { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %132 = getelementptr inbounds %"class.std::complex", ptr %23, i32 0, i32 0
  %133 = getelementptr inbounds { double, double }, ptr %132, i32 0, i32 0
  %134 = extractvalue { double, double } %131, 0
  store double %134, ptr %133, align 8
  %135 = getelementptr inbounds { double, double }, ptr %132, i32 0, i32 1
  %136 = extractvalue { double, double } %131, 1
  store double %136, ptr %135, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.elabtsaot::Load", ptr %137, i32 0, i32 4
  %139 = call { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %138)
  %140 = getelementptr inbounds %"class.std::complex", ptr %24, i32 0, i32 0
  %141 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 0
  %142 = extractvalue { double, double } %139, 0
  store double %142, ptr %141, align 8
  %143 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 1
  %144 = extractvalue { double, double } %139, 1
  store double %144, ptr %143, align 8
  %145 = call { double, double } @_ZStdvIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %146 = getelementptr inbounds %"class.std::complex", ptr %22, i32 0, i32 0
  %147 = getelementptr inbounds { double, double }, ptr %146, i32 0, i32 0
  %148 = extractvalue { double, double } %145, 0
  store double %148, ptr %147, align 8
  %149 = getelementptr inbounds { double, double }, ptr %146, i32 0, i32 1
  %150 = extractvalue { double, double } %145, 1
  store double %150, ptr %149, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  %151 = getelementptr inbounds %"class.elabtsaot::TDConstILoadPipeline", ptr %26, i32 0, i32 1
  %152 = load i64, ptr %12, align 8, !tbaa !9
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %152) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %153, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !34
  %154 = load i8, ptr %16, align 1, !tbaa !11, !range !30, !noundef !31
  %155 = trunc i8 %154 to i1
  br i1 %155, label %160, label %156

156:                                              ; preds = %115
  %157 = getelementptr inbounds %"class.elabtsaot::Pipeline", ptr %26, i32 0, i32 3
  %158 = load i64, ptr %157, align 8, !tbaa !13
  %159 = add i64 %158, 1
  store i64 %159, ptr %157, align 8, !tbaa !13
  br label %160

160:                                              ; preds = %156, %115
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  br label %161

161:                                              ; preds = %160, %74
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %162

162:                                              ; preds = %161, %44, %38, %32
  %163 = load i32, ptr %6, align 4
  ret i32 %163
}

declare noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) #3

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

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

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

; 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 i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZStdvIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16)) #5

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 = { 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 = { "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 = { inlinehint 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 }

!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 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 40}
!14 = !{!"_ZTSN9elabtsaot8PipelineE", !15, i64 8, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !19, i64 64}
!15 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!14, !10, i64 32}
!24 = !{!14, !10, i64 48}
!25 = !{!14, !10, i64 56}
!26 = !{!27, !28, i64 0}
!27 = !{!"_ZTSSt4pairIiiE", !28, i64 0, !28, i64 4}
!28 = !{!"int", !7, i64 0}
!29 = !{!27, !28, i64 4}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{i64 0, i64 16, !35}
!35 = !{!7, !7, i64 0}
!36 = distinct !{!36, !33}
!37 = !{!28, !28, i64 0}
!38 = !{!39, !40, i64 8}
!39 = !{!"_ZTSN9elabtsaot4LoadE", !28, i64 0, !28, i64 4, !40, i64 8, !40, i64 16, !41, i64 24, !40, i64 40, !40, i64 48, !40, i64 56, !40, i64 64}
!40 = !{!"double", !7, i64 0}
!41 = !{!"_ZTSSt7complexIdE", !7, i64 0}
!42 = !{!39, !40, i64 16}


; 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::pair" = type { i32, i32 }
%"class.std::complex" = type { { double, double } }

; 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 nounwind uwtable
declare dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #1 align 2

; 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 range(i32 0, 5) i32 @_ZN9elabtsaot20TDConstILoadPipeline14insert_elementEmmRKNS_4LoadEb(ptr noundef nonnull align 8 dereferenceable(112) %0, i64 noundef %1, i64 noundef %2, ptr noundef nonnull align 8 dereferenceable(72) %3, i1 noundef zeroext %4) local_unnamed_addr #2 align 2 {
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::complex", align 8
  %10 = alloca %"class.std::complex", align 8
  %11 = alloca %"class.std::complex", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = load i64, ptr %14, align 8, !tbaa !19
  %16 = icmp eq i64 %13, %15
  br i1 %16, label %79, label %17

17:                                               ; preds = %5
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  %19 = load i64, ptr %18, align 8, !tbaa !20
  %.not = icmp ugt i64 %19, %1
  br i1 %.not, label %20, label %79

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  %22 = load i64, ptr %21, align 8, !tbaa !21
  %.not37 = icmp ugt i64 %22, %2
  br i1 %.not37, label %23, label %79

23:                                               ; preds = %20
  %24 = tail call noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %1, i64 noundef %2)
  %25 = load i64, ptr %12, align 8, !tbaa !5
  %.not3845 = icmp eq i64 %25, 0
  br i1 %.not3845, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  br label %27

27:                                               ; preds = %.lr.ph, %40
  %.03046 = phi i64 [ 0, %.lr.ph ], [ %41, %40 ]
  %28 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.03046) #6
  %29 = load i32, ptr %28, align 4, !tbaa !22
  %30 = sext i32 %29 to i64
  %31 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.03046) #6
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !25
  %34 = sext i32 %33 to i64
  %35 = tail call noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %30, i64 noundef %34)
  %36 = icmp eq i64 %24, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %27
  br i1 %4, label %.loopexit, label %79

38:                                               ; preds = %27
  %39 = icmp ult i64 %24, %35
  %.pre.pre = load i64, ptr %12, align 8, !tbaa !5
  br i1 %39, label %._crit_edge, label %40

40:                                               ; preds = %38
  %41 = add i64 %.03046, 1
  %.not38 = icmp eq i64 %41, %.pre.pre
  br i1 %.not38, label %.loopexit, label %27, !llvm.loop !26

._crit_edge:                                      ; preds = %38
  %.not3949 = icmp eq i64 %.pre.pre, %.03046
  br i1 %.not3949, label %.loopexit, label %.lr.ph52

.lr.ph52:                                         ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  %43 = getelementptr inbounds i8, ptr %0, i64 88
  br label %44

44:                                               ; preds = %.lr.ph52, %44
  %.03250 = phi i64 [ %.pre.pre, %.lr.ph52 ], [ %45, %44 ]
  %45 = add i64 %.03250, -1
  %46 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %45) #6
  %47 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %.03250) #6
  %48 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %47, ptr noundef nonnull align 4 dereferenceable(8) %46)
  %49 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #6
  %50 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %.03250) #6
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %49, i64 16, i1 false), !tbaa.struct !28
  %.not39 = icmp eq i64 %45, %.03046
  br i1 %.not39, label %.loopexit, label %44, !llvm.loop !30

.loopexit:                                        ; preds = %40, %44, %23, %._crit_edge, %37
  %.03044 = phi i64 [ %.03046, %37 ], [ %.pre.pre, %._crit_edge ], [ 0, %23 ], [ %.03046, %44 ], [ %.pre.pre, %40 ]
  %.03142 = phi i1 [ true, %37 ], [ false, %._crit_edge ], [ false, %23 ], [ false, %44 ], [ false, %40 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %51 = trunc i64 %1 to i32
  store i32 %51, ptr %7, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %52 = trunc i64 %2 to i32
  store i32 %52, ptr %8, align 4, !tbaa !31
  %53 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %53, ptr %6, align 8
  %54 = getelementptr inbounds i8, ptr %0, i64 64
  %55 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %.03044) #6
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %55, ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %57 = getelementptr inbounds i8, ptr %3, i64 8
  %58 = load double, ptr %57, align 8, !tbaa !32
  %59 = getelementptr inbounds i8, ptr %3, i64 16
  %60 = load double, ptr %59, align 8, !tbaa !36
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %9, double noundef %58, double noundef %60)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %61 = call { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %62 = extractvalue { double, double } %61, 0
  store double %62, ptr %10, align 8
  %63 = getelementptr inbounds i8, ptr %10, i64 8
  %64 = extractvalue { double, double } %61, 1
  store double %64, ptr %63, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %65 = getelementptr inbounds i8, ptr %3, i64 24
  %66 = call { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %65)
  %67 = extractvalue { double, double } %66, 0
  store double %67, ptr %11, align 8
  %68 = getelementptr inbounds i8, ptr %11, i64 8
  %69 = extractvalue { double, double } %66, 1
  store double %69, ptr %68, align 8
  %70 = call { double, double } @_ZStdvIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %71 = extractvalue { double, double } %70, 0
  %72 = extractvalue { double, double } %70, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  %73 = getelementptr inbounds i8, ptr %0, i64 88
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %.03044) #6
  store double %71, ptr %74, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %74, i64 8
  store double %72, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !29
  br i1 %.03142, label %78, label %75

75:                                               ; preds = %.loopexit
  %76 = load i64, ptr %12, align 8, !tbaa !5
  %77 = add i64 %76, 1
  store i64 %77, ptr %12, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %75, %.loopexit
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %79

79:                                               ; preds = %78, %37, %20, %17, %5
  %.1 = phi i32 [ 1, %5 ], [ 2, %17 ], [ 3, %20 ], [ 0, %78 ], [ 4, %37 ]
  ret i32 %.1
}

declare noundef i64 @_ZNK9elabtsaot8Pipeline19calculate_pseudo_idEmm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) local_unnamed_addr #3

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

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

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

; 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 i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZStdvIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZSt4conjIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

attributes #0 = { mustprogress 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 = { 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 = { "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 = { inlinehint 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 }

!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, !14, i64 40}
!6 = !{!"_ZTSN9elabtsaot8PipelineE", !7, i64 8, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !15, i64 64}
!7 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!19 = !{!6, !14, i64 32}
!20 = !{!6, !14, i64 48}
!21 = !{!6, !14, i64 56}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTSSt4pairIiiE", !24, i64 0, !24, i64 4}
!24 = !{!"int", !12, i64 0}
!25 = !{!23, !24, i64 4}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i64 0, i64 16, !29}
!29 = !{!12, !12, i64 0}
!30 = distinct !{!30, !27}
!31 = !{!24, !24, i64 0}
!32 = !{!33, !34, i64 8}
!33 = !{!"_ZTSN9elabtsaot4LoadE", !24, i64 0, !24, i64 4, !34, i64 8, !34, i64 16, !35, i64 24, !34, i64 40, !34, i64 48, !34, i64 56, !34, i64 64}
!34 = !{!"double", !12, i64 0}
!35 = !{!"_ZTSSt7complexIdE", !12, i64 0}
!36 = !{!33, !34, i64 16}


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