; LLVM IR from sbu-fsl/kernel-ml :: src/models (readahead_net_data)

; 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.readahead_net = type { i32, ptr, ptr, ptr, ptr, %struct.model_data, %struct.model_multithreading, %struct.model_state, ptr, ptr, %struct.readahead_net_data_stat, %struct.readahead_norm_data_stat }
%struct.model_data = type { ptr, ptr, ptr, ptr }
%struct.model_multithreading = type { [32 x %struct.mt_buffer], [32 x i32], i32, i32, i32, i64, ptr }
%struct.mt_buffer = type { ptr, ptr }
%struct.model_state = type { i8, i32 }
%struct.readahead_net_data_stat = type { i64, double, double }
%struct.readahead_norm_data_stat = type { i64, ptr, ptr, ptr, ptr }
%struct.matrix = type { i32, i32, i32, %union.anon }
%union.anon = type { ptr }

@readahead_data_processing.timing_starts = external hidden global double, align 8
@readahead_data_processing.last_pg_idx = external hidden global i32, align 4
@readahead_data_processing.total_pg_idx_diffs = external hidden global double, align 8
@readahead_data_processing.min_pg_idx_norm = external hidden global i32, align 4
@readahead_data_processing.max_pg_idx_norm = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @readahead_normalized_online_data(ptr noundef, i32 noundef, i1 noundef zeroext) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @readahead_online_data_update(double noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @readahead_data_processing(ptr noundef %0, ptr noundef %1, i32 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, i64 noundef %5) #0 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  %15 = zext i1 %3 to i8
  store i8 %15, ptr %11, align 1, !tbaa !11
  %16 = zext i1 %4 to i8
  store i8 %16, ptr %12, align 1, !tbaa !11
  store i64 %5, ptr %13, align 8, !tbaa !13
  %17 = load i8, ptr %12, align 1, !tbaa !11, !range !15, !noundef !16
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %20

19:                                               ; preds = %6
  store double 0.000000e+00, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !17
  store i1 false, ptr %7, align 1
  br label %240

20:                                               ; preds = %6
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.readahead_net, ptr %21, i32 0, i32 10
  %23 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %22, i32 0, i32 0
  %24 = load i64, ptr %23, align 8, !tbaa !19
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %20
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 0
  %29 = load double, ptr %28, align 8, !tbaa !17
  store double %29, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !17
  br label %30

30:                                               ; preds = %26, %20
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i64 2
  %33 = load double, ptr %32, align 8, !tbaa !17
  %34 = fcmp ogt double %33, 1.000000e+06
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  store i1 false, ptr %7, align 1
  br label %240

36:                                               ; preds = %30
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.readahead_net, ptr %37, i32 0, i32 10
  %39 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %38, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !19
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %39, align 8, !tbaa !19
  %42 = load i32, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !9
  %43 = icmp ne i32 %42, -1
  br i1 %43, label %44, label %55

44:                                               ; preds = %36
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i64 2
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = fptosi double %47 to i32
  %49 = load i32, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !9
  %50 = sub nsw i32 %48, %49
  %51 = call i32 @llvm.abs.i32(i32 %50, i1 true)
  %52 = sitofp i32 %51 to double
  %53 = load double, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !17
  %54 = fadd double %53, %52
  store double %54, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !17
  br label %55

55:                                               ; preds = %44, %36
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 2
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = fptosi double %58 to i32
  store i32 %59, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !9
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %60, i64 2
  %62 = load double, ptr %61, align 8, !tbaa !17
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @readahead_online_data_update(double noundef %62, ptr noundef %63)
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %64, i64 2
  %66 = load double, ptr %65, align 8, !tbaa !17
  %67 = load i32, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !9
  %68 = sitofp i32 %67 to double
  %69 = fcmp olt double %66, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %55
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %71, i64 2
  %73 = load double, ptr %72, align 8, !tbaa !17
  %74 = fptosi double %73 to i32
  store i32 %74, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %70, %55
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %76, i64 2
  %78 = load double, ptr %77, align 8, !tbaa !17
  %79 = load i32, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !9
  %80 = sitofp i32 %79 to double
  %81 = fcmp ogt double %78, %80
  br i1 %81, label %82, label %87

82:                                               ; preds = %75
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds double, ptr %83, i64 2
  %85 = load double, ptr %84, align 8, !tbaa !17
  %86 = fptosi double %85 to i32
  store i32 %86, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %82, %75
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 0
  %90 = load double, ptr %89, align 8, !tbaa !17
  %91 = load double, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !17
  %92 = fsub double %90, %91
  %93 = fcmp ogt double %92, 1.000000e+09
  br i1 %93, label %94, label %239

94:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %95 = load i32, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !9
  %96 = load i32, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !9
  %97 = sub nsw i32 %95, %96
  store i32 %97, ptr %14, align 4, !tbaa !9
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.readahead_net, ptr %98, i32 0, i32 10
  %100 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %99, i32 0, i32 0
  %101 = load i64, ptr %100, align 8, !tbaa !19
  %102 = sitofp i64 %101 to double
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.readahead_net, ptr %103, i32 0, i32 8
  %105 = load ptr, ptr %104, align 8, !tbaa !26
  %106 = getelementptr inbounds %struct.matrix, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !27
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.readahead_net, ptr %108, i32 0, i32 8
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = getelementptr inbounds %struct.matrix, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !28
  %113 = mul nsw i32 0, %112
  %114 = add nsw i32 %113, 0
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %107, i64 %115
  store double %102, ptr %116, align 8, !tbaa !17
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.readahead_net, ptr %117, i32 0, i32 10
  %119 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %118, i32 0, i32 2
  %120 = load double, ptr %119, align 8, !tbaa !30
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.readahead_net, ptr %121, i32 0, i32 10
  %123 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %122, i32 0, i32 0
  %124 = load i64, ptr %123, align 8, !tbaa !19
  %125 = sitofp i64 %124 to double
  %126 = fdiv double %120, %125
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.readahead_net, ptr %127, i32 0, i32 8
  %129 = load ptr, ptr %128, align 8, !tbaa !26
  %130 = getelementptr inbounds %struct.matrix, ptr %129, i32 0, i32 3
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.readahead_net, ptr %132, i32 0, i32 8
  %134 = load ptr, ptr %133, align 8, !tbaa !26
  %135 = getelementptr inbounds %struct.matrix, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !28
  %137 = mul nsw i32 0, %136
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %131, i64 %139
  store double %126, ptr %140, align 8, !tbaa !17
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = sitofp i32 %141 to double
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.readahead_net, ptr %143, i32 0, i32 8
  %145 = load ptr, ptr %144, align 8, !tbaa !26
  %146 = getelementptr inbounds %struct.matrix, ptr %145, i32 0, i32 3
  %147 = load ptr, ptr %146, align 8, !tbaa !27
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.readahead_net, ptr %148, i32 0, i32 8
  %150 = load ptr, ptr %149, align 8, !tbaa !26
  %151 = getelementptr inbounds %struct.matrix, ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !28
  %153 = mul nsw i32 0, %152
  %154 = add nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %147, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !17
  %158 = fdiv double %157, %142
  store double %158, ptr %156, align 8, !tbaa !17
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.readahead_net, ptr %159, i32 0, i32 10
  %161 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %160, i32 0, i32 2
  %162 = load double, ptr %161, align 8, !tbaa !30
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.readahead_net, ptr %163, i32 0, i32 10
  %165 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %164, i32 0, i32 0
  %166 = load i64, ptr %165, align 8, !tbaa !19
  %167 = sub nsw i64 %166, 1
  %168 = sitofp i64 %167 to double
  %169 = fdiv double %162, %168
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.readahead_net, ptr %170, i32 0, i32 8
  %172 = load ptr, ptr %171, align 8, !tbaa !26
  %173 = getelementptr inbounds %struct.matrix, ptr %172, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !27
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.readahead_net, ptr %175, i32 0, i32 8
  %177 = load ptr, ptr %176, align 8, !tbaa !26
  %178 = getelementptr inbounds %struct.matrix, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 4, !tbaa !28
  %180 = mul nsw i32 0, %179
  %181 = add nsw i32 %180, 2
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds double, ptr %174, i64 %182
  store double %169, ptr %183, align 8, !tbaa !17
  %184 = load i32, ptr %14, align 4, !tbaa !9
  %185 = sitofp i32 %184 to double
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.readahead_net, ptr %186, i32 0, i32 8
  %188 = load ptr, ptr %187, align 8, !tbaa !26
  %189 = getelementptr inbounds %struct.matrix, ptr %188, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !27
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.readahead_net, ptr %191, i32 0, i32 8
  %193 = load ptr, ptr %192, align 8, !tbaa !26
  %194 = getelementptr inbounds %struct.matrix, ptr %193, i32 0, i32 1
  %195 = load i32, ptr %194, align 4, !tbaa !28
  %196 = mul nsw i32 0, %195
  %197 = add nsw i32 %196, 2
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds double, ptr %190, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !17
  %201 = fdiv double %200, %185
  store double %201, ptr %199, align 8, !tbaa !17
  %202 = load double, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !17
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.readahead_net, ptr %203, i32 0, i32 10
  %205 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %204, i32 0, i32 0
  %206 = load i64, ptr %205, align 8, !tbaa !19
  %207 = sitofp i64 %206 to double
  %208 = fdiv double %202, %207
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.readahead_net, ptr %209, i32 0, i32 8
  %211 = load ptr, ptr %210, align 8, !tbaa !26
  %212 = getelementptr inbounds %struct.matrix, ptr %211, i32 0, i32 3
  %213 = load ptr, ptr %212, align 8, !tbaa !27
  %214 = load ptr, ptr %9, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.readahead_net, ptr %214, i32 0, i32 8
  %216 = load ptr, ptr %215, align 8, !tbaa !26
  %217 = getelementptr inbounds %struct.matrix, ptr %216, i32 0, i32 1
  %218 = load i32, ptr %217, align 4, !tbaa !28
  %219 = mul nsw i32 0, %218
  %220 = add nsw i32 %219, 3
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds double, ptr %213, i64 %221
  store double %208, ptr %222, align 8, !tbaa !17
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = load i32, ptr %10, align 4, !tbaa !9
  %225 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %226 = trunc i8 %225 to i1
  call void @readahead_normalized_online_data(ptr noundef %223, i32 noundef %224, i1 noundef zeroext %226)
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.readahead_net, ptr %227, i32 0, i32 10
  %229 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %228, i32 0, i32 0
  store i64 0, ptr %229, align 8, !tbaa !19
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.readahead_net, ptr %230, i32 0, i32 10
  %232 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %231, i32 0, i32 1
  store double 0.000000e+00, ptr %232, align 8, !tbaa !31
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.readahead_net, ptr %233, i32 0, i32 10
  %235 = getelementptr inbounds %struct.readahead_net_data_stat, ptr %234, i32 0, i32 2
  store double 0.000000e+00, ptr %235, align 8, !tbaa !30
  store i32 2147483647, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !9
  store i32 -2147483648, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !9
  %236 = load ptr, ptr %8, align 8, !tbaa !5
  %237 = getelementptr inbounds double, ptr %236, i64 0
  %238 = load double, ptr %237, align 8, !tbaa !17
  store double %238, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !17
  store double 0.000000e+00, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !17
  store i32 -1, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !9
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %240

239:                                              ; preds = %87
  store i1 false, ptr %7, align 1
  br label %240

240:                                              ; preds = %239, %94, %35, %19
  %241 = load i1, ptr %7, align 1
  ret i1 %241
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !14, i64 768}
!20 = !{!"readahead_net", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !21, i64 40, !22, i64 72, !23, i64 744, !6, i64 752, !6, i64 760, !24, i64 768, !25, i64 792}
!21 = !{!"model_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"model_multithreading", !7, i64 0, !7, i64 512, !7, i64 640, !7, i64 644, !7, i64 648, !14, i64 656, !6, i64 664}
!23 = !{!"model_state", !7, i64 0, !7, i64 4}
!24 = !{!"readahead_net_data_stat", !14, i64 0, !18, i64 8, !18, i64 16}
!25 = !{!"readahead_norm_data_stat", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!26 = !{!20, !6, i64 752}
!27 = !{!7, !7, i64 0}
!28 = !{!29, !10, i64 4}
!29 = !{!"matrix", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16}
!30 = !{!20, !18, i64 784}
!31 = !{!20, !18, i64 776}


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

@readahead_data_processing.timing_starts = external hidden local_unnamed_addr global double, align 8
@readahead_data_processing.last_pg_idx = external hidden local_unnamed_addr global i32, align 4
@readahead_data_processing.total_pg_idx_diffs = external hidden local_unnamed_addr global double, align 8
@readahead_data_processing.min_pg_idx_norm = external hidden local_unnamed_addr global i32, align 4
@readahead_data_processing.max_pg_idx_norm = external hidden local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @readahead_normalized_online_data(ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @readahead_online_data_update(double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @readahead_data_processing(ptr nocapture noundef readonly %0, ptr noundef %1, i32 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, i64 noundef %5) local_unnamed_addr #0 {
  br i1 %4, label %7, label %8

7:                                                ; preds = %6
  store double 0.000000e+00, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !5
  br label %79

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %1, i64 768
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = icmp eq i64 %10, 0
  br i1 %11, label %12, label %14

12:                                               ; preds = %8
  %13 = load double, ptr %0, align 8, !tbaa !5
  store double %13, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %12, %8
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fcmp ogt double %16, 1.000000e+06
  br i1 %17, label %79, label %18

18:                                               ; preds = %14
  %19 = add nsw i64 %10, 1
  store i64 %19, ptr %9, align 8, !tbaa !9
  %20 = load i32, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !19
  %.not = icmp eq i32 %20, -1
  %.pre = fptosi double %16 to i32
  br i1 %.not, label %._crit_edge, label %21

21:                                               ; preds = %18
  %22 = sub nsw i32 %.pre, %20
  %23 = tail call i32 @llvm.abs.i32(i32 %22, i1 true)
  %24 = uitofp nneg i32 %23 to double
  %25 = load double, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !5
  %26 = fadd double %25, %24
  store double %26, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %18, %21
  store i32 %.pre, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !19
  tail call void @readahead_online_data_update(double noundef %16, ptr noundef nonnull %1)
  %27 = load double, ptr %15, align 8, !tbaa !5
  %28 = load i32, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !19
  %29 = sitofp i32 %28 to double
  %30 = fcmp olt double %27, %29
  br i1 %30, label %31, label %33

31:                                               ; preds = %._crit_edge
  %32 = fptosi double %27 to i32
  store i32 %32, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !19
  br label %33

33:                                               ; preds = %31, %._crit_edge
  %34 = phi i32 [ %32, %31 ], [ %28, %._crit_edge ]
  %35 = load i32, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !19
  %36 = sitofp i32 %35 to double
  %37 = fcmp ogt double %27, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = fptosi double %27 to i32
  store i32 %39, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !19
  br label %40

40:                                               ; preds = %38, %33
  %41 = phi i32 [ %39, %38 ], [ %35, %33 ]
  %42 = load double, ptr %0, align 8, !tbaa !5
  %43 = load double, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !5
  %44 = fsub double %42, %43
  %45 = fcmp ogt double %44, 1.000000e+09
  br i1 %45, label %46, label %79

46:                                               ; preds = %40
  %47 = sub nsw i32 %41, %34
  %48 = load i64, ptr %9, align 8, !tbaa !9
  %49 = sitofp i64 %48 to double
  %50 = getelementptr inbounds i8, ptr %1, i64 752
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  store double %49, ptr %53, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %1, i64 784
  %55 = load double, ptr %54, align 8, !tbaa !22
  %56 = fdiv double %55, %49
  %57 = load ptr, ptr %52, align 8, !tbaa !21
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  store double %56, ptr %58, align 8, !tbaa !5
  %59 = sitofp i32 %47 to double
  %60 = load ptr, ptr %52, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = fdiv double %62, %59
  store double %63, ptr %61, align 8, !tbaa !5
  %64 = load double, ptr %54, align 8, !tbaa !22
  %65 = add nsw i64 %48, -1
  %66 = sitofp i64 %65 to double
  %67 = fdiv double %64, %66
  %68 = load ptr, ptr %52, align 8, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  store double %67, ptr %69, align 8, !tbaa !5
  %70 = load ptr, ptr %52, align 8, !tbaa !21
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = fdiv double %72, %59
  store double %73, ptr %71, align 8, !tbaa !5
  %74 = load double, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !5
  %75 = fdiv double %74, %49
  %76 = load ptr, ptr %52, align 8, !tbaa !21
  %77 = getelementptr inbounds i8, ptr %76, i64 24
  store double %75, ptr %77, align 8, !tbaa !5
  tail call void @readahead_normalized_online_data(ptr noundef nonnull %1, i32 noundef %2, i1 noundef zeroext %3)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, i8 0, i64 24, i1 false)
  store i32 2147483647, ptr @readahead_data_processing.min_pg_idx_norm, align 4, !tbaa !19
  store i32 -2147483648, ptr @readahead_data_processing.max_pg_idx_norm, align 4, !tbaa !19
  %78 = load double, ptr %0, align 8, !tbaa !5
  store double %78, ptr @readahead_data_processing.timing_starts, align 8, !tbaa !5
  store double 0.000000e+00, ptr @readahead_data_processing.total_pg_idx_diffs, align 8, !tbaa !5
  store i32 -1, ptr @readahead_data_processing.last_pg_idx, align 4, !tbaa !19
  br label %79

79:                                               ; preds = %40, %14, %46, %7
  %.0 = phi i1 [ false, %7 ], [ true, %46 ], [ false, %14 ], [ false, %40 ]
  ret i1 %.0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #1

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !15, i64 768}
!10 = !{!"readahead_net", !11, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !13, i64 40, !14, i64 72, !16, i64 744, !12, i64 752, !12, i64 760, !17, i64 768, !18, i64 792}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"model_data", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!14 = !{!"model_multithreading", !7, i64 0, !7, i64 512, !7, i64 640, !7, i64 644, !7, i64 648, !15, i64 656, !12, i64 664}
!15 = !{!"long", !7, i64 0}
!16 = !{!"model_state", !7, i64 0, !7, i64 4}
!17 = !{!"readahead_net_data_stat", !15, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"readahead_norm_data_stat", !15, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !12, i64 752}
!21 = !{!7, !7, i64 0}
!22 = !{!10, !6, i64 784}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass