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

; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, 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 }

@_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.120 = external hidden unnamed_addr constant [2 x i8], align 1
@.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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1

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

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

; 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 #3 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) #4

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 #3 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) #5

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB20Surrogate_Parameters5get_xEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(312) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.120, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %21 unwind label %35

21:                                               ; preds = %2
  %22 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 26
  %23 = load i32, ptr %22, align 4, !tbaa !9
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1, i32 noundef %23)
          to label %24 unwind label %39

24:                                               ; preds = %21
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !24
  %25 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !25
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %48

28:                                               ; preds = %24
  %29 = load i32, ptr %10, align 4, !tbaa !24
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %10, align 4, !tbaa !24
  %31 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !26
  %33 = sitofp i32 %32 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %29, double noundef %33)
          to label %34 unwind label %44

34:                                               ; preds = %28
  br label %48

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %9, align 4
  br label %43

39:                                               ; preds = %21
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %8, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %43

43:                                               ; preds = %39, %35
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  br label %212

44:                                               ; preds = %183, %179, %177, %175, %172, %170, %83, %72, %62, %52, %28
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  br label %209

48:                                               ; preds = %34, %24
  %49 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 9
  %50 = load i32, ptr %49, align 8, !tbaa !27
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %58

52:                                               ; preds = %48
  %53 = load i32, ptr %10, align 4, !tbaa !24
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %10, align 4, !tbaa !24
  %55 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 8
  %56 = load double, ptr %55, align 8, !tbaa !28
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %53, double noundef %56)
          to label %57 unwind label %44

57:                                               ; preds = %52
  br label %58

58:                                               ; preds = %57, %48
  %59 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 7
  %60 = load i32, ptr %59, align 8, !tbaa !29
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %68

62:                                               ; preds = %58
  %63 = load i32, ptr %10, align 4, !tbaa !24
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !24
  %65 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 6
  %66 = load double, ptr %65, align 8, !tbaa !30
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %63, double noundef %66)
          to label %67 unwind label %44

67:                                               ; preds = %62
  br label %68

68:                                               ; preds = %67, %58
  %69 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 5
  %70 = load i32, ptr %69, align 8, !tbaa !31
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %72, label %79

72:                                               ; preds = %68
  %73 = load i32, ptr %10, align 4, !tbaa !24
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %10, align 4, !tbaa !24
  %75 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 4
  %76 = load i32, ptr %75, align 4, !tbaa !32
  %77 = uitofp i32 %76 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %73, double noundef %77)
          to label %78 unwind label %44

78:                                               ; preds = %72
  br label %79

79:                                               ; preds = %78, %68
  %80 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 11
  %81 = load i32, ptr %80, align 8, !tbaa !33
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %90

83:                                               ; preds = %79
  %84 = load i32, ptr %10, align 4, !tbaa !24
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %10, align 4, !tbaa !24
  %86 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 10
  %87 = load i32, ptr %86, align 4, !tbaa !34
  %88 = uitofp i32 %87 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %84, double noundef %88)
          to label %89 unwind label %44

89:                                               ; preds = %83
  br label %90

90:                                               ; preds = %89, %79
  %91 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 21
  %92 = load i32, ptr %91, align 8, !tbaa !35
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %119

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !24
  br label %95

95:                                               ; preds = %115, %94
  %96 = load i32, ptr %11, align 4, !tbaa !24
  %97 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 20
  %98 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %97)
          to label %99 unwind label %102

99:                                               ; preds = %95
  %100 = icmp slt i32 %96, %98
  br i1 %100, label %106, label %101

101:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %118

102:                                              ; preds = %112, %106, %95
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %209

106:                                              ; preds = %99
  %107 = load i32, ptr %10, align 4, !tbaa !24
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %10, align 4, !tbaa !24
  %109 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 20
  %110 = load i32, ptr %11, align 4, !tbaa !24
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %109, i32 noundef %110)
          to label %112 unwind label %102

112:                                              ; preds = %106
  %113 = load double, ptr %111, align 8, !tbaa !36
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %107, double noundef %113)
          to label %114 unwind label %102

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %11, align 4, !tbaa !24
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %11, align 4, !tbaa !24
  br label %95, !llvm.loop !37

118:                                              ; preds = %101
  br label %119

119:                                              ; preds = %118, %90
  %120 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 14
  %121 = load i32, ptr %120, align 4, !tbaa !39
  %122 = icmp eq i32 %121, 1
  br i1 %122, label %123, label %165

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !24
  br label %124

124:                                              ; preds = %160, %123
  %125 = load i32, ptr %12, align 4, !tbaa !24
  %126 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 12
  %127 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %126)
          to label %128 unwind label %131

128:                                              ; preds = %124
  %129 = icmp slt i32 %125, %127
  br i1 %129, label %135, label %130

130:                                              ; preds = %128
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %164

131:                                              ; preds = %124
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  br label %163

135:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !24
  br label %136

136:                                              ; preds = %156, %135
  %137 = load i32, ptr %14, align 4, !tbaa !24
  %138 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 12
  %139 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %138)
          to label %140 unwind label %143

140:                                              ; preds = %136
  %141 = icmp slt i32 %137, %139
  br i1 %141, label %147, label %142

142:                                              ; preds = %140
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %159

143:                                              ; preds = %154, %147, %136
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %163

147:                                              ; preds = %140
  %148 = load i32, ptr %10, align 4, !tbaa !24
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %10, align 4, !tbaa !24
  %150 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 12
  %151 = load i32, ptr %12, align 4, !tbaa !24
  %152 = load i32, ptr %14, align 4, !tbaa !24
  %153 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %150, i32 noundef %151, i32 noundef %152)
          to label %154 unwind label %143

154:                                              ; preds = %147
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %148, double noundef %153)
          to label %155 unwind label %143

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %14, align 4, !tbaa !24
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %14, align 4, !tbaa !24
  br label %136, !llvm.loop !40

159:                                              ; preds = %142
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %12, align 4, !tbaa !24
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %12, align 4, !tbaa !24
  br label %124, !llvm.loop !41

163:                                              ; preds = %143, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %209

164:                                              ; preds = %130
  br label %165

165:                                              ; preds = %164, %119
  %166 = load i32, ptr %10, align 4, !tbaa !24
  %167 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 26
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = icmp ne i32 %166, %168
  br i1 %169, label %170, label %207

170:                                              ; preds = %165
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.121)
          to label %172 unwind label %44

172:                                              ; preds = %170
  %173 = load i32, ptr %10, align 4, !tbaa !24
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %171, i32 noundef %173)
          to label %175 unwind label %44

175:                                              ; preds = %172
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef @.str.2)
          to label %177 unwind label %44

177:                                              ; preds = %175
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.122)
          to label %179 unwind label %44

179:                                              ; preds = %177
  %180 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %20, i32 0, i32 26
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %178, i32 noundef %181)
          to label %183 unwind label %44

183:                                              ; preds = %179
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str.2)
          to label %185 unwind label %44

185:                                              ; preds = %183
  store i1 true, ptr %19, align 1
  %186 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %187 unwind label %190

187:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.123, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %188 unwind label %194

188:                                              ; preds = %187
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %186, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 950, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %189 unwind label %198

189:                                              ; preds = %188
  store i1 false, ptr %19, align 1
  invoke void @__cxa_throw(ptr %186, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %217 unwind label %198

190:                                              ; preds = %185
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %8, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %9, align 4
  br label %203

194:                                              ; preds = %187
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %8, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %9, align 4
  br label %202

198:                                              ; preds = %189, %188
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %8, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %202

202:                                              ; preds = %198, %194
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %203

203:                                              ; preds = %202, %190
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %204 = load i1, ptr %19, align 1
  br i1 %204, label %205, label %206

205:                                              ; preds = %203
  call void @__cxa_free_exception(ptr %186) #7
  br label %206

206:                                              ; preds = %205, %203
  br label %209

207:                                              ; preds = %165
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %208 = load i1, ptr %5, align 1
  br i1 %208, label %211, label %210

209:                                              ; preds = %206, %163, %102, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %212

210:                                              ; preds = %207
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %211

211:                                              ; preds = %210, %207
  ret void

212:                                              ; preds = %209, %43
  %213 = load ptr, ptr %8, align 8
  %214 = load i32, ptr %9, align 4
  %215 = insertvalue { ptr, i32 } poison, ptr %213, 0
  %216 = insertvalue { ptr, i32 } %215, i32 %214, 1
  resume { ptr, i32 } %216

217:                                              ; preds = %189
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef) #6 align 2

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 = { nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !12, i64 308}
!10 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !11, i64 8, !12, i64 12, !13, i64 16, !14, i64 20, !13, i64 24, !15, i64 32, !13, i64 40, !15, i64 48, !13, i64 56, !16, i64 60, !13, i64 64, !17, i64 72, !21, i64 128, !13, i64 132, !22, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !17, i64 176, !13, i64 232, !23, i64 236, !18, i64 240, !18, i64 272, !12, i64 304, !12, i64 308}
!11 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!17 = !{!"_ZTSN7SGTELIB6MatrixE", !18, i64 8, !12, i64 40, !12, i64 44, !6, i64 48}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!22 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!24 = !{!12, !12, i64 0}
!25 = !{!10, !13, i64 16}
!26 = !{!10, !12, i64 12}
!27 = !{!10, !13, i64 56}
!28 = !{!10, !15, i64 48}
!29 = !{!10, !13, i64 40}
!30 = !{!10, !15, i64 32}
!31 = !{!10, !13, i64 24}
!32 = !{!10, !14, i64 20}
!33 = !{!10, !13, i64 64}
!34 = !{!10, !16, i64 60}
!35 = !{!10, !13, i64 232}
!36 = !{!15, !15, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!10, !13, i64 132}
!40 = distinct !{!40, !38}
!41 = distinct !{!41, !38}


; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, 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.120 = external hidden unnamed_addr constant [2 x i8], align 1
@.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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1

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

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

; 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 #3 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 #4

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 #3 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 #5

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB20Surrogate_Parameters5get_xEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(312) %1) local_unnamed_addr #3 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 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.120, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %9 unwind label %20

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 308
  %11 = load i32, ptr %10, align 4, !tbaa !5
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 1, i32 noundef %11)
          to label %12 unwind label %22

12:                                               ; preds = %9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load i32, ptr %13, align 8, !tbaa !23
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %16, label %27

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %1, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !24
  %19 = sitofp i32 %18 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef 0, double noundef %19)
          to label %27 unwind label %25

20:                                               ; preds = %2
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %9
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %24

24:                                               ; preds = %22, %20
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %125

25:                                               ; preds = %109, %106, %104, %102, %100, %98, %56, %47, %39, %31, %16
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %123

27:                                               ; preds = %16, %12
  %.025 = phi i32 [ 1, %16 ], [ 0, %12 ]
  %28 = getelementptr inbounds i8, ptr %1, i64 56
  %29 = load i32, ptr %28, align 8, !tbaa !25
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %35

31:                                               ; preds = %27
  %32 = add nuw nsw i32 %.025, 1
  %33 = getelementptr inbounds i8, ptr %1, i64 48
  %34 = load double, ptr %33, align 8, !tbaa !26
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.025, double noundef %34)
          to label %35 unwind label %25

35:                                               ; preds = %31, %27
  %.126 = phi i32 [ %32, %31 ], [ %.025, %27 ]
  %36 = getelementptr inbounds i8, ptr %1, i64 40
  %37 = load i32, ptr %36, align 8, !tbaa !27
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = add nuw nsw i32 %.126, 1
  %41 = getelementptr inbounds i8, ptr %1, i64 32
  %42 = load double, ptr %41, align 8, !tbaa !28
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.126, double noundef %42)
          to label %43 unwind label %25

43:                                               ; preds = %39, %35
  %.227 = phi i32 [ %40, %39 ], [ %.126, %35 ]
  %44 = getelementptr inbounds i8, ptr %1, i64 24
  %45 = load i32, ptr %44, align 8, !tbaa !29
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %52

47:                                               ; preds = %43
  %48 = add nuw nsw i32 %.227, 1
  %49 = getelementptr inbounds i8, ptr %1, i64 20
  %50 = load i32, ptr %49, align 4, !tbaa !30
  %51 = uitofp i32 %50 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.227, double noundef %51)
          to label %52 unwind label %25

52:                                               ; preds = %47, %43
  %.3 = phi i32 [ %48, %47 ], [ %.227, %43 ]
  %53 = getelementptr inbounds i8, ptr %1, i64 64
  %54 = load i32, ptr %53, align 8, !tbaa !31
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %61

56:                                               ; preds = %52
  %57 = add nuw nsw i32 %.3, 1
  %58 = getelementptr inbounds i8, ptr %1, i64 60
  %59 = load i32, ptr %58, align 4, !tbaa !32
  %60 = uitofp i32 %59 to double
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.3, double noundef %60)
          to label %61 unwind label %25

61:                                               ; preds = %56, %52
  %.4 = phi i32 [ %57, %56 ], [ %.3, %52 ]
  %62 = getelementptr inbounds i8, ptr %1, i64 232
  %63 = load i32, ptr %62, align 8, !tbaa !33
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %.preheader49, label %.loopexit50

.preheader49:                                     ; preds = %61
  %65 = getelementptr inbounds i8, ptr %1, i64 176
  %66 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %65)
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph, label %.loopexit50

68:                                               ; preds = %72, %.lr.ph
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph:                                           ; preds = %.preheader49, %74
  %.02455 = phi i32 [ %75, %74 ], [ 0, %.preheader49 ]
  %.554 = phi i32 [ %70, %74 ], [ %.4, %.preheader49 ]
  %70 = add nuw nsw i32 %.554, 1
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %65, i32 noundef %.02455)
          to label %72 unwind label %68

72:                                               ; preds = %.lr.ph
  %73 = load double, ptr %71, align 8, !tbaa !34
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.554, double noundef %73)
          to label %74 unwind label %68

74:                                               ; preds = %72
  %75 = add nuw nsw i32 %.02455, 1
  %76 = 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.ph, label %.loopexit50, !llvm.loop !35

