; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests/test_c.ll (Z12testlegendrebPN11alglib_impl8ae_stateE)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { ptr }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.690 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.691 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.692 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.693 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.695 = external hidden unnamed_addr constant [49 x i8], align 1

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

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

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12testlegendrebPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) #4 {
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = zext i1 %0 to i8
  store i8 %20, ptr %3, align 1, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %21, ptr noundef %5)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %22, i1 noundef zeroext true)
  store double 0.000000e+00, ptr %6, align 8, !tbaa !11
  store double 0.000000e+00, ptr %7, align 8, !tbaa !11
  store double 0.000000e+00, ptr %8, align 8, !tbaa !11
  store double 1.000000e-09, ptr %9, align 8, !tbaa !11
  store i8 0, ptr %18, align 1, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %71, %2
  %24 = load i64, ptr %10, align 8, !tbaa !13
  %25 = icmp sle i64 %24, 10
  br i1 %25, label %26, label %74

26:                                               ; preds = %23
  %27 = load i64, ptr %10, align 8, !tbaa !13
  %28 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %27, ptr noundef %14, ptr noundef %28)
  store i64 1, ptr %13, align 8, !tbaa !13
  br label %29

29:                                               ; preds = %67, %26
  %30 = load i64, ptr %13, align 8, !tbaa !13
  %31 = icmp sle i64 %30, 10
  br i1 %31, label %32, label %70

32:                                               ; preds = %29
  %33 = load ptr, ptr %4, align 8, !tbaa !9
  %34 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %33)
  %35 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %34, double -1.000000e+00)
  store double %35, ptr %15, align 8, !tbaa !11
  %36 = load i64, ptr %10, align 8, !tbaa !13
  %37 = load double, ptr %15, align 8, !tbaa !11
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  %39 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %36, double noundef %37, ptr noundef %38)
  store double %39, ptr %16, align 8, !tbaa !11
  store double 1.000000e+00, ptr %17, align 8, !tbaa !11
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %40

40:                                               ; preds = %57, %32
  %41 = load i64, ptr %12, align 8, !tbaa !13
  %42 = load i64, ptr %10, align 8, !tbaa !13
  %43 = icmp sle i64 %41, %42
  br i1 %43, label %44, label %60

44:                                               ; preds = %40
  %45 = load double, ptr %16, align 8, !tbaa !11
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load i64, ptr %12, align 8, !tbaa !13
  %49 = getelementptr inbounds double, ptr %47, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = load double, ptr %17, align 8, !tbaa !11
  %52 = fneg double %50
  %53 = call double @llvm.fmuladd.f64(double %52, double %51, double %45)
  store double %53, ptr %16, align 8, !tbaa !11
  %54 = load double, ptr %17, align 8, !tbaa !11
  %55 = load double, ptr %15, align 8, !tbaa !11
  %56 = fmul double %54, %55
  store double %56, ptr %17, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %44
  %58 = load i64, ptr %12, align 8, !tbaa !13
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %12, align 8, !tbaa !13
  br label %40, !llvm.loop !16

60:                                               ; preds = %40
  %61 = load double, ptr %6, align 8, !tbaa !11
  %62 = load double, ptr %16, align 8, !tbaa !11
  %63 = load ptr, ptr %4, align 8, !tbaa !9
  %64 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %62, ptr noundef %63)
  %65 = load ptr, ptr %4, align 8, !tbaa !9
  %66 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %61, double noundef %64, ptr noundef %65)
  store double %66, ptr %6, align 8, !tbaa !11
  br label %67

67:                                               ; preds = %60
  %68 = load i64, ptr %13, align 8, !tbaa !13
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %13, align 8, !tbaa !13
  br label %29, !llvm.loop !18

70:                                               ; preds = %29
  br label %71

71:                                               ; preds = %70
  %72 = load i64, ptr %10, align 8, !tbaa !13
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %10, align 8, !tbaa !13
  br label %23, !llvm.loop !19

74:                                               ; preds = %23
  store i64 20, ptr %11, align 8, !tbaa !13
  %75 = load i64, ptr %11, align 8, !tbaa !13
  %76 = add nsw i64 %75, 1
  %77 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %76, ptr noundef %77)
  store i64 1, ptr %13, align 8, !tbaa !13
  br label %78

78:                                               ; preds = %123, %74
  %79 = load i64, ptr %13, align 8, !tbaa !13
  %80 = icmp sle i64 %79, 10
  br i1 %80, label %81, label %126

81:                                               ; preds = %78
  %82 = load ptr, ptr %4, align 8, !tbaa !9
  %83 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %82)
  %84 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %83, double -1.000000e+00)
  store double %84, ptr %15, align 8, !tbaa !11
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %85

85:                                               ; preds = %119, %81
  %86 = load i64, ptr %10, align 8, !tbaa !13
  %87 = load i64, ptr %11, align 8, !tbaa !13
  %88 = icmp sle i64 %86, %87
  br i1 %88, label %89, label %122

89:                                               ; preds = %85
  %90 = load ptr, ptr %4, align 8, !tbaa !9
  %91 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %90)
  %92 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %91, double -1.000000e+00)
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !15
  %95 = load i64, ptr %10, align 8, !tbaa !13
  %96 = getelementptr inbounds double, ptr %94, i64 %95
  store double %92, ptr %96, align 8, !tbaa !11
  %97 = load double, ptr %16, align 8, !tbaa !11
  %98 = load i64, ptr %10, align 8, !tbaa !13
  %99 = load double, ptr %15, align 8, !tbaa !11
  %100 = load ptr, ptr %4, align 8, !tbaa !9
  %101 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %98, double noundef %99, ptr noundef %100)
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !15
  %104 = load i64, ptr %10, align 8, !tbaa !13
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = call double @llvm.fmuladd.f64(double %101, double %106, double %97)
  store double %107, ptr %16, align 8, !tbaa !11
  %108 = load double, ptr %7, align 8, !tbaa !11
  %109 = load double, ptr %16, align 8, !tbaa !11
  %110 = load i64, ptr %10, align 8, !tbaa !13
  %111 = load double, ptr %15, align 8, !tbaa !11
  %112 = load ptr, ptr %4, align 8, !tbaa !9
  %113 = call noundef double @_ZN11alglib_impl11legendresumEPNS_9ae_vectorEldPNS_8ae_stateE(ptr noundef %14, i64 noundef %110, double noundef %111, ptr noundef %112)
  %114 = fsub double %109, %113
  %115 = load ptr, ptr %4, align 8, !tbaa !9
  %116 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %114, ptr noundef %115)
  %117 = load ptr, ptr %4, align 8, !tbaa !9
  %118 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %108, double noundef %116, ptr noundef %117)
  store double %118, ptr %7, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %89
  %120 = load i64, ptr %10, align 8, !tbaa !13
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %10, align 8, !tbaa !13
  br label %85, !llvm.loop !20

122:                                              ; preds = %85
  br label %123

123:                                              ; preds = %122
  %124 = load i64, ptr %13, align 8, !tbaa !13
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %13, align 8, !tbaa !13
  br label %78, !llvm.loop !21

126:                                              ; preds = %78
  %127 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 0, ptr noundef %14, ptr noundef %127)
  %128 = load double, ptr %8, align 8, !tbaa !11
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = getelementptr inbounds double, ptr %130, i64 0
  %132 = load double, ptr %131, align 8, !tbaa !11
  %133 = fsub double %132, 1.000000e+00
  %134 = load ptr, ptr %4, align 8, !tbaa !9
  %135 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %133, ptr noundef %134)
  %136 = load ptr, ptr %4, align 8, !tbaa !9
  %137 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %128, double noundef %135, ptr noundef %136)
  store double %137, ptr %8, align 8, !tbaa !11
  %138 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 1, ptr noundef %14, ptr noundef %138)
  %139 = load double, ptr %8, align 8, !tbaa !11
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !15
  %142 = getelementptr inbounds double, ptr %141, i64 0
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = fsub double %143, 0.000000e+00
  %145 = load ptr, ptr %4, align 8, !tbaa !9
  %146 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %144, ptr noundef %145)
  %147 = load ptr, ptr %4, align 8, !tbaa !9
  %148 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %139, double noundef %146, ptr noundef %147)
  store double %148, ptr %8, align 8, !tbaa !11
  %149 = load double, ptr %8, align 8, !tbaa !11
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !15
  %152 = getelementptr inbounds double, ptr %151, i64 1
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = fsub double %153, 1.000000e+00
  %155 = load ptr, ptr %4, align 8, !tbaa !9
  %156 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %154, ptr noundef %155)
  %157 = load ptr, ptr %4, align 8, !tbaa !9
  %158 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %149, double noundef %156, ptr noundef %157)
  store double %158, ptr %8, align 8, !tbaa !11
  %159 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 2, ptr noundef %14, ptr noundef %159)
  %160 = load double, ptr %8, align 8, !tbaa !11
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %162 = load ptr, ptr %161, align 8, !tbaa !15
  %163 = getelementptr inbounds double, ptr %162, i64 0
  %164 = load double, ptr %163, align 8, !tbaa !11
  %165 = fadd double %164, 5.000000e-01
  %166 = load ptr, ptr %4, align 8, !tbaa !9
  %167 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %165, ptr noundef %166)
  %168 = load ptr, ptr %4, align 8, !tbaa !9
  %169 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %160, double noundef %167, ptr noundef %168)
  store double %169, ptr %8, align 8, !tbaa !11
  %170 = load double, ptr %8, align 8, !tbaa !11
  %171 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !15
  %173 = getelementptr inbounds double, ptr %172, i64 1
  %174 = load double, ptr %173, align 8, !tbaa !11
  %175 = fsub double %174, 0.000000e+00
  %176 = load ptr, ptr %4, align 8, !tbaa !9
  %177 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %175, ptr noundef %176)
  %178 = load ptr, ptr %4, align 8, !tbaa !9
  %179 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %170, double noundef %177, ptr noundef %178)
  store double %179, ptr %8, align 8, !tbaa !11
  %180 = load double, ptr %8, align 8, !tbaa !11
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !15
  %183 = getelementptr inbounds double, ptr %182, i64 2
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = fsub double %184, 1.500000e+00
  %186 = load ptr, ptr %4, align 8, !tbaa !9
  %187 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %185, ptr noundef %186)
  %188 = load ptr, ptr %4, align 8, !tbaa !9
  %189 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %180, double noundef %187, ptr noundef %188)
  store double %189, ptr %8, align 8, !tbaa !11
  %190 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 3, ptr noundef %14, ptr noundef %190)
  %191 = load double, ptr %8, align 8, !tbaa !11
  %192 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !15
  %194 = getelementptr inbounds double, ptr %193, i64 0
  %195 = load double, ptr %194, align 8, !tbaa !11
  %196 = fsub double %195, 0.000000e+00
  %197 = load ptr, ptr %4, align 8, !tbaa !9
  %198 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %196, ptr noundef %197)
  %199 = load ptr, ptr %4, align 8, !tbaa !9
  %200 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %191, double noundef %198, ptr noundef %199)
  store double %200, ptr %8, align 8, !tbaa !11
  %201 = load double, ptr %8, align 8, !tbaa !11
  %202 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !15
  %204 = getelementptr inbounds double, ptr %203, i64 1
  %205 = load double, ptr %204, align 8, !tbaa !11
  %206 = fadd double %205, 1.500000e+00
  %207 = load ptr, ptr %4, align 8, !tbaa !9
  %208 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %206, ptr noundef %207)
  %209 = load ptr, ptr %4, align 8, !tbaa !9
  %210 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %201, double noundef %208, ptr noundef %209)
  store double %210, ptr %8, align 8, !tbaa !11
  %211 = load double, ptr %8, align 8, !tbaa !11
  %212 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = getelementptr inbounds double, ptr %213, i64 2
  %215 = load double, ptr %214, align 8, !tbaa !11
  %216 = fsub double %215, 0.000000e+00
  %217 = load ptr, ptr %4, align 8, !tbaa !9
  %218 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %216, ptr noundef %217)
  %219 = load ptr, ptr %4, align 8, !tbaa !9
  %220 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %211, double noundef %218, ptr noundef %219)
  store double %220, ptr %8, align 8, !tbaa !11
  %221 = load double, ptr %8, align 8, !tbaa !11
  %222 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %223 = load ptr, ptr %222, align 8, !tbaa !15
  %224 = getelementptr inbounds double, ptr %223, i64 3
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = fsub double %225, 2.500000e+00
  %227 = load ptr, ptr %4, align 8, !tbaa !9
  %228 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %226, ptr noundef %227)
  %229 = load ptr, ptr %4, align 8, !tbaa !9
  %230 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %221, double noundef %228, ptr noundef %229)
  store double %230, ptr %8, align 8, !tbaa !11
  %231 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 4, ptr noundef %14, ptr noundef %231)
  %232 = load double, ptr %8, align 8, !tbaa !11
  %233 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %234 = load ptr, ptr %233, align 8, !tbaa !15
  %235 = getelementptr inbounds double, ptr %234, i64 0
  %236 = load double, ptr %235, align 8, !tbaa !11
  %237 = fsub double %236, 3.750000e-01
  %238 = load ptr, ptr %4, align 8, !tbaa !9
  %239 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %237, ptr noundef %238)
  %240 = load ptr, ptr %4, align 8, !tbaa !9
  %241 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %232, double noundef %239, ptr noundef %240)
  store double %241, ptr %8, align 8, !tbaa !11
  %242 = load double, ptr %8, align 8, !tbaa !11
  %243 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %244 = load ptr, ptr %243, align 8, !tbaa !15
  %245 = getelementptr inbounds double, ptr %244, i64 1
  %246 = load double, ptr %245, align 8, !tbaa !11
  %247 = fsub double %246, 0.000000e+00
  %248 = load ptr, ptr %4, align 8, !tbaa !9
  %249 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %247, ptr noundef %248)
  %250 = load ptr, ptr %4, align 8, !tbaa !9
  %251 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %242, double noundef %249, ptr noundef %250)
  store double %251, ptr %8, align 8, !tbaa !11
  %252 = load double, ptr %8, align 8, !tbaa !11
  %253 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !15
  %255 = getelementptr inbounds double, ptr %254, i64 2
  %256 = load double, ptr %255, align 8, !tbaa !11
  %257 = fadd double %256, 3.750000e+00
  %258 = load ptr, ptr %4, align 8, !tbaa !9
  %259 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %257, ptr noundef %258)
  %260 = load ptr, ptr %4, align 8, !tbaa !9
  %261 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %252, double noundef %259, ptr noundef %260)
  store double %261, ptr %8, align 8, !tbaa !11
  %262 = load double, ptr %8, align 8, !tbaa !11
  %263 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !15
  %265 = getelementptr inbounds double, ptr %264, i64 3
  %266 = load double, ptr %265, align 8, !tbaa !11
  %267 = fsub double %266, 0.000000e+00
  %268 = load ptr, ptr %4, align 8, !tbaa !9
  %269 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %267, ptr noundef %268)
  %270 = load ptr, ptr %4, align 8, !tbaa !9
  %271 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %262, double noundef %269, ptr noundef %270)
  store double %271, ptr %8, align 8, !tbaa !11
  %272 = load double, ptr %8, align 8, !tbaa !11
  %273 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %274 = load ptr, ptr %273, align 8, !tbaa !15
  %275 = getelementptr inbounds double, ptr %274, i64 4
  %276 = load double, ptr %275, align 8, !tbaa !11
  %277 = fsub double %276, 4.375000e+00
  %278 = load ptr, ptr %4, align 8, !tbaa !9
  %279 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %277, ptr noundef %278)
  %280 = load ptr, ptr %4, align 8, !tbaa !9
  %281 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %272, double noundef %279, ptr noundef %280)
  store double %281, ptr %8, align 8, !tbaa !11
  %282 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 9, ptr noundef %14, ptr noundef %282)
  %283 = load double, ptr %8, align 8, !tbaa !11
  %284 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !15
  %286 = getelementptr inbounds double, ptr %285, i64 0
  %287 = load double, ptr %286, align 8, !tbaa !11
  %288 = fsub double %287, 0.000000e+00
  %289 = load ptr, ptr %4, align 8, !tbaa !9
  %290 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %288, ptr noundef %289)
  %291 = load ptr, ptr %4, align 8, !tbaa !9
  %292 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %283, double noundef %290, ptr noundef %291)
  store double %292, ptr %8, align 8, !tbaa !11
  %293 = load double, ptr %8, align 8, !tbaa !11
  %294 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %295 = load ptr, ptr %294, align 8, !tbaa !15
  %296 = getelementptr inbounds double, ptr %295, i64 1
  %297 = load double, ptr %296, align 8, !tbaa !11
  %298 = fsub double %297, 0x4003B00000000000
  %299 = load ptr, ptr %4, align 8, !tbaa !9
  %300 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %298, ptr noundef %299)
  %301 = load ptr, ptr %4, align 8, !tbaa !9
  %302 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %293, double noundef %300, ptr noundef %301)
  store double %302, ptr %8, align 8, !tbaa !11
  %303 = load double, ptr %8, align 8, !tbaa !11
  %304 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %305 = load ptr, ptr %304, align 8, !tbaa !15
  %306 = getelementptr inbounds double, ptr %305, i64 2
  %307 = load double, ptr %306, align 8, !tbaa !11
  %308 = fsub double %307, 0.000000e+00
  %309 = load ptr, ptr %4, align 8, !tbaa !9
  %310 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %308, ptr noundef %309)
  %311 = load ptr, ptr %4, align 8, !tbaa !9
  %312 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %303, double noundef %310, ptr noundef %311)
  store double %312, ptr %8, align 8, !tbaa !11
  %313 = load double, ptr %8, align 8, !tbaa !11
  %314 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %315 = load ptr, ptr %314, align 8, !tbaa !15
  %316 = getelementptr inbounds double, ptr %315, i64 3
  %317 = load double, ptr %316, align 8, !tbaa !11
  %318 = fadd double %317, 0x40420C0000000000
  %319 = load ptr, ptr %4, align 8, !tbaa !9
  %320 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %318, ptr noundef %319)
  %321 = load ptr, ptr %4, align 8, !tbaa !9
  %322 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %313, double noundef %320, ptr noundef %321)
  store double %322, ptr %8, align 8, !tbaa !11
  %323 = load double, ptr %8, align 8, !tbaa !11
  %324 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %325 = load ptr, ptr %324, align 8, !tbaa !15
  %326 = getelementptr inbounds double, ptr %325, i64 4
  %327 = load double, ptr %326, align 8, !tbaa !11
  %328 = fsub double %327, 0.000000e+00
  %329 = load ptr, ptr %4, align 8, !tbaa !9
  %330 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %328, ptr noundef %329)
  %331 = load ptr, ptr %4, align 8, !tbaa !9
  %332 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %323, double noundef %330, ptr noundef %331)
  store double %332, ptr %8, align 8, !tbaa !11
  %333 = load double, ptr %8, align 8, !tbaa !11
  %334 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %335 = load ptr, ptr %334, align 8, !tbaa !15
  %336 = getelementptr inbounds double, ptr %335, i64 5
  %337 = load double, ptr %336, align 8, !tbaa !11
  %338 = fsub double %337, 0x4061988000000000
  %339 = load ptr, ptr %4, align 8, !tbaa !9
  %340 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %338, ptr noundef %339)
  %341 = load ptr, ptr %4, align 8, !tbaa !9
  %342 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %333, double noundef %340, ptr noundef %341)
  store double %342, ptr %8, align 8, !tbaa !11
  %343 = load double, ptr %8, align 8, !tbaa !11
  %344 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %345 = load ptr, ptr %344, align 8, !tbaa !15
  %346 = getelementptr inbounds double, ptr %345, i64 6
  %347 = load double, ptr %346, align 8, !tbaa !11
  %348 = fsub double %347, 0.000000e+00
  %349 = load ptr, ptr %4, align 8, !tbaa !9
  %350 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %348, ptr noundef %349)
  %351 = load ptr, ptr %4, align 8, !tbaa !9
  %352 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %343, double noundef %350, ptr noundef %351)
  store double %352, ptr %8, align 8, !tbaa !11
  %353 = load double, ptr %8, align 8, !tbaa !11
  %354 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %355 = load ptr, ptr %354, align 8, !tbaa !15
  %356 = getelementptr inbounds double, ptr %355, i64 7
  %357 = load double, ptr %356, align 8, !tbaa !11
  %358 = fadd double %357, 0x4069230000000000
  %359 = load ptr, ptr %4, align 8, !tbaa !9
  %360 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %358, ptr noundef %359)
  %361 = load ptr, ptr %4, align 8, !tbaa !9
  %362 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %353, double noundef %360, ptr noundef %361)
  store double %362, ptr %8, align 8, !tbaa !11
  %363 = load double, ptr %8, align 8, !tbaa !11
  %364 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %365 = load ptr, ptr %364, align 8, !tbaa !15
  %366 = getelementptr inbounds double, ptr %365, i64 8
  %367 = load double, ptr %366, align 8, !tbaa !11
  %368 = fsub double %367, 0.000000e+00
  %369 = load ptr, ptr %4, align 8, !tbaa !9
  %370 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %368, ptr noundef %369)
  %371 = load ptr, ptr %4, align 8, !tbaa !9
  %372 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %363, double noundef %370, ptr noundef %371)
  store double %372, ptr %8, align 8, !tbaa !11
  %373 = load double, ptr %8, align 8, !tbaa !11
  %374 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %375 = load ptr, ptr %374, align 8, !tbaa !15
  %376 = getelementptr inbounds double, ptr %375, i64 9
  %377 = load double, ptr %376, align 8, !tbaa !11
  %378 = fsub double %377, 0x4057BD8000000000
  %379 = load ptr, ptr %4, align 8, !tbaa !9
  %380 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %378, ptr noundef %379)
  %381 = load ptr, ptr %4, align 8, !tbaa !9
  %382 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %373, double noundef %380, ptr noundef %381)
  store double %382, ptr %8, align 8, !tbaa !11
  %383 = load double, ptr %6, align 8, !tbaa !11
  %384 = load double, ptr %9, align 8, !tbaa !11
  %385 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %383, double noundef %384)
  br i1 %385, label %394, label %386

