; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src (Surrogate_Parameters)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.SGTELIB::Surrogate_Parameters" = type { ptr, i32, i32, i32, i32, i32, double, i32, double, i32, i32, i32, %"class.SGTELIB::Matrix", i32, i32, i32, double, double, double, double, %"class.SGTELIB::Matrix", i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32 }
%"class.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.121 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [33 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #0 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

declare void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB20Surrogate_Parameters5set_xERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  %18 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %28

21:                                               ; preds = %2
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %5, align 4, !tbaa !9
  %25 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %22, i32 noundef %23)
  %26 = fptosi double %25 to i32
  %27 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 2
  store i32 %26, ptr %27, align 4, !tbaa !25
  br label %28

28:                                               ; preds = %21, %2
  %29 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 9
  %30 = load i32, ptr %29, align 8, !tbaa !26
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %38

32:                                               ; preds = %28
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %5, align 4, !tbaa !9
  %36 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %33, i32 noundef %34)
  %37 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 8
  store double %36, ptr %37, align 8, !tbaa !27
  br label %38

38:                                               ; preds = %32, %28
  %39 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 7
  %40 = load i32, ptr %39, align 8, !tbaa !28
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %42, label %48

42:                                               ; preds = %38
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !9
  %46 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %43, i32 noundef %44)
  %47 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 6
  store double %46, ptr %47, align 8, !tbaa !29
  br label %48

48:                                               ; preds = %42, %38
  %49 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 5
  %50 = load i32, ptr %49, align 8, !tbaa !30
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %60

52:                                               ; preds = %48
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %5, align 4, !tbaa !9
  %56 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %53, i32 noundef %54)
  %57 = fptosi double %56 to i32
  %58 = call noundef i32 @_ZN7SGTELIB18int_to_kernel_typeEi(i32 noundef %57)
  %59 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 4
  store i32 %58, ptr %59, align 4, !tbaa !31
  br label %60

60:                                               ; preds = %52, %48
  %61 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 11
  %62 = load i32, ptr %61, align 8, !tbaa !32
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %72

64:                                               ; preds = %60
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %5, align 4, !tbaa !9
  %68 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %65, i32 noundef %66)
  %69 = fptosi double %68 to i32
  %70 = call noundef i32 @_ZN7SGTELIB20int_to_distance_typeEi(i32 noundef %69)
  %71 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 10
  store i32 %70, ptr %71, align 4, !tbaa !33
  br label %72

72:                                               ; preds = %64, %60
  %73 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 21
  %74 = load i32, ptr %73, align 8, !tbaa !34
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %94

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %90, %76
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 20
  %80 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %79)
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %93

83:                                               ; preds = %77
  %84 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 20
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %5, align 4, !tbaa !9
  %89 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %86, i32 noundef %87)
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %84, i32 noundef 0, i32 noundef %85, double noundef %89)
  br label %90

90:                                               ; preds = %83
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %6, align 4, !tbaa !9
  br label %77, !llvm.loop !35

93:                                               ; preds = %82
  br label %94

94:                                               ; preds = %93, %72
  %95 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 14
  %96 = load i32, ptr %95, align 4, !tbaa !37
  %97 = icmp eq i32 %96, 1
  br i1 %97, label %98, label %129

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %124, %98
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 12
  %102 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %101)
  %103 = icmp slt i32 %100, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %99
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %127

105:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %120, %105
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 12
  %109 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %108)
  %110 = icmp slt i32 %107, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %106
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %123

112:                                              ; preds = %106
  %113 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 12
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %5, align 4, !tbaa !9
  %119 = call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %116, i32 noundef %117)
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %113, i32 noundef %114, i32 noundef %115, double noundef %119)
  br label %120

120:                                              ; preds = %112
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %9, align 4, !tbaa !9
  br label %106, !llvm.loop !38

123:                                              ; preds = %111
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %7, align 4, !tbaa !9
  br label %99, !llvm.loop !39

127:                                              ; preds = %104
  %128 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 12
  call void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %128)
  br label %129

129:                                              ; preds = %127, %94
  %130 = load i32, ptr %5, align 4, !tbaa !9
  %131 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 26
  %132 = load i32, ptr %131, align 4, !tbaa !40
  %133 = icmp ne i32 %130, %132
  br i1 %133, label %134, label %165

134:                                              ; preds = %129
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.121)
  %136 = load i32, ptr %5, align 4, !tbaa !9
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %135, i32 noundef %136)
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef @.str.2)
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.122)
  %140 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %17, i32 0, i32 26
  %141 = load i32, ptr %140, align 4, !tbaa !40
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %139, i32 noundef %141)
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef @.str.2)
  store i1 true, ptr %16, align 1
  %144 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %145 unwind label %148

145:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.123, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %146 unwind label %152

146:                                              ; preds = %145
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %144, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 989, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %147 unwind label %156

147:                                              ; preds = %146
  store i1 false, ptr %16, align 1
  invoke void @__cxa_throw(ptr %144, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #7
          to label %171 unwind label %156

148:                                              ; preds = %134
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %12, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %13, align 4
  br label %161

152:                                              ; preds = %145
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %12, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %13, align 4
  br label %160

156:                                              ; preds = %147, %146
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %12, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %160

160:                                              ; preds = %156, %152
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %161

161:                                              ; preds = %160, %148
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  %162 = load i1, ptr %16, align 1
  br i1 %162, label %163, label %164

163:                                              ; preds = %161
  call void @__cxa_free_exception(ptr %144) #6
  br label %164

164:                                              ; preds = %163, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %166

165:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

166:                                              ; preds = %164
  %167 = load ptr, ptr %12, align 8
  %168 = load i32, ptr %13, align 4
  %169 = insertvalue { ptr, i32 } poison, ptr %167, 0
  %170 = insertvalue { ptr, i32 } %169, i32 %168, 1
  resume { ptr, i32 } %170

171:                                              ; preds = %147
  unreachable
}

declare noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #4

declare noundef i32 @_ZN7SGTELIB18int_to_kernel_typeEi(i32 noundef) #4

declare noundef i32 @_ZN7SGTELIB20int_to_distance_typeEi(i32 noundef) #4

declare void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 #5 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !14, i64 16}
!12 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !13, i64 8, !10, i64 12, !14, i64 16, !15, i64 20, !14, i64 24, !16, i64 32, !14, i64 40, !16, i64 48, !14, i64 56, !17, i64 60, !14, i64 64, !18, i64 72, !22, i64 128, !14, i64 132, !23, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !18, i64 176, !14, i64 232, !24, i64 236, !19, i64 240, !19, i64 272, !10, i64 304, !10, i64 308}
!13 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!15 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB6MatrixE", !19, i64 8, !10, i64 40, !10, i64 44, !6, i64 48}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!25 = !{!12, !10, i64 12}
!26 = !{!12, !14, i64 56}
!27 = !{!12, !16, i64 48}
!28 = !{!12, !14, i64 40}
!29 = !{!12, !16, i64 32}
!30 = !{!12, !14, i64 24}
!31 = !{!12, !15, i64 20}
!32 = !{!12, !14, i64 64}
!33 = !{!12, !17, i64 60}
!34 = !{!12, !14, i64 232}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!12, !14, i64 132}
!38 = distinct !{!38, !36}
!39 = distinct !{!39, !36}
!40 = !{!12, !10, i64 308}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.121 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [33 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #0 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

declare void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB20Surrogate_Parameters5set_xERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 1
  br i1 %9, label %10, label %14

10:                                               ; preds = %2
  %11 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef 0)
  %12 = fptosi double %11 to i32
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %12, ptr %13, align 4, !tbaa !23
  br label %14

14:                                               ; preds = %10, %2
  %.035 = phi i32 [ 1, %10 ], [ 0, %2 ]
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i32, ptr %15, align 8, !tbaa !24
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %18, label %22

18:                                               ; preds = %14
  %19 = add nuw nsw i32 %.035, 1
  %20 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.035)
  %21 = getelementptr inbounds i8, ptr %0, i64 48
  store double %20, ptr %21, align 8, !tbaa !25
  br label %22

