; LLVM IR from sbu-fsl/kernel-ml :: examples (readahead_net)

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

%union.val = type { double }
%struct.matrix = type { i32, i32, i32, %union.anon }
%union.anon = type { ptr }
%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 }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@readahead_test_list = external hidden constant [33 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.simulation = external hidden unnamed_addr constant [33 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare ptr @allocate_matrix(i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #3

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

declare ptr @kml_file_open(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @kml_fscanf(ptr noundef, ptr noundef, ...) #2

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

declare void @matrix_mean_constant(ptr noundef, ptr noundef) #2

declare void @free_matrix(ptr noundef) #2

declare i32 @kml_file_close(ptr noundef) #2

declare ptr @matrix_argsort(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @cmp_actual_results(ptr noundef, ptr noundef) #5

declare void @ranking_matrix_distance(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local void @simulation(ptr noundef %0) #5 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [255 x i8], align 16
  %7 = alloca [255 x i8], align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %union.val, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %union.val, align 8
  %25 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 255, ptr %6) #6
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 255, i1 false)
  call void @llvm.lifetime.start.p0(i64 255, ptr %7) #6
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 255, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %26 = call ptr @allocate_matrix(i32 noundef 1, i32 noundef 33, i32 noundef 1)
  store ptr %26, ptr %8, align 8, !tbaa !5
  %27 = call ptr @allocate_matrix(i32 noundef 1, i32 noundef 33, i32 noundef 1)
  store ptr %27, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %226, %1
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = icmp slt i32 %29, 33
  br i1 %30, label %31, label %229

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %32 = getelementptr inbounds [255 x i8], ptr %6, i64 0, i64 0
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [33 x i32], ptr @readahead_test_list, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %32, i64 noundef 255, ptr noundef @.str.8, i32 noundef %36) #6
  store i32 %37, ptr %20, align 4, !tbaa !9
  %38 = load i32, ptr %20, align 4, !tbaa !9
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %31
  %41 = load i32, ptr %20, align 4, !tbaa !9
  %42 = icmp slt i32 %41, 255
  br i1 %42, label %44, label %43

43:                                               ; preds = %40, %31
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 135, ptr noundef @__PRETTY_FUNCTION__.simulation) #7
  unreachable

44:                                               ; preds = %40
  %45 = getelementptr inbounds [255 x i8], ptr %7, i64 0, i64 0
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [33 x i32], ptr @readahead_test_list, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %45, i64 noundef 255, ptr noundef @.str, i32 noundef %49) #6
  store i32 %50, ptr %20, align 4, !tbaa !9
  %51 = load i32, ptr %20, align 4, !tbaa !9
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %44
  %54 = load i32, ptr %20, align 4, !tbaa !9
  %55 = icmp slt i32 %54, 255
  br i1 %55, label %57, label %56

56:                                               ; preds = %53, %44
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 143, ptr noundef @__PRETTY_FUNCTION__.simulation) #7
  unreachable

57:                                               ; preds = %53
  %58 = getelementptr inbounds [255 x i8], ptr %6, i64 0, i64 0
  %59 = call ptr @kml_file_open(ptr noundef %58, ptr noundef @.str.3, i32 noundef 0)
  store ptr %59, ptr %4, align 8, !tbaa !5
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %60, ptr noundef @.str.4, ptr noundef %16)
  %62 = load float, ptr %16, align 4, !tbaa !11
  %63 = fptosi float %62 to i32
  store i32 %63, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = call ptr @allocate_matrix(i32 noundef %64, i32 noundef 5, i32 noundef 1)
  store ptr %65, ptr %17, align 8, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %99, %57
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.matrix, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !13
  %71 = icmp slt i32 %67, %70
  br i1 %71, label %72, label %102

72:                                               ; preds = %66
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %95, %72
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = load ptr, ptr %17, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.matrix, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = icmp slt i32 %74, %77
  br i1 %78, label %79, label %98

79:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %80, ptr noundef @.str.4, ptr noundef %21)
  %82 = load float, ptr %21, align 4, !tbaa !11
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.matrix, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %87 = load ptr, ptr %17, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.matrix, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !15
  %90 = mul nsw i32 %86, %89
  %91 = load i32, ptr %15, align 4, !tbaa !9
  %92 = add nsw i32 %90, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %85, i64 %93
  store float %82, ptr %94, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %95

