; LLVM IR from romerojosh/zefr :: src/polynomials.ll (Z9Dubiner3Djdddj)

; 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::__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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__func__._Z9Dubiner3Djdddj = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z6Jacobidddj(double noundef, double noundef, double noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) 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) #2

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #0 align 2

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z9Dubiner3Djdddj(i32 noundef %0, double noundef %1, double noundef %2, double noundef %3, i32 noundef %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i1, align 1
  %18 = alloca [3 x double], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  store i32 %0, ptr %6, align 4, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store double %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = add i32 %29, 1
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = add i32 %31, 2
  %33 = mul i32 %30, %32
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = add i32 %34, 3
  %36 = mul i32 %33, %35
  %37 = udiv i32 %36, 6
  store i32 %37, ptr %12, align 4, !tbaa !5
  %38 = load i32, ptr %10, align 4, !tbaa !5
  %39 = load i32, ptr %12, align 4, !tbaa !5
  %40 = icmp uge i32 %38, %39
  br i1 %40, label %41, label %77

41:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 392, ptr %13) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13)
  %42 = getelementptr inbounds i8, ptr %13, i64 16
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @.str)
          to label %44 unwind label %60

44:                                               ; preds = %41
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.1)
          to label %46 unwind label %60

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef 292)
          to label %48 unwind label %60

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str.1)
          to label %50 unwind label %60

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @__func__._Z9Dubiner3Djdddj)
          to label %52 unwind label %60

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str.2)
          to label %54 unwind label %60

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef @.str.3)
          to label %56 unwind label %60

56:                                               ; preds = %54
  store i1 true, ptr %17, align 1
  %57 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(128) %13)
          to label %58 unwind label %64

58:                                               ; preds = %56
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %59 unwind label %68

59:                                               ; preds = %58
  store i1 false, ptr %17, align 1
  invoke void @__cxa_throw(ptr %57, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %207 unwind label %68

60:                                               ; preds = %54, %52, %50, %48, %46, %44, %41
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %14, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %15, align 4
  br label %76

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %14, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %15, align 4
  br label %72

68:                                               ; preds = %59, %58
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %14, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %72

72:                                               ; preds = %68, %64
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  %73 = load i1, ptr %17, align 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  call void @__cxa_free_exception(ptr %57) #7
  br label %75

75:                                               ; preds = %74, %72
  br label %76

76:                                               ; preds = %75, %60
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %202

77:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  %78 = load double, ptr %8, align 8, !tbaa !9
  %79 = load double, ptr %9, align 8, !tbaa !9
  %80 = fadd double %78, %79
  %81 = fcmp oeq double %80, 0.000000e+00
  br i1 %81, label %82, label %83

82:                                               ; preds = %77
  br label %92

83:                                               ; preds = %77
  %84 = load double, ptr %7, align 8, !tbaa !9
  %85 = fadd double 1.000000e+00, %84
  %86 = fmul double -2.000000e+00, %85
  %87 = load double, ptr %8, align 8, !tbaa !9
  %88 = load double, ptr %9, align 8, !tbaa !9
  %89 = fadd double %87, %88
  %90 = fdiv double %86, %89
  %91 = fsub double %90, 1.000000e+00
  br label %92

92:                                               ; preds = %83, %82
  %93 = phi double [ -1.000000e+00, %82 ], [ %91, %83 ]
  %94 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  store double %93, ptr %94, align 16, !tbaa !9
  %95 = load double, ptr %9, align 8, !tbaa !9
  %96 = fcmp oeq double %95, 1.000000e+00
  br i1 %96, label %97, label %98

97:                                               ; preds = %92
  br label %106

98:                                               ; preds = %92
  %99 = load double, ptr %8, align 8, !tbaa !9
  %100 = fadd double 1.000000e+00, %99
  %101 = fmul double 2.000000e+00, %100
  %102 = load double, ptr %9, align 8, !tbaa !9
  %103 = fsub double 1.000000e+00, %102
  %104 = fdiv double %101, %103
  %105 = fsub double %104, 1.000000e+00
  br label %106

106:                                              ; preds = %98, %97
  %107 = phi double [ -1.000000e+00, %97 ], [ %105, %98 ]
  %108 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 1
  store double %107, ptr %108, align 8, !tbaa !9
  %109 = load double, ptr %9, align 8, !tbaa !9
  %110 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 2
  store double %109, ptr %110, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %197, %106
  %112 = load i32, ptr %20, align 4, !tbaa !5
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = icmp ule i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %200

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %193, %116
  %118 = load i32, ptr %22, align 4, !tbaa !5
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = icmp ule i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %196

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %189, %122
  %124 = load i32, ptr %23, align 4, !tbaa !5
  %125 = load i32, ptr %22, align 4, !tbaa !5
  %126 = icmp ule i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %192

128:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %129 = load i32, ptr %22, align 4, !tbaa !5
  %130 = load i32, ptr %23, align 4, !tbaa !5
  %131 = sub i32 %129, %130
  store i32 %131, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %132 = load i32, ptr %20, align 4, !tbaa !5
  %133 = load i32, ptr %24, align 4, !tbaa !5
  %134 = sub i32 %132, %133
  %135 = load i32, ptr %23, align 4, !tbaa !5
  %136 = sub i32 %134, %135
  store i32 %136, ptr %25, align 4, !tbaa !5
  %137 = load i32, ptr %19, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = icmp eq i32 %137, %138
  br i1 %139, label %140, label %186

140:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %141 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %142 = load double, ptr %141, align 16, !tbaa !9
  %143 = load i32, ptr %25, align 4, !tbaa !5
  %144 = call noundef double @_Z6Jacobidddj(double noundef %142, double noundef 0.000000e+00, double noundef 0.000000e+00, i32 noundef %143)
  store double %144, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %145 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 1
  %146 = load double, ptr %145, align 8, !tbaa !9
  %147 = load i32, ptr %25, align 4, !tbaa !5
  %148 = mul i32 2, %147
  %149 = add i32 %148, 1
  %150 = uitofp i32 %149 to double
  %151 = load i32, ptr %24, align 4, !tbaa !5
  %152 = call noundef double @_Z6Jacobidddj(double noundef %146, double noundef %150, double noundef 0.000000e+00, i32 noundef %151)
  store double %152, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %153 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 2
  %154 = load double, ptr %153, align 16, !tbaa !9
  %155 = load i32, ptr %25, align 4, !tbaa !5
  %156 = mul i32 2, %155
  %157 = load i32, ptr %24, align 4, !tbaa !5
  %158 = mul i32 2, %157
  %159 = add i32 %156, %158
  %160 = add i32 %159, 2
  %161 = uitofp i32 %160 to double
  %162 = load i32, ptr %23, align 4, !tbaa !5
  %163 = call noundef double @_Z6Jacobidddj(double noundef %154, double noundef %161, double noundef 0.000000e+00, i32 noundef %162)
  store double %163, ptr %28, align 8, !tbaa !9
  %164 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %165 = fmul double 2.000000e+00, %164
  %166 = load double, ptr %26, align 8, !tbaa !9
  %167 = fmul double %165, %166
  %168 = load double, ptr %27, align 8, !tbaa !9
  %169 = fmul double %167, %168
  %170 = load double, ptr %28, align 8, !tbaa !9
  %171 = fmul double %169, %170
  %172 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 1
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = fsub double 1.000000e+00, %173
  %175 = load i32, ptr %25, align 4, !tbaa !5
  %176 = call noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %174, i32 noundef %175)
  %177 = fmul double %171, %176
  %178 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 2
  %179 = load double, ptr %178, align 16, !tbaa !9
  %180 = fsub double 1.000000e+00, %179
  %181 = load i32, ptr %25, align 4, !tbaa !5
  %182 = load i32, ptr %24, align 4, !tbaa !5
  %183 = add i32 %181, %182
  %184 = call noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %180, i32 noundef %183)
  %185 = fmul double %177, %184
  store double %185, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %186

186:                                              ; preds = %140, %128
  %187 = load i32, ptr %19, align 4, !tbaa !5
  %188 = add i32 %187, 1
  store i32 %188, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %189

189:                                              ; preds = %186
  %190 = load i32, ptr %23, align 4, !tbaa !5
  %191 = add i32 %190, 1
  store i32 %191, ptr %23, align 4, !tbaa !5
  br label %123, !llvm.loop !11

192:                                              ; preds = %127
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %22, align 4, !tbaa !5
  %195 = add i32 %194, 1
  store i32 %195, ptr %22, align 4, !tbaa !5
  br label %117, !llvm.loop !13

196:                                              ; preds = %121
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %20, align 4, !tbaa !5
  %199 = add i32 %198, 1
  store i32 %199, ptr %20, align 4, !tbaa !5
  br label %111, !llvm.loop !14

200:                                              ; preds = %115
  %201 = load double, ptr %11, align 8, !tbaa !9
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  ret double %201

202:                                              ; preds = %76
  %203 = load ptr, ptr %14, align 8
  %204 = load i32, ptr %15, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206

207:                                              ; preds = %59
  unreachable
}

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


; 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::__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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__func__._Z9Dubiner3Djdddj = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z6Jacobidddj(double noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) 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 #2

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #0 align 2

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z9Dubiner3Djdddj(i32 noundef %0, double noundef %1, double noundef %2, double noundef %3, i32 noundef %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = add i32 %0, 1
  %9 = add i32 %0, 2
  %10 = mul i32 %8, %9
  %11 = add i32 %0, 3
  %12 = mul i32 %10, %11
  %13 = udiv i32 %12, 6
  %.not = icmp ugt i32 %13, %4
  br i1 %.not, label %41, label %14

14:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
  %15 = getelementptr inbounds i8, ptr %6, i64 16
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str)
          to label %17 unwind label %34

17:                                               ; preds = %14
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.1)
          to label %19 unwind label %34

19:                                               ; preds = %17
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef 292)
          to label %21 unwind label %34

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.1)
          to label %23 unwind label %34

23:                                               ; preds = %21
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @__func__._Z9Dubiner3Djdddj)
          to label %25 unwind label %34

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.2)
          to label %27 unwind label %34

27:                                               ; preds = %25
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @.str.3)
          to label %29 unwind label %34

29:                                               ; preds = %27
  %30 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %31 unwind label %.thread

31:                                               ; preds = %29
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %33 unwind label %.thread71

.thread71:                                        ; preds = %31
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %39

33:                                               ; preds = %31
  invoke void @__cxa_throw(ptr nonnull %30, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #8
          to label %91 unwind label %37

34:                                               ; preds = %27, %25, %23, %21, %19, %17, %14
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %40

.thread:                                          ; preds = %29
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %39

37:                                               ; preds = %33
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %40

39:                                               ; preds = %.thread71, %.thread
  %.pn70 = phi { ptr, i32 } [ %36, %.thread ], [ %32, %.thread71 ]
  call void @__cxa_free_exception(ptr %30) #7
  br label %40

40:                                               ; preds = %37, %39, %34
  %.pn.pn = phi { ptr, i32 } [ %.pn70, %39 ], [ %38, %37 ], [ %35, %34 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn.pn

41:                                               ; preds = %5
  %42 = fadd double %2, %3
  %43 = fcmp oeq double %42, 0.000000e+00
  %44 = fadd double %1, 1.000000e+00
  %45 = fmul double %44, 2.000000e+00
  %46 = fdiv double %45, %42
  %47 = fsub double -1.000000e+00, %46
  %48 = select i1 %43, double -1.000000e+00, double %47
  %49 = fcmp oeq double %3, 1.000000e+00
  br i1 %49, label %._crit_edge, label %50

._crit_edge:                                      ; preds = %41
  %.pre = fsub double 1.000000e+00, %3
  br label %56

50:                                               ; preds = %41
  %51 = fadd double %2, 1.000000e+00
  %52 = fmul double %51, 2.000000e+00
  %53 = fsub double 1.000000e+00, %3
  %54 = fdiv double %52, %53
  %55 = fadd double %54, -1.000000e+00
  br label %56

56:                                               ; preds = %._crit_edge, %50
  %.pre-phi = phi double [ %.pre, %._crit_edge ], [ %53, %50 ]
  %57 = phi double [ -1.000000e+00, %._crit_edge ], [ %55, %50 ]
  %58 = fsub double 1.000000e+00, %57
  br label %.preheader73

.preheader73:                                     ; preds = %56, %64
  %indvars.iv = phi i32 [ 1, %56 ], [ %indvars.iv.next, %64 ]
  %.082 = phi double [ undef, %56 ], [ %.3, %64 ]
  %.05481 = phi i32 [ 0, %56 ], [ %89, %64 ]
  %.05980 = phi i32 [ 0, %56 ], [ %65, %64 ]
  br label %.preheader

59:                                               ; preds = %64
  ret double %.3

.preheader:                                       ; preds = %.preheader73, %66
  %.179 = phi double [ %.082, %.preheader73 ], [ %.3, %66 ]
  %.15578 = phi i32 [ %.05481, %.preheader73 ], [ %89, %66 ]
  %.05877 = phi i32 [ 0, %.preheader73 ], [ %67, %66 ]
  %60 = sub i32 %.05980, %.05877
  %61 = shl i32 %60, 1
  %62 = or disjoint i32 %61, 1
  %63 = uitofp i32 %62 to double
  br label %68

64:                                               ; preds = %66
  %65 = add i32 %.05980, 1
  %indvars.iv.next = add i32 %indvars.iv, 1
  %exitcond83.not = icmp eq i32 %.05980, %0
  br i1 %exitcond83.not, label %59, label %.preheader73, !llvm.loop !5

66:                                               ; preds = %88
  %67 = add nuw i32 %.05877, 1
  %exitcond.not = icmp eq i32 %67, %indvars.iv
  br i1 %exitcond.not, label %64, label %.preheader, !llvm.loop !7

68:                                               ; preds = %.preheader, %88
  %.276 = phi double [ %.179, %.preheader ], [ %.3, %88 ]
  %.25675 = phi i32 [ %.15578, %.preheader ], [ %89, %88 ]
  %.05774 = phi i32 [ 0, %.preheader ], [ %90, %88 ]
  %69 = icmp eq i32 %.25675, %4
  br i1 %69, label %70, label %88

70:                                               ; preds = %68
  %71 = sub i32 %.05877, %.05774
  %72 = tail call noundef double @_Z6Jacobidddj(double noundef %48, double noundef 0.000000e+00, double noundef 0.000000e+00, i32 noundef %60)
  %73 = tail call noundef double @_Z6Jacobidddj(double noundef %57, double noundef %63, double noundef 0.000000e+00, i32 noundef %71)
  %74 = add i32 %71, %60
  %75 = shl i32 %74, 1
  %76 = add i32 %75, 2
  %77 = uitofp i32 %76 to double
  %78 = tail call noundef double @_Z6Jacobidddj(double noundef %3, double noundef %77, double noundef 0.000000e+00, i32 noundef %.05774)
  %79 = tail call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %80 = fmul double %79, 2.000000e+00
  %81 = fmul double %72, %80
  %82 = fmul double %73, %81
  %83 = fmul double %78, %82
  %84 = tail call noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %58, i32 noundef %60)
  %85 = fmul double %84, %83
  %86 = tail call noundef double @_ZSt3powIdjEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %.pre-phi, i32 noundef %74)
  %87 = fmul double %86, %85
  br label %88

88:                                               ; preds = %70, %68
  %.3 = phi double [ %87, %70 ], [ %.276, %68 ]
  %89 = add i32 %.25675, 1
  %90 = add i32 %.05774, 1
  %.not65 = icmp ugt i32 %90, %.05877
  br i1 %.not65, label %66, label %68, !llvm.loop !8

91:                                               ; preds = %33
  unreachable
}

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


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