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

@.str.419 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.420 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.421 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.422 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.423 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.424 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.425 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.426 = external hidden unnamed_addr constant [61 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 noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

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

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

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

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

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

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

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

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

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

declare void @_ZN11alglib_impl25_xconicconstraint_destroyEPv(ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30xccaddsoccorthogonalnoncanonicEPNS_17xconicconstraintsEPKNS_9ae_vectorES4_S4_ldbPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, double noundef %5, i1 noundef zeroext %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store double %5, ptr %14, align 8, !tbaa !11
  %22 = zext i1 %6 to i8
  store i8 %22, ptr %15, align 1, !tbaa !13
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #4
  %23 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %23, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 80, i1 false)
  %24 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %21, ptr noundef %20, ptr noundef %24, i1 noundef zeroext true)
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %25, i32 0, i32 0
  %27 = load i64, ptr %26, align 8, !tbaa !15
  store i64 %27, ptr %18, align 8, !tbaa !9
  %28 = load i64, ptr %13, align 8, !tbaa !9
  %29 = icmp sge i64 %28, 1
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.419, ptr noundef %30)
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %31, i32 0, i32 0
  %33 = load i64, ptr %32, align 8, !tbaa !20
  %34 = load i64, ptr %13, align 8, !tbaa !9
  %35 = icmp sge i64 %33, %34
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.420, ptr noundef %36)
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 0
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %40 = load i64, ptr %13, align 8, !tbaa !9
  %41 = icmp sge i64 %39, %40
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef @.str.421, ptr noundef %42)
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %43, i32 0, i32 0
  %45 = load i64, ptr %44, align 8, !tbaa !20
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = icmp sge i64 %45, %46
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.422, ptr noundef %48)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %92, %8
  %50 = load i64, ptr %19, align 8, !tbaa !9
  %51 = load i64, ptr %13, align 8, !tbaa !9
  %52 = sub nsw i64 %51, 1
  %53 = icmp sle i64 %50, %52
  br i1 %53, label %54, label %95

54:                                               ; preds = %49
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %55, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = load i64, ptr %19, align 8, !tbaa !9
  %59 = getelementptr inbounds i64, ptr %57, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = icmp sge i64 %60, 0
  br i1 %61, label %62, label %71

62:                                               ; preds = %54
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %63, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  %66 = load i64, ptr %19, align 8, !tbaa !9
  %67 = getelementptr inbounds i64, ptr %65, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = load i64, ptr %18, align 8, !tbaa !9
  %70 = icmp slt i64 %68, %69
  br label %71

71:                                               ; preds = %62, %54
  %72 = phi i1 [ false, %54 ], [ %70, %62 ]
  %73 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %72, ptr noundef @.str.423, ptr noundef %73)
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  %77 = load i64, ptr %19, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %76, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %79, ptr noundef %80)
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %81, ptr noundef @.str.424, ptr noundef %82)
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = load i64, ptr %19, align 8, !tbaa !9
  %87 = getelementptr inbounds double, ptr %85, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %88, ptr noundef %89)
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %90, ptr noundef @.str.425, ptr noundef %91)
  br label %92

92:                                               ; preds = %71
  %93 = load i64, ptr %19, align 8, !tbaa !9
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %19, align 8, !tbaa !9
  br label %49, !llvm.loop !23

95:                                               ; preds = %49
  %96 = load double, ptr %14, align 8, !tbaa !11
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %96, ptr noundef %97)
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %98, ptr noundef @.str.426, ptr noundef %99)
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 216, ptr noundef %100)
  store ptr %101, ptr %20, align 8, !tbaa !5
  %102 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %102, i8 0, i64 216, i1 false)
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef %103, ptr noundef %104, i1 noundef zeroext false)
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef %21, ptr noundef %105, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 216, ptr noundef @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef @_ZN11alglib_impl25_xconicconstraint_destroyEPv)
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %106, i32 0, i32 0
  store i64 -1, ptr %107, align 8, !tbaa !25
  %108 = load i64, ptr %13, align 8, !tbaa !9
  %109 = load ptr, ptr %20, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %109, i32 0, i32 1
  store i64 %108, ptr %110, align 8, !tbaa !27
  %111 = load i8, ptr %15, align 1, !tbaa !13, !range !28, !noundef !29
  %112 = trunc i8 %111 to i1
  %113 = load ptr, ptr %20, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %113, i32 0, i32 5
  %115 = zext i1 %112 to i8
  store i8 %115, ptr %114, align 8, !tbaa !30
  %116 = load i64, ptr %13, align 8, !tbaa !9
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %116, ptr noundef %117, ptr noundef %119, ptr noundef %120)
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = load ptr, ptr %20, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %123, i32 0, i32 3
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %121, ptr noundef %122, ptr noundef %124, ptr noundef %125)
  %126 = load i64, ptr %13, align 8, !tbaa !9
  %127 = add nsw i64 %126, 1
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %127, ptr noundef %129, ptr noundef %130)
  %131 = load i64, ptr %13, align 8, !tbaa !9
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = load ptr, ptr %20, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl6rcopyvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %131, ptr noundef %132, ptr noundef %134, ptr noundef %135)
  %136 = load double, ptr %14, align 8, !tbaa !11
  %137 = load double, ptr %14, align 8, !tbaa !11
  %138 = fmul double %136, %137
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %139, i32 0, i32 4
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  store double %138, ptr %144, align 8, !tbaa !11
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %146, ptr noundef %21, ptr noundef %147)
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %149)
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN11alglib_impl17xconicconstraintsE", !10, i64 0, !17, i64 8}
!17 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !10, i64 0, !10, i64 8, !14, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !18, i64 56, !19, i64 104}
!18 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !19, i64 8, !14, i64 40}
!19 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !19, i64 24, !7, i64 56}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSN11alglib_impl16xconicconstraintE", !10, i64 0, !10, i64 8, !21, i64 16, !21, i64 80, !21, i64 144, !14, i64 208}
!27 = !{!26, !10, i64 8}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!26, !14, i64 208}


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

@.str.419 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.420 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.421 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.422 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.423 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.424 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.425 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.426 = external hidden unnamed_addr constant [61 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 noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare void @_ZN11alglib_impl25_xconicconstraint_destroyEPv(ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30xccaddsoccorthogonalnoncanonicEPNS_17xconicconstraintsEPKNS_9ae_vectorES4_S4_ldbPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, double noundef %5, i1 noundef zeroext %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef %7, i1 noundef zeroext true)
  %12 = load i64, ptr %0, align 8, !tbaa !5
  %13 = icmp sgt i64 %4, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.419, ptr noundef %7)
  %14 = load i64, ptr %1, align 8, !tbaa !15
  %15 = icmp sge i64 %14, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.420, ptr noundef %7)
  %16 = load i64, ptr %2, align 8, !tbaa !15
  %17 = icmp sge i64 %16, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.421, ptr noundef %7)
  %18 = load i64, ptr %3, align 8, !tbaa !15
  %19 = icmp sge i64 %18, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.422, ptr noundef %7)
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8
  %20 = getelementptr inbounds i8, ptr %1, i64 56
  %21 = getelementptr inbounds i8, ptr %2, i64 56
  %22 = getelementptr inbounds i8, ptr %3, i64 56
  br label %23

23:                                               ; preds = %.lr.ph, %23
  %.056 = phi i64 [ 0, %.lr.ph ], [ %37, %23 ]
  %24 = load ptr, ptr %20, align 8, !tbaa !17
  %25 = getelementptr inbounds i64, ptr %24, i64 %.056
  %26 = load i64, ptr %25, align 8, !tbaa !18
  %27 = icmp sgt i64 %26, -1
  %28 = icmp slt i64 %26, %12
  %spec.select = select i1 %27, i1 %28, i1 false
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.423, ptr noundef %7)
  %29 = load ptr, ptr %21, align 8, !tbaa !17
  %30 = getelementptr inbounds double, ptr %29, i64 %.056
  %31 = load double, ptr %30, align 8, !tbaa !19
  %32 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %31, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef nonnull @.str.424, ptr noundef %7)
  %33 = load ptr, ptr %22, align 8, !tbaa !17
  %34 = getelementptr inbounds double, ptr %33, i64 %.056
  %35 = load double, ptr %34, align 8, !tbaa !19
  %36 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %35, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef nonnull @.str.425, ptr noundef %7)
  %37 = add nuw nsw i64 %.056, 1
  %exitcond.not = icmp eq i64 %37, %4
  br i1 %exitcond.not, label %._crit_edge, label %23, !llvm.loop !21

._crit_edge:                                      ; preds = %23, %8
  %38 = zext i1 %6 to i8
  %39 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %5, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef nonnull @.str.426, ptr noundef %7)
  %40 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 216, ptr noundef %7)
  store ptr %40, ptr %10, align 8, !tbaa !23
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(216) %40, i8 0, i64 216, i1 false)
  call void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef %40, ptr noundef %7, i1 noundef zeroext false)
  %41 = load ptr, ptr %10, align 8, !tbaa !23
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef nonnull %11, ptr noundef %41, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 216, ptr noundef nonnull @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef nonnull @_ZN11alglib_impl25_xconicconstraint_destroyEPv)
  %42 = load ptr, ptr %10, align 8, !tbaa !23
  store i64 -1, ptr %42, align 8, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  store i64 %4, ptr %43, align 8, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %42, i64 208
  store i8 %38, ptr %44, align 8, !tbaa !27
  %45 = getelementptr inbounds i8, ptr %42, i64 16
  call void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %1, ptr noundef nonnull %45, ptr noundef %7)
  %46 = load ptr, ptr %10, align 8, !tbaa !23
  %47 = getelementptr inbounds i8, ptr %46, i64 80
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %2, ptr noundef nonnull %47, ptr noundef %7)
  %48 = add nsw i64 %4, 1
  %49 = load ptr, ptr %10, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %49, i64 144
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %48, ptr noundef nonnull %50, ptr noundef %7)
  %51 = load ptr, ptr %10, align 8, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %51, i64 144
  call void @_ZN11alglib_impl6rcopyvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %4, ptr noundef nonnull %3, ptr noundef nonnull %52, ptr noundef %7)
  %53 = fmul double %5, %5
  %54 = load ptr, ptr %10, align 8, !tbaa !23
  %55 = getelementptr inbounds i8, ptr %54, i64 200
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds double, ptr %56, i64 %4
  store double %53, ptr %57, align 8, !tbaa !19
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  %59 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %58, ptr noundef nonnull %11, ptr noundef %7)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret void
}

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl17xconicconstraintsE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !14, i64 104}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSN11alglib_impl7ae_lockE", !12, i64 0, !14, i64 8, !11, i64 40}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!16, !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !14, i64 24, !8, i64 56}
!17 = !{!8, !8, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !12, i64 0}
!24 = !{!25, !7, i64 0}
!25 = !{!"_ZTSN11alglib_impl16xconicconstraintE", !7, i64 0, !7, i64 8, !16, i64 16, !16, i64 80, !16, i64 144, !11, i64 208}
!26 = !{!25, !7, i64 8}
!27 = !{!25, !11, i64 208}


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