.loopexit50:                                      ; preds = %74, %.preheader49, %61
  %.6 = phi i32 [ %.4, %61 ], [ %.4, %.preheader49 ], [ %70, %74 ]
  %78 = getelementptr inbounds i8, ptr %1, i64 132
  %79 = load i32, ptr %78, align 4, !tbaa !37
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %.preheader48, label %.loopexit

.preheader48:                                     ; preds = %.loopexit50
  %81 = getelementptr inbounds i8, ptr %1, i64 72
  %82 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %81)
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.preheader48, %._crit_edge
  %.02361 = phi i32 [ %86, %._crit_edge ], [ 0, %.preheader48 ]
  %.760 = phi i32 [ %.8.lcssa, %._crit_edge ], [ %.6, %.preheader48 ]
  %84 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %81)
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %.lr.ph58, label %._crit_edge

._crit_edge:                                      ; preds = %92, %.preheader
  %.8.lcssa = phi i32 [ %.760, %.preheader ], [ %93, %92 ]
  %86 = add nuw nsw i32 %.02361, 1
  %87 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %81)
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %.preheader, label %.loopexit, !llvm.loop !38

89:                                               ; preds = %.lr.ph58
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph58:                                         ; preds = %.preheader, %92
  %.02257 = phi i32 [ %94, %92 ], [ 0, %.preheader ]
  %.856 = phi i32 [ %93, %92 ], [ %.760, %.preheader ]
  %91 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %81, i32 noundef %.02361, i32 noundef %.02257)
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.856, double noundef %91)
          to label %92 unwind label %89

92:                                               ; preds = %.lr.ph58
  %93 = add nsw i32 %.856, 1
  %94 = add nuw nsw i32 %.02257, 1
  %95 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %81)
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %.lr.ph58, label %._crit_edge, !llvm.loop !39

.loopexit:                                        ; preds = %._crit_edge, %.preheader48, %.loopexit50
  %.9 = phi i32 [ %.6, %.loopexit50 ], [ %.6, %.preheader48 ], [ %.8.lcssa, %._crit_edge ]
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %.not = icmp eq i32 %.9, %97
  br i1 %.not, label %124, label %98

98:                                               ; preds = %.loopexit
  %99 = invoke 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)
          to label %100 unwind label %25

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef %.9)
          to label %102 unwind label %25

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str.2)
          to label %104 unwind label %25

104:                                              ; preds = %102
  %105 = invoke 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)
          to label %106 unwind label %25

106:                                              ; preds = %104
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %105, i32 noundef %107)
          to label %109 unwind label %25

109:                                              ; preds = %106
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @.str.2)
          to label %111 unwind label %25

111:                                              ; preds = %109
  %112 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %113 unwind label %.thread

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.123, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %114 unwind label %117

114:                                              ; preds = %113
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %112, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 950, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %115 unwind label %119

115:                                              ; preds = %114
  invoke void @__cxa_throw(ptr nonnull %112, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %126 unwind label %119

.thread:                                          ; preds = %111
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %122

117:                                              ; preds = %113
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %121

119:                                              ; preds = %115, %114
  %.0 = phi i1 [ false, %115 ], [ true, %114 ]
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %121

121:                                              ; preds = %117, %119
  %.pn39 = phi { ptr, i32 } [ %120, %119 ], [ %118, %117 ]
  %.1 = phi i1 [ %.0, %119 ], [ true, %117 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br i1 %.1, label %122, label %123

122:                                              ; preds = %.thread, %121
  %.pn39.pn47 = phi { ptr, i32 } [ %116, %.thread ], [ %.pn39, %121 ]
  call void @__cxa_free_exception(ptr %112) #7
  br label %123

123:                                              ; preds = %121, %122, %89, %68, %25
  %.pn42 = phi { ptr, i32 } [ %69, %68 ], [ %90, %89 ], [ %.pn39.pn47, %122 ], [ %.pn39, %121 ], [ %26, %25 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %125

124:                                              ; preds = %.loopexit
  ret void

125:                                              ; preds = %123, %24
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %123 ], [ %.pn, %24 ]
  resume { ptr, i32 } %.pn42.pn

126:                                              ; preds = %115
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #5

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

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

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 = { nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !10, i64 308}
!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, !11, i64 16}
!24 = !{!6, !10, i64 12}
!25 = !{!6, !11, i64 56}
!26 = !{!6, !13, i64 48}
!27 = !{!6, !11, i64 40}
!28 = !{!6, !13, i64 32}
!29 = !{!6, !11, i64 24}
!30 = !{!6, !12, i64 20}
!31 = !{!6, !11, i64 64}
!32 = !{!6, !14, i64 60}
!33 = !{!6, !11, i64 232}
!34 = !{!13, !13, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!6, !11, i64 132}
!38 = distinct !{!38, !36}
!39 = distinct !{!39, !36}


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