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

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

@.str = external hidden unnamed_addr constant [102 x i8], align 1
@rsize_test_list = external hidden constant [7 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.data_processing = external hidden unnamed_addr constant [38 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.5 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@current_rsize_val = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @data_processing(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [6 x double], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [255 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [32 x i8], align 16
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 255, ptr %10) #6
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 255, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %160, %1
  %19 = load i32, ptr %9, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 2
  br i1 %20, label %21, label %163

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %22 = getelementptr inbounds [255 x i8], ptr %10, i64 0, i64 0
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [7 x i32], ptr @rsize_test_list, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %22, i64 noundef 255, ptr noundef @.str, i32 noundef %26) #6
  store i32 %27, ptr %14, align 4, !tbaa !9
  %28 = load i32, ptr %14, align 4, !tbaa !9
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %21
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 255
  br i1 %32, label %34, label %33

33:                                               ; preds = %30, %21
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 46, ptr noundef @__PRETTY_FUNCTION__.data_processing) #7
  unreachable

34:                                               ; preds = %30
  %35 = getelementptr inbounds [255 x i8], ptr %10, i64 0, i64 0
  %36 = call ptr @kml_file_open(ptr noundef %35, ptr noundef @.str.3, i32 noundef 0)
  store ptr %36, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %37, ptr noundef @.str.4, ptr noundef %4)
  %39 = load float, ptr %4, align 4, !tbaa !11
  %40 = fptosi float %39 to i32
  store i32 %40, ptr %3, align 4, !tbaa !9
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [7 x i32], ptr @rsize_test_list, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %44)
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %149, %34
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %152

50:                                               ; preds = %46
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 0
  %53 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %51, ptr noundef @.str.6, ptr noundef %52)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 1
  %56 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %54, ptr noundef @.str.6, ptr noundef %55)
  %57 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 1
  %58 = load double, ptr %57, align 8, !tbaa !13
  %59 = fptosi double %58 to i32
  store i32 %59, ptr %11, align 4, !tbaa !9
  %60 = load i32, ptr %11, align 4, !tbaa !9
  switch i32 %60, label %66 [
    i32 1, label %61
    i32 2, label %62
    i32 3, label %63
    i32 4, label %64
    i32 5, label %65
  ]

61:                                               ; preds = %50
  store i32 4, ptr %12, align 4, !tbaa !9
  br label %66

62:                                               ; preds = %50
  store i32 4, ptr %12, align 4, !tbaa !9
  br label %66

63:                                               ; preds = %50
  store i32 6, ptr %12, align 4, !tbaa !9
  br label %66

64:                                               ; preds = %50
  store i32 6, ptr %12, align 4, !tbaa !9
  br label %66

65:                                               ; preds = %50
  store i32 4, ptr %12, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %65, %64, %63, %62, %61, %50
  store i32 2, ptr %8, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %126, %66
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %129

71:                                               ; preds = %67
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 3
  br i1 %73, label %77, label %74

74:                                               ; preds = %71
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = icmp eq i32 %75, 4
  br i1 %76, label %77, label %83

77:                                               ; preds = %74, %71
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = icmp eq i32 %78, 2
  br i1 %79, label %80, label %83

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %81, ptr noundef @.str.7, ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %125

83:                                               ; preds = %77, %74
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = icmp eq i32 %84, 3
  br i1 %85, label %89, label %86

86:                                               ; preds = %83
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = icmp eq i32 %87, 4
  br i1 %88, label %89, label %100

89:                                               ; preds = %86, %83
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 3
  br i1 %91, label %92, label %100

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %93, ptr noundef @.str.8, ptr noundef %16)
  %95 = load i64, ptr %16, align 8, !tbaa !15
  %96 = sitofp i64 %95 to double
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 %98
  store double %96, ptr %99, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %124

100:                                              ; preds = %89, %86
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 1
  br i1 %102, label %106, label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 2
  br i1 %105, label %106, label %117

106:                                              ; preds = %103, %100
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 2
  br i1 %108, label %109, label %117

109:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %110, ptr noundef @.str.9, ptr noundef %17)
  %112 = load i32, ptr %17, align 4, !tbaa !9
  %113 = sitofp i32 %112 to double
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 %115
  store double %113, ptr %116, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %123

