; LLVM IR from sbu-fsl/kernel-ml :: src/decision-tree (decision_tree)

; 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.kml_dt = type { ptr }
%struct.kml_dt_node = type { i32, i32, float, ptr, ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @build_decision_tree_model_from_file(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [128 x i8], align 16
  %5 = alloca [128 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [10 x ptr], align 16
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  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 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !11
  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
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #6
  call void @llvm.memset.p0.i64(ptr align 16 %13, i8 0, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %16 = call ptr @kml_calloc(i64 noundef 1, i64 noundef 8)
  store ptr %16, ptr %12, align 8, !tbaa !5
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.kml_dt, ptr %17, i32 0, i32 0
  store ptr null, ptr %18, align 8, !tbaa !13
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = call ptr @kml_file_open(ptr noundef %19, ptr noundef @.str, i32 noundef 0)
  store ptr %20, ptr %3, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %153, %1
  %22 = load i32, ptr %9, align 4, !tbaa !11
  %23 = icmp slt i32 %22, 88
  br i1 %23, label %24, label %156

24:                                               ; preds = %21
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds [128 x i8], ptr %4, i64 0, i64 0
  %27 = call i32 @kml_file_read(ptr noundef %25, ptr noundef %26, i64 noundef 128, ptr noundef %6)
  store i32 %27, ptr %10, align 4, !tbaa !11
  %28 = getelementptr inbounds [128 x i8], ptr %4, i64 0, i64 0
  %29 = call ptr @strchr(ptr noundef %28, i32 noundef 10) #7
  store ptr %29, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds [128 x i8], ptr %4, i64 0, i64 0
  %32 = ptrtoint ptr %30 to i64
  %33 = ptrtoint ptr %31 to i64
  %34 = sub i64 %32, %33
  %35 = sub nsw i64 127, %34
  %36 = load i64, ptr %6, align 8, !tbaa !9
  %37 = sub i64 %36, %35
  store i64 %37, ptr %6, align 8, !tbaa !9
  %38 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 0
  call void @kml_memset(ptr noundef %38, i32 noundef 0, i64 noundef 128)
  %39 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 0
  %40 = getelementptr inbounds [128 x i8], ptr %4, i64 0, i64 0
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds [128 x i8], ptr %4, i64 0, i64 0
  %43 = ptrtoint ptr %41 to i64
  %44 = ptrtoint ptr %42 to i64
  %45 = sub i64 %43, %44
  %46 = call ptr @strncpy(ptr noundef %39, ptr noundef %40, i64 noundef %45) #6
  %47 = call ptr @kml_calloc(i64 noundef 1, i64 noundef 32)
  store ptr %47, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 0
  %49 = call ptr @strchr(ptr noundef %48, i32 noundef 102) #7
  store ptr %49, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %57

52:                                               ; preds = %24
  %53 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 0
  %54 = call ptr @strchr(ptr noundef %53, i32 noundef 99) #7
  store ptr %54, ptr %8, align 8, !tbaa !5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  call void @parse_dt_leaf_data(ptr noundef %55, ptr noundef %56)
  br label %60

57:                                               ; preds = %24
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @parse_dt_node_data(ptr noundef %58, ptr noundef %59)
  br label %60

60:                                               ; preds = %57, %52
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.kml_dt, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = icmp eq ptr %63, null
  br i1 %64, label %65, label %71

65:                                               ; preds = %60
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.kml_dt, ptr %67, i32 0, i32 0
  store ptr %66, ptr %68, align 8, !tbaa !13
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds [10 x ptr], ptr %13, i64 0, i64 0
  store ptr %69, ptr %70, align 16, !tbaa !5
  br label %152

71:                                               ; preds = %60
  %72 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 0
  %73 = call i32 @get_level(ptr noundef %72)
  store i32 %73, ptr %14, align 4, !tbaa !11
  %74 = load i32, ptr %14, align 4, !tbaa !11
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [10 x ptr], ptr %13, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  store ptr %78, ptr %15, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.kml_dt_node, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !15
  %82 = icmp eq i32 %81, -1
  br i1 %82, label %83, label %97

83:                                               ; preds = %71
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.kml_dt_node, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !18
  %87 = icmp eq i32 %86, 1
  br i1 %87, label %88, label %92

88:                                               ; preds = %83
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.kml_dt_node, ptr %90, i32 0, i32 3
  store ptr %89, ptr %91, align 8, !tbaa !19
  br label %96

92:                                               ; preds = %83
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.kml_dt_node, ptr %94, i32 0, i32 4
  store ptr %93, ptr %95, align 8, !tbaa !20
  br label %96

96:                                               ; preds = %92, %88
  br label %151

97:                                               ; preds = %71
  %98 = load i32, ptr %14, align 4, !tbaa !11
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [10 x ptr], ptr %13, i64 0, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  store ptr %101, ptr %15, align 8, !tbaa !5
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %127

104:                                              ; preds = %97
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.kml_dt_node, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !15
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.kml_dt_node, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !15
  %111 = icmp eq i32 %107, %110
  br i1 %111, label %112, label %127

112:                                              ; preds = %104
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.kml_dt_node, ptr %113, i32 0, i32 2
  %115 = load float, ptr %114, align 8, !tbaa !21
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.kml_dt_node, ptr %116, i32 0, i32 2
  %118 = load float, ptr %117, align 8, !tbaa !21
  %119 = fcmp oeq float %115, %118
  br i1 %119, label %120, label %127

120:                                              ; preds = %112
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.kml_dt_node, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !18
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.kml_dt_node, ptr %124, i32 0, i32 1
  store i32 %123, ptr %125, align 4, !tbaa !18
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  call void @kml_free(ptr noundef %126)
  br label %150

127:                                              ; preds = %112, %104, %97
  %128 = load i32, ptr %14, align 4, !tbaa !11
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [10 x ptr], ptr %13, i64 0, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  store ptr %132, ptr %15, align 8, !tbaa !5
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.kml_dt_node, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !18
  %136 = icmp eq i32 %135, 1
  br i1 %136, label %137, label %141

137:                                              ; preds = %127
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.kml_dt_node, ptr %139, i32 0, i32 3
  store ptr %138, ptr %140, align 8, !tbaa !19
  br label %145

141:                                              ; preds = %127
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load ptr, ptr %15, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.kml_dt_node, ptr %143, i32 0, i32 4
  store ptr %142, ptr %144, align 8, !tbaa !20
  br label %145

145:                                              ; preds = %141, %137
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = load i32, ptr %14, align 4, !tbaa !11
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [10 x ptr], ptr %13, i64 0, i64 %148
  store ptr %146, ptr %149, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %145, %120
  br label %151

151:                                              ; preds = %150, %96
  br label %152

152:                                              ; preds = %151, %65
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %9, align 4, !tbaa !11
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %9, align 4, !tbaa !11
  br label %21, !llvm.loop !22

156:                                              ; preds = %21
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = call i32 @kml_file_close(ptr noundef %157)
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #6
  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 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret ptr %159
}

; 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

declare ptr @kml_calloc(i64 noundef, i64 noundef) #3

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

declare i32 @kml_file_read(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strchr(ptr noundef, i32 noundef) #4

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @parse_dt_leaf_data(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @parse_dt_node_data(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @get_level(ptr noundef) #0

declare void @kml_free(ptr noundef) #3

declare i32 @kml_file_close(ptr noundef) #3

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

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 = { "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 = { nounwind willreturn memory(read) "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 "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 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"kml_dt", !6, i64 0}
!15 = !{!16, !12, i64 0}
!16 = !{!"kml_dt_node", !12, i64 0, !12, i64 4, !17, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"float", !7, i64 0}
!18 = !{!16, !12, i64 4}
!19 = !{!16, !6, i64 16}
!20 = !{!16, !6, i64 24}
!21 = !{!16, !17, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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 [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @build_decision_tree_model_from_file(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [128 x i8], align 16
  %3 = alloca [128 x i8], align 16
  %4 = alloca i64, align 8
  %5 = alloca [10 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %5, i8 0, i64 80, i1 false)
  %6 = tail call ptr @kml_calloc(i64 noundef 1, i64 noundef 8) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  %7 = tail call ptr @kml_file_open(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 0) #6
  %8 = ptrtoint ptr %2 to i64
  br label %9

9:                                                ; preds = %1, %65
  %.044 = phi i32 [ 0, %1 ], [ %66, %65 ]
  %10 = call i32 @kml_file_read(ptr noundef %7, ptr noundef nonnull %2, i64 noundef 128, ptr noundef nonnull %4) #6
  %11 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %2, i32 noundef 10) #7
  %12 = ptrtoint ptr %11 to i64
  %13 = sub i64 %12, %8
  %14 = load i64, ptr %4, align 8, !tbaa !5
  %.neg = add i64 %14, -127
  %15 = add i64 %.neg, %13
  store i64 %15, ptr %4, align 8, !tbaa !5
  call void @kml_memset(ptr noundef nonnull %3, i32 noundef 0, i64 noundef 128) #6
  %16 = call ptr @strncpy(ptr noundef nonnull %3, ptr noundef nonnull %2, i64 noundef %13) #6
  %17 = call ptr @kml_calloc(i64 noundef 1, i64 noundef 32) #6
  %18 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %3, i32 noundef 102) #7
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %22

20:                                               ; preds = %9
  %21 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %3, i32 noundef 99) #7
  call void @parse_dt_leaf_data(ptr noundef %21, ptr noundef %17)
  br label %23

22:                                               ; preds = %9
  call void @parse_dt_node_data(ptr noundef nonnull %18, ptr noundef %17)
  br label %23

23:                                               ; preds = %22, %20
  %24 = load ptr, ptr %6, align 8, !tbaa !9
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store ptr %17, ptr %6, align 8, !tbaa !9
  store ptr %17, ptr %5, align 16, !tbaa !12
  br label %65

27:                                               ; preds = %23
  %28 = call i32 @get_level(ptr noundef nonnull %3)
  %29 = add nsw i32 %28, -1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [10 x ptr], ptr %5, i64 0, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load i32, ptr %17, align 8, !tbaa !13
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %35, label %43

35:                                               ; preds = %27
  %36 = getelementptr inbounds i8, ptr %32, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !17
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %32, i64 16
  store ptr %17, ptr %40, align 8, !tbaa !18
  br label %65

41:                                               ; preds = %35
  %42 = getelementptr inbounds i8, ptr %32, i64 24
  store ptr %17, ptr %42, align 8, !tbaa !19
  br label %65

43:                                               ; preds = %27
  %44 = sext i32 %28 to i64
  %45 = getelementptr inbounds [10 x ptr], ptr %5, i64 0, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !12
  %.not = icmp eq ptr %46, null
  br i1 %.not, label %60, label %47

47:                                               ; preds = %43
  %48 = load i32, ptr %46, align 8, !tbaa !13
  %49 = icmp eq i32 %48, %33
  br i1 %49, label %50, label %60

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %46, i64 8
  %52 = load float, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds i8, ptr %17, i64 8
  %54 = load float, ptr %53, align 8, !tbaa !20
  %55 = fcmp oeq float %52, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %17, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = getelementptr inbounds i8, ptr %46, i64 4
  store i32 %58, ptr %59, align 4, !tbaa !17
  call void @kml_free(ptr noundef nonnull %17) #6
  br label %65

60:                                               ; preds = %50, %47, %43
  %61 = getelementptr inbounds i8, ptr %32, i64 4
  %62 = load i32, ptr %61, align 4, !tbaa !17
  %63 = icmp eq i32 %62, 1
  %. = select i1 %63, i64 16, i64 24
  %64 = getelementptr inbounds i8, ptr %32, i64 %.
  store ptr %17, ptr %64, align 8, !tbaa !12
  store ptr %17, ptr %45, align 8, !tbaa !12
  br label %65

65:                                               ; preds = %26, %56, %60, %39, %41
  %66 = add nuw nsw i32 %.044, 1
  %exitcond.not = icmp eq i32 %66, 88
  br i1 %exitcond.not, label %67, label %9, !llvm.loop !21

67:                                               ; preds = %65
  %68 = call i32 @kml_file_close(ptr noundef %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #6
  ret ptr %6
}

; 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

declare ptr @kml_calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

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

declare i32 @kml_file_read(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @parse_dt_leaf_data(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @parse_dt_node_data(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @get_level(ptr noundef) local_unnamed_addr #0

declare void @kml_free(ptr noundef) local_unnamed_addr #3

declare i32 @kml_file_close(ptr noundef) 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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { nounwind willreturn memory(read) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"kml_dt", !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"kml_dt_node", !15, i64 0, !15, i64 4, !16, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"int", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!14, !15, i64 4}
!18 = !{!14, !11, i64 16}
!19 = !{!14, !11, i64 24}
!20 = !{!14, !16, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass