; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (optimization)

; 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::optguardnonc1test0report" = type { i8, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl36smoothnessmonitorexportc1test0reportEPKNS_24optguardnonc1test0reportEPKNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %10, i32 0, i32 0
  %12 = load i8, ptr %11, align 8, !tbaa !9, !range !15, !noundef !16
  %13 = trunc i8 %12 to i1
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %14, i32 0, i32 0
  %16 = zext i1 %13 to i8
  store i8 %16, ptr %15, align 8, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %17, i32 0, i32 0
  %19 = load i8, ptr %18, align 8, !tbaa !9, !range !15, !noundef !16
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %171

21:                                               ; preds = %4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %22, i32 0, i32 8
  %24 = load i64, ptr %23, align 8, !tbaa !17
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %25, i32 0, i32 8
  store i64 %24, ptr %26, align 8, !tbaa !17
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %27, i32 0, i32 9
  %29 = load i64, ptr %28, align 8, !tbaa !18
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %30, i32 0, i32 9
  store i64 %29, ptr %31, align 8, !tbaa !18
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %32, i32 0, i32 10
  %34 = load i64, ptr %33, align 8, !tbaa !19
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %35, i32 0, i32 10
  store i64 %34, ptr %36, align 8, !tbaa !19
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %37, i32 0, i32 11
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %40, i32 0, i32 11
  store i64 %39, ptr %41, align 8, !tbaa !20
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !21
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %45, i32 0, i32 1
  store i64 %44, ptr %46, align 8, !tbaa !21
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %47, i32 0, i32 7
  %49 = load i64, ptr %48, align 8, !tbaa !22
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %50, i32 0, i32 7
  store i64 %49, ptr %51, align 8, !tbaa !22
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %52, i32 0, i32 4
  %54 = load i64, ptr %53, align 8, !tbaa !23
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %55, i32 0, i32 4
  store i64 %54, ptr %56, align 8, !tbaa !23
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %59, i32 0, i32 4
  %61 = load i64, ptr %60, align 8, !tbaa !23
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %58, i64 noundef %61, ptr noundef %62)
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %65, i32 0, i32 4
  %67 = load i64, ptr %66, align 8, !tbaa !23
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %64, i64 noundef %67, ptr noundef %68)
  store i64 0, ptr %9, align 8, !tbaa !24
  br label %69

69:                                               ; preds = %117, %21
  %70 = load i64, ptr %9, align 8, !tbaa !24
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %71, i32 0, i32 4
  %73 = load i64, ptr %72, align 8, !tbaa !23
  %74 = sub nsw i64 %73, 1
  %75 = icmp sle i64 %70, %74
  br i1 %75, label %76, label %120

76:                                               ; preds = %69
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %77, i32 0, i32 2
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !25
  %81 = load i64, ptr %9, align 8, !tbaa !24
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !26
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %84, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !25
  %87 = load i64, ptr %9, align 8, !tbaa !24
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !26
  %90 = fmul double %83, %89
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %91, i32 0, i32 2
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %92, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !25
  %95 = load i64, ptr %9, align 8, !tbaa !24
  %96 = getelementptr inbounds double, ptr %94, i64 %95
  store double %90, ptr %96, align 8, !tbaa !26
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %97, i32 0, i32 3
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !25
  %101 = load i64, ptr %9, align 8, !tbaa !24
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !26
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  %107 = load i64, ptr %9, align 8, !tbaa !24
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !26
  %110 = fmul double %103, %109
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %111, i32 0, i32 3
  %113 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %112, i32 0, i32 4
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  %115 = load i64, ptr %9, align 8, !tbaa !24
  %116 = getelementptr inbounds double, ptr %114, i64 %115
  store double %110, ptr %116, align 8, !tbaa !26
  br label %117

117:                                              ; preds = %76
  %118 = load i64, ptr %9, align 8, !tbaa !24
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %9, align 8, !tbaa !24
  br label %69, !llvm.loop !28

120:                                              ; preds = %69
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %121, i32 0, i32 5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %123, i32 0, i32 7
  %125 = load i64, ptr %124, align 8, !tbaa !22
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %122, i64 noundef %125, ptr noundef %126)
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %127, i32 0, i32 6
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %129, i32 0, i32 7
  %131 = load i64, ptr %130, align 8, !tbaa !22
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %128, i64 noundef %131, ptr noundef %132)
  store i64 0, ptr %9, align 8, !tbaa !24
  br label %133

133:                                              ; preds = %167, %120
  %134 = load i64, ptr %9, align 8, !tbaa !24
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %135, i32 0, i32 7
  %137 = load i64, ptr %136, align 8, !tbaa !22
  %138 = sub nsw i64 %137, 1
  %139 = icmp sle i64 %134, %138
  br i1 %139, label %140, label %170

140:                                              ; preds = %133
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %141, i32 0, i32 5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  %145 = load i64, ptr %9, align 8, !tbaa !24
  %146 = getelementptr inbounds double, ptr %144, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !26
  %148 = load ptr, ptr %7, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %148, i32 0, i32 5
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = load i64, ptr %9, align 8, !tbaa !24
  %153 = getelementptr inbounds double, ptr %151, i64 %152
  store double %147, ptr %153, align 8, !tbaa !26
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %154, i32 0, i32 6
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !25
  %158 = load i64, ptr %9, align 8, !tbaa !24
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !26
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %161, i32 0, i32 6
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %162, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !25
  %165 = load i64, ptr %9, align 8, !tbaa !24
  %166 = getelementptr inbounds double, ptr %164, i64 %165
  store double %160, ptr %166, align 8, !tbaa !26
  br label %167

167:                                              ; preds = %140
  %168 = load i64, ptr %9, align 8, !tbaa !24
  %169 = add nsw i64 %168, 1
  store i64 %169, ptr %9, align 8, !tbaa !24
  br label %133, !llvm.loop !30

170:                                              ; preds = %133
  br label %198

171:                                              ; preds = %4
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %172, i32 0, i32 8
  store i64 -1, ptr %173, align 8, !tbaa !17
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %174, i32 0, i32 9
  store i64 -1, ptr %175, align 8, !tbaa !18
  %176 = load ptr, ptr %7, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %176, i32 0, i32 10
  store i64 -1, ptr %177, align 8, !tbaa !19
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %178, i32 0, i32 11
  store i64 -1, ptr %179, align 8, !tbaa !20
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %180, i32 0, i32 1
  store i64 -1, ptr %181, align 8, !tbaa !21
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %182, i32 0, i32 7
  store i64 0, ptr %183, align 8, !tbaa !22
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %184, i32 0, i32 4
  store i64 0, ptr %185, align 8, !tbaa !23
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %187, i64 noundef 0, ptr noundef %188)
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %190, i64 noundef 0, ptr noundef %191)
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %192, i32 0, i32 5
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %193, i64 noundef 0, ptr noundef %194)
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %195, i32 0, i32 6
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %196, i64 noundef 0, ptr noundef %197)
  br label %198

198:                                              ; preds = %171, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !11, i64 0, !12, i64 8, !13, i64 16, !13, i64 80, !12, i64 144, !13, i64 152, !13, i64 216, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !11, i64 16, !14, i64 24, !7, i64 56}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!10, !12, i64 288}
!18 = !{!10, !12, i64 296}
!19 = !{!10, !12, i64 304}
!20 = !{!10, !12, i64 312}
!21 = !{!10, !12, i64 8}
!22 = !{!10, !12, i64 280}
!23 = !{!10, !12, i64 144}
!24 = !{!12, !12, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"double", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; 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"

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl36smoothnessmonitorexportc1test0reportEPKNS_24optguardnonc1test0reportEPKNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = load i8, ptr %0, align 8, !tbaa !5, !range !14, !noundef !15
  store i8 %5, ptr %2, align 8, !tbaa !5
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %85

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 296
  %9 = getelementptr inbounds i8, ptr %2, i64 296
  %10 = load <2 x i64>, ptr %8, align 8, !tbaa !16
  store <2 x i64> %10, ptr %9, align 8, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %0, i64 312
  %12 = load i64, ptr %11, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %2, i64 312
  store i64 %12, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %15, ptr %16, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %0, i64 280
  %18 = getelementptr inbounds i8, ptr %2, i64 280
  %19 = load <2 x i64>, ptr %17, align 8, !tbaa !16
  store <2 x i64> %19, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 144
  %21 = load i64, ptr %20, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %2, i64 144
  store i64 %21, ptr %22, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %2, i64 16
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %23, i64 noundef %21, ptr noundef %3)
  %24 = getelementptr inbounds i8, ptr %2, i64 80
  %25 = load i64, ptr %20, align 8, !tbaa !19
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %24, i64 noundef %25, ptr noundef %3)
  %26 = load i64, ptr %20, align 8, !tbaa !19
  %.not.not70 = icmp sgt i64 %26, 0
  br i1 %.not.not70, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %7
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  %28 = getelementptr inbounds i8, ptr %1, i64 56
  %29 = getelementptr inbounds i8, ptr %2, i64 72
  %30 = getelementptr inbounds i8, ptr %0, i64 136
  %31 = getelementptr inbounds i8, ptr %2, i64 136
  br label %32

32:                                               ; preds = %.lr.ph, %32
  %.071 = phi i64 [ 0, %.lr.ph ], [ %51, %32 ]
  %33 = load ptr, ptr %27, align 8, !tbaa !20
  %34 = getelementptr inbounds double, ptr %33, i64 %.071
  %35 = load double, ptr %34, align 8, !tbaa !21
  %36 = load ptr, ptr %28, align 8, !tbaa !20
  %37 = getelementptr inbounds double, ptr %36, i64 %.071
  %38 = load double, ptr %37, align 8, !tbaa !21
  %39 = fmul double %35, %38
  %40 = load ptr, ptr %29, align 8, !tbaa !20
  %41 = getelementptr inbounds double, ptr %40, i64 %.071
  store double %39, ptr %41, align 8, !tbaa !21
  %42 = load ptr, ptr %30, align 8, !tbaa !20
  %43 = getelementptr inbounds double, ptr %42, i64 %.071
  %44 = load double, ptr %43, align 8, !tbaa !21
  %45 = load ptr, ptr %28, align 8, !tbaa !20
  %46 = getelementptr inbounds double, ptr %45, i64 %.071
  %47 = load double, ptr %46, align 8, !tbaa !21
  %48 = fmul double %44, %47
  %49 = load ptr, ptr %31, align 8, !tbaa !20
  %50 = getelementptr inbounds double, ptr %49, i64 %.071
  store double %48, ptr %50, align 8, !tbaa !21
  %51 = add nuw nsw i64 %.071, 1
  %exitcond.not = icmp eq i64 %51, %26
  br i1 %exitcond.not, label %._crit_edge, label %32, !llvm.loop !23

._crit_edge:                                      ; preds = %32, %7
  %52 = getelementptr inbounds i8, ptr %2, i64 152
  %53 = load i64, ptr %17, align 8, !tbaa !25
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %52, i64 noundef %53, ptr noundef %3)
  %54 = getelementptr inbounds i8, ptr %2, i64 216
  %55 = load i64, ptr %17, align 8, !tbaa !25
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %54, i64 noundef %55, ptr noundef %3)
  %56 = load i64, ptr %17, align 8, !tbaa !25
  %.not.not6972 = icmp sgt i64 %56, 0
  br i1 %.not.not6972, label %.lr.ph75, label %.loopexit

.lr.ph75:                                         ; preds = %._crit_edge
  %57 = getelementptr inbounds i8, ptr %0, i64 208
  %58 = getelementptr inbounds i8, ptr %2, i64 208
  %59 = getelementptr inbounds i8, ptr %0, i64 272
  %60 = getelementptr inbounds i8, ptr %2, i64 272
  %xtraiter = and i64 %56, 1
  %61 = icmp eq i64 %56, 1
  br i1 %61, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph75.new

.lr.ph75.new:                                     ; preds = %.lr.ph75
  %unroll_iter = and i64 %56, 9223372036854775806
  br label %62

62:                                               ; preds = %62, %.lr.ph75.new
  %.173 = phi i64 [ 0, %.lr.ph75.new ], [ %84, %62 ]
  %niter = phi i64 [ 0, %.lr.ph75.new ], [ %niter.next.1, %62 ]
  %63 = load ptr, ptr %57, align 8, !tbaa !20
  %64 = getelementptr inbounds double, ptr %63, i64 %.173
  %65 = load double, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %58, align 8, !tbaa !20
  %67 = getelementptr inbounds double, ptr %66, i64 %.173
  store double %65, ptr %67, align 8, !tbaa !21
  %68 = load ptr, ptr %59, align 8, !tbaa !20
  %69 = getelementptr inbounds double, ptr %68, i64 %.173
  %70 = load double, ptr %69, align 8, !tbaa !21
  %71 = load ptr, ptr %60, align 8, !tbaa !20
  %72 = getelementptr inbounds double, ptr %71, i64 %.173
  store double %70, ptr %72, align 8, !tbaa !21
  %73 = or disjoint i64 %.173, 1
  %74 = load ptr, ptr %57, align 8, !tbaa !20
  %75 = getelementptr inbounds double, ptr %74, i64 %73
  %76 = load double, ptr %75, align 8, !tbaa !21
  %77 = load ptr, ptr %58, align 8, !tbaa !20
  %78 = getelementptr inbounds double, ptr %77, i64 %73
  store double %76, ptr %78, align 8, !tbaa !21
  %79 = load ptr, ptr %59, align 8, !tbaa !20
  %80 = getelementptr inbounds double, ptr %79, i64 %73
  %81 = load double, ptr %80, align 8, !tbaa !21
  %82 = load ptr, ptr %60, align 8, !tbaa !20
  %83 = getelementptr inbounds double, ptr %82, i64 %73
  store double %81, ptr %83, align 8, !tbaa !21
  %84 = add nuw nsw i64 %.173, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %62, !llvm.loop !26

85:                                               ; preds = %4
  %86 = getelementptr inbounds i8, ptr %2, i64 288
  %87 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 -1, ptr %87, align 8, !tbaa !18
  %88 = getelementptr inbounds i8, ptr %2, i64 280
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %86, i8 -1, i64 32, i1 false)
  store i64 0, ptr %88, align 8, !tbaa !25
  %89 = getelementptr inbounds i8, ptr %2, i64 144
  store i64 0, ptr %89, align 8, !tbaa !19
  %90 = getelementptr inbounds i8, ptr %2, i64 16
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %90, i64 noundef 0, ptr noundef %3)
  %91 = getelementptr inbounds i8, ptr %2, i64 80
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %91, i64 noundef 0, ptr noundef %3)
  %92 = getelementptr inbounds i8, ptr %2, i64 152
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %92, i64 noundef 0, ptr noundef %3)
  %93 = getelementptr inbounds i8, ptr %2, i64 216
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %93, i64 noundef 0, ptr noundef %3)
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %62, %.lr.ph75
  %.173.unr = phi i64 [ 0, %.lr.ph75 ], [ %84, %62 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %94 = load ptr, ptr %57, align 8, !tbaa !20
  %95 = getelementptr inbounds double, ptr %94, i64 %.173.unr
  %96 = load double, ptr %95, align 8, !tbaa !21
  %97 = load ptr, ptr %58, align 8, !tbaa !20
  %98 = getelementptr inbounds double, ptr %97, i64 %.173.unr
  store double %96, ptr %98, align 8, !tbaa !21
  %99 = load ptr, ptr %59, align 8, !tbaa !20
  %100 = getelementptr inbounds double, ptr %99, i64 %.173.unr
  %101 = load double, ptr %100, align 8, !tbaa !21
  %102 = load ptr, ptr %60, align 8, !tbaa !20
  %103 = getelementptr inbounds double, ptr %102, i64 %.173.unr
  store double %101, ptr %103, align 8, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %._crit_edge, %85
  ret void
}

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

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

!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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 80, !10, i64 144, !11, i64 152, !11, i64 216, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !7, i64 16, !12, i64 24, !8, i64 56}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !10, i64 0}
!17 = !{!6, !10, i64 312}
!18 = !{!6, !10, i64 8}
!19 = !{!6, !10, i64 144}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !10, i64 280}
!26 = distinct !{!26, !24}


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