22:                                               ; preds = %18, %14
  %.136 = phi i32 [ %19, %18 ], [ %.035, %14 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = load i32, ptr %23, align 8, !tbaa !26
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %30

26:                                               ; preds = %22
  %27 = add nuw nsw i32 %.136, 1
  %28 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.136)
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  store double %28, ptr %29, align 8, !tbaa !27
  br label %30

30:                                               ; preds = %26, %22
  %.237 = phi i32 [ %27, %26 ], [ %.136, %22 ]
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load i32, ptr %31, align 8, !tbaa !28
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %40

34:                                               ; preds = %30
  %35 = add nuw nsw i32 %.237, 1
  %36 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.237)
  %37 = fptosi double %36 to i32
  %38 = tail call noundef i32 @_ZN7SGTELIB18int_to_kernel_typeEi(i32 noundef %37)
  %39 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %38, ptr %39, align 4, !tbaa !29
  br label %40

40:                                               ; preds = %34, %30
  %.3 = phi i32 [ %35, %34 ], [ %.237, %30 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 64
  %42 = load i32, ptr %41, align 8, !tbaa !30
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %50

44:                                               ; preds = %40
  %45 = add nuw nsw i32 %.3, 1
  %46 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.3)
  %47 = fptosi double %46 to i32
  %48 = tail call noundef i32 @_ZN7SGTELIB20int_to_distance_typeEi(i32 noundef %47)
  %49 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %48, ptr %49, align 4, !tbaa !31
  br label %50

50:                                               ; preds = %44, %40
  %.4 = phi i32 [ %45, %44 ], [ %.3, %40 ]
  %51 = getelementptr inbounds i8, ptr %0, i64 232
  %52 = load i32, ptr %51, align 8, !tbaa !32
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %.preheader45, label %.loopexit

.preheader45:                                     ; preds = %50
  %54 = getelementptr inbounds i8, ptr %0, i64 176
  %55 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %54)
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader45, %.lr.ph
  %.03447 = phi i32 [ %59, %.lr.ph ], [ 0, %.preheader45 ]
  %.546 = phi i32 [ %57, %.lr.ph ], [ %.4, %.preheader45 ]
  %57 = add nuw nsw i32 %.546, 1
  %58 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.546)
  tail call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %54, i32 noundef 0, i32 noundef %.03447, double noundef %58)
  %59 = add nuw nsw i32 %.03447, 1
  %60 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %54)
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %.lr.ph, label %.loopexit, !llvm.loop !33

.loopexit:                                        ; preds = %.lr.ph, %.preheader45, %50
  %.6 = phi i32 [ %.4, %50 ], [ %.4, %.preheader45 ], [ %57, %.lr.ph ]
  %62 = getelementptr inbounds i8, ptr %0, i64 132
  %63 = load i32, ptr %62, align 4, !tbaa !35
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %.preheader44, label %78

.preheader44:                                     ; preds = %.loopexit
  %65 = getelementptr inbounds i8, ptr %0, i64 72
  %66 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.preheader, label %._crit_edge54

.preheader:                                       ; preds = %.preheader44, %._crit_edge
  %.03353 = phi i32 [ %70, %._crit_edge ], [ 0, %.preheader44 ]
  %.752 = phi i32 [ %.8.lcssa, %._crit_edge ], [ %.6, %.preheader44 ]
  %68 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph50, label %._crit_edge

._crit_edge54:                                    ; preds = %._crit_edge, %.preheader44
  %.7.lcssa = phi i32 [ %.6, %.preheader44 ], [ %.8.lcssa, %._crit_edge ]
  tail call void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  br label %78

._crit_edge:                                      ; preds = %.lr.ph50, %.preheader
  %.8.lcssa = phi i32 [ %.752, %.preheader ], [ %73, %.lr.ph50 ]
  %70 = add nuw nsw i32 %.03353, 1
  %71 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %.preheader, label %._crit_edge54, !llvm.loop !36

.lr.ph50:                                         ; preds = %.preheader, %.lr.ph50
  %.03249 = phi i32 [ %75, %.lr.ph50 ], [ 0, %.preheader ]
  %.848 = phi i32 [ %73, %.lr.ph50 ], [ %.752, %.preheader ]
  %73 = add nsw i32 %.848, 1
  %74 = tail call noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %.848)
  tail call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %65, i32 noundef %.03353, i32 noundef %.03249, double noundef %74)
  %75 = add nuw nsw i32 %.03249, 1
  %76 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %.lr.ph50, label %._crit_edge, !llvm.loop !37

78:                                               ; preds = %._crit_edge54, %.loopexit
  %.9 = phi i32 [ %.7.lcssa, %._crit_edge54 ], [ %.6, %.loopexit ]
  %79 = getelementptr inbounds i8, ptr %0, i64 308
  %80 = load i32, ptr %79, align 4, !tbaa !38
  %.not = icmp eq i32 %.9, %80
  br i1 %.not, label %101, label %81

81:                                               ; preds = %78
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.121)
  %83 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef %.9)
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str.2)
  %85 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.122)
  %86 = load i32, ptr %79, align 4, !tbaa !38
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %85, i32 noundef %86)
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @.str.2)
  %89 = tail call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %90 unwind label %.thread

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.123, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %91 unwind label %94

91:                                               ; preds = %90
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %89, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 989, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %92 unwind label %96

92:                                               ; preds = %91
  invoke void @__cxa_throw(ptr nonnull %89, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #7
          to label %102 unwind label %96

.thread:                                          ; preds = %81
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %99

94:                                               ; preds = %90
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %98

96:                                               ; preds = %92, %91
  %.0 = phi i1 [ false, %92 ], [ true, %91 ]
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %98

98:                                               ; preds = %94, %96
  %.pn = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ]
  %.1 = phi i1 [ %.0, %96 ], [ true, %94 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br i1 %.1, label %99, label %100

99:                                               ; preds = %.thread, %98
  %.pn.pn43 = phi { ptr, i32 } [ %93, %.thread ], [ %.pn, %98 ]
  call void @__cxa_free_exception(ptr %89) #6
  br label %100

100:                                              ; preds = %99, %98
  %.pn.pn42 = phi { ptr, i32 } [ %.pn.pn43, %99 ], [ %.pn, %98 ]
  resume { ptr, i32 } %.pn.pn42

101:                                              ; preds = %78
  ret void

102:                                              ; preds = %92
  unreachable
}

declare noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN7SGTELIB18int_to_kernel_typeEi(i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN7SGTELIB20int_to_distance_typeEi(i32 noundef) local_unnamed_addr #4

declare void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 #5 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 16}
!6 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !7, i64 8, !10, i64 12, !11, i64 16, !12, i64 20, !11, i64 24, !13, i64 32, !11, i64 40, !13, i64 48, !11, i64 56, !14, i64 60, !11, i64 64, !15, i64 72, !20, i64 128, !11, i64 132, !21, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !15, i64 176, !11, i64 232, !22, i64 236, !16, i64 240, !16, i64 272, !10, i64 304, !10, i64 308}
!7 = !{!"_ZTSN7SGTELIB7model_tE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN7SGTELIB14param_status_tE", !8, i64 0}
!12 = !{!"_ZTSN7SGTELIB8kernel_tE", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!"_ZTSN7SGTELIB10distance_tE", !8, i64 0}
!15 = !{!"_ZTSN7SGTELIB6MatrixE", !16, i64 8, !10, i64 40, !10, i64 44, !18, i64 48}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !19, i64 8, !8, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_ZTSN7SGTELIB8weight_tE", !8, i64 0}
!21 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !8, i64 0}
!22 = !{!"_ZTSN7SGTELIB8metric_tE", !8, i64 0}
!23 = !{!6, !10, i64 12}
!24 = !{!6, !11, i64 56}
!25 = !{!6, !13, i64 48}
!26 = !{!6, !11, i64 40}
!27 = !{!6, !13, i64 32}
!28 = !{!6, !11, i64 24}
!29 = !{!6, !12, i64 20}
!30 = !{!6, !11, i64 64}
!31 = !{!6, !14, i64 60}
!32 = !{!6, !11, i64 232}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!6, !11, i64 132}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}
!38 = !{!6, !10, i64 308}


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