; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests/test_c.ll (Z9testschurbPN11alglib_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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.719 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.720 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.721 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.722 = external hidden unnamed_addr constant [42 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 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 void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #1

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

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 zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9testschurbPN11alglib_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 %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %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 80, 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 1, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, 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 8, 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 %6, i8 0, i64 80, i1 false)
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %6, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %22, i1 noundef zeroext true)
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  store i8 0, ptr %14, align 1, !tbaa !5
  store i8 0, ptr %15, align 1, !tbaa !5
  store i8 0, ptr %13, align 1, !tbaa !5
  store i64 70, ptr %8, align 8, !tbaa !13
  store i64 1, ptr %12, align 8, !tbaa !13
  store double 2.500000e-13, ptr %18, align 8, !tbaa !11
  %23 = load i64, ptr %8, align 8, !tbaa !13
  %24 = sub nsw i64 %23, 1
  %25 = add nsw i64 %24, 1
  %26 = load i64, ptr %8, align 8, !tbaa !13
  %27 = sub nsw i64 %26, 1
  %28 = add nsw i64 %27, 1
  %29 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %25, i64 noundef %28, ptr noundef %29)
  store i64 0, ptr %9, align 8, !tbaa !13
  br label %30

30:                                               ; preds = %53, %2
  %31 = load i64, ptr %9, align 8, !tbaa !13
  %32 = load i64, ptr %8, align 8, !tbaa !13
  %33 = sub nsw i64 %32, 1
  %34 = icmp sle i64 %31, %33
  br i1 %34, label %35, label %56

35:                                               ; preds = %30
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %36

36:                                               ; preds = %49, %35
  %37 = load i64, ptr %10, align 8, !tbaa !13
  %38 = load i64, ptr %8, align 8, !tbaa !13
  %39 = sub nsw i64 %38, 1
  %40 = icmp sle i64 %37, %39
  br i1 %40, label %41, label %52

41:                                               ; preds = %36
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = load i64, ptr %9, align 8, !tbaa !13
  %45 = getelementptr inbounds ptr, ptr %43, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = load i64, ptr %10, align 8, !tbaa !13
  %48 = getelementptr inbounds double, ptr %46, i64 %47
  store double 0.000000e+00, ptr %48, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %41
  %50 = load i64, ptr %10, align 8, !tbaa !13
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %10, align 8, !tbaa !13
  br label %36, !llvm.loop !16

52:                                               ; preds = %36
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %9, align 8, !tbaa !13
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %9, align 8, !tbaa !13
  br label %30, !llvm.loop !18

56:                                               ; preds = %30
  store i64 1, ptr %7, align 8, !tbaa !13
  br label %57

57:                                               ; preds = %72, %56
  %58 = load i64, ptr %7, align 8, !tbaa !13
  %59 = load i64, ptr %8, align 8, !tbaa !13
  %60 = icmp sle i64 %58, %59
  br i1 %60, label %61, label %75

61:                                               ; preds = %57
  %62 = load i64, ptr %7, align 8, !tbaa !13
  %63 = icmp sgt i64 %62, 30
  br i1 %63, label %64, label %69

64:                                               ; preds = %61
  %65 = load i64, ptr %7, align 8, !tbaa !13
  %66 = srem i64 %65, 2
  %67 = icmp eq i64 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  br label %72

69:                                               ; preds = %64, %61
  %70 = load i64, ptr %7, align 8, !tbaa !13
  %71 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL30testschurunit_testschurproblemPN11alglib_impl9ae_matrixElPdS2_PbS3_PNS_8ae_stateE(ptr noundef %6, i64 noundef %70, ptr noundef %16, ptr noundef %17, ptr noundef %14, ptr noundef %15, ptr noundef %71)
  br label %72

72:                                               ; preds = %69, %68
  %73 = load i64, ptr %7, align 8, !tbaa !13
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %7, align 8, !tbaa !13
  br label %57, !llvm.loop !19

75:                                               ; preds = %57
  store i64 1, ptr %11, align 8, !tbaa !13
  br label %76

76:                                               ; preds = %130, %75
  %77 = load i64, ptr %11, align 8, !tbaa !13
  %78 = load i64, ptr %12, align 8, !tbaa !13
  %79 = icmp sle i64 %77, %78
  br i1 %79, label %80, label %133

80:                                               ; preds = %76
  store i64 1, ptr %7, align 8, !tbaa !13
  br label %81

81:                                               ; preds = %126, %80
  %82 = load i64, ptr %7, align 8, !tbaa !13
  %83 = load i64, ptr %8, align 8, !tbaa !13
  %84 = icmp sle i64 %82, %83
  br i1 %84, label %85, label %129

85:                                               ; preds = %81
  %86 = load i64, ptr %7, align 8, !tbaa !13
  %87 = icmp sgt i64 %86, 30
  br i1 %87, label %88, label %93

88:                                               ; preds = %85
  %89 = load i64, ptr %7, align 8, !tbaa !13
  %90 = srem i64 %89, 2
  %91 = icmp eq i64 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  br label %126

93:                                               ; preds = %88, %85
  store i64 0, ptr %9, align 8, !tbaa !13
  br label %94

94:                                               ; preds = %120, %93
  %95 = load i64, ptr %9, align 8, !tbaa !13
  %96 = load i64, ptr %7, align 8, !tbaa !13
  %97 = sub nsw i64 %96, 1
  %98 = icmp sle i64 %95, %97
  br i1 %98, label %99, label %123

99:                                               ; preds = %94
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %100

100:                                              ; preds = %116, %99
  %101 = load i64, ptr %10, align 8, !tbaa !13
  %102 = load i64, ptr %7, align 8, !tbaa !13
  %103 = sub nsw i64 %102, 1
  %104 = icmp sle i64 %101, %103
  br i1 %104, label %105, label %119

105:                                              ; preds = %100
  %106 = load ptr, ptr %4, align 8, !tbaa !9
  %107 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %106)
  %108 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %107, double -1.000000e+00)
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %6, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !15
  %111 = load i64, ptr %9, align 8, !tbaa !13
  %112 = getelementptr inbounds ptr, ptr %110, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = load i64, ptr %10, align 8, !tbaa !13
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  store double %108, ptr %115, align 8, !tbaa !11
  br label %116

116:                                              ; preds = %105
  %117 = load i64, ptr %10, align 8, !tbaa !13
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %10, align 8, !tbaa !13
  br label %100, !llvm.loop !20

119:                                              ; preds = %100
  br label %120

120:                                              ; preds = %119
  %121 = load i64, ptr %9, align 8, !tbaa !13
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %9, align 8, !tbaa !13
  br label %94, !llvm.loop !21

123:                                              ; preds = %94
  %124 = load i64, ptr %7, align 8, !tbaa !13
  %125 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZL30testschurunit_testschurproblemPN11alglib_impl9ae_matrixElPdS2_PbS3_PNS_8ae_stateE(ptr noundef %6, i64 noundef %124, ptr noundef %16, ptr noundef %17, ptr noundef %14, ptr noundef %15, ptr noundef %125)
  br label %126

126:                                              ; preds = %123, %92
  %127 = load i64, ptr %7, align 8, !tbaa !13
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %7, align 8, !tbaa !13
  br label %81, !llvm.loop !22

129:                                              ; preds = %81
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %11, align 8, !tbaa !13
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %11, align 8, !tbaa !13
  br label %76, !llvm.loop !23

133:                                              ; preds = %76
  %134 = load double, ptr %16, align 8, !tbaa !11
  %135 = load double, ptr %18, align 8, !tbaa !11
  %136 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %134, double noundef %135)
  br i1 %136, label %147, label %137

137:                                              ; preds = %133
  %138 = load double, ptr %17, align 8, !tbaa !11
  %139 = load double, ptr %18, align 8, !tbaa !11
  %140 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %138, double noundef %139)
  br i1 %140, label %147, label %141

141:                                              ; preds = %137
  %142 = load i8, ptr %14, align 1, !tbaa !5, !range !24, !noundef !25
  %143 = trunc i8 %142 to i1
  br i1 %143, label %147, label %144

144:                                              ; preds = %141
  %145 = load i8, ptr %15, align 1, !tbaa !5, !range !24, !noundef !25
  %146 = trunc i8 %145 to i1
  br label %147

147:                                              ; preds = %144, %141, %137, %133
  %148 = phi i1 [ true, %141 ], [ true, %137 ], [ true, %133 ], [ %146, %144 ]
  %149 = zext i1 %148 to i8
  store i8 %149, ptr %13, align 1, !tbaa !5
  %150 = load i8, ptr %3, align 1, !tbaa !5, !range !24, !noundef !25
  %151 = trunc i8 %150 to i1
  br i1 %151, label %184, label %152

152:                                              ; preds = %147
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.719)
  %154 = load double, ptr %16, align 8, !tbaa !11
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.720, double noundef %154)
  %156 = load double, ptr %17, align 8, !tbaa !11
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.721, double noundef %156)
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.722)
  %159 = load i8, ptr %14, align 1, !tbaa !5, !range !24, !noundef !25
  %160 = trunc i8 %159 to i1
  br i1 %160, label %163, label %161

161:                                              ; preds = %152
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %165

163:                                              ; preds = %152
  %164 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %165

165:                                              ; preds = %163, %161
  %166 = call i32 (ptr, ...) @printf(ptr noundef @.str.300)
  %167 = load i8, ptr %15, align 1, !tbaa !5, !range !24, !noundef !25
  %168 = trunc i8 %167 to i1
  br i1 %168, label %171, label %169

169:                                              ; preds = %165
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %173

171:                                              ; preds = %165
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %173

173:                                              ; preds = %171, %169
  %174 = load double, ptr %18, align 8, !tbaa !11
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.196, double noundef %174)
  %176 = load i8, ptr %13, align 1, !tbaa !5, !range !24, !noundef !25
  %177 = trunc i8 %176 to i1
  br i1 %177, label %178, label %180

178:                                              ; preds = %173
  %179 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %182

180:                                              ; preds = %173
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %182

182:                                              ; preds = %180, %178
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %184

184:                                              ; preds = %182, %147
  %185 = load i8, ptr %13, align 1, !tbaa !5, !range !24, !noundef !25
  %186 = trunc i8 %185 to i1
  %187 = xor i1 %186, true
  %188 = zext i1 %187 to i8
  store i8 %188, ptr %19, align 1, !tbaa !5
  %189 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %189)
  %190 = load i8, ptr %19, align 1, !tbaa !5, !range !24, !noundef !25
  %191 = trunc i8 %190 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, 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 80, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  ret i1 %191
}

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

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 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = !{i8 0, i8 2}
!25 = !{}


; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.719 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.720 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.721 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.722 = external hidden unnamed_addr constant [42 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

; 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 void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

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

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 zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9testschurbPN11alglib_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_matrix", align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #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(80) %4, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %1, i1 noundef zeroext true)
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !5
  store i8 0, ptr %5, align 1, !tbaa !9
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef 70, i64 noundef 70, ptr noundef %1)
  %9 = getelementptr inbounds i8, ptr %4, i64 72
  br label %.preheader59

.preheader59:                                     ; preds = %2, %36
  %.04661 = phi i64 [ 0, %2 ], [ %37, %36 ]
  br label %10

10:                                               ; preds = %10, %.preheader59
  %.04860 = phi i64 [ 0, %.preheader59 ], [ %35, %10 ]
  %11 = load ptr, ptr %9, align 8, !tbaa !11
  %12 = getelementptr inbounds ptr, ptr %11, i64 %.04661
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = getelementptr inbounds double, ptr %13, i64 %.04860
  store double 0.000000e+00, ptr %14, align 8, !tbaa !5
  %15 = load ptr, ptr %9, align 8, !tbaa !11
  %16 = getelementptr inbounds ptr, ptr %15, i64 %.04661
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds double, ptr %17, i64 %.04860
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  store double 0.000000e+00, ptr %19, align 8, !tbaa !5
  %20 = load ptr, ptr %9, align 8, !tbaa !11
  %21 = getelementptr inbounds ptr, ptr %20, i64 %.04661
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds double, ptr %22, i64 %.04860
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  store double 0.000000e+00, ptr %24, align 8, !tbaa !5
  %25 = load ptr, ptr %9, align 8, !tbaa !11
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.04661
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = getelementptr inbounds double, ptr %27, i64 %.04860
  %29 = getelementptr inbounds i8, ptr %28, i64 24
  store double 0.000000e+00, ptr %29, align 8, !tbaa !5
  %30 = load ptr, ptr %9, align 8, !tbaa !11
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.04661
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = getelementptr inbounds double, ptr %32, i64 %.04860
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  store double 0.000000e+00, ptr %34, align 8, !tbaa !5
  %35 = add nuw nsw i64 %.04860, 5
  %exitcond.not.4 = icmp eq i64 %35, 70
  br i1 %exitcond.not.4, label %36, label %10, !llvm.loop !14

36:                                               ; preds = %10
  %37 = add nuw nsw i64 %.04661, 1
  %exitcond66.not = icmp eq i64 %37, 70
  br i1 %exitcond66.not, label %.preheader58, label %.preheader59, !llvm.loop !16

.preheader58:                                     ; preds = %36, %42
  %.062 = phi i64 [ %43, %42 ], [ 1, %36 ]
  %38 = icmp ugt i64 %.062, 30
  %39 = and i64 %.062, 1
  %40 = icmp eq i64 %39, 0
  %or.cond = and i1 %38, %40
  br i1 %or.cond, label %42, label %41

41:                                               ; preds = %.preheader58
  call void @_ZL30testschurunit_testschurproblemPN11alglib_impl9ae_matrixElPdS2_PbS3_PNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.062, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %1)
  br label %42

42:                                               ; preds = %.preheader58, %41
  %43 = add nuw nsw i64 %.062, 1
  %exitcond67.not = icmp eq i64 %43, 71
  br i1 %exitcond67.not, label %.preheader57, label %.preheader58, !llvm.loop !17

.preheader57:                                     ; preds = %42, %58
  %.165 = phi i64 [ %59, %58 ], [ 1, %42 ]
  %44 = icmp ugt i64 %.165, 30
  %45 = and i64 %.165, 1
  %46 = icmp eq i64 %45, 0
  %or.cond55 = and i1 %44, %46
  br i1 %or.cond55, label %58, label %.preheader

.preheader:                                       ; preds = %.preheader57, %55
  %.14764 = phi i64 [ %56, %55 ], [ 0, %.preheader57 ]
  br label %47

47:                                               ; preds = %.preheader, %47
  %.14963 = phi i64 [ 0, %.preheader ], [ %54, %47 ]
  %48 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %1)
  %49 = call double @llvm.fmuladd.f64(double %48, double 2.000000e+00, double -1.000000e+00)
  %50 = load ptr, ptr %9, align 8, !tbaa !11
  %51 = getelementptr inbounds ptr, ptr %50, i64 %.14764
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds double, ptr %52, i64 %.14963
  store double %49, ptr %53, align 8, !tbaa !5
  %54 = add nuw nsw i64 %.14963, 1
  %exitcond68.not = icmp eq i64 %54, %.165
  br i1 %exitcond68.not, label %55, label %47, !llvm.loop !18

55:                                               ; preds = %47
  %56 = add nuw nsw i64 %.14764, 1
  %exitcond69.not = icmp eq i64 %56, %.165
  br i1 %exitcond69.not, label %57, label %.preheader, !llvm.loop !19

57:                                               ; preds = %55
  call void @_ZL30testschurunit_testschurproblemPN11alglib_impl9ae_matrixElPdS2_PbS3_PNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %.165, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %1)
  br label %58

58:                                               ; preds = %.preheader57, %57
  %59 = add nuw nsw i64 %.165, 1
  %exitcond70.not = icmp eq i64 %59, 71
  br i1 %exitcond70.not, label %.critedge, label %.preheader57, !llvm.loop !20

.critedge:                                        ; preds = %58
  %60 = load double, ptr %7, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %60, double noundef 2.500000e-13)
  br i1 %61, label %71, label %62

62:                                               ; preds = %.critedge
  %63 = load double, ptr %8, align 8, !tbaa !5
  %64 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %63, double noundef 2.500000e-13)
  br i1 %64, label %71, label %65

65:                                               ; preds = %62
  %66 = load i8, ptr %5, align 1, !tbaa !9, !range !21, !noundef !22
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %71, label %68

68:                                               ; preds = %65
  %69 = load i8, ptr %6, align 1, !tbaa !9, !range !21, !noundef !22
  %70 = trunc nuw i8 %69 to i1
  br label %71

71:                                               ; preds = %68, %65, %62, %.critedge
  %72 = phi i1 [ true, %65 ], [ true, %62 ], [ true, %.critedge ], [ %70, %68 ]
  br i1 %0, label %90, label %73

73:                                               ; preds = %71
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.719)
  %75 = load double, ptr %7, align 8, !tbaa !5
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.720, double noundef %75)
  %77 = load double, ptr %8, align 8, !tbaa !5
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.721, double noundef %77)
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.722)
  %80 = load i8, ptr %5, align 1, !tbaa !9, !range !21, !noundef !22
  %81 = trunc nuw i8 %80 to i1
  %.str.7..str.6 = select i1 %81, ptr @.str.7, ptr @.str.6
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.6)
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.300)
  %84 = load i8, ptr %6, align 1, !tbaa !9, !range !21, !noundef !22
  %85 = trunc nuw i8 %84 to i1
  %.str.7.sink71 = select i1 %85, ptr @.str.7, ptr @.str.6
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7.sink71)
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.196, double noundef 2.500000e-13)
  %.str.2.sink = select i1 %72, ptr @.str.1, ptr @.str.2
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %90

90:                                               ; preds = %73, %71
  %91 = xor i1 %72, true
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret i1 %91
}

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

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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = !{i8 0, i8 2}
!22 = !{}


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