95:                                               ; preds = %79
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %15, align 4, !tbaa !9
  br label %73, !llvm.loop !17

98:                                               ; preds = %73
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %14, align 4, !tbaa !9
  br label %66, !llvm.loop !19

102:                                              ; preds = %66
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = call ptr @allocate_matrix(i32 noundef %103, i32 noundef 1, i32 noundef 1)
  store ptr %104, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %144, %102
  %106 = load i32, ptr %14, align 4, !tbaa !9
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.matrix, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 8, !tbaa !13
  %110 = icmp slt i32 %106, %109
  br i1 %110, label %111, label %147

111:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = call ptr @get_row(ptr noundef %112, i32 noundef %113)
  store ptr %114, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %115 = load ptr, ptr %22, align 8, !tbaa !5
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = call ptr @readahead_net_inference(ptr noundef %115, ptr noundef %116)
  store ptr %117, ptr %23, align 8, !tbaa !5
  %118 = load ptr, ptr %23, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.matrix, ptr %118, i32 0, i32 3
  %120 = load ptr, ptr %119, align 8, !tbaa !16
  %121 = load ptr, ptr %23, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.matrix, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !15
  %124 = mul nsw i32 0, %123
  %125 = add nsw i32 %124, 0
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds float, ptr %120, i64 %126
  %128 = load float, ptr %127, align 4, !tbaa !11
  %129 = load ptr, ptr %19, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.matrix, ptr %129, i32 0, i32 3
  %131 = load ptr, ptr %130, align 8, !tbaa !16
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.matrix, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !15
  %136 = mul nsw i32 %132, %135
  %137 = add nsw i32 %136, 0
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds float, ptr %131, i64 %138
  store float %128, ptr %139, align 4, !tbaa !11
  %140 = load ptr, ptr %2, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.readahead_net, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !20
  call void @cleanup_autodiff(ptr noundef %142)
  %143 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %143)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %144

144:                                              ; preds = %111
  %145 = load i32, ptr %14, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %14, align 4, !tbaa !9
  br label %105, !llvm.loop !29

147:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %148 = load ptr, ptr %19, align 8, !tbaa !5
  call void @matrix_mean_constant(ptr noundef %148, ptr noundef %24)
  %149 = load float, ptr %24, align 8, !tbaa !16
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.matrix, ptr %150, i32 0, i32 3
  %152 = load ptr, ptr %151, align 8, !tbaa !16
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.matrix, ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !15
  %156 = mul nsw i32 0, %155
  %157 = load i32, ptr %3, align 4, !tbaa !9
  %158 = add nsw i32 %156, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds float, ptr %152, i64 %159
  store float %149, ptr %160, align 4, !tbaa !11
  %161 = getelementptr inbounds [255 x i8], ptr %7, i64 0, i64 0
  %162 = call ptr @kml_file_open(ptr noundef %161, ptr noundef @.str.3, i32 noundef 0)
  store ptr %162, ptr %5, align 8, !tbaa !5
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %163, ptr noundef @.str.4, ptr noundef %16)
  %165 = load float, ptr %16, align 4, !tbaa !11
  %166 = fptosi float %165 to i32
  store i32 %166, ptr %13, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = call ptr @allocate_matrix(i32 noundef %167, i32 noundef 1, i32 noundef 1)
  store ptr %168, ptr %18, align 8, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %202, %147
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = load ptr, ptr %18, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.matrix, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 8, !tbaa !13
  %174 = icmp slt i32 %170, %173
  br i1 %174, label %175, label %205

175:                                              ; preds = %169
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %198, %175
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = load ptr, ptr %18, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.matrix, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !15
  %181 = icmp slt i32 %177, %180
  br i1 %181, label %182, label %201

182:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %183, ptr noundef @.str.4, ptr noundef %25)
  %185 = load float, ptr %25, align 4, !tbaa !11
  %186 = load ptr, ptr %18, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.matrix, ptr %186, i32 0, i32 3
  %188 = load ptr, ptr %187, align 8, !tbaa !16
  %189 = load i32, ptr %14, align 4, !tbaa !9
  %190 = load ptr, ptr %18, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.matrix, ptr %190, i32 0, i32 1
  %192 = load i32, ptr %191, align 4, !tbaa !15
  %193 = mul nsw i32 %189, %192
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = add nsw i32 %193, %194
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds float, ptr %188, i64 %196
  store float %185, ptr %197, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %198

198:                                              ; preds = %182
  %199 = load i32, ptr %15, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %15, align 4, !tbaa !9
  br label %176, !llvm.loop !30

201:                                              ; preds = %176
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %14, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %14, align 4, !tbaa !9
  br label %169, !llvm.loop !31

205:                                              ; preds = %169
  %206 = load ptr, ptr %18, align 8, !tbaa !5
  call void @matrix_mean_constant(ptr noundef %206, ptr noundef %24)
  %207 = load float, ptr %24, align 8, !tbaa !16
  %208 = load ptr, ptr %9, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.matrix, ptr %208, i32 0, i32 3
  %210 = load ptr, ptr %209, align 8, !tbaa !16
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.matrix, ptr %211, i32 0, i32 1
  %213 = load i32, ptr %212, align 4, !tbaa !15
  %214 = mul nsw i32 0, %213
  %215 = load i32, ptr %3, align 4, !tbaa !9
  %216 = add nsw i32 %214, %215
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds float, ptr %210, i64 %217
  store float %207, ptr %218, align 4, !tbaa !11
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %219)
  %220 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %220)
  %221 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %221)
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = call i32 @kml_file_close(ptr noundef %222)
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = call i32 @kml_file_close(ptr noundef %224)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %226

226:                                              ; preds = %205
  %227 = load i32, ptr %3, align 4, !tbaa !9
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %3, align 4, !tbaa !9
  br label %28, !llvm.loop !32

229:                                              ; preds = %28
  %230 = load ptr, ptr %8, align 8, !tbaa !5
  %231 = call ptr @matrix_argsort(ptr noundef %230, ptr noundef @cmp_prediction)
  store ptr %231, ptr %10, align 8, !tbaa !5
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  call void @print_matrix(ptr noundef %232)
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = call ptr @matrix_argsort(ptr noundef %233, ptr noundef @cmp_actual_results)
  store ptr %234, ptr %11, align 8, !tbaa !5
  %235 = load ptr, ptr %11, align 8, !tbaa !5
  call void @print_matrix(ptr noundef %235)
  %236 = load ptr, ptr %10, align 8, !tbaa !5
  %237 = load ptr, ptr %11, align 8, !tbaa !5
  call void @ranking_matrix_distance(ptr noundef %236, ptr noundef %237, ptr noundef %12)
  %238 = load float, ptr %12, align 8, !tbaa !16
  %239 = fpext float %238 to double
  %240 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %239)
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %241)
  %242 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %242)
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %243)
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free_matrix(ptr noundef %244)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

declare ptr @get_row(ptr noundef, i32 noundef) #2

declare ptr @readahead_net_inference(ptr noundef, ptr noundef) #2