386:                                              ; preds = %126
  %387 = load double, ptr %7, align 8, !tbaa !11
  %388 = load double, ptr %9, align 8, !tbaa !11
  %389 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %387, double noundef %388)
  br i1 %389, label %394, label %390

390:                                              ; preds = %386
  %391 = load double, ptr %8, align 8, !tbaa !11
  %392 = load double, ptr %9, align 8, !tbaa !11
  %393 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %391, double noundef %392)
  br label %394

394:                                              ; preds = %390, %386, %126
  %395 = phi i1 [ true, %386 ], [ true, %126 ], [ %393, %390 ]
  %396 = zext i1 %395 to i8
  store i8 %396, ptr %18, align 1, !tbaa !5
  %397 = load i8, ptr %3, align 1, !tbaa !5, !range !22, !noundef !23
  %398 = trunc i8 %397 to i1
  br i1 %398, label %416, label %399

399:                                              ; preds = %394
  %400 = call i32 (ptr, ...) @printf(ptr noundef @.str.695)
  %401 = load double, ptr %6, align 8, !tbaa !11
  %402 = call i32 (ptr, ...) @printf(ptr noundef @.str.690, double noundef %401)
  %403 = load double, ptr %7, align 8, !tbaa !11
  %404 = call i32 (ptr, ...) @printf(ptr noundef @.str.691, double noundef %403)
  %405 = load double, ptr %8, align 8, !tbaa !11
  %406 = call i32 (ptr, ...) @printf(ptr noundef @.str.692, double noundef %405)
  %407 = load double, ptr %9, align 8, !tbaa !11
  %408 = call i32 (ptr, ...) @printf(ptr noundef @.str.693, double noundef %407)
  %409 = load i8, ptr %18, align 1, !tbaa !5, !range !22, !noundef !23
  %410 = trunc i8 %409 to i1
  br i1 %410, label %413, label %411

411:                                              ; preds = %399
  %412 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %415

413:                                              ; preds = %399
  %414 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %415

415:                                              ; preds = %413, %411
  br label %416

416:                                              ; preds = %415, %394
  %417 = load i8, ptr %18, align 1, !tbaa !5, !range !22, !noundef !23
  %418 = trunc i8 %417 to i1
  %419 = xor i1 %418, true
  %420 = zext i1 %419 to i8
  store i8 %420, ptr %19, align 1, !tbaa !5
  %421 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %421)
  %422 = load i8, ptr %19, align 1, !tbaa !5, !range !22, !noundef !23
  %423 = trunc i8 %422 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  ret i1 %423
}

declare void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl11legendresumEPNS_9ae_vectorEldPNS_8ae_stateE(ptr noundef, i64 noundef, double noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = !{i8 0, i8 2}
!23 = !{}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { ptr }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.690 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.691 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.692 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.693 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.695 = external hidden unnamed_addr constant [49 x i8], align 1

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12testlegendrebPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca %"struct.alglib_impl::ae_frame", align 8
  %4 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #6
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %1, ptr noundef nonnull %3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %4, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 3, ptr noundef %1, i1 noundef zeroext true)
  %5 = getelementptr inbounds i8, ptr %4, i64 56
  br label %6

6:                                                ; preds = %2, %.epilog-lcssa298
  %indvars.iv = phi i64 [ 1, %2 ], [ %indvars.iv.next, %.epilog-lcssa298 ]
  %.0157 = phi double [ 0.000000e+00, %2 ], [ %386, %.epilog-lcssa298 ]
  %.0149156 = phi i64 [ 0, %2 ], [ %387, %.epilog-lcssa298 ]
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %.0149156, ptr noundef nonnull %4, ptr noundef %1)
  %7 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %8 = call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double -1.000000e+00)
  %9 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %8, ptr noundef %1)
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter = and i64 %indvars.iv, 3
  %11 = icmp ult i64 %.0149156, 3
  br i1 %11, label %.unr-lcssa, label %.new

.new:                                             ; preds = %6
  %unroll_iter = and i64 %indvars.iv, 9223372036854775804
  br label %12

12:                                               ; preds = %12, %.new
  %.0141153 = phi double [ 1.000000e+00, %.new ], [ %35, %12 ]
  %.0142152 = phi double [ %9, %.new ], [ %34, %12 ]
  %.0146151 = phi i64 [ 0, %.new ], [ %36, %12 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %12 ]
  %13 = getelementptr inbounds double, ptr %10, i64 %.0146151
  %14 = load double, ptr %13, align 8, !tbaa !8
  %15 = fneg double %14
  %16 = call double @llvm.fmuladd.f64(double %15, double %.0141153, double %.0142152)
  %17 = fmul double %8, %.0141153
  %18 = or disjoint i64 %.0146151, 1
  %19 = getelementptr inbounds double, ptr %10, i64 %18
  %20 = load double, ptr %19, align 8, !tbaa !8
  %21 = fneg double %20
  %22 = call double @llvm.fmuladd.f64(double %21, double %17, double %16)
  %23 = fmul double %8, %17
  %24 = or disjoint i64 %.0146151, 2
  %25 = getelementptr inbounds double, ptr %10, i64 %24
  %26 = load double, ptr %25, align 8, !tbaa !8
  %27 = fneg double %26
  %28 = call double @llvm.fmuladd.f64(double %27, double %23, double %22)
  %29 = fmul double %8, %23
  %30 = or disjoint i64 %.0146151, 3
  %31 = getelementptr inbounds double, ptr %10, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !8
  %33 = fneg double %32
  %34 = call double @llvm.fmuladd.f64(double %33, double %29, double %28)
  %35 = fmul double %8, %29
  %36 = add nuw nsw i64 %.0146151, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.unr-lcssa, label %12, !llvm.loop !10

.unr-lcssa:                                       ; preds = %12, %6
  %.lcssa191.ph = phi double [ poison, %6 ], [ %34, %12 ]
  %.0141153.unr = phi double [ 1.000000e+00, %6 ], [ %35, %12 ]
  %.0142152.unr = phi double [ %9, %6 ], [ %34, %12 ]
  %.0146151.unr = phi i64 [ 0, %6 ], [ %36, %12 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %.0141153.epil = phi double [ %41, %.epil.preheader ], [ %.0141153.unr, %.unr-lcssa ]
  %.0142152.epil = phi double [ %40, %.epil.preheader ], [ %.0142152.unr, %.unr-lcssa ]
  %.0146151.epil = phi i64 [ %42, %.epil.preheader ], [ %.0146151.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %37 = getelementptr inbounds double, ptr %10, i64 %.0146151.epil
  %38 = load double, ptr %37, align 8, !tbaa !8
  %39 = fneg double %38
  %40 = call double @llvm.fmuladd.f64(double %39, double %.0141153.epil, double %.0142152.epil)
  %41 = fmul double %8, %.0141153.epil
  %42 = add nuw nsw i64 %.0146151.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !12

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %.lcssa191 = phi double [ %.lcssa191.ph, %.unr-lcssa ], [ %40, %.epil.preheader ]
  %43 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa191, ptr noundef %1)
  %44 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.0157, double noundef %43, ptr noundef %1)
  %45 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %46 = call double @llvm.fmuladd.f64(double %45, double 2.000000e+00, double -1.000000e+00)
  %47 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %46, ptr noundef %1)
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter215 = and i64 %indvars.iv, 3
  %49 = icmp ult i64 %.0149156, 3
  br i1 %49, label %.unr-lcssa213, label %.new212

.new212:                                          ; preds = %.epilog-lcssa
  %unroll_iter220 = and i64 %indvars.iv, 9223372036854775804
  br label %50

50:                                               ; preds = %50, %.new212
  %.0141153.1 = phi double [ 1.000000e+00, %.new212 ], [ %73, %50 ]
  %.0142152.1 = phi double [ %47, %.new212 ], [ %72, %50 ]
  %.0146151.1 = phi i64 [ 0, %.new212 ], [ %74, %50 ]
  %niter221 = phi i64 [ 0, %.new212 ], [ %niter221.next.3, %50 ]
  %51 = getelementptr inbounds double, ptr %48, i64 %.0146151.1
  %52 = load double, ptr %51, align 8, !tbaa !8
  %53 = fneg double %52
  %54 = call double @llvm.fmuladd.f64(double %53, double %.0141153.1, double %.0142152.1)
  %55 = fmul double %46, %.0141153.1
  %56 = or disjoint i64 %.0146151.1, 1
  %57 = getelementptr inbounds double, ptr %48, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !8
  %59 = fneg double %58
  %60 = call double @llvm.fmuladd.f64(double %59, double %55, double %54)
  %61 = fmul double %46, %55
  %62 = or disjoint i64 %.0146151.1, 2
  %63 = getelementptr inbounds double, ptr %48, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !8
  %65 = fneg double %64
  %66 = call double @llvm.fmuladd.f64(double %65, double %61, double %60)
  %67 = fmul double %46, %61
  %68 = or disjoint i64 %.0146151.1, 3
  %69 = getelementptr inbounds double, ptr %48, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !8
  %71 = fneg double %70
  %72 = call double @llvm.fmuladd.f64(double %71, double %67, double %66)
  %73 = fmul double %46, %67
  %74 = add nuw nsw i64 %.0146151.1, 4
  %niter221.next.3 = add i64 %niter221, 4
  %niter221.ncmp.3 = icmp eq i64 %niter221.next.3, %unroll_iter220
  br i1 %niter221.ncmp.3, label %.unr-lcssa213, label %50, !llvm.loop !10

.unr-lcssa213:                                    ; preds = %50, %.epilog-lcssa
  %.lcssa192.ph = phi double [ poison, %.epilog-lcssa ], [ %72, %50 ]
  %.0141153.1.unr = phi double [ 1.000000e+00, %.epilog-lcssa ], [ %73, %50 ]
  %.0142152.1.unr = phi double [ %47, %.epilog-lcssa ], [ %72, %50 ]
  %.0146151.1.unr = phi i64 [ 0, %.epilog-lcssa ], [ %74, %50 ]
  %lcmp.mod217.not = icmp eq i64 %xtraiter215, 0
  br i1 %lcmp.mod217.not, label %.epilog-lcssa218, label %.epil.preheader214

