; 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.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.3 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.126 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [11 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #4 align 2

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

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 #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters5get_xEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(312)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters12get_x_boundsEPNS_6MatrixES2_PNS_14param_domain_tEPb(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4 align 2

declare noundef i32 @_ZN7SGTELIB5roundEd(double noundef) #6

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

26:                                               ; preds = %1
  %27 = icmp ne i32 %25, 1
  br i1 %27, label %28, label %35

28:                                               ; preds = %26
  store i8 1, ptr %4, align 1, !tbaa !9
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.142)
          to label %30 unwind label %31

30:                                               ; preds = %28
  br label %35

31:                                               ; preds = %28, %1
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %5, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %6, align 4
  br label %314

35:                                               ; preds = %30, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  %36 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %24, i32 0, i32 26
  %37 = load i32, ptr %36, align 4, !tbaa !11
  store i32 %37, ptr %7, align 4, !tbaa !26
  %38 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %39 unwind label %45

39:                                               ; preds = %35
  %40 = load i32, ptr %7, align 4, !tbaa !26
  %41 = icmp ne i32 %38, %40
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  store i8 1, ptr %4, align 1, !tbaa !9
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.143)
          to label %44 unwind label %45

44:                                               ; preds = %42
  br label %49

45:                                               ; preds = %42, %35
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %6, align 4
  br label %313

49:                                               ; preds = %44, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %50 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #11
          to label %51 unwind label %83

51:                                               ; preds = %49
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.144, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %52 unwind label %87

52:                                               ; preds = %51
  %53 = load i32, ptr %7, align 4, !tbaa !26
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %50, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1, i32 noundef %53)
          to label %54 unwind label %91

54:                                               ; preds = %52
  store i1 false, ptr %11, align 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #10
  store ptr %50, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %55 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #11
          to label %56 unwind label %99

56:                                               ; preds = %54
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.145, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %57 unwind label %103

57:                                               ; preds = %56
  %58 = load i32, ptr %7, align 4, !tbaa !26
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %55, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef 1, i32 noundef %58)
          to label %59 unwind label %107

59:                                               ; preds = %57
  store i1 false, ptr %15, align 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #10
  store ptr %55, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %60 = load i32, ptr %7, align 4, !tbaa !26
  %61 = sext i32 %60 to i64
  %62 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %61, i64 4)
  %63 = extractvalue { i64, i1 } %62, 1
  %64 = extractvalue { i64, i1 } %62, 0
  %65 = select i1 %63, i64 -1, i64 %64
  %66 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %65) #11
          to label %67 unwind label %115

67:                                               ; preds = %59
  store ptr %66, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %68 = load i32, ptr %7, align 4, !tbaa !26
  %69 = sext i32 %68 to i64
  %70 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %69) #11
          to label %71 unwind label %119

71:                                               ; preds = %67
  store ptr %70, ptr %17, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB20Surrogate_Parameters12get_x_boundsEPNS_6MatrixES2_PNS_14param_domain_tEPb(ptr noundef nonnull align 8 dereferenceable(312) %24, ptr noundef %72, ptr noundef %73, ptr noundef %74, ptr noundef %75)
          to label %76 unwind label %119

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

77:                                               ; preds = %251, %76
  %78 = load i32, ptr %18, align 4, !tbaa !26
  %79 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %24, i32 0, i32 26
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %123, label %82

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

83:                                               ; preds = %49
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %5, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %6, align 4
  br label %312

87:                                               ; preds = %51
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %5, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %6, align 4
  br label %95

91:                                               ; preds = %52
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %5, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  br label %95

95:                                               ; preds = %91, %87
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #10
  %96 = load i1, ptr %11, align 1
  br i1 %96, label %97, label %98

97:                                               ; preds = %95
  call void @_ZdlPvm(ptr noundef %50, i64 noundef 56) #12
  br label %98

98:                                               ; preds = %97, %95
  br label %312

99:                                               ; preds = %54
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %5, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %6, align 4
  br label %311

103:                                              ; preds = %56
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %5, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %6, align 4
  br label %111

107:                                              ; preds = %57
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %5, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  br label %111

111:                                              ; preds = %107, %103
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #10
  %112 = load i1, ptr %15, align 1
  br i1 %112, label %113, label %114

113:                                              ; preds = %111
  call void @_ZdlPvm(ptr noundef %55, i64 noundef 56) #12
  br label %114

114:                                              ; preds = %113, %111
  br label %311

115:                                              ; preds = %59
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %5, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %6, align 4
  br label %310

119:                                              ; preds = %259, %254, %71, %67
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %5, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %6, align 4
  br label %309

123:                                              ; preds = %77
  %124 = load i32, ptr %18, align 4, !tbaa !26
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %124)
          to label %126 unwind label %141

126:                                              ; preds = %123
  %127 = load double, ptr %125, align 8, !tbaa !27
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i32, ptr %18, align 4, !tbaa !26
  %130 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %128, i32 noundef %129)
          to label %131 unwind label %141

131:                                              ; preds = %126
  %132 = fcmp olt double %127, %130
  br i1 %132, label %133, label %145

133:                                              ; preds = %131
  store i8 1, ptr %4, align 1, !tbaa !9
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.146)
          to label %135 unwind label %141

135:                                              ; preds = %133
  %136 = load i32, ptr %18, align 4, !tbaa !26
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %134, i32 noundef %136)
          to label %138 unwind label %141

138:                                              ; preds = %135
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef @.str.147)
          to label %140 unwind label %141

140:                                              ; preds = %138
  br label %145

141:                                              ; preds = %247, %244, %242, %238, %235, %232, %230, %227, %225, %223, %220, %218, %212, %206, %202, %199, %196, %194, %191, %189, %187, %184, %182, %175, %172, %169, %160, %157, %155, %148, %145, %138, %135, %133, %126, %123
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  br label %309

145:                                              ; preds = %140, %131
  %146 = load i32, ptr %18, align 4, !tbaa !26
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %146)
          to label %148 unwind label %141

148:                                              ; preds = %145
  %149 = load double, ptr %147, align 8, !tbaa !27
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = load i32, ptr %18, align 4, !tbaa !26
  %152 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %150, i32 noundef %151)
          to label %153 unwind label %141

153:                                              ; preds = %148
  %154 = fcmp ogt double %149, %152
  br i1 %154, label %155, label %163

155:                                              ; preds = %153
  store i8 1, ptr %4, align 1, !tbaa !9
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.146)
          to label %157 unwind label %141

157:                                              ; preds = %155
  %158 = load i32, ptr %18, align 4, !tbaa !26
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %156, i32 noundef %158)
          to label %160 unwind label %141

160:                                              ; preds = %157
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef @.str.148)
          to label %162 unwind label %141

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162, %153
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = load i32, ptr %18, align 4, !tbaa !26
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %164, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !28
  switch i32 %168, label %250 [
    i32 0, label %250
    i32 1, label %169
    i32 3, label %169
    i32 2, label %206
    i32 4, label %242
  ]

169:                                              ; preds = %163, %163
  %170 = load i32, ptr %18, align 4, !tbaa !26
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %170)
          to label %172 unwind label %141

172:                                              ; preds = %169
  %173 = load double, ptr %171, align 8, !tbaa !27
  %174 = invoke noundef i32 @_ZN7SGTELIB5roundEd(double noundef %173)
          to label %175 unwind label %141

175:                                              ; preds = %172
  %176 = sitofp i32 %174 to double
  %177 = load i32, ptr %18, align 4, !tbaa !26
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %177)
          to label %179 unwind label %141

179:                                              ; preds = %175
  %180 = load double, ptr %178, align 8, !tbaa !27
  %181 = fcmp une double %176, %180
  br i1 %181, label %182, label %205

182:                                              ; preds = %179
  store i8 1, ptr %4, align 1, !tbaa !9
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.126)
          to label %184 unwind label %141

184:                                              ; preds = %182
  %185 = load i32, ptr %18, align 4, !tbaa !26
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %183, i32 noundef %185)
          to label %187 unwind label %141

187:                                              ; preds = %184
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %186, ptr noundef @.str.134)
          to label %189 unwind label %141

189:                                              ; preds = %187
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.146)
          to label %191 unwind label %141

191:                                              ; preds = %189
  %192 = load i32, ptr %18, align 4, !tbaa !26
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef %192)
          to label %194 unwind label %141

194:                                              ; preds = %191
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef @.str.149)
          to label %196 unwind label %141

196:                                              ; preds = %194
  %197 = load i32, ptr %18, align 4, !tbaa !26
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %197)
          to label %199 unwind label %141

199:                                              ; preds = %196
  %200 = load double, ptr %198, align 8, !tbaa !27
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %195, double noundef %200)
          to label %202 unwind label %141

202:                                              ; preds = %199
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %201, ptr noundef @.str.150)
          to label %204 unwind label %141

204:                                              ; preds = %202
  br label %205

205:                                              ; preds = %204, %179
  br label %250

206:                                              ; preds = %163
  %207 = load i32, ptr %18, align 4, !tbaa !26
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %207)
          to label %209 unwind label %141

209:                                              ; preds = %206
  %210 = load double, ptr %208, align 8, !tbaa !27
  %211 = fcmp une double %210, 0.000000e+00
  br i1 %211, label %212, label %241

212:                                              ; preds = %209
  %213 = load i32, ptr %18, align 4, !tbaa !26
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %213)
          to label %215 unwind label %141

215:                                              ; preds = %212
  %216 = load double, ptr %214, align 8, !tbaa !27
  %217 = fcmp une double %216, 1.000000e+00
  br i1 %217, label %218, label %241

218:                                              ; preds = %215
  store i8 1, ptr %4, align 1, !tbaa !9
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.126)
          to label %220 unwind label %141

220:                                              ; preds = %218
  %221 = load i32, ptr %18, align 4, !tbaa !26
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %219, i32 noundef %221)
          to label %223 unwind label %141

223:                                              ; preds = %220
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %222, ptr noundef @.str.137)
          to label %225 unwind label %141

225:                                              ; preds = %223
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.146)
          to label %227 unwind label %141

227:                                              ; preds = %225
  %228 = load i32, ptr %18, align 4, !tbaa !26
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %226, i32 noundef %228)
          to label %230 unwind label %141

230:                                              ; preds = %227
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef @.str.149)
          to label %232 unwind label %141

232:                                              ; preds = %230
  %233 = load i32, ptr %18, align 4, !tbaa !26
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %233)
          to label %235 unwind label %141

235:                                              ; preds = %232
  %236 = load double, ptr %234, align 8, !tbaa !27
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %231, double noundef %236)
          to label %238 unwind label %141

238:                                              ; preds = %235
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %237, ptr noundef @.str.151)
          to label %240 unwind label %141

240:                                              ; preds = %238
  br label %241

241:                                              ; preds = %240, %215, %209
  br label %250

242:                                              ; preds = %163
  store i8 1, ptr %4, align 1, !tbaa !9
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.126)
          to label %244 unwind label %141

244:                                              ; preds = %242
  %245 = load i32, ptr %18, align 4, !tbaa !26
  %246 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %243, i32 noundef %245)
          to label %247 unwind label %141

247:                                              ; preds = %244
  %248 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %246, ptr noundef @.str.140)
          to label %249 unwind label %141

249:                                              ; preds = %247
  br label %250

250:                                              ; preds = %249, %241, %205, %163, %163
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %18, align 4, !tbaa !26
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %18, align 4, !tbaa !26
  br label %77, !llvm.loop !30

254:                                              ; preds = %82
  %255 = getelementptr inbounds %"class.SGTELIB::Surrogate_Parameters", ptr %24, i32 0, i32 20
  %256 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %255)
          to label %257 unwind label %119

257:                                              ; preds = %254
  %258 = icmp sgt i32 %256, 1
  br i1 %258, label %259, label %262

259:                                              ; preds = %257
  store i8 1, ptr %4, align 1, !tbaa !9
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.152)
          to label %261 unwind label %119

261:                                              ; preds = %259
  br label %262

262:                                              ; preds = %261, %257
  %263 = load i8, ptr %4, align 1, !tbaa !9, !range !32, !noundef !33
  %264 = trunc i8 %263 to i1
  br i1 %264, label %265, label %287

265:                                              ; preds = %262
  store i1 true, ptr %23, align 1
  %266 = call ptr @__cxa_allocate_exception(i64 112) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %267 unwind label %270

267:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.153, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %268 unwind label %274

268:                                              ; preds = %267
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %266, ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef 1237, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %269 unwind label %278

269:                                              ; preds = %268
  store i1 false, ptr %23, align 1
  invoke void @__cxa_throw(ptr %266, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #13
          to label %320 unwind label %278

270:                                              ; preds = %265
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %5, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %6, align 4
  br label %283

274:                                              ; preds = %267
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %5, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %6, align 4
  br label %282

278:                                              ; preds = %269, %268
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %5, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  br label %282

282:                                              ; preds = %278, %274
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  br label %283

283:                                              ; preds = %282, %270
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #10
  %284 = load i1, ptr %23, align 1
  br i1 %284, label %285, label %286

285:                                              ; preds = %283
  call void @__cxa_free_exception(ptr %266) #10
  br label %286

286:                                              ; preds = %285, %283
  br label %309

287:                                              ; preds = %262
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  %289 = icmp eq ptr %288, null
  br i1 %289, label %294, label %290

290:                                              ; preds = %287
  %291 = load ptr, ptr %288, align 8, !tbaa !34
  %292 = getelementptr inbounds ptr, ptr %291, i64 1
  %293 = load ptr, ptr %292, align 8
  call void %293(ptr noundef nonnull align 8 dereferenceable(56) %288) #10
  br label %294

294:                                              ; preds = %290, %287
  %295 = load ptr, ptr %12, align 8, !tbaa !5
  %296 = icmp eq ptr %295, null
  br i1 %296, label %301, label %297

297:                                              ; preds = %294
  %298 = load ptr, ptr %295, align 8, !tbaa !34
  %299 = getelementptr inbounds ptr, ptr %298, i64 1
  %300 = load ptr, ptr %299, align 8
  call void %300(ptr noundef nonnull align 8 dereferenceable(56) %295) #10
  br label %301

301:                                              ; preds = %297, %294
  %302 = load ptr, ptr %16, align 8, !tbaa !5
  %303 = icmp eq ptr %302, null
  br i1 %303, label %305, label %304

304:                                              ; preds = %301
  call void @_ZdaPv(ptr noundef %302) #12
  br label %305

305:                                              ; preds = %304, %301
  %306 = load i8, ptr %4, align 1, !tbaa !9, !range !32, !noundef !33
  %307 = trunc i8 %306 to i1
  %308 = xor i1 %307, true
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #10
  ret i1 %308

309:                                              ; preds = %286, %141, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %310

310:                                              ; preds = %309, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %311

311:                                              ; preds = %310, %114, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %312

312:                                              ; preds = %311, %98, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %313

313:                                              ; preds = %312, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  br label %314

314:                                              ; preds = %313, %31
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #10
  br label %315

315:                                              ; preds = %314
  %316 = load ptr, ptr %5, align 8
  %317 = load i32, ptr %6, align 4
  %318 = insertvalue { ptr, i32 } poison, ptr %316, 0
  %319 = insertvalue { ptr, i32 } %318, i32 %317, 1
  resume { ptr, i32 } %319

320:                                              ; preds = %269
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #9

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #8

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


; 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.3 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.126 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [11 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #4 align 2

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

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 #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters5get_xEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters12get_x_boundsEPNS_6MatrixES2_PNS_14param_domain_tEPb(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

declare noundef i32 @_ZN7SGTELIB5roundEd(double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB20Surrogate_Parameters7check_xEv(ptr noundef nonnull align 8 dereferenceable(312) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SGTELIB::Matrix", align 8
  %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
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #9
  call void @_ZN7SGTELIB20Surrogate_Parameters5get_xEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %2, ptr noundef nonnull align 8 dereferenceable(312) %0)
  %11 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %.not = icmp ne i32 %11, 1
  br i1 %.not, label %12, label %16

12:                                               ; preds = %1
  %13 = 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.142)
          to label %16 unwind label %14

14:                                               ; preds = %12
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %182

16:                                               ; preds = %12, %1
  %17 = getelementptr inbounds i8, ptr %0, i64 308
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %.not63 = icmp eq i32 %19, %18
  br i1 %.not63, label %24, label %20

20:                                               ; preds = %16
  %21 = 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.143)
          to label %24 unwind label %22

22:                                               ; preds = %20
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %182

24:                                               ; preds = %20, %16
  %.144 = phi i1 [ true, %20 ], [ %.not, %16 ]
  %25 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #10
          to label %26 unwind label %46

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.144, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %27 unwind label %48

27:                                               ; preds = %26
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 1, i32 noundef %18)
          to label %28 unwind label %50

28:                                               ; preds = %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  %29 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #10
          to label %30 unwind label %53

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.145, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %31 unwind label %55

31:                                               ; preds = %30
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1, i32 noundef %18)
          to label %32 unwind label %57

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  %33 = sext i32 %18 to i64
  %34 = icmp slt i32 %18, 0
  %35 = shl nsw i64 %33, 2
  %36 = select i1 %34, i64 -1, i64 %35
  %37 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %36) #10
          to label %38 unwind label %60

38:                                               ; preds = %32
  %39 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %33) #10
          to label %40 unwind label %62

40:                                               ; preds = %38
  invoke void @_ZN7SGTELIB20Surrogate_Parameters12get_x_boundsEPNS_6MatrixES2_PNS_14param_domain_tEPb(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull %25, ptr noundef nonnull %29, ptr noundef nonnull %37, ptr noundef nonnull %39)
          to label %.preheader unwind label %62

.preheader:                                       ; preds = %40
  %41 = load i32, ptr %17, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %157, %.preheader
  %.245.lcssa = phi i1 [ %.144, %.preheader ], [ %.5, %157 ]
  %43 = getelementptr inbounds i8, ptr %0, i64 176
  %44 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %43)
  %45 = icmp sgt i32 %44, 1
  br i1 %45, label %161, label %163

46:                                               ; preds = %24
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %182

48:                                               ; preds = %26
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %27
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 56) #11
  br label %182

53:                                               ; preds = %28
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %182

55:                                               ; preds = %30
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %31
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  br label %59

59:                                               ; preds = %57, %55
  %.pn65 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 56) #11
  br label %182

60:                                               ; preds = %32
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %182

62:                                               ; preds = %161, %40, %38
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %182

.lr.ph:                                           ; preds = %.preheader, %157
  %indvars.iv = phi i64 [ %indvars.iv.next, %157 ], [ 0, %.preheader ]
  %.24583 = phi i1 [ %.5, %157 ], [ %.144, %.preheader ]
  %64 = trunc nuw nsw i64 %indvars.iv to i32
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %66 unwind label %77

66:                                               ; preds = %.lr.ph
  %67 = load double, ptr %65, align 8, !tbaa !23
  %68 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %25, i32 noundef %64)
          to label %69 unwind label %77

69:                                               ; preds = %66
  %70 = fcmp olt double %67, %68
  br i1 %70, label %71, label %79

71:                                               ; preds = %69
  %72 = 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.146)
          to label %73 unwind label %77

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %72, i32 noundef %64)
          to label %75 unwind label %77

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str.147)
          to label %79 unwind label %77

77:                                               ; preds = %.invoke, %152, %150, %147, %145, %143, %141, %139, %137, %135, %133, %128, %123, %120, %118, %116, %114, %112, %110, %108, %106, %100, %97, %95, %90, %88, %86, %81, %79, %75, %73, %71, %66, %.lr.ph
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %182

79:                                               ; preds = %75, %69
  %.3 = phi i1 [ true, %75 ], [ %.24583, %69 ]
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %81 unwind label %77

81:                                               ; preds = %79
  %82 = load double, ptr %80, align 8, !tbaa !23
  %83 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %29, i32 noundef %64)
          to label %84 unwind label %77

84:                                               ; preds = %81
  %85 = fcmp ogt double %82, %83
  br i1 %85, label %86, label %92

86:                                               ; preds = %84
  %87 = 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.146)
          to label %88 unwind label %77

88:                                               ; preds = %86
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %87, i32 noundef %64)
          to label %90 unwind label %77

90:                                               ; preds = %88
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @.str.148)
          to label %92 unwind label %77

92:                                               ; preds = %90, %84
  %.4 = phi i1 [ true, %90 ], [ %.3, %84 ]
  %93 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv
  %94 = load i32, ptr %93, align 4, !tbaa !24
  switch i32 %94, label %157 [
    i32 4, label %150
    i32 1, label %95
    i32 3, label %95
    i32 2, label %123
  ]

95:                                               ; preds = %92, %92
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %97 unwind label %77

97:                                               ; preds = %95
  %98 = load double, ptr %96, align 8, !tbaa !23
  %99 = invoke noundef i32 @_ZN7SGTELIB5roundEd(double noundef %98)
          to label %100 unwind label %77

100:                                              ; preds = %97
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %102 unwind label %77

102:                                              ; preds = %100
  %103 = sitofp i32 %99 to double
  %104 = load double, ptr %101, align 8, !tbaa !23
  %105 = fcmp une double %104, %103
  br i1 %105, label %106, label %157

106:                                              ; preds = %102
  %107 = 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.126)
          to label %108 unwind label %77

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 noundef %64)
          to label %110 unwind label %77

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

112:                                              ; preds = %110
  %113 = 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.146)
          to label %114 unwind label %77

114:                                              ; preds = %112
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef %64)
          to label %116 unwind label %77

116:                                              ; preds = %114
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @.str.149)
          to label %118 unwind label %77

118:                                              ; preds = %116
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %120 unwind label %77

120:                                              ; preds = %118
  %121 = load double, ptr %119, align 8, !tbaa !23
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %117, double noundef %121)
          to label %.invoke unwind label %77

123:                                              ; preds = %92
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %125 unwind label %77

125:                                              ; preds = %123
  %126 = load double, ptr %124, align 8, !tbaa !23
  %127 = fcmp une double %126, 0.000000e+00
  br i1 %127, label %128, label %157

128:                                              ; preds = %125
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %130 unwind label %77

130:                                              ; preds = %128
  %131 = load double, ptr %129, align 8, !tbaa !23
  %132 = fcmp une double %131, 1.000000e+00
  br i1 %132, label %133, label %157

133:                                              ; preds = %130
  %134 = 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.126)
          to label %135 unwind label %77

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %134, i32 noundef %64)
          to label %137 unwind label %77

137:                                              ; preds = %135
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull @.str.137)
          to label %139 unwind label %77

139:                                              ; preds = %137
  %140 = 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.146)
          to label %141 unwind label %77

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %140, i32 noundef %64)
          to label %143 unwind label %77

143:                                              ; preds = %141
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @.str.149)
          to label %145 unwind label %77

145:                                              ; preds = %143
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %64)
          to label %147 unwind label %77

147:                                              ; preds = %145
  %148 = load double, ptr %146, align 8, !tbaa !23
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %144, double noundef %148)
          to label %.invoke unwind label %77

150:                                              ; preds = %92
  %151 = 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.126)
          to label %152 unwind label %77

152:                                              ; preds = %150
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %64)
          to label %.invoke unwind label %77

.invoke:                                          ; preds = %152, %147, %120
  %154 = phi ptr [ %122, %120 ], [ %149, %147 ], [ %153, %152 ]
  %155 = phi ptr [ @.str.150, %120 ], [ @.str.151, %147 ], [ @.str.140, %152 ]
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull %155)
          to label %157 unwind label %77

157:                                              ; preds = %.invoke, %92, %102, %130, %125
  %.5 = phi i1 [ %.4, %92 ], [ %.4, %130 ], [ %.4, %125 ], [ %.4, %102 ], [ true, %.invoke ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = icmp slt i64 %indvars.iv.next, %159
  br i1 %160, label %.lr.ph, label %._crit_edge, !llvm.loop !26

161:                                              ; preds = %._crit_edge
  %162 = 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.152)
          to label %.thread unwind label %62

163:                                              ; preds = %._crit_edge
  br i1 %.245.lcssa, label %.thread, label %175

.thread:                                          ; preds = %161, %163
  %164 = call ptr @__cxa_allocate_exception(i64 112) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %165 unwind label %.thread78

165:                                              ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.153, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %166 unwind label %169

166:                                              ; preds = %165
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %164, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 1237, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %167 unwind label %171

167:                                              ; preds = %166
  invoke void @__cxa_throw(ptr nonnull %164, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #12
          to label %183 unwind label %171

.thread78:                                        ; preds = %.thread
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %174

169:                                              ; preds = %165
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %173

171:                                              ; preds = %167, %166
  %.0 = phi i1 [ false, %167 ], [ true, %166 ]
  %172 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %173

173:                                              ; preds = %169, %171
  %.pn67 = phi { ptr, i32 } [ %172, %171 ], [ %170, %169 ]
  %.1 = phi i1 [ %.0, %171 ], [ true, %169 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br i1 %.1, label %174, label %182

174:                                              ; preds = %.thread78, %173
  %.pn67.pn81 = phi { ptr, i32 } [ %168, %.thread78 ], [ %.pn67, %173 ]
  call void @__cxa_free_exception(ptr %164) #9
  br label %182

175:                                              ; preds = %163
  %176 = load ptr, ptr %25, align 8, !tbaa !28
  %177 = getelementptr inbounds i8, ptr %176, i64 8
  %178 = load ptr, ptr %177, align 8
  call void %178(ptr noundef nonnull align 8 dereferenceable(56) %25) #9
  %179 = load ptr, ptr %29, align 8, !tbaa !28
  %180 = getelementptr inbounds i8, ptr %179, i64 8
  %181 = load ptr, ptr %180, align 8
  call void %181(ptr noundef nonnull align 8 dereferenceable(56) %29) #9
  call void @_ZdaPv(ptr noundef nonnull %37) #11
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #9
  ret i1 true

182:                                              ; preds = %22, %53, %59, %62, %77, %174, %173, %60, %52, %46, %14
  %.pn70.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %15, %14 ], [ %23, %22 ], [ %.pn, %52 ], [ %47, %46 ], [ %.pn65, %59 ], [ %54, %53 ], [ %61, %60 ], [ %78, %77 ], [ %.pn67.pn81, %174 ], [ %.pn67, %173 ], [ %63, %62 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn70.pn.pn.pn.pn.pn

183:                                              ; preds = %167
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #8

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #8

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #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 = { nobuiltin 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { 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 #8 = { nobuiltin allocsize(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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }
attributes #12 = { 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 = !{!13, !13, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTSN7SGTELIB14param_domain_tE", !8, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !9, i64 0}


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