117:                                              ; preds = %106, %103
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 %120
  %122 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %118, ptr noundef @.str.6, ptr noundef %121)
  br label %123

123:                                              ; preds = %117, %109
  br label %124

124:                                              ; preds = %123, %92
  br label %125

125:                                              ; preds = %124, %80
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !9
  br label %67, !llvm.loop !17

129:                                              ; preds = %67
  %130 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 0
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [7 x i32], ptr @rsize_test_list, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = call zeroext i1 @nfs_data_processing(ptr noundef %130, ptr noundef %131, i32 noundef %135, i32 noundef %136, i1 noundef zeroext true, i1 noundef zeroext false)
  br i1 %137, label %138, label %147

138:                                              ; preds = %129
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [7 x i32], ptr @rsize_test_list, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = call i32 @predict_nfs_class(ptr noundef %139, i32 noundef %143)
  store i32 %144, ptr %13, align 4, !tbaa !9
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %145)
  br label %147

147:                                              ; preds = %138, %129
  %148 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 0
  call void @kml_memset(ptr noundef %148, i32 noundef 0, i64 noundef 48)
  br label %149

149:                                              ; preds = %147
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %7, align 4, !tbaa !9
  br label %46, !llvm.loop !19

152:                                              ; preds = %46
  %153 = getelementptr inbounds [6 x double], ptr %6, i64 0, i64 0
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = load i32, ptr @current_rsize_val, align 4, !tbaa !9
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = call zeroext i1 @nfs_data_processing(ptr noundef %153, ptr noundef %154, i32 noundef %155, i32 noundef %156, i1 noundef zeroext true, i1 noundef zeroext true)
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = call i32 @kml_file_close(ptr noundef %158)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %160

160:                                              ; preds = %152
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %9, align 4, !tbaa !9
  br label %18, !llvm.loop !20

163:                                              ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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) #5

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

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

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

declare zeroext i1 @nfs_data_processing(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #5

declare i32 @predict_nfs_class(ptr noundef, i32 noundef) #5

declare void @kml_memset(ptr noundef, i32 noundef, i64 noundef) #5

declare i32 @kml_file_close(ptr noundef) #5

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 nounwind willreturn memory(argmem: write) }
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 = { "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, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !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"

@.str = external hidden unnamed_addr constant [102 x i8], align 1
@rsize_test_list = external hidden local_unnamed_addr constant [7 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.data_processing = external hidden unnamed_addr constant [38 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.5 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@current_rsize_val = external hidden local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @data_processing(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca float, align 4
  %3 = alloca [6 x double], align 16
  %4 = alloca [255 x i8], align 16
  %5 = alloca [32 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 255, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(255) %4, i8 0, i64 255, i1 false)
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @rsize_test_list, i64 4), align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %3, i64 8
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  %11 = getelementptr inbounds i8, ptr %3, i64 24
  %12 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 255, ptr noundef nonnull @.str, i32 noundef %8) #6
  %13 = add i32 %12, -1
  %or.cond = icmp ult i32 %13, 254
  br i1 %or.cond, label %15, label %14

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

15:                                               ; preds = %1
  %16 = call ptr @kml_file_open(ptr noundef nonnull %4, ptr noundef nonnull @.str.3, i32 noundef 0) #6
  %17 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.4, ptr noundef nonnull %2) #6
  %18 = load float, ptr %2, align 4, !tbaa !9
  %19 = fptosi float %18 to i32
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %8)
  %21 = icmp sgt i32 %19, 0
  br i1 %21, label %.lr.ph64.preheader, label %._crit_edge65

.lr.ph64.preheader:                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %3, i64 32
  %23 = getelementptr inbounds i8, ptr %3, i64 40
  %24 = getelementptr inbounds i8, ptr %3, i64 24
  br label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %47
  %.062 = phi i32 [ %48, %47 ], [ 0, %.lr.ph64.preheader ]
  %.161 = phi i32 [ %.296, %47 ], [ 0, %.lr.ph64.preheader ]
  %25 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %3) #6
  %26 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %9) #6
  %27 = load double, ptr %9, align 8, !tbaa !11
  %28 = fptosi double %27 to i32
  switch i32 %28, label %29 [
    i32 1, label %.lr.ph.split.us.split.peel.next
    i32 2, label %.lr.ph.split.us.split.peel.next
    i32 3, label %.lr.ph.split.split.us
    i32 4, label %.lr.ph.split.split.us
    i32 5, label %.lr.ph.split.us.split.us.preheader
  ]

29:                                               ; preds = %.lr.ph64
  %30 = icmp sgt i32 %.161, 2
  br i1 %30, label %.lr.ph.split.us.split.us.preheader, label %._crit_edge

.lr.ph.split.us.split.us.preheader:               ; preds = %.lr.ph64, %29
  %.297101107 = phi i32 [ %.161, %29 ], [ 4, %.lr.ph64 ]
  %wide.trip.count = zext nneg i32 %.297101107 to i64
  br label %.lr.ph.split.us.split.us

.lr.ph.split.us.split.peel.next:                  ; preds = %.lr.ph64, %.lr.ph64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %31 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.9, ptr noundef nonnull %7) #6
  %32 = load i32, ptr %7, align 4, !tbaa !5
  %33 = sitofp i32 %32 to double
  store double %33, ptr %10, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %34 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %24) #6
  br label %._crit_edge

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us.split.us.preheader, %.lr.ph.split.us.split.us
  %indvars.iv = phi i64 [ 2, %.lr.ph.split.us.split.us.preheader ], [ %indvars.iv.next, %.lr.ph.split.us.split.us ]
  %35 = getelementptr inbounds [6 x double], ptr %3, i64 0, i64 %indvars.iv
  %36 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %35) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.us.split.us, !llvm.loop !13

.lr.ph.split.split.us:                            ; preds = %.lr.ph64, %.lr.ph64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %37 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.7, ptr noundef nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %38 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.8, ptr noundef nonnull %6) #6
  %39 = load i64, ptr %6, align 8, !tbaa !15
  %40 = sitofp i64 %39 to double
  store double %40, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %41 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %22) #6
  %42 = call i32 (ptr, ptr, ...) @kml_fscanf(ptr noundef %16, ptr noundef nonnull @.str.6, ptr noundef nonnull %23) #6
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.split.us.split.us, %.lr.ph.split.split.us, %.lr.ph.split.us.split.peel.next, %29
  %.296 = phi i32 [ %.161, %29 ], [ 4, %.lr.ph.split.us.split.peel.next ], [ 6, %.lr.ph.split.split.us ], [ %.297101107, %.lr.ph.split.us.split.us ]
  %43 = call zeroext i1 @nfs_data_processing(ptr noundef nonnull %3, ptr noundef %0, i32 noundef %8, i32 noundef %28, i1 noundef zeroext true, i1 noundef zeroext false) #6
  br i1 %43, label %44, label %47

44:                                               ; preds = %._crit_edge
  %45 = call i32 @predict_nfs_class(ptr noundef %0, i32 noundef %8) #6
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %45)
  br label %47

47:                                               ; preds = %44, %._crit_edge
  call void @kml_memset(ptr noundef nonnull %3, i32 noundef 0, i64 noundef 48) #6
  %48 = add nuw nsw i32 %.062, 1
  %exitcond94.not = icmp eq i32 %48, %19
  br i1 %exitcond94.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !17

._crit_edge65:                                    ; preds = %47, %15
  %.156.lcssa = phi i32 [ 0, %15 ], [ %28, %47 ]
  %49 = load i32, ptr @current_rsize_val, align 4, !tbaa !5
  %50 = call zeroext i1 @nfs_data_processing(ptr noundef nonnull %3, ptr noundef %0, i32 noundef %49, i32 noundef %.156.lcssa, i1 noundef zeroext true, i1 noundef zeroext true) #6
  %51 = call i32 @kml_file_close(ptr noundef %16) #6
  call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @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 #5

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

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

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

declare zeroext i1 @nfs_data_processing(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #5

declare i32 @predict_nfs_class(ptr noundef, i32 noundef) local_unnamed_addr #5

declare void @kml_memset(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #5

declare i32 @kml_file_close(ptr noundef) local_unnamed_addr #5

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 willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !14}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass