; LLVM IR from siavashserver/neonrvm :: neonrvm (neonrvm_train)

; 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.neonrvm_cache = type { i64, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i8 }
%struct.neonrvm_param = type { i64, double, double, double, double, double, i64 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.neonrvm_train = external hidden unnamed_addr constant [105 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @is_finite(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @neonrvm_train(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5, i64 noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca 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 ptr %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !9
  store i64 %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !11
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp eq ptr null, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %7
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.neonrvm_cache, ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = icmp ne i64 44252, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %26, %7
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 726, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

32:                                               ; preds = %26
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = icmp eq ptr null, %33
  br i1 %34, label %40, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.neonrvm_param, ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %39 = icmp ne i64 44252, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %35, %32
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 731, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

41:                                               ; preds = %35
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = icmp eq ptr null, %42
  br i1 %43, label %49, label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.neonrvm_param, ptr %45, i32 0, i32 0
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = icmp ne i64 44252, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %44, %41
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 736, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

50:                                               ; preds = %44
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = icmp eq ptr null, %51
  br i1 %52, label %63, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.neonrvm_cache, ptr %55, i32 0, i32 14
  %57 = load i64, ptr %56, align 8, !tbaa !19
  %58 = load i64, ptr %14, align 8, !tbaa !9
  %59 = mul i64 %57, %58
  %60 = call zeroext i1 @is_finite(ptr noundef %54, i64 noundef %59)
  %61 = zext i1 %60 to i32
  %62 = icmp eq i32 0, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %53, %50
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 741, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

64:                                               ; preds = %53
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = icmp eq ptr null, %65
  br i1 %66, label %71, label %67

67:                                               ; preds = %64
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load i64, ptr %14, align 8, !tbaa !9
  %70 = call zeroext i1 @contains_bias(ptr noundef %68, i64 noundef %69)
  br i1 %70, label %71, label %72

71:                                               ; preds = %67, %64
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 746, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

72:                                               ; preds = %67
  %73 = load i64, ptr %14, align 8, !tbaa !9
  %74 = icmp ugt i64 1, %73
  br i1 %74, label %83, label %75

75:                                               ; preds = %72
  %76 = load i64, ptr %14, align 8, !tbaa !9
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.neonrvm_cache, ptr %77, i32 0, i32 15
  %79 = load i64, ptr %78, align 8, !tbaa !20
  %80 = sub i64 2147483647, %79
  %81 = sub i64 %80, 1
  %82 = icmp ugt i64 %76, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %75, %72
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 752, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

84:                                               ; preds = %75
  %85 = load i64, ptr %15, align 8, !tbaa !9
  %86 = icmp ugt i64 1, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 757, ptr noundef @__PRETTY_FUNCTION__.neonrvm_train) #4
  unreachable

88:                                               ; preds = %84
  %89 = load i64, ptr %15, align 8, !tbaa !9
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = load i64, ptr %15, align 8, !tbaa !9
  br label %96

94:                                               ; preds = %88
  %95 = load i64, ptr %14, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %94, %92
  %97 = phi i64 [ %93, %92 ], [ %95, %94 ]
  store i64 %97, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 0, ptr %17, align 8, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %133, %96
  %99 = load i64, ptr %17, align 8, !tbaa !9
  %100 = load i64, ptr %14, align 8, !tbaa !9
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = udiv i64 %100, %101
  %103 = icmp ult i64 %99, %102
  br i1 %103, label %104, label %136

104:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load i64, ptr %17, align 8, !tbaa !9
  %107 = load i64, ptr %15, align 8, !tbaa !9
  %108 = mul i64 %106, %107
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.neonrvm_cache, ptr %109, i32 0, i32 14
  %111 = load i64, ptr %110, align 8, !tbaa !19
  %112 = mul i64 %108, %111
  %113 = getelementptr inbounds double, ptr %105, i64 %112
  store ptr %113, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load i64, ptr %17, align 8, !tbaa !9
  %116 = load i64, ptr %15, align 8, !tbaa !9
  %117 = mul i64 %115, %116
  %118 = getelementptr inbounds i64, ptr %114, i64 %117
  store ptr %118, ptr %19, align 8, !tbaa !5
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = load i64, ptr %15, align 8, !tbaa !9
  %124 = call i32 @train_incremental(ptr noundef %119, ptr noundef %120, ptr noundef %121, ptr noundef %122, i64 noundef %123)
  store i32 %124, ptr %16, align 4, !tbaa !11
  %125 = load i32, ptr %16, align 4, !tbaa !11
  %126 = icmp ne i32 0, %125
  br i1 %126, label %127, label %129

127:                                              ; preds = %104
  %128 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %128, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %130

129:                                              ; preds = %104
  store i32 0, ptr %20, align 4
  br label %130

130:                                              ; preds = %129, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %131 = load i32, ptr %20, align 4
  switch i32 %131, label %175 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %133

133:                                              ; preds = %132
  %134 = load i64, ptr %17, align 8, !tbaa !9
  %135 = add i64 %134, 1
  store i64 %135, ptr %17, align 8, !tbaa !9
  br label %98, !llvm.loop !21

136:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %137 = load i64, ptr %14, align 8, !tbaa !9
  %138 = load i64, ptr %15, align 8, !tbaa !9
  %139 = urem i64 %137, %138
  store i64 %139, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = load i64, ptr %17, align 8, !tbaa !9
  %142 = load i64, ptr %15, align 8, !tbaa !9
  %143 = mul i64 %141, %142
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.neonrvm_cache, ptr %144, i32 0, i32 14
  %146 = load i64, ptr %145, align 8, !tbaa !19
  %147 = mul i64 %143, %146
  %148 = getelementptr inbounds double, ptr %140, i64 %147
  store ptr %148, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = load i64, ptr %17, align 8, !tbaa !9
  %151 = load i64, ptr %15, align 8, !tbaa !9
  %152 = mul i64 %150, %151
  %153 = getelementptr inbounds i64, ptr %149, i64 %152
  store ptr %153, ptr %23, align 8, !tbaa !5
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = load ptr, ptr %22, align 8, !tbaa !5
  %157 = load ptr, ptr %23, align 8, !tbaa !5
  %158 = load i64, ptr %21, align 8, !tbaa !9
  %159 = call i32 @train_incremental(ptr noundef %154, ptr noundef %155, ptr noundef %156, ptr noundef %157, i64 noundef %158)
  store i32 %159, ptr %16, align 4, !tbaa !11
  %160 = load i32, ptr %16, align 4, !tbaa !11
  %161 = icmp ne i32 0, %160
  br i1 %161, label %162, label %164

162:                                              ; preds = %136
  %163 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %163, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %174

164:                                              ; preds = %136
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.neonrvm_cache, ptr %165, i32 0, i32 18
  %167 = load i8, ptr %166, align 8, !tbaa !23, !range !24, !noundef !25
  %168 = trunc i8 %167 to i1
  %169 = zext i1 %168 to i32
  %170 = icmp eq i32 1, %169
  br i1 %170, label %171, label %173

171:                                              ; preds = %164
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  call void @move_bias(ptr noundef %172)
  br label %173

173:                                              ; preds = %171, %164
  store i32 0, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %174

174:                                              ; preds = %173, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %175

175:                                              ; preds = %174, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %176 = load i32, ptr %8, align 4
  ret i32 %176
}

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @contains_bias(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @train_incremental(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

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

; Function Attrs: nounwind uwtable
declare hidden void @move_bias(ptr noundef) #1

attributes #0 = { noreturn 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }
attributes #4 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"neonrvm_cache", !10, i64 0, !15, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !16, i64 144}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"neonrvm_param", !10, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !10, i64 48}
!19 = !{!14, !10, i64 112}
!20 = !{!14, !10, i64 120}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!14, !16, i64 144}
!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"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.neonrvm_train = external hidden unnamed_addr constant [105 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @is_finite(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @neonrvm_train(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5, i64 noundef %6) local_unnamed_addr #1 {
  %8 = icmp eq ptr %0, null
  br i1 %8, label %11, label %9

9:                                                ; preds = %7
  %10 = load i64, ptr %0, align 8, !tbaa !5
  %.not = icmp eq i64 %10, 44252
  br i1 %.not, label %12, label %11

11:                                               ; preds = %9, %7
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 726, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

12:                                               ; preds = %9
  %13 = icmp eq ptr %1, null
  br i1 %13, label %16, label %14

14:                                               ; preds = %12
  %15 = load i64, ptr %1, align 8, !tbaa !13
  %.not69 = icmp eq i64 %15, 44252
  br i1 %.not69, label %17, label %16

16:                                               ; preds = %14, %12
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 731, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

17:                                               ; preds = %14
  %18 = icmp eq ptr %2, null
  br i1 %18, label %21, label %19

19:                                               ; preds = %17
  %20 = load i64, ptr %2, align 8, !tbaa !13
  %.not70 = icmp eq i64 %20, 44252
  br i1 %.not70, label %22, label %21

21:                                               ; preds = %19, %17
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 736, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

22:                                               ; preds = %19
  %23 = icmp eq ptr %3, null
  br i1 %23, label %29, label %24

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %0, i64 112
  %26 = load i64, ptr %25, align 8, !tbaa !15
  %27 = mul i64 %26, %5
  %28 = tail call zeroext i1 @is_finite(ptr noundef nonnull %3, i64 noundef %27)
  br i1 %28, label %30, label %29

29:                                               ; preds = %24, %22
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 741, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

30:                                               ; preds = %24
  %31 = icmp eq ptr %4, null
  br i1 %31, label %34, label %32

32:                                               ; preds = %30
  %33 = tail call zeroext i1 @contains_bias(ptr noundef nonnull %4, i64 noundef %5)
  br i1 %33, label %34, label %35

34:                                               ; preds = %32, %30
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 746, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

35:                                               ; preds = %32
  %36 = icmp eq i64 %5, 0
  br i1 %36, label %42, label %37

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %0, i64 120
  %39 = load i64, ptr %38, align 8, !tbaa !16
  %40 = sub i64 2147483646, %39
  %41 = icmp ult i64 %40, %5
  br i1 %41, label %42, label %43

42:                                               ; preds = %37, %35
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 752, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

43:                                               ; preds = %37
  %44 = icmp eq i64 %6, 0
  br i1 %44, label %45, label %.lr.ph.preheader

45:                                               ; preds = %43
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 757, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_train) #3
  unreachable

.lr.ph.preheader:                                 ; preds = %43
  %46 = tail call i64 @llvm.umin.i64(i64 %6, i64 %5)
  %47 = udiv i64 %5, %46
  %48 = urem i64 %5, %46
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %55
  %.05974 = phi i64 [ %56, %55 ], [ 0, %.lr.ph.preheader ]
  %49 = mul i64 %.05974, %46
  %50 = load i64, ptr %25, align 8, !tbaa !15
  %51 = mul i64 %50, %49
  %52 = getelementptr inbounds double, ptr %3, i64 %51
  %53 = getelementptr inbounds i64, ptr %4, i64 %49
  %54 = tail call i32 @train_incremental(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %52, ptr noundef nonnull %53, i64 noundef %46)
  %.not72 = icmp eq i32 %54, 0
  br i1 %.not72, label %55, label %.loopexit

55:                                               ; preds = %.lr.ph
  %56 = add nuw i64 %.05974, 1
  %57 = icmp ult i64 %56, %47
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %55
  %58 = mul i64 %56, %46
  %59 = load i64, ptr %25, align 8, !tbaa !15
  %60 = mul i64 %59, %58
  %61 = getelementptr inbounds double, ptr %3, i64 %60
  %62 = getelementptr inbounds i64, ptr %4, i64 %58
  %63 = tail call i32 @train_incremental(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %61, ptr noundef nonnull %62, i64 noundef %48)
  %.not71 = icmp eq i32 %63, 0
  br i1 %.not71, label %64, label %.loopexit

64:                                               ; preds = %._crit_edge
  %65 = getelementptr inbounds i8, ptr %0, i64 144
  %66 = load i8, ptr %65, align 8, !tbaa !19, !range !20, !noundef !21
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %68, label %.loopexit

68:                                               ; preds = %64
  tail call void @move_bias(ptr noundef nonnull %0)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %._crit_edge, %68, %64
  %.3 = phi i32 [ %63, %._crit_edge ], [ 0, %68 ], [ 0, %64 ], [ %54, %.lr.ph ]
  ret i32 %.3
}

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @contains_bias(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @train_incremental(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @move_bias(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #2

attributes #0 = { noreturn 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { noreturn 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 = !{!"neonrvm_cache", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !12, i64 144}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_Bool", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"neonrvm_param", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48}
!15 = !{!6, !7, i64 112}
!16 = !{!6, !7, i64 120}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !12, i64 144}
!20 = !{i8 0, i8 2}
!21 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass