; LLVM IR from venumb/ZSPACE :: cpp/depends/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::dualsimplexstate" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::dualsimplexbasis", %"struct.alglib_impl::dualsimplexsubproblem", %"struct.alglib_impl::dualsimplexsubproblem", %"struct.alglib_impl::dualsimplexsubproblem", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, double, double, i64, i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::dualsimplexbasis" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i8, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i8, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sluv2buffer", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::sluv2buffer" = type { i64, %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::sluv2list1matrix", %"struct.alglib_impl::sluv2list1matrix", %"struct.alglib_impl::sluv2sparsetrail", %"struct.alglib_impl::sluv2densetrail", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::sluv2list1matrix" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64 }
%"struct.alglib_impl::sluv2sparsetrail" = type { i64, i64, %"struct.alglib_impl::ae_vector", i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::sluv2densetrail" = type { i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::dualsimplexsubproblem" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.340 = external hidden unnamed_addr constant [14 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

; 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 void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7dssinitElPNS_16dualsimplexstateEPNS_8ae_stateE(i64 noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  store i64 %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %8 = load i64, ptr %4, align 8, !tbaa !5
  %9 = icmp sgt i64 %8, 0
  %10 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef @.str.340, ptr noundef %10)
  %11 = load i64, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !9
  %13 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %12, i32 0, i32 4
  store i64 %11, ptr %13, align 8, !tbaa !11
  %14 = load ptr, ptr %5, align 8, !tbaa !9
  %15 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %14, i32 0, i32 5
  store i64 0, ptr %15, align 8, !tbaa !25
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  %17 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %16, i32 0, i32 0
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %18, ptr noundef %19)
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %20, i32 0, i32 2
  %22 = load i64, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %21, i64 noundef %22, ptr noundef %23)
  %24 = load ptr, ptr %5, align 8, !tbaa !9
  %25 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %24, i32 0, i32 3
  %26 = load i64, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %26, ptr noundef %27)
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %52, %3
  %29 = load i64, ptr %7, align 8, !tbaa !5
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = sub nsw i64 %30, 1
  %32 = icmp sle i64 %29, %31
  br i1 %32, label %33, label %55

33:                                               ; preds = %28
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %35, i32 0, i32 4
  %37 = load ptr, ptr %36, align 8, !tbaa !26
  %38 = load i64, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %37, i64 %38
  store double 1.000000e+00, ptr %39, align 8, !tbaa !27
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  %41 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %40, i32 0, i32 2
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !26
  %44 = load i64, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %43, i64 %44
  store double 0.000000e+00, ptr %45, align 8, !tbaa !27
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %46, i32 0, i32 3
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !26
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %49, i64 %50
  store double 0.000000e+00, ptr %51, align 8, !tbaa !27
  br label %52

52:                                               ; preds = %33
  %53 = load i64, ptr %7, align 8, !tbaa !5
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %7, align 8, !tbaa !5
  br label %28, !llvm.loop !28

55:                                               ; preds = %28
  %56 = load i64, ptr %4, align 8, !tbaa !5
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %57, i32 0, i32 9
  %59 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_implL33reviseddualsimplex_subprobleminitElPNS_21dualsimplexsubproblemEPNS_8ae_stateE(i64 noundef %56, ptr noundef %58, ptr noundef %59)
  %60 = load i64, ptr %4, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !9
  %62 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %61, i32 0, i32 8
  %63 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_implL28reviseddualsimplex_basisinitEllPNS_16dualsimplexbasisEPNS_8ae_stateE(i64 noundef %60, i64 noundef 0, ptr noundef %62, ptr noundef %63)
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %64, i32 0, i32 12
  %66 = load i64, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %65, i64 noundef %66, ptr noundef %67)
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %68, i32 0, i32 14
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %69, i64 noundef 0, ptr noundef %70)
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %71, i32 0, i32 15
  %73 = load i64, ptr %4, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %72, i64 noundef %73, ptr noundef %74)
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %93, %55
  %76 = load i64, ptr %7, align 8, !tbaa !5
  %77 = load i64, ptr %4, align 8, !tbaa !5
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %76, %78
  br i1 %79, label %80, label %96

80:                                               ; preds = %75
  %81 = load ptr, ptr %5, align 8, !tbaa !9
  %82 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %81, i32 0, i32 12
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !26
  %85 = load i64, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %84, i64 %85
  store double 0.000000e+00, ptr %86, align 8, !tbaa !27
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = getelementptr inbounds %"struct.alglib_impl::dualsimplexstate", ptr %87, i32 0, i32 15
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !26
  %91 = load i64, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds i64, ptr %90, i64 %91
  store i64 1, ptr %92, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %80
  %94 = load i64, ptr %7, align 8, !tbaa !5
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %7, align 8, !tbaa !5
  br label %75, !llvm.loop !30

96:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL33reviseddualsimplex_subprobleminitElPNS_21dualsimplexsubproblemEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28reviseddualsimplex_basisinitEllPNS_16dualsimplexbasisEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

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 = !{!"long", !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, !6, i64 256}
!12 = !{!"_ZTSN11alglib_impl16dualsimplexstateE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !6, i64 256, !6, i64 264, !16, i64 272, !16, i64 640, !17, i64 1008, !24, i64 7280, !24, i64 8072, !24, i64 8864, !13, i64 9656, !13, i64 9720, !13, i64 9784, !13, i64 9848, !19, i64 9912, !19, i64 9920, !19, i64 9928, !6, i64 9936, !6, i64 9944, !6, i64 9952, !6, i64 9960, !6, i64 9968, !13, i64 9976, !6, i64 10040, !13, i64 10048, !13, i64 10112, !13, i64 10176, !13, i64 10240, !13, i64 10304, !13, i64 10368, !13, i64 10432, !13, i64 10496, !13, i64 10560, !13, i64 10624, !13, i64 10688, !13, i64 10752, !13, i64 10816, !13, i64 10880}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!16 = !{!"_ZTSN11alglib_impl12sparsematrixE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !13, i64 256, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360}
!17 = !{!"_ZTSN11alglib_impl16dualsimplexbasisE", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 80, !13, i64 144, !6, i64 208, !14, i64 216, !6, i64 224, !18, i64 232, !16, i64 312, !16, i64 680, !16, i64 1048, !13, i64 1416, !13, i64 1480, !13, i64 1544, !13, i64 1608, !13, i64 1672, !13, i64 1736, !13, i64 1800, !14, i64 1864, !19, i64 1872, !13, i64 1880, !13, i64 1944, !13, i64 2008, !13, i64 2072, !13, i64 2136, !18, i64 2200, !13, i64 2280, !13, i64 2344, !16, i64 2408, !16, i64 2776, !20, i64 3144, !13, i64 5712, !13, i64 5776, !13, i64 5840, !16, i64 5904}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSN11alglib_impl11sluv2bufferE", !6, i64 0, !16, i64 8, !16, i64 376, !21, i64 744, !21, i64 968, !22, i64 1192, !23, i64 1816, !13, i64 1976, !18, i64 2040, !13, i64 2120, !13, i64 2184, !13, i64 2248, !13, i64 2312, !13, i64 2376, !13, i64 2440, !13, i64 2504}
!21 = !{!"_ZTSN11alglib_impl16sluv2list1matrixE", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 80, !13, i64 144, !6, i64 208, !6, i64 216}
!22 = !{!"_ZTSN11alglib_impl16sluv2sparsetrailE", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !13, i64 168, !13, i64 232, !13, i64 296, !13, i64 360, !13, i64 424, !13, i64 488, !6, i64 552, !13, i64 560}
!23 = !{!"_ZTSN11alglib_impl15sluv2densetrailE", !6, i64 0, !6, i64 8, !18, i64 16, !13, i64 96}
!24 = !{!"_ZTSN11alglib_impl21dualsimplexsubproblemE", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 80, !13, i64 144, !13, i64 208, !13, i64 272, !13, i64 336, !6, i64 400, !13, i64 408, !13, i64 472, !13, i64 536, !13, i64 600, !13, i64 664, !13, i64 728}
!25 = !{!12, !6, i64 264}
!26 = !{!7, !7, i64 0}
!27 = !{!19, !19, 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"

@.str.340 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7dssinitElPNS_16dualsimplexstateEPNS_8ae_stateE(i64 noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = icmp sgt i64 %0, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %4, ptr noundef nonnull @.str.340, ptr noundef %2)
  %5 = getelementptr inbounds i8, ptr %1, i64 256
  store i64 %0, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 264
  store i64 0, ptr %6, align 8, !tbaa !23
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %1, i64 noundef %0, ptr noundef %2)
  %7 = getelementptr inbounds i8, ptr %1, i64 128
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %0, ptr noundef %2)
  %8 = getelementptr inbounds i8, ptr %1, i64 192
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %0, ptr noundef %2)
  br i1 %4, label %.lr.ph, label %._crit_edge51.critedge

.lr.ph:                                           ; preds = %3
  %9 = getelementptr inbounds i8, ptr %1, i64 56
  %10 = getelementptr inbounds i8, ptr %1, i64 184
  %11 = getelementptr inbounds i8, ptr %1, i64 248
  %12 = add nsw i64 %0, -1
  %xtraiter = and i64 %0, 1
  %13 = icmp eq i64 %12, 0
  br i1 %13, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %0, 9223372036854775806
  br label %14

14:                                               ; preds = %14, %.lr.ph.new
  %.046 = phi i64 [ 0, %.lr.ph.new ], [ %28, %14 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %14 ]
  %15 = load ptr, ptr %9, align 8, !tbaa !24
  %16 = getelementptr inbounds double, ptr %15, i64 %.046
  store double 1.000000e+00, ptr %16, align 8, !tbaa !25
  %17 = load ptr, ptr %10, align 8, !tbaa !24
  %18 = getelementptr inbounds double, ptr %17, i64 %.046
  store double 0.000000e+00, ptr %18, align 8, !tbaa !25
  %19 = load ptr, ptr %11, align 8, !tbaa !24
  %20 = getelementptr inbounds double, ptr %19, i64 %.046
  store double 0.000000e+00, ptr %20, align 8, !tbaa !25
  %21 = or disjoint i64 %.046, 1
  %22 = load ptr, ptr %9, align 8, !tbaa !24
  %23 = getelementptr inbounds double, ptr %22, i64 %21
  store double 1.000000e+00, ptr %23, align 8, !tbaa !25
  %24 = load ptr, ptr %10, align 8, !tbaa !24
  %25 = getelementptr inbounds double, ptr %24, i64 %21
  store double 0.000000e+00, ptr %25, align 8, !tbaa !25
  %26 = load ptr, ptr %11, align 8, !tbaa !24
  %27 = getelementptr inbounds double, ptr %26, i64 %21
  store double 0.000000e+00, ptr %27, align 8, !tbaa !25
  %28 = add nuw nsw i64 %.046, 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 %._crit_edge.unr-lcssa, label %14, !llvm.loop !26

._crit_edge.unr-lcssa:                            ; preds = %14, %.lr.ph
  %.046.unr = phi i64 [ 0, %.lr.ph ], [ %28, %14 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %29 = load ptr, ptr %9, align 8, !tbaa !24
  %30 = getelementptr inbounds double, ptr %29, i64 %.046.unr
  store double 1.000000e+00, ptr %30, align 8, !tbaa !25
  %31 = load ptr, ptr %10, align 8, !tbaa !24
  %32 = getelementptr inbounds double, ptr %31, i64 %.046.unr
  store double 0.000000e+00, ptr %32, align 8, !tbaa !25
  %33 = load ptr, ptr %11, align 8, !tbaa !24
  %34 = getelementptr inbounds double, ptr %33, i64 %.046.unr
  store double 0.000000e+00, ptr %34, align 8, !tbaa !25
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %35 = getelementptr inbounds i8, ptr %1, i64 7280
  tail call void @_ZN11alglib_implL33reviseddualsimplex_subprobleminitElPNS_21dualsimplexsubproblemEPNS_8ae_stateE(i64 noundef %0, ptr noundef nonnull %35, ptr noundef %2)
  %36 = getelementptr inbounds i8, ptr %1, i64 1008
  tail call void @_ZN11alglib_implL28reviseddualsimplex_basisinitEllPNS_16dualsimplexbasisEPNS_8ae_stateE(i64 noundef %0, i64 noundef 0, ptr noundef nonnull %36, ptr noundef %2)
  %37 = getelementptr inbounds i8, ptr %1, i64 9656
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %37, i64 noundef %0, ptr noundef %2)
  %38 = getelementptr inbounds i8, ptr %1, i64 9784
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %38, i64 noundef 0, ptr noundef %2)
  %39 = getelementptr inbounds i8, ptr %1, i64 9848
  tail call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %39, i64 noundef %0, ptr noundef %2)
  br i1 %4, label %.lr.ph50, label %._crit_edge51

.lr.ph50:                                         ; preds = %._crit_edge
  %40 = getelementptr inbounds i8, ptr %1, i64 9712
  %41 = getelementptr inbounds i8, ptr %1, i64 9904
  %xtraiter54 = and i64 %0, 1
  %42 = icmp eq i64 %12, 0
  br i1 %42, label %._crit_edge51.loopexit.unr-lcssa, label %.lr.ph50.new

.lr.ph50.new:                                     ; preds = %.lr.ph50
  %unroll_iter56 = and i64 %0, 9223372036854775806
  br label %43

43:                                               ; preds = %43, %.lr.ph50.new
  %.148 = phi i64 [ 0, %.lr.ph50.new ], [ %53, %43 ]
  %niter57 = phi i64 [ 0, %.lr.ph50.new ], [ %niter57.next.1, %43 ]
  %44 = load ptr, ptr %40, align 8, !tbaa !24
  %45 = getelementptr inbounds double, ptr %44, i64 %.148
  store double 0.000000e+00, ptr %45, align 8, !tbaa !25
  %46 = load ptr, ptr %41, align 8, !tbaa !24
  %47 = getelementptr inbounds i64, ptr %46, i64 %.148
  store i64 1, ptr %47, align 8, !tbaa !28
  %48 = or disjoint i64 %.148, 1
  %49 = load ptr, ptr %40, align 8, !tbaa !24
  %50 = getelementptr inbounds double, ptr %49, i64 %48
  store double 0.000000e+00, ptr %50, align 8, !tbaa !25
  %51 = load ptr, ptr %41, align 8, !tbaa !24
  %52 = getelementptr inbounds i64, ptr %51, i64 %48
  store i64 1, ptr %52, align 8, !tbaa !28
  %53 = add nuw nsw i64 %.148, 2
  %niter57.next.1 = add i64 %niter57, 2
  %niter57.ncmp.1 = icmp eq i64 %niter57.next.1, %unroll_iter56
  br i1 %niter57.ncmp.1, label %._crit_edge51.loopexit.unr-lcssa, label %43, !llvm.loop !29

._crit_edge51.critedge:                           ; preds = %3
  %54 = getelementptr inbounds i8, ptr %1, i64 7280
  tail call void @_ZN11alglib_implL33reviseddualsimplex_subprobleminitElPNS_21dualsimplexsubproblemEPNS_8ae_stateE(i64 noundef %0, ptr noundef nonnull %54, ptr noundef %2)
  %55 = getelementptr inbounds i8, ptr %1, i64 1008
  tail call void @_ZN11alglib_implL28reviseddualsimplex_basisinitEllPNS_16dualsimplexbasisEPNS_8ae_stateE(i64 noundef %0, i64 noundef 0, ptr noundef nonnull %55, ptr noundef %2)
  %56 = getelementptr inbounds i8, ptr %1, i64 9656
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %56, i64 noundef %0, ptr noundef %2)
  %57 = getelementptr inbounds i8, ptr %1, i64 9784
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %57, i64 noundef 0, ptr noundef %2)
  %58 = getelementptr inbounds i8, ptr %1, i64 9848
  tail call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %58, i64 noundef %0, ptr noundef %2)
  br label %._crit_edge51

._crit_edge51.loopexit.unr-lcssa:                 ; preds = %43, %.lr.ph50
  %.148.unr = phi i64 [ 0, %.lr.ph50 ], [ %53, %43 ]
  %lcmp.mod55.not = icmp eq i64 %xtraiter54, 0
  br i1 %lcmp.mod55.not, label %._crit_edge51, label %._crit_edge51.loopexit.epilog-lcssa

._crit_edge51.loopexit.epilog-lcssa:              ; preds = %._crit_edge51.loopexit.unr-lcssa
  %59 = load ptr, ptr %40, align 8, !tbaa !24
  %60 = getelementptr inbounds double, ptr %59, i64 %.148.unr
  store double 0.000000e+00, ptr %60, align 8, !tbaa !25
  %61 = load ptr, ptr %41, align 8, !tbaa !24
  %62 = getelementptr inbounds i64, ptr %61, i64 %.148.unr
  store i64 1, ptr %62, align 8, !tbaa !28
  br label %._crit_edge51

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL33reviseddualsimplex_subprobleminitElPNS_21dualsimplexsubproblemEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28reviseddualsimplex_basisinitEllPNS_16dualsimplexbasisEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

!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, !8, i64 256}
!6 = !{!"_ZTSN11alglib_impl16dualsimplexstateE", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 192, !8, i64 256, !8, i64 264, !14, i64 272, !14, i64 640, !15, i64 1008, !22, i64 7280, !22, i64 8072, !22, i64 8864, !7, i64 9656, !7, i64 9720, !7, i64 9784, !7, i64 9848, !17, i64 9912, !17, i64 9920, !17, i64 9928, !8, i64 9936, !8, i64 9944, !8, i64 9952, !8, i64 9960, !8, i64 9968, !7, i64 9976, !8, i64 10040, !7, i64 10048, !7, i64 10112, !7, i64 10176, !7, i64 10240, !7, i64 10304, !7, i64 10368, !7, i64 10432, !7, i64 10496, !7, i64 10560, !7, i64 10624, !7, i64 10688, !7, i64 10752, !7, i64 10816, !7, i64 10880}
!7 = !{!"_ZTSN11alglib_impl9ae_vectorE", !8, i64 0, !8, i64 8, !11, i64 16, !12, i64 24, !9, i64 56}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!"_ZTSN11alglib_impl12sparsematrixE", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 192, !7, i64 256, !8, i64 320, !8, i64 328, !8, i64 336, !8, i64 344, !8, i64 352, !8, i64 360}
!15 = !{!"_ZTSN11alglib_impl16dualsimplexbasisE", !8, i64 0, !8, i64 8, !7, i64 16, !7, i64 80, !7, i64 144, !8, i64 208, !11, i64 216, !8, i64 224, !16, i64 232, !14, i64 312, !14, i64 680, !14, i64 1048, !7, i64 1416, !7, i64 1480, !7, i64 1544, !7, i64 1608, !7, i64 1672, !7, i64 1736, !7, i64 1800, !11, i64 1864, !17, i64 1872, !7, i64 1880, !7, i64 1944, !7, i64 2008, !7, i64 2072, !7, i64 2136, !16, i64 2200, !7, i64 2280, !7, i64 2344, !14, i64 2408, !14, i64 2776, !18, i64 3144, !7, i64 5712, !7, i64 5776, !7, i64 5840, !14, i64 5904}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !11, i64 32, !12, i64 40, !9, i64 72}
!17 = !{!"double", !9, i64 0}
!18 = !{!"_ZTSN11alglib_impl11sluv2bufferE", !8, i64 0, !14, i64 8, !14, i64 376, !19, i64 744, !19, i64 968, !20, i64 1192, !21, i64 1816, !7, i64 1976, !16, i64 2040, !7, i64 2120, !7, i64 2184, !7, i64 2248, !7, i64 2312, !7, i64 2376, !7, i64 2440, !7, i64 2504}
!19 = !{!"_ZTSN11alglib_impl16sluv2list1matrixE", !8, i64 0, !8, i64 8, !7, i64 16, !7, i64 80, !7, i64 144, !8, i64 208, !8, i64 216}
!20 = !{!"_ZTSN11alglib_impl16sluv2sparsetrailE", !8, i64 0, !8, i64 8, !7, i64 16, !8, i64 80, !8, i64 88, !8, i64 96, !7, i64 104, !7, i64 168, !7, i64 232, !7, i64 296, !7, i64 360, !7, i64 424, !7, i64 488, !8, i64 552, !7, i64 560}
!21 = !{!"_ZTSN11alglib_impl15sluv2densetrailE", !8, i64 0, !8, i64 8, !16, i64 16, !7, i64 96}
!22 = !{!"_ZTSN11alglib_impl21dualsimplexsubproblemE", !8, i64 0, !8, i64 8, !7, i64 16, !7, i64 80, !7, i64 144, !7, i64 208, !7, i64 272, !7, i64 336, !8, i64 400, !7, i64 408, !7, i64 472, !7, i64 536, !7, i64 600, !7, i64 664, !7, i64 728}
!23 = !{!6, !8, i64 264}
!24 = !{!9, !9, i64 0}
!25 = !{!17, !17, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!8, !8, i64 0}
!29 = distinct !{!29, !27}


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