.epil.preheader214:                               ; preds = %.unr-lcssa213, %.epil.preheader214
  %.0141153.1.epil = phi double [ %79, %.epil.preheader214 ], [ %.0141153.1.unr, %.unr-lcssa213 ]
  %.0142152.1.epil = phi double [ %78, %.epil.preheader214 ], [ %.0142152.1.unr, %.unr-lcssa213 ]
  %.0146151.1.epil = phi i64 [ %80, %.epil.preheader214 ], [ %.0146151.1.unr, %.unr-lcssa213 ]
  %epil.iter216 = phi i64 [ %epil.iter216.next, %.epil.preheader214 ], [ 0, %.unr-lcssa213 ]
  %75 = getelementptr inbounds double, ptr %48, i64 %.0146151.1.epil
  %76 = load double, ptr %75, align 8, !tbaa !8
  %77 = fneg double %76
  %78 = call double @llvm.fmuladd.f64(double %77, double %.0141153.1.epil, double %.0142152.1.epil)
  %79 = fmul double %46, %.0141153.1.epil
  %80 = add nuw nsw i64 %.0146151.1.epil, 1
  %epil.iter216.next = add i64 %epil.iter216, 1
  %epil.iter216.cmp.not = icmp eq i64 %epil.iter216.next, %xtraiter215
  br i1 %epil.iter216.cmp.not, label %.epilog-lcssa218, label %.epil.preheader214, !llvm.loop !14

.epilog-lcssa218:                                 ; preds = %.epil.preheader214, %.unr-lcssa213
  %.lcssa192 = phi double [ %.lcssa192.ph, %.unr-lcssa213 ], [ %78, %.epil.preheader214 ]
  %81 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa192, ptr noundef %1)
  %82 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %44, double noundef %81, ptr noundef %1)
  %83 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %84 = call double @llvm.fmuladd.f64(double %83, double 2.000000e+00, double -1.000000e+00)
  %85 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %84, ptr noundef %1)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter225 = and i64 %indvars.iv, 3
  %87 = icmp ult i64 %.0149156, 3
  br i1 %87, label %.unr-lcssa223, label %.new222

.new222:                                          ; preds = %.epilog-lcssa218
  %unroll_iter230 = and i64 %indvars.iv, 9223372036854775804
  br label %88

88:                                               ; preds = %88, %.new222
  %.0141153.2 = phi double [ 1.000000e+00, %.new222 ], [ %111, %88 ]
  %.0142152.2 = phi double [ %85, %.new222 ], [ %110, %88 ]
  %.0146151.2 = phi i64 [ 0, %.new222 ], [ %112, %88 ]
  %niter231 = phi i64 [ 0, %.new222 ], [ %niter231.next.3, %88 ]
  %89 = getelementptr inbounds double, ptr %86, i64 %.0146151.2
  %90 = load double, ptr %89, align 8, !tbaa !8
  %91 = fneg double %90
  %92 = call double @llvm.fmuladd.f64(double %91, double %.0141153.2, double %.0142152.2)
  %93 = fmul double %84, %.0141153.2
  %94 = or disjoint i64 %.0146151.2, 1
  %95 = getelementptr inbounds double, ptr %86, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !8
  %97 = fneg double %96
  %98 = call double @llvm.fmuladd.f64(double %97, double %93, double %92)
  %99 = fmul double %84, %93
  %100 = or disjoint i64 %.0146151.2, 2
  %101 = getelementptr inbounds double, ptr %86, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !8
  %103 = fneg double %102
  %104 = call double @llvm.fmuladd.f64(double %103, double %99, double %98)
  %105 = fmul double %84, %99
  %106 = or disjoint i64 %.0146151.2, 3
  %107 = getelementptr inbounds double, ptr %86, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !8
  %109 = fneg double %108
  %110 = call double @llvm.fmuladd.f64(double %109, double %105, double %104)
  %111 = fmul double %84, %105
  %112 = add nuw nsw i64 %.0146151.2, 4
  %niter231.next.3 = add i64 %niter231, 4
  %niter231.ncmp.3 = icmp eq i64 %niter231.next.3, %unroll_iter230
  br i1 %niter231.ncmp.3, label %.unr-lcssa223, label %88, !llvm.loop !10

.unr-lcssa223:                                    ; preds = %88, %.epilog-lcssa218
  %.lcssa193.ph = phi double [ poison, %.epilog-lcssa218 ], [ %110, %88 ]
  %.0141153.2.unr = phi double [ 1.000000e+00, %.epilog-lcssa218 ], [ %111, %88 ]
  %.0142152.2.unr = phi double [ %85, %.epilog-lcssa218 ], [ %110, %88 ]
  %.0146151.2.unr = phi i64 [ 0, %.epilog-lcssa218 ], [ %112, %88 ]
  %lcmp.mod227.not = icmp eq i64 %xtraiter225, 0
  br i1 %lcmp.mod227.not, label %.epilog-lcssa228, label %.epil.preheader224

.epil.preheader224:                               ; preds = %.unr-lcssa223, %.epil.preheader224
  %.0141153.2.epil = phi double [ %117, %.epil.preheader224 ], [ %.0141153.2.unr, %.unr-lcssa223 ]
  %.0142152.2.epil = phi double [ %116, %.epil.preheader224 ], [ %.0142152.2.unr, %.unr-lcssa223 ]
  %.0146151.2.epil = phi i64 [ %118, %.epil.preheader224 ], [ %.0146151.2.unr, %.unr-lcssa223 ]
  %epil.iter226 = phi i64 [ %epil.iter226.next, %.epil.preheader224 ], [ 0, %.unr-lcssa223 ]
  %113 = getelementptr inbounds double, ptr %86, i64 %.0146151.2.epil
  %114 = load double, ptr %113, align 8, !tbaa !8
  %115 = fneg double %114
  %116 = call double @llvm.fmuladd.f64(double %115, double %.0141153.2.epil, double %.0142152.2.epil)
  %117 = fmul double %84, %.0141153.2.epil
  %118 = add nuw nsw i64 %.0146151.2.epil, 1
  %epil.iter226.next = add i64 %epil.iter226, 1
  %epil.iter226.cmp.not = icmp eq i64 %epil.iter226.next, %xtraiter225
  br i1 %epil.iter226.cmp.not, label %.epilog-lcssa228, label %.epil.preheader224, !llvm.loop !15

.epilog-lcssa228:                                 ; preds = %.epil.preheader224, %.unr-lcssa223
  %.lcssa193 = phi double [ %.lcssa193.ph, %.unr-lcssa223 ], [ %116, %.epil.preheader224 ]
  %119 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa193, ptr noundef %1)
  %120 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %82, double noundef %119, ptr noundef %1)
  %121 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %122 = call double @llvm.fmuladd.f64(double %121, double 2.000000e+00, double -1.000000e+00)
  %123 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %122, ptr noundef %1)
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter235 = and i64 %indvars.iv, 3
  %125 = icmp ult i64 %.0149156, 3
  br i1 %125, label %.unr-lcssa233, label %.new232

.new232:                                          ; preds = %.epilog-lcssa228
  %unroll_iter240 = and i64 %indvars.iv, 9223372036854775804
  br label %126

126:                                              ; preds = %126, %.new232
  %.0141153.3 = phi double [ 1.000000e+00, %.new232 ], [ %149, %126 ]
  %.0142152.3 = phi double [ %123, %.new232 ], [ %148, %126 ]
  %.0146151.3 = phi i64 [ 0, %.new232 ], [ %150, %126 ]
  %niter241 = phi i64 [ 0, %.new232 ], [ %niter241.next.3, %126 ]
  %127 = getelementptr inbounds double, ptr %124, i64 %.0146151.3
  %128 = load double, ptr %127, align 8, !tbaa !8
  %129 = fneg double %128
  %130 = call double @llvm.fmuladd.f64(double %129, double %.0141153.3, double %.0142152.3)
  %131 = fmul double %122, %.0141153.3
  %132 = or disjoint i64 %.0146151.3, 1
  %133 = getelementptr inbounds double, ptr %124, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !8
  %135 = fneg double %134
  %136 = call double @llvm.fmuladd.f64(double %135, double %131, double %130)
  %137 = fmul double %122, %131
  %138 = or disjoint i64 %.0146151.3, 2
  %139 = getelementptr inbounds double, ptr %124, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !8
  %141 = fneg double %140
  %142 = call double @llvm.fmuladd.f64(double %141, double %137, double %136)
  %143 = fmul double %122, %137
  %144 = or disjoint i64 %.0146151.3, 3
  %145 = getelementptr inbounds double, ptr %124, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !8
  %147 = fneg double %146
  %148 = call double @llvm.fmuladd.f64(double %147, double %143, double %142)
  %149 = fmul double %122, %143
  %150 = add nuw nsw i64 %.0146151.3, 4
  %niter241.next.3 = add i64 %niter241, 4
  %niter241.ncmp.3 = icmp eq i64 %niter241.next.3, %unroll_iter240
  br i1 %niter241.ncmp.3, label %.unr-lcssa233, label %126, !llvm.loop !10

.unr-lcssa233:                                    ; preds = %126, %.epilog-lcssa228
  %.lcssa194.ph = phi double [ poison, %.epilog-lcssa228 ], [ %148, %126 ]
  %.0141153.3.unr = phi double [ 1.000000e+00, %.epilog-lcssa228 ], [ %149, %126 ]
  %.0142152.3.unr = phi double [ %123, %.epilog-lcssa228 ], [ %148, %126 ]
  %.0146151.3.unr = phi i64 [ 0, %.epilog-lcssa228 ], [ %150, %126 ]
  %lcmp.mod237.not = icmp eq i64 %xtraiter235, 0
  br i1 %lcmp.mod237.not, label %.epilog-lcssa238, label %.epil.preheader234

.epil.preheader234:                               ; preds = %.unr-lcssa233, %.epil.preheader234
  %.0141153.3.epil = phi double [ %155, %.epil.preheader234 ], [ %.0141153.3.unr, %.unr-lcssa233 ]
  %.0142152.3.epil = phi double [ %154, %.epil.preheader234 ], [ %.0142152.3.unr, %.unr-lcssa233 ]
  %.0146151.3.epil = phi i64 [ %156, %.epil.preheader234 ], [ %.0146151.3.unr, %.unr-lcssa233 ]
  %epil.iter236 = phi i64 [ %epil.iter236.next, %.epil.preheader234 ], [ 0, %.unr-lcssa233 ]
  %151 = getelementptr inbounds double, ptr %124, i64 %.0146151.3.epil
  %152 = load double, ptr %151, align 8, !tbaa !8
  %153 = fneg double %152
  %154 = call double @llvm.fmuladd.f64(double %153, double %.0141153.3.epil, double %.0142152.3.epil)
  %155 = fmul double %122, %.0141153.3.epil
  %156 = add nuw nsw i64 %.0146151.3.epil, 1
  %epil.iter236.next = add i64 %epil.iter236, 1
  %epil.iter236.cmp.not = icmp eq i64 %epil.iter236.next, %xtraiter235
  br i1 %epil.iter236.cmp.not, label %.epilog-lcssa238, label %.epil.preheader234, !llvm.loop !16

.epilog-lcssa238:                                 ; preds = %.epil.preheader234, %.unr-lcssa233
  %.lcssa194 = phi double [ %.lcssa194.ph, %.unr-lcssa233 ], [ %154, %.epil.preheader234 ]
  %157 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa194, ptr noundef %1)
  %158 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %120, double noundef %157, ptr noundef %1)
  %159 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %160 = call double @llvm.fmuladd.f64(double %159, double 2.000000e+00, double -1.000000e+00)
  %161 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %160, ptr noundef %1)
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter245 = and i64 %indvars.iv, 3
  %163 = icmp ult i64 %.0149156, 3
  br i1 %163, label %.unr-lcssa243, label %.new242

.new242:                                          ; preds = %.epilog-lcssa238
  %unroll_iter250 = and i64 %indvars.iv, 9223372036854775804
  br label %164

164:                                              ; preds = %164, %.new242
  %.0141153.4 = phi double [ 1.000000e+00, %.new242 ], [ %187, %164 ]
  %.0142152.4 = phi double [ %161, %.new242 ], [ %186, %164 ]
  %.0146151.4 = phi i64 [ 0, %.new242 ], [ %188, %164 ]
  %niter251 = phi i64 [ 0, %.new242 ], [ %niter251.next.3, %164 ]
  %165 = getelementptr inbounds double, ptr %162, i64 %.0146151.4
  %166 = load double, ptr %165, align 8, !tbaa !8
  %167 = fneg double %166
  %168 = call double @llvm.fmuladd.f64(double %167, double %.0141153.4, double %.0142152.4)
  %169 = fmul double %160, %.0141153.4
  %170 = or disjoint i64 %.0146151.4, 1
  %171 = getelementptr inbounds double, ptr %162, i64 %170
  %172 = load double, ptr %171, align 8, !tbaa !8
  %173 = fneg double %172
  %174 = call double @llvm.fmuladd.f64(double %173, double %169, double %168)
  %175 = fmul double %160, %169
  %176 = or disjoint i64 %.0146151.4, 2
  %177 = getelementptr inbounds double, ptr %162, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !8
  %179 = fneg double %178
  %180 = call double @llvm.fmuladd.f64(double %179, double %175, double %174)
  %181 = fmul double %160, %175
  %182 = or disjoint i64 %.0146151.4, 3
  %183 = getelementptr inbounds double, ptr %162, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !8
  %185 = fneg double %184
  %186 = call double @llvm.fmuladd.f64(double %185, double %181, double %180)
  %187 = fmul double %160, %181
  %188 = add nuw nsw i64 %.0146151.4, 4
  %niter251.next.3 = add i64 %niter251, 4
  %niter251.ncmp.3 = icmp eq i64 %niter251.next.3, %unroll_iter250
  br i1 %niter251.ncmp.3, label %.unr-lcssa243, label %164, !llvm.loop !10

.unr-lcssa243:                                    ; preds = %164, %.epilog-lcssa238
  %.lcssa195.ph = phi double [ poison, %.epilog-lcssa238 ], [ %186, %164 ]
  %.0141153.4.unr = phi double [ 1.000000e+00, %.epilog-lcssa238 ], [ %187, %164 ]
  %.0142152.4.unr = phi double [ %161, %.epilog-lcssa238 ], [ %186, %164 ]
  %.0146151.4.unr = phi i64 [ 0, %.epilog-lcssa238 ], [ %188, %164 ]
  %lcmp.mod247.not = icmp eq i64 %xtraiter245, 0
  br i1 %lcmp.mod247.not, label %.epilog-lcssa248, label %.epil.preheader244

.epil.preheader244:                               ; preds = %.unr-lcssa243, %.epil.preheader244
  %.0141153.4.epil = phi double [ %193, %.epil.preheader244 ], [ %.0141153.4.unr, %.unr-lcssa243 ]
  %.0142152.4.epil = phi double [ %192, %.epil.preheader244 ], [ %.0142152.4.unr, %.unr-lcssa243 ]
  %.0146151.4.epil = phi i64 [ %194, %.epil.preheader244 ], [ %.0146151.4.unr, %.unr-lcssa243 ]
  %epil.iter246 = phi i64 [ %epil.iter246.next, %.epil.preheader244 ], [ 0, %.unr-lcssa243 ]
  %189 = getelementptr inbounds double, ptr %162, i64 %.0146151.4.epil
  %190 = load double, ptr %189, align 8, !tbaa !8
  %191 = fneg double %190
  %192 = call double @llvm.fmuladd.f64(double %191, double %.0141153.4.epil, double %.0142152.4.epil)
  %193 = fmul double %160, %.0141153.4.epil
  %194 = add nuw nsw i64 %.0146151.4.epil, 1
  %epil.iter246.next = add i64 %epil.iter246, 1
  %epil.iter246.cmp.not = icmp eq i64 %epil.iter246.next, %xtraiter245
  br i1 %epil.iter246.cmp.not, label %.epilog-lcssa248, label %.epil.preheader244, !llvm.loop !17

.epilog-lcssa248:                                 ; preds = %.epil.preheader244, %.unr-lcssa243
  %.lcssa195 = phi double [ %.lcssa195.ph, %.unr-lcssa243 ], [ %192, %.epil.preheader244 ]
  %195 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa195, ptr noundef %1)
  %196 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %158, double noundef %195, ptr noundef %1)
  %197 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %198 = call double @llvm.fmuladd.f64(double %197, double 2.000000e+00, double -1.000000e+00)
  %199 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %198, ptr noundef %1)
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter255 = and i64 %indvars.iv, 3
  %201 = icmp ult i64 %.0149156, 3
  br i1 %201, label %.unr-lcssa253, label %.new252

.new252:                                          ; preds = %.epilog-lcssa248
  %unroll_iter260 = and i64 %indvars.iv, 9223372036854775804
  br label %202

202:                                              ; preds = %202, %.new252
  %.0141153.5 = phi double [ 1.000000e+00, %.new252 ], [ %225, %202 ]
  %.0142152.5 = phi double [ %199, %.new252 ], [ %224, %202 ]
  %.0146151.5 = phi i64 [ 0, %.new252 ], [ %226, %202 ]
  %niter261 = phi i64 [ 0, %.new252 ], [ %niter261.next.3, %202 ]
  %203 = getelementptr inbounds double, ptr %200, i64 %.0146151.5
  %204 = load double, ptr %203, align 8, !tbaa !8
  %205 = fneg double %204
  %206 = call double @llvm.fmuladd.f64(double %205, double %.0141153.5, double %.0142152.5)
  %207 = fmul double %198, %.0141153.5
  %208 = or disjoint i64 %.0146151.5, 1
  %209 = getelementptr inbounds double, ptr %200, i64 %208
  %210 = load double, ptr %209, align 8, !tbaa !8
  %211 = fneg double %210
  %212 = call double @llvm.fmuladd.f64(double %211, double %207, double %206)
  %213 = fmul double %198, %207
  %214 = or disjoint i64 %.0146151.5, 2
  %215 = getelementptr inbounds double, ptr %200, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !8
  %217 = fneg double %216
  %218 = call double @llvm.fmuladd.f64(double %217, double %213, double %212)
  %219 = fmul double %198, %213
  %220 = or disjoint i64 %.0146151.5, 3
  %221 = getelementptr inbounds double, ptr %200, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !8
  %223 = fneg double %222
  %224 = call double @llvm.fmuladd.f64(double %223, double %219, double %218)
  %225 = fmul double %198, %219
  %226 = add nuw nsw i64 %.0146151.5, 4
  %niter261.next.3 = add i64 %niter261, 4
  %niter261.ncmp.3 = icmp eq i64 %niter261.next.3, %unroll_iter260
  br i1 %niter261.ncmp.3, label %.unr-lcssa253, label %202, !llvm.loop !10

.unr-lcssa253:                                    ; preds = %202, %.epilog-lcssa248
  %.lcssa196.ph = phi double [ poison, %.epilog-lcssa248 ], [ %224, %202 ]
  %.0141153.5.unr = phi double [ 1.000000e+00, %.epilog-lcssa248 ], [ %225, %202 ]
  %.0142152.5.unr = phi double [ %199, %.epilog-lcssa248 ], [ %224, %202 ]
  %.0146151.5.unr = phi i64 [ 0, %.epilog-lcssa248 ], [ %226, %202 ]
  %lcmp.mod257.not = icmp eq i64 %xtraiter255, 0
  br i1 %lcmp.mod257.not, label %.epilog-lcssa258, label %.epil.preheader254

.epil.preheader254:                               ; preds = %.unr-lcssa253, %.epil.preheader254
  %.0141153.5.epil = phi double [ %231, %.epil.preheader254 ], [ %.0141153.5.unr, %.unr-lcssa253 ]
  %.0142152.5.epil = phi double [ %230, %.epil.preheader254 ], [ %.0142152.5.unr, %.unr-lcssa253 ]
  %.0146151.5.epil = phi i64 [ %232, %.epil.preheader254 ], [ %.0146151.5.unr, %.unr-lcssa253 ]
  %epil.iter256 = phi i64 [ %epil.iter256.next, %.epil.preheader254 ], [ 0, %.unr-lcssa253 ]
  %227 = getelementptr inbounds double, ptr %200, i64 %.0146151.5.epil
  %228 = load double, ptr %227, align 8, !tbaa !8
  %229 = fneg double %228
  %230 = call double @llvm.fmuladd.f64(double %229, double %.0141153.5.epil, double %.0142152.5.epil)
  %231 = fmul double %198, %.0141153.5.epil
  %232 = add nuw nsw i64 %.0146151.5.epil, 1
  %epil.iter256.next = add i64 %epil.iter256, 1
  %epil.iter256.cmp.not = icmp eq i64 %epil.iter256.next, %xtraiter255
  br i1 %epil.iter256.cmp.not, label %.epilog-lcssa258, label %.epil.preheader254, !llvm.loop !18

.epilog-lcssa258:                                 ; preds = %.epil.preheader254, %.unr-lcssa253
  %.lcssa196 = phi double [ %.lcssa196.ph, %.unr-lcssa253 ], [ %230, %.epil.preheader254 ]
  %233 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa196, ptr noundef %1)
  %234 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %196, double noundef %233, ptr noundef %1)
  %235 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %236 = call double @llvm.fmuladd.f64(double %235, double 2.000000e+00, double -1.000000e+00)
  %237 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %236, ptr noundef %1)
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter265 = and i64 %indvars.iv, 3
  %239 = icmp ult i64 %.0149156, 3
  br i1 %239, label %.unr-lcssa263, label %.new262

.new262:                                          ; preds = %.epilog-lcssa258
  %unroll_iter270 = and i64 %indvars.iv, 9223372036854775804
  br label %240

240:                                              ; preds = %240, %.new262
  %.0141153.6 = phi double [ 1.000000e+00, %.new262 ], [ %263, %240 ]
  %.0142152.6 = phi double [ %237, %.new262 ], [ %262, %240 ]
  %.0146151.6 = phi i64 [ 0, %.new262 ], [ %264, %240 ]
  %niter271 = phi i64 [ 0, %.new262 ], [ %niter271.next.3, %240 ]
  %241 = getelementptr inbounds double, ptr %238, i64 %.0146151.6
  %242 = load double, ptr %241, align 8, !tbaa !8
  %243 = fneg double %242
  %244 = call double @llvm.fmuladd.f64(double %243, double %.0141153.6, double %.0142152.6)
  %245 = fmul double %236, %.0141153.6
  %246 = or disjoint i64 %.0146151.6, 1
  %247 = getelementptr inbounds double, ptr %238, i64 %246
  %248 = load double, ptr %247, align 8, !tbaa !8
  %249 = fneg double %248
  %250 = call double @llvm.fmuladd.f64(double %249, double %245, double %244)
  %251 = fmul double %236, %245
  %252 = or disjoint i64 %.0146151.6, 2
  %253 = getelementptr inbounds double, ptr %238, i64 %252
  %254 = load double, ptr %253, align 8, !tbaa !8
  %255 = fneg double %254
  %256 = call double @llvm.fmuladd.f64(double %255, double %251, double %250)
  %257 = fmul double %236, %251
  %258 = or disjoint i64 %.0146151.6, 3
  %259 = getelementptr inbounds double, ptr %238, i64 %258
  %260 = load double, ptr %259, align 8, !tbaa !8
  %261 = fneg double %260
  %262 = call double @llvm.fmuladd.f64(double %261, double %257, double %256)
  %263 = fmul double %236, %257
  %264 = add nuw nsw i64 %.0146151.6, 4
  %niter271.next.3 = add i64 %niter271, 4
  %niter271.ncmp.3 = icmp eq i64 %niter271.next.3, %unroll_iter270
  br i1 %niter271.ncmp.3, label %.unr-lcssa263, label %240, !llvm.loop !10

.unr-lcssa263:                                    ; preds = %240, %.epilog-lcssa258
  %.lcssa197.ph = phi double [ poison, %.epilog-lcssa258 ], [ %262, %240 ]
  %.0141153.6.unr = phi double [ 1.000000e+00, %.epilog-lcssa258 ], [ %263, %240 ]
  %.0142152.6.unr = phi double [ %237, %.epilog-lcssa258 ], [ %262, %240 ]
  %.0146151.6.unr = phi i64 [ 0, %.epilog-lcssa258 ], [ %264, %240 ]
  %lcmp.mod267.not = icmp eq i64 %xtraiter265, 0
  br i1 %lcmp.mod267.not, label %.epilog-lcssa268, label %.epil.preheader264

.epil.preheader264:                               ; preds = %.unr-lcssa263, %.epil.preheader264
  %.0141153.6.epil = phi double [ %269, %.epil.preheader264 ], [ %.0141153.6.unr, %.unr-lcssa263 ]
  %.0142152.6.epil = phi double [ %268, %.epil.preheader264 ], [ %.0142152.6.unr, %.unr-lcssa263 ]
  %.0146151.6.epil = phi i64 [ %270, %.epil.preheader264 ], [ %.0146151.6.unr, %.unr-lcssa263 ]
  %epil.iter266 = phi i64 [ %epil.iter266.next, %.epil.preheader264 ], [ 0, %.unr-lcssa263 ]
  %265 = getelementptr inbounds double, ptr %238, i64 %.0146151.6.epil
  %266 = load double, ptr %265, align 8, !tbaa !8
  %267 = fneg double %266
  %268 = call double @llvm.fmuladd.f64(double %267, double %.0141153.6.epil, double %.0142152.6.epil)
  %269 = fmul double %236, %.0141153.6.epil
  %270 = add nuw nsw i64 %.0146151.6.epil, 1
  %epil.iter266.next = add i64 %epil.iter266, 1
  %epil.iter266.cmp.not = icmp eq i64 %epil.iter266.next, %xtraiter265
  br i1 %epil.iter266.cmp.not, label %.epilog-lcssa268, label %.epil.preheader264, !llvm.loop !19

.epilog-lcssa268:                                 ; preds = %.epil.preheader264, %.unr-lcssa263
  %.lcssa197 = phi double [ %.lcssa197.ph, %.unr-lcssa263 ], [ %268, %.epil.preheader264 ]
  %271 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa197, ptr noundef %1)
  %272 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %234, double noundef %271, ptr noundef %1)
  %273 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %274 = call double @llvm.fmuladd.f64(double %273, double 2.000000e+00, double -1.000000e+00)
  %275 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %274, ptr noundef %1)
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter275 = and i64 %indvars.iv, 3
  %277 = icmp ult i64 %.0149156, 3
  br i1 %277, label %.unr-lcssa273, label %.new272

.new272:                                          ; preds = %.epilog-lcssa268
  %unroll_iter280 = and i64 %indvars.iv, 9223372036854775804
  br label %278

278:                                              ; preds = %278, %.new272
  %.0141153.7 = phi double [ 1.000000e+00, %.new272 ], [ %301, %278 ]
  %.0142152.7 = phi double [ %275, %.new272 ], [ %300, %278 ]
  %.0146151.7 = phi i64 [ 0, %.new272 ], [ %302, %278 ]
  %niter281 = phi i64 [ 0, %.new272 ], [ %niter281.next.3, %278 ]
  %279 = getelementptr inbounds double, ptr %276, i64 %.0146151.7
  %280 = load double, ptr %279, align 8, !tbaa !8
  %281 = fneg double %280
  %282 = call double @llvm.fmuladd.f64(double %281, double %.0141153.7, double %.0142152.7)
  %283 = fmul double %274, %.0141153.7
  %284 = or disjoint i64 %.0146151.7, 1
  %285 = getelementptr inbounds double, ptr %276, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !8
  %287 = fneg double %286
  %288 = call double @llvm.fmuladd.f64(double %287, double %283, double %282)
  %289 = fmul double %274, %283
  %290 = or disjoint i64 %.0146151.7, 2
  %291 = getelementptr inbounds double, ptr %276, i64 %290
  %292 = load double, ptr %291, align 8, !tbaa !8
  %293 = fneg double %292
  %294 = call double @llvm.fmuladd.f64(double %293, double %289, double %288)
  %295 = fmul double %274, %289
  %296 = or disjoint i64 %.0146151.7, 3
  %297 = getelementptr inbounds double, ptr %276, i64 %296
  %298 = load double, ptr %297, align 8, !tbaa !8
  %299 = fneg double %298
  %300 = call double @llvm.fmuladd.f64(double %299, double %295, double %294)
  %301 = fmul double %274, %295
  %302 = add nuw nsw i64 %.0146151.7, 4
  %niter281.next.3 = add i64 %niter281, 4
  %niter281.ncmp.3 = icmp eq i64 %niter281.next.3, %unroll_iter280
  br i1 %niter281.ncmp.3, label %.unr-lcssa273, label %278, !llvm.loop !10

.unr-lcssa273:                                    ; preds = %278, %.epilog-lcssa268
  %.lcssa198.ph = phi double [ poison, %.epilog-lcssa268 ], [ %300, %278 ]
  %.0141153.7.unr = phi double [ 1.000000e+00, %.epilog-lcssa268 ], [ %301, %278 ]
  %.0142152.7.unr = phi double [ %275, %.epilog-lcssa268 ], [ %300, %278 ]
  %.0146151.7.unr = phi i64 [ 0, %.epilog-lcssa268 ], [ %302, %278 ]
  %lcmp.mod277.not = icmp eq i64 %xtraiter275, 0
  br i1 %lcmp.mod277.not, label %.epilog-lcssa278, label %.epil.preheader274

.epil.preheader274:                               ; preds = %.unr-lcssa273, %.epil.preheader274
  %.0141153.7.epil = phi double [ %307, %.epil.preheader274 ], [ %.0141153.7.unr, %.unr-lcssa273 ]
  %.0142152.7.epil = phi double [ %306, %.epil.preheader274 ], [ %.0142152.7.unr, %.unr-lcssa273 ]
  %.0146151.7.epil = phi i64 [ %308, %.epil.preheader274 ], [ %.0146151.7.unr, %.unr-lcssa273 ]
  %epil.iter276 = phi i64 [ %epil.iter276.next, %.epil.preheader274 ], [ 0, %.unr-lcssa273 ]
  %303 = getelementptr inbounds double, ptr %276, i64 %.0146151.7.epil
  %304 = load double, ptr %303, align 8, !tbaa !8
  %305 = fneg double %304
  %306 = call double @llvm.fmuladd.f64(double %305, double %.0141153.7.epil, double %.0142152.7.epil)
  %307 = fmul double %274, %.0141153.7.epil
  %308 = add nuw nsw i64 %.0146151.7.epil, 1
  %epil.iter276.next = add i64 %epil.iter276, 1
  %epil.iter276.cmp.not = icmp eq i64 %epil.iter276.next, %xtraiter275
  br i1 %epil.iter276.cmp.not, label %.epilog-lcssa278, label %.epil.preheader274, !llvm.loop !20

.epilog-lcssa278:                                 ; preds = %.epil.preheader274, %.unr-lcssa273
  %.lcssa198 = phi double [ %.lcssa198.ph, %.unr-lcssa273 ], [ %306, %.epil.preheader274 ]
  %309 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa198, ptr noundef %1)
  %310 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %272, double noundef %309, ptr noundef %1)
  %311 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %312 = call double @llvm.fmuladd.f64(double %311, double 2.000000e+00, double -1.000000e+00)
  %313 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %312, ptr noundef %1)
  %314 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter285 = and i64 %indvars.iv, 3
  %315 = icmp ult i64 %.0149156, 3
  br i1 %315, label %.unr-lcssa283, label %.new282

.new282:                                          ; preds = %.epilog-lcssa278
  %unroll_iter290 = and i64 %indvars.iv, 9223372036854775804
  br label %316

316:                                              ; preds = %316, %.new282
  %.0141153.8 = phi double [ 1.000000e+00, %.new282 ], [ %339, %316 ]
  %.0142152.8 = phi double [ %313, %.new282 ], [ %338, %316 ]
  %.0146151.8 = phi i64 [ 0, %.new282 ], [ %340, %316 ]
  %niter291 = phi i64 [ 0, %.new282 ], [ %niter291.next.3, %316 ]
  %317 = getelementptr inbounds double, ptr %314, i64 %.0146151.8
  %318 = load double, ptr %317, align 8, !tbaa !8
  %319 = fneg double %318
  %320 = call double @llvm.fmuladd.f64(double %319, double %.0141153.8, double %.0142152.8)
  %321 = fmul double %312, %.0141153.8
  %322 = or disjoint i64 %.0146151.8, 1
  %323 = getelementptr inbounds double, ptr %314, i64 %322
  %324 = load double, ptr %323, align 8, !tbaa !8
  %325 = fneg double %324
  %326 = call double @llvm.fmuladd.f64(double %325, double %321, double %320)
  %327 = fmul double %312, %321
  %328 = or disjoint i64 %.0146151.8, 2
  %329 = getelementptr inbounds double, ptr %314, i64 %328
  %330 = load double, ptr %329, align 8, !tbaa !8
  %331 = fneg double %330
  %332 = call double @llvm.fmuladd.f64(double %331, double %327, double %326)
  %333 = fmul double %312, %327
  %334 = or disjoint i64 %.0146151.8, 3
  %335 = getelementptr inbounds double, ptr %314, i64 %334
  %336 = load double, ptr %335, align 8, !tbaa !8
  %337 = fneg double %336
  %338 = call double @llvm.fmuladd.f64(double %337, double %333, double %332)
  %339 = fmul double %312, %333
  %340 = add nuw nsw i64 %.0146151.8, 4
  %niter291.next.3 = add i64 %niter291, 4
  %niter291.ncmp.3 = icmp eq i64 %niter291.next.3, %unroll_iter290
  br i1 %niter291.ncmp.3, label %.unr-lcssa283, label %316, !llvm.loop !10

.unr-lcssa283:                                    ; preds = %316, %.epilog-lcssa278
  %.lcssa199.ph = phi double [ poison, %.epilog-lcssa278 ], [ %338, %316 ]
  %.0141153.8.unr = phi double [ 1.000000e+00, %.epilog-lcssa278 ], [ %339, %316 ]
  %.0142152.8.unr = phi double [ %313, %.epilog-lcssa278 ], [ %338, %316 ]
  %.0146151.8.unr = phi i64 [ 0, %.epilog-lcssa278 ], [ %340, %316 ]
  %lcmp.mod287.not = icmp eq i64 %xtraiter285, 0
  br i1 %lcmp.mod287.not, label %.epilog-lcssa288, label %.epil.preheader284

.epil.preheader284:                               ; preds = %.unr-lcssa283, %.epil.preheader284
  %.0141153.8.epil = phi double [ %345, %.epil.preheader284 ], [ %.0141153.8.unr, %.unr-lcssa283 ]
  %.0142152.8.epil = phi double [ %344, %.epil.preheader284 ], [ %.0142152.8.unr, %.unr-lcssa283 ]
  %.0146151.8.epil = phi i64 [ %346, %.epil.preheader284 ], [ %.0146151.8.unr, %.unr-lcssa283 ]
  %epil.iter286 = phi i64 [ %epil.iter286.next, %.epil.preheader284 ], [ 0, %.unr-lcssa283 ]
  %341 = getelementptr inbounds double, ptr %314, i64 %.0146151.8.epil
  %342 = load double, ptr %341, align 8, !tbaa !8
  %343 = fneg double %342
  %344 = call double @llvm.fmuladd.f64(double %343, double %.0141153.8.epil, double %.0142152.8.epil)
  %345 = fmul double %312, %.0141153.8.epil
  %346 = add nuw nsw i64 %.0146151.8.epil, 1
  %epil.iter286.next = add i64 %epil.iter286, 1
  %epil.iter286.cmp.not = icmp eq i64 %epil.iter286.next, %xtraiter285
  br i1 %epil.iter286.cmp.not, label %.epilog-lcssa288, label %.epil.preheader284, !llvm.loop !21

.epilog-lcssa288:                                 ; preds = %.epil.preheader284, %.unr-lcssa283
  %.lcssa199 = phi double [ %.lcssa199.ph, %.unr-lcssa283 ], [ %344, %.epil.preheader284 ]
  %347 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa199, ptr noundef %1)
  %348 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %310, double noundef %347, ptr noundef %1)
  %349 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %350 = call double @llvm.fmuladd.f64(double %349, double 2.000000e+00, double -1.000000e+00)
  %351 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.0149156, double noundef %350, ptr noundef %1)
  %352 = load ptr, ptr %5, align 8, !tbaa !5
  %xtraiter295 = and i64 %indvars.iv, 3
  %353 = icmp ult i64 %.0149156, 3
  br i1 %353, label %.unr-lcssa293, label %.new292

.new292:                                          ; preds = %.epilog-lcssa288
  %unroll_iter300 = and i64 %indvars.iv, 9223372036854775804
  br label %354

354:                                              ; preds = %354, %.new292
  %.0141153.9 = phi double [ 1.000000e+00, %.new292 ], [ %377, %354 ]
  %.0142152.9 = phi double [ %351, %.new292 ], [ %376, %354 ]
  %.0146151.9 = phi i64 [ 0, %.new292 ], [ %378, %354 ]
  %niter301 = phi i64 [ 0, %.new292 ], [ %niter301.next.3, %354 ]
  %355 = getelementptr inbounds double, ptr %352, i64 %.0146151.9
  %356 = load double, ptr %355, align 8, !tbaa !8
  %357 = fneg double %356
  %358 = call double @llvm.fmuladd.f64(double %357, double %.0141153.9, double %.0142152.9)
  %359 = fmul double %350, %.0141153.9
  %360 = or disjoint i64 %.0146151.9, 1
  %361 = getelementptr inbounds double, ptr %352, i64 %360
  %362 = load double, ptr %361, align 8, !tbaa !8
  %363 = fneg double %362
  %364 = call double @llvm.fmuladd.f64(double %363, double %359, double %358)
  %365 = fmul double %350, %359
  %366 = or disjoint i64 %.0146151.9, 2
  %367 = getelementptr inbounds double, ptr %352, i64 %366
  %368 = load double, ptr %367, align 8, !tbaa !8
  %369 = fneg double %368
  %370 = call double @llvm.fmuladd.f64(double %369, double %365, double %364)
  %371 = fmul double %350, %365
  %372 = or disjoint i64 %.0146151.9, 3
  %373 = getelementptr inbounds double, ptr %352, i64 %372
  %374 = load double, ptr %373, align 8, !tbaa !8
  %375 = fneg double %374
  %376 = call double @llvm.fmuladd.f64(double %375, double %371, double %370)
  %377 = fmul double %350, %371
  %378 = add nuw nsw i64 %.0146151.9, 4
  %niter301.next.3 = add i64 %niter301, 4
  %niter301.ncmp.3 = icmp eq i64 %niter301.next.3, %unroll_iter300
  br i1 %niter301.ncmp.3, label %.unr-lcssa293, label %354, !llvm.loop !10

.unr-lcssa293:                                    ; preds = %354, %.epilog-lcssa288
  %.lcssa200.ph = phi double [ poison, %.epilog-lcssa288 ], [ %376, %354 ]
  %.0141153.9.unr = phi double [ 1.000000e+00, %.epilog-lcssa288 ], [ %377, %354 ]
  %.0142152.9.unr = phi double [ %351, %.epilog-lcssa288 ], [ %376, %354 ]
  %.0146151.9.unr = phi i64 [ 0, %.epilog-lcssa288 ], [ %378, %354 ]
  %lcmp.mod297.not = icmp eq i64 %xtraiter295, 0
  br i1 %lcmp.mod297.not, label %.epilog-lcssa298, label %.epil.preheader294

.epil.preheader294:                               ; preds = %.unr-lcssa293, %.epil.preheader294
  %.0141153.9.epil = phi double [ %383, %.epil.preheader294 ], [ %.0141153.9.unr, %.unr-lcssa293 ]
  %.0142152.9.epil = phi double [ %382, %.epil.preheader294 ], [ %.0142152.9.unr, %.unr-lcssa293 ]
  %.0146151.9.epil = phi i64 [ %384, %.epil.preheader294 ], [ %.0146151.9.unr, %.unr-lcssa293 ]
  %epil.iter296 = phi i64 [ %epil.iter296.next, %.epil.preheader294 ], [ 0, %.unr-lcssa293 ]
  %379 = getelementptr inbounds double, ptr %352, i64 %.0146151.9.epil
  %380 = load double, ptr %379, align 8, !tbaa !8
  %381 = fneg double %380
  %382 = call double @llvm.fmuladd.f64(double %381, double %.0141153.9.epil, double %.0142152.9.epil)
  %383 = fmul double %350, %.0141153.9.epil
  %384 = add nuw nsw i64 %.0146151.9.epil, 1
  %epil.iter296.next = add i64 %epil.iter296, 1
  %epil.iter296.cmp.not = icmp eq i64 %epil.iter296.next, %xtraiter295
  br i1 %epil.iter296.cmp.not, label %.epilog-lcssa298, label %.epil.preheader294, !llvm.loop !22

.epilog-lcssa298:                                 ; preds = %.epil.preheader294, %.unr-lcssa293
  %.lcssa200 = phi double [ %.lcssa200.ph, %.unr-lcssa293 ], [ %382, %.epil.preheader294 ]
  %385 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.lcssa200, ptr noundef %1)
  %386 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %348, double noundef %385, ptr noundef %1)
  %387 = add nuw nsw i64 %.0149156, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond166.not = icmp eq i64 %387, 11
  br i1 %exitcond166.not, label %388, label %6, !llvm.loop !23

388:                                              ; preds = %.epilog-lcssa298
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 21, ptr noundef %1)
  br label %389

389:                                              ; preds = %388, %407
  %.1145162 = phi i64 [ 1, %388 ], [ %408, %407 ]
  %.0147161 = phi double [ 0.000000e+00, %388 ], [ %405, %407 ]
  %390 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %391 = call double @llvm.fmuladd.f64(double %390, double 2.000000e+00, double -1.000000e+00)
  br label %392

392:                                              ; preds = %389, %392
  %.1143160 = phi double [ 0.000000e+00, %389 ], [ %401, %392 ]
  %.1148159 = phi double [ %.0147161, %389 ], [ %405, %392 ]
  %.1150158 = phi i64 [ 0, %389 ], [ %406, %392 ]
  %393 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %394 = call double @llvm.fmuladd.f64(double %393, double 2.000000e+00, double -1.000000e+00)
  %395 = load ptr, ptr %5, align 8, !tbaa !5
  %396 = getelementptr inbounds double, ptr %395, i64 %.1150158
  store double %394, ptr %396, align 8, !tbaa !8
  %397 = call noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef %.1150158, double noundef %391, ptr noundef %1)
  %398 = load ptr, ptr %5, align 8, !tbaa !5
  %399 = getelementptr inbounds double, ptr %398, i64 %.1150158
  %400 = load double, ptr %399, align 8, !tbaa !8
  %401 = call double @llvm.fmuladd.f64(double %397, double %400, double %.1143160)
  %402 = call noundef double @_ZN11alglib_impl11legendresumEPNS_9ae_vectorEldPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.1150158, double noundef %391, ptr noundef %1)
  %403 = fsub double %401, %402
  %404 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %403, ptr noundef %1)
  %405 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.1148159, double noundef %404, ptr noundef %1)
  %406 = add nuw nsw i64 %.1150158, 1
  %exitcond167.not = icmp eq i64 %406, 21
  br i1 %exitcond167.not, label %407, label %392, !llvm.loop !24

407:                                              ; preds = %392
  %408 = add nuw nsw i64 %.1145162, 1
  %exitcond168.not = icmp eq i64 %408, 11
  br i1 %exitcond168.not, label %409, label %389, !llvm.loop !25

409:                                              ; preds = %407
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 0, ptr noundef nonnull %4, ptr noundef %1)
  %410 = load ptr, ptr %5, align 8, !tbaa !5
  %411 = load double, ptr %410, align 8, !tbaa !8
  %412 = fadd double %411, -1.000000e+00
  %413 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %412, ptr noundef %1)
  %414 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef 0.000000e+00, double noundef %413, ptr noundef %1)
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 1, ptr noundef nonnull %4, ptr noundef %1)
  %415 = load ptr, ptr %5, align 8, !tbaa !5
  %416 = load double, ptr %415, align 8, !tbaa !8
  %417 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %416, ptr noundef %1)
  %418 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %414, double noundef %417, ptr noundef %1)
  %419 = load ptr, ptr %5, align 8, !tbaa !5
  %420 = getelementptr inbounds i8, ptr %419, i64 8
  %421 = load double, ptr %420, align 8, !tbaa !8
  %422 = fadd double %421, -1.000000e+00
  %423 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %422, ptr noundef %1)
  %424 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %418, double noundef %423, ptr noundef %1)
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 2, ptr noundef nonnull %4, ptr noundef %1)
  %425 = load ptr, ptr %5, align 8, !tbaa !5
  %426 = load double, ptr %425, align 8, !tbaa !8
  %427 = fadd double %426, 5.000000e-01
  %428 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %427, ptr noundef %1)
  %429 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %424, double noundef %428, ptr noundef %1)
  %430 = load ptr, ptr %5, align 8, !tbaa !5
  %431 = getelementptr inbounds i8, ptr %430, i64 8
  %432 = load double, ptr %431, align 8, !tbaa !8
  %433 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %432, ptr noundef %1)
  %434 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %429, double noundef %433, ptr noundef %1)
  %435 = load ptr, ptr %5, align 8, !tbaa !5
  %436 = getelementptr inbounds i8, ptr %435, i64 16
  %437 = load double, ptr %436, align 8, !tbaa !8
  %438 = fadd double %437, -1.500000e+00
  %439 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %438, ptr noundef %1)
  %440 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %434, double noundef %439, ptr noundef %1)
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 3, ptr noundef nonnull %4, ptr noundef %1)
  %441 = load ptr, ptr %5, align 8, !tbaa !5
  %442 = load double, ptr %441, align 8, !tbaa !8
  %443 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %442, ptr noundef %1)
  %444 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %440, double noundef %443, ptr noundef %1)
  %445 = load ptr, ptr %5, align 8, !tbaa !5
  %446 = getelementptr inbounds i8, ptr %445, i64 8
  %447 = load double, ptr %446, align 8, !tbaa !8
  %448 = fadd double %447, 1.500000e+00
  %449 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %448, ptr noundef %1)
  %450 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %444, double noundef %449, ptr noundef %1)
  %451 = load ptr, ptr %5, align 8, !tbaa !5
  %452 = getelementptr inbounds i8, ptr %451, i64 16
  %453 = load double, ptr %452, align 8, !tbaa !8
  %454 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %453, ptr noundef %1)
  %455 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %450, double noundef %454, ptr noundef %1)
  %456 = load ptr, ptr %5, align 8, !tbaa !5
  %457 = getelementptr inbounds i8, ptr %456, i64 24
  %458 = load double, ptr %457, align 8, !tbaa !8
  %459 = fadd double %458, -2.500000e+00
  %460 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %459, ptr noundef %1)
  %461 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %455, double noundef %460, ptr noundef %1)
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 4, ptr noundef nonnull %4, ptr noundef %1)
  %462 = load ptr, ptr %5, align 8, !tbaa !5
  %463 = load double, ptr %462, align 8, !tbaa !8
  %464 = fadd double %463, -3.750000e-01
  %465 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %464, ptr noundef %1)
  %466 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %461, double noundef %465, ptr noundef %1)
  %467 = load ptr, ptr %5, align 8, !tbaa !5
  %468 = getelementptr inbounds i8, ptr %467, i64 8
  %469 = load double, ptr %468, align 8, !tbaa !8
  %470 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %469, ptr noundef %1)
  %471 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %466, double noundef %470, ptr noundef %1)
  %472 = load ptr, ptr %5, align 8, !tbaa !5
  %473 = getelementptr inbounds i8, ptr %472, i64 16
  %474 = load double, ptr %473, align 8, !tbaa !8
  %475 = fadd double %474, 3.750000e+00
  %476 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %475, ptr noundef %1)
  %477 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %471, double noundef %476, ptr noundef %1)
  %478 = load ptr, ptr %5, align 8, !tbaa !5
  %479 = getelementptr inbounds i8, ptr %478, i64 24
  %480 = load double, ptr %479, align 8, !tbaa !8
  %481 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %480, ptr noundef %1)
  %482 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %477, double noundef %481, ptr noundef %1)
  %483 = load ptr, ptr %5, align 8, !tbaa !5
  %484 = getelementptr inbounds i8, ptr %483, i64 32
  %485 = load double, ptr %484, align 8, !tbaa !8
  %486 = fadd double %485, -4.375000e+00
  %487 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %486, ptr noundef %1)
  %488 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %482, double noundef %487, ptr noundef %1)
  call void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef 9, ptr noundef nonnull %4, ptr noundef %1)
  %489 = load ptr, ptr %5, align 8, !tbaa !5
  %490 = load double, ptr %489, align 8, !tbaa !8
  %491 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %490, ptr noundef %1)
  %492 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %488, double noundef %491, ptr noundef %1)
  %493 = load ptr, ptr %5, align 8, !tbaa !5
  %494 = getelementptr inbounds i8, ptr %493, i64 8
  %495 = load double, ptr %494, align 8, !tbaa !8
  %496 = fadd double %495, 0xC003B00000000000
  %497 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %496, ptr noundef %1)
  %498 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %492, double noundef %497, ptr noundef %1)
  %499 = load ptr, ptr %5, align 8, !tbaa !5
  %500 = getelementptr inbounds i8, ptr %499, i64 16
  %501 = load double, ptr %500, align 8, !tbaa !8
  %502 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %501, ptr noundef %1)
  %503 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %498, double noundef %502, ptr noundef %1)
  %504 = load ptr, ptr %5, align 8, !tbaa !5
  %505 = getelementptr inbounds i8, ptr %504, i64 24
  %506 = load double, ptr %505, align 8, !tbaa !8
  %507 = fadd double %506, 0x40420C0000000000
  %508 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %507, ptr noundef %1)
  %509 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %503, double noundef %508, ptr noundef %1)
  %510 = load ptr, ptr %5, align 8, !tbaa !5
  %511 = getelementptr inbounds i8, ptr %510, i64 32
  %512 = load double, ptr %511, align 8, !tbaa !8
  %513 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %512, ptr noundef %1)
  %514 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %509, double noundef %513, ptr noundef %1)
  %515 = load ptr, ptr %5, align 8, !tbaa !5
  %516 = getelementptr inbounds i8, ptr %515, i64 40
  %517 = load double, ptr %516, align 8, !tbaa !8
  %518 = fadd double %517, 0xC061988000000000
  %519 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %518, ptr noundef %1)
  %520 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %514, double noundef %519, ptr noundef %1)
  %521 = load ptr, ptr %5, align 8, !tbaa !5
  %522 = getelementptr inbounds i8, ptr %521, i64 48
  %523 = load double, ptr %522, align 8, !tbaa !8
  %524 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %523, ptr noundef %1)
  %525 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %520, double noundef %524, ptr noundef %1)
  %526 = load ptr, ptr %5, align 8, !tbaa !5
  %527 = getelementptr inbounds i8, ptr %526, i64 56
  %528 = load double, ptr %527, align 8, !tbaa !8
  %529 = fadd double %528, 0x4069230000000000
  %530 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %529, ptr noundef %1)
  %531 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %525, double noundef %530, ptr noundef %1)
  %532 = load ptr, ptr %5, align 8, !tbaa !5
  %533 = getelementptr inbounds i8, ptr %532, i64 64
  %534 = load double, ptr %533, align 8, !tbaa !8
  %535 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %534, ptr noundef %1)
  %536 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %531, double noundef %535, ptr noundef %1)
  %537 = load ptr, ptr %5, align 8, !tbaa !5
  %538 = getelementptr inbounds i8, ptr %537, i64 72
  %539 = load double, ptr %538, align 8, !tbaa !8
  %540 = fadd double %539, 0xC057BD8000000000
  %541 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %540, ptr noundef %1)
  %542 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %536, double noundef %541, ptr noundef %1)
  %543 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %386, double noundef 1.000000e-09)
  br i1 %543, label %548, label %544

544:                                              ; preds = %409
  %545 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %405, double noundef 1.000000e-09)
  br i1 %545, label %548, label %546

546:                                              ; preds = %544
  %547 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %542, double noundef 1.000000e-09)
  br label %548

548:                                              ; preds = %546, %544, %409
  %549 = phi i1 [ true, %544 ], [ true, %409 ], [ %547, %546 ]
  br i1 %0, label %556, label %.sink.split

.sink.split:                                      ; preds = %548
  %550 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.695)
  %551 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.690, double noundef %386)
  %552 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.691, double noundef %405)
  %553 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.692, double noundef %542)
  %554 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.693, double noundef 1.000000e-09)
  %.str.1..str.2 = select i1 %549, ptr @.str.1, ptr @.str.2
  %555 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2)
  br label %556

556:                                              ; preds = %.sink.split, %548
  %557 = xor i1 %549, true
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret i1 %557
}

declare void @_ZN11alglib_impl20legendrecoefficientsElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl17legendrecalculateEldPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl11legendresumEPNS_9ae_vectorEldPNS_8ae_stateE(ptr noundef, i64 noundef, double noundef, ptr noundef) local_unnamed_addr #1

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}


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