declare void @cleanup_autodiff(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @cmp_prediction(ptr noundef, ptr noundef) #5

declare void @print_matrix(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 "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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"matrix", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16}
!15 = !{!14, !10, i64 4}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !6, i64 24}
!21 = !{!"readahead_net", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !22, i64 40, !23, i64 72, !25, i64 744, !6, i64 752, !6, i64 760, !26, i64 768, !28, i64 792}
!22 = !{!"model_data", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"model_multithreading", !7, i64 0, !7, i64 512, !7, i64 640, !7, i64 644, !7, i64 648, !24, i64 656, !6, i64 664}
!24 = !{!"long", !7, i64 0}
!25 = !{!"model_state", !7, i64 0, !7, i64 4}
!26 = !{!"readahead_net_data_stat", !24, i64 0, !27, i64 8, !27, i64 16}
!27 = !{!"double", !7, i64 0}
!28 = !{!"readahead_norm_data_stat", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !18}


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

%union.val = type { double }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@readahead_test_list = external hidden local_unnamed_addr constant [33 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.simulation = external hidden unnamed_addr constant [33 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

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

declare ptr @allocate_matrix(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

declare ptr @kml_file_open(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @kml_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare void @matrix_mean_constant(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @free_matrix(ptr noundef) local_unnamed_addr #2

declare i32 @kml_file_close(ptr noundef) local_unnamed_addr #2

declare ptr @matrix_argsort(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @cmp_actual_results(ptr noundef, ptr noundef) #5

declare void @ranking_matrix_distance(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @simulation(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca [255 x i8], align 16
  %3 = alloca [255 x i8], align 16
  %4 = alloca %union.val, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %union.val, align 8
  %8 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 255, ptr nonnull %2) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(255) %2, i8 0, i64 255, i1 false)
  call void @llvm.lifetime.start.p0(i64 255, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(255) %3, i8 0, i64 255, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %9 = tail call ptr @allocate_matrix(i32 noundef 1, i32 noundef 33, i32 noundef 1) #6
  %10 = tail call ptr @allocate_matrix(i32 noundef 1, i32 noundef 33, i32 noundef 1) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = getelementptr inbounds i8, ptr %9, i64 16
  %13 = getelementptr inbounds i8, ptr %10, i64 16
  br label %14

14:                                               ; preds = %1, %._crit_edge89
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %._crit_edge89 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %15 = getelementptr inbounds [33 x i32], ptr @readahead_test_list, i64 0, i64 %indvars.iv
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 255, ptr noundef nonnull @.str.8, i32 noundef %16) #6
  %18 = add i32 %17, -1
  %or.cond = icmp ult i32 %18, 254
  br i1 %or.cond, label %20, label %19

19:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 135, ptr noundef nonnull @__PRETTY_FUNCTION__.simulation) #7
  unreachable

20:                                               ; preds = %14
  %21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 255, ptr noundef nonnull @.str, i32 noundef %16) #6
  %22 = add i32 %21, -1
  %or.cond3 = icmp ult i32 %22, 254
  br i1 %or.cond3, label %24, label %23

23:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 143, ptr noundef nonnull @__PRETTY_FUNCTION__.simulation) #7
  unreachable

24:                                               ; preds = %20
  %25 = call ptr @kml_file_open(ptr noundef nonnull %2, ptr noundef nonnull @.str.3, i32 noundef 0) #6
  %26 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %25, ptr noundef nonnull @.str.4, ptr noundef nonnull %5) #6
  %27 = load float, ptr %5, align 4, !tbaa !9
  %28 = fptosi float %27 to i32
  %29 = call ptr @allocate_matrix(i32 noundef %28, i32 noundef 5, i32 noundef 1) #6
  %30 = load i32, ptr %29, align 8, !tbaa !11
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.preheader77.lr.ph, label %._crit_edge80

.preheader77.lr.ph:                               ; preds = %24
  %32 = getelementptr inbounds i8, ptr %29, i64 4
  %33 = getelementptr inbounds i8, ptr %29, i64 16
  %34 = load i32, ptr %32, align 4, !tbaa !13
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.preheader77, label %._crit_edge80

.preheader77:                                     ; preds = %.preheader77.lr.ph, %._crit_edge
  %36 = phi i32 [ %49, %._crit_edge ], [ %30, %.preheader77.lr.ph ]
  %37 = phi i32 [ %50, %._crit_edge ], [ %34, %.preheader77.lr.ph ]
  %.07579 = phi i32 [ %51, %._crit_edge ], [ 0, %.preheader77.lr.ph ]
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader77, %.lr.ph
  %.07478 = phi i32 [ %47, %.lr.ph ], [ 0, %.preheader77 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %39 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %25, ptr noundef nonnull @.str.4, ptr noundef nonnull %6) #6
  %40 = load float, ptr %6, align 4, !tbaa !9
  %41 = load ptr, ptr %33, align 8, !tbaa !14
  %42 = load i32, ptr %32, align 4, !tbaa !13
  %43 = mul nsw i32 %42, %.07579
  %44 = add nsw i32 %43, %.07478
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds float, ptr %41, i64 %45
  store float %40, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %47 = add nuw nsw i32 %.07478, 1
  %48 = icmp slt i32 %47, %42
  br i1 %48, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %29, align 8, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader77
  %49 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %36, %.preheader77 ]
  %50 = phi i32 [ %42, %._crit_edge.loopexit ], [ %37, %.preheader77 ]
  %51 = add nuw nsw i32 %.07579, 1
  %52 = icmp slt i32 %51, %49
  br i1 %52, label %.preheader77, label %._crit_edge80, !llvm.loop !17

._crit_edge80:                                    ; preds = %._crit_edge, %.preheader77.lr.ph, %24
  %53 = call ptr @allocate_matrix(i32 noundef %28, i32 noundef 1, i32 noundef 1) #6
  %54 = load i32, ptr %29, align 8, !tbaa !11
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph83, label %._crit_edge84

.lr.ph83:                                         ; preds = %._crit_edge80
  %56 = getelementptr inbounds i8, ptr %53, i64 16
  %57 = getelementptr inbounds i8, ptr %53, i64 4
  br label %58

58:                                               ; preds = %.lr.ph83, %58
  %.17681 = phi i32 [ 0, %.lr.ph83 ], [ %70, %58 ]
  %59 = call ptr @get_row(ptr noundef nonnull %29, i32 noundef %.17681) #6
  %60 = call ptr @readahead_net_inference(ptr noundef %59, ptr noundef %0) #6
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = load float, ptr %62, align 4, !tbaa !9
  %64 = load ptr, ptr %56, align 8, !tbaa !14
  %65 = load i32, ptr %57, align 4, !tbaa !13
  %66 = mul nsw i32 %65, %.17681
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds float, ptr %64, i64 %67
  store float %63, ptr %68, align 4, !tbaa !9
  %69 = load ptr, ptr %11, align 8, !tbaa !19
  call void @cleanup_autodiff(ptr noundef %69) #6
  call void @free_matrix(ptr noundef %59) #6
  %70 = add nuw nsw i32 %.17681, 1
  %71 = load i32, ptr %29, align 8, !tbaa !11
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %58, label %._crit_edge84, !llvm.loop !29

._crit_edge84:                                    ; preds = %58, %._crit_edge80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @matrix_mean_constant(ptr noundef %53, ptr noundef nonnull %7) #6
  %73 = load float, ptr %7, align 8, !tbaa !14
  %74 = load ptr, ptr %12, align 8, !tbaa !14
  %75 = getelementptr inbounds float, ptr %74, i64 %indvars.iv
  store float %73, ptr %75, align 4, !tbaa !9
  %76 = call ptr @kml_file_open(ptr noundef nonnull %3, ptr noundef nonnull @.str.3, i32 noundef 0) #6
  %77 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %76, ptr noundef nonnull @.str.4, ptr noundef nonnull %5) #6
  %78 = load float, ptr %5, align 4, !tbaa !9
  %79 = fptosi float %78 to i32
  %80 = call ptr @allocate_matrix(i32 noundef %79, i32 noundef 1, i32 noundef 1) #6
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.preheader.lr.ph, label %._crit_edge89

.preheader.lr.ph:                                 ; preds = %._crit_edge84
  %83 = getelementptr inbounds i8, ptr %80, i64 4
  %84 = getelementptr inbounds i8, ptr %80, i64 16
  %85 = load i32, ptr %83, align 4, !tbaa !13
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %.preheader, label %._crit_edge89

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge87
  %87 = phi i32 [ %100, %._crit_edge87 ], [ %81, %.preheader.lr.ph ]
  %88 = phi i32 [ %101, %._crit_edge87 ], [ %85, %.preheader.lr.ph ]
  %.288 = phi i32 [ %102, %._crit_edge87 ], [ 0, %.preheader.lr.ph ]
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %.preheader, %.lr.ph86
  %.185 = phi i32 [ %98, %.lr.ph86 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %90 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %76, ptr noundef nonnull @.str.4, ptr noundef nonnull %8) #6
  %91 = load float, ptr %8, align 4, !tbaa !9
  %92 = load ptr, ptr %84, align 8, !tbaa !14
  %93 = load i32, ptr %83, align 4, !tbaa !13
  %94 = mul nsw i32 %93, %.288
  %95 = add nsw i32 %94, %.185
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds float, ptr %92, i64 %96
  store float %91, ptr %97, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %98 = add nuw nsw i32 %.185, 1
  %99 = icmp slt i32 %98, %93
  br i1 %99, label %.lr.ph86, label %._crit_edge87.loopexit, !llvm.loop !30

._crit_edge87.loopexit:                           ; preds = %.lr.ph86
  %.pre94 = load i32, ptr %80, align 8, !tbaa !11
  br label %._crit_edge87

._crit_edge87:                                    ; preds = %._crit_edge87.loopexit, %.preheader
  %100 = phi i32 [ %.pre94, %._crit_edge87.loopexit ], [ %87, %.preheader ]
  %101 = phi i32 [ %93, %._crit_edge87.loopexit ], [ %88, %.preheader ]
  %102 = add nuw nsw i32 %.288, 1
  %103 = icmp slt i32 %102, %100
  br i1 %103, label %.preheader, label %._crit_edge89, !llvm.loop !31

._crit_edge89:                                    ; preds = %._crit_edge87, %.preheader.lr.ph, %._crit_edge84
  call void @matrix_mean_constant(ptr noundef nonnull %80, ptr noundef nonnull %7) #6
  %104 = load float, ptr %7, align 8, !tbaa !14
  %105 = load ptr, ptr %13, align 8, !tbaa !14
  %106 = getelementptr inbounds float, ptr %105, i64 %indvars.iv
  store float %104, ptr %106, align 4, !tbaa !9
  call void @free_matrix(ptr noundef nonnull %80) #6
  call void @free_matrix(ptr noundef nonnull %29) #6
  call void @free_matrix(ptr noundef %53) #6
  %107 = call i32 @kml_file_close(ptr noundef %25) #6
  %108 = call i32 @kml_file_close(ptr noundef %76) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 33
  br i1 %exitcond.not, label %109, label %14, !llvm.loop !32

109:                                              ; preds = %._crit_edge89
  %110 = call ptr @matrix_argsort(ptr noundef %9, ptr noundef nonnull @cmp_prediction) #6
  call void @print_matrix(ptr noundef %110) #6
  %111 = call ptr @matrix_argsort(ptr noundef nonnull %10, ptr noundef nonnull @cmp_actual_results) #6
  call void @print_matrix(ptr noundef %111) #6
  call void @ranking_matrix_distance(ptr noundef %110, ptr noundef %111, ptr noundef nonnull %4) #6
  %112 = load float, ptr %4, align 8, !tbaa !14
  %113 = fpext float %112 to double
  %114 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %113)
  call void @free_matrix(ptr noundef %110) #6
  call void @free_matrix(ptr noundef %111) #6
  call void @free_matrix(ptr noundef %9) #6
  call void @free_matrix(ptr noundef nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %2) #6
  ret void
}

declare ptr @get_row(ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @readahead_net_inference(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @cleanup_autodiff(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @cmp_prediction(ptr noundef, ptr noundef) #5

declare void @print_matrix(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"matrix", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 16}
!13 = !{!12, !6, i64 4}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = !{!20, !21, i64 24}
!20 = !{!"readahead_net", !6, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32, !22, i64 40, !23, i64 72, !25, i64 744, !21, i64 752, !21, i64 760, !26, i64 768, !28, i64 792}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!"model_data", !21, i64 0, !21, i64 8, !21, i64 16, !21, i64 24}
!23 = !{!"model_multithreading", !7, i64 0, !7, i64 512, !7, i64 640, !7, i64 644, !7, i64 648, !24, i64 656, !21, i64 664}
!24 = !{!"long", !7, i64 0}
!25 = !{!"model_state", !7, i64 0, !7, i64 4}
!26 = !{!"readahead_net_data_stat", !24, i64 0, !27, i64 8, !27, i64 16}
!27 = !{!"double", !7, i64 0}
!28 = !{!"readahead_norm_data_stat", !24, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}
!31 = distinct !{!31, !16, !18}
!32 = distinct !{!32, !16}


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