; LLVM IR from Discngine/fpocket :: src (fpocket)

; 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.s_fparams = type { [2000 x i8], [2000 x i8], [2000 x i8], [8000 x i8], ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, i8, i8, i32, i32, i16, i32, i32, i32, i16, i32, i32, i32, i16, float, float, float, float, float, [20 x ptr], i16, i16, [20 x ptr], i32, [10 x i8] }
%struct.s_lst_vvertice = type { ptr, ptr, ptr, i32, ptr, i32, i32 }
%struct.s_clusterlib_vertices = type { ptr, ptr, [3 x double], i32, i8, i8 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @search_pocket(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store ptr null, ptr %14, align 8, !tbaa !5
  %18 = call i64 @clock() #4
  store i64 %18, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = call ptr @load_vvertices(ptr noundef %19, ptr noundef %20, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  store ptr %21, ptr %15, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s_fparams, ptr %22, i32 0, i32 7
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = icmp eq i32 %24, -1
  br i1 %25, label %26, label %90

26:                                               ; preds = %3
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.s_fparams, ptr %27, i32 0, i32 8
  %29 = load i32, ptr %28, align 4, !tbaa !16
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %90

31:                                               ; preds = %26
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s_fparams, ptr %33, i32 0, i32 13
  %35 = load i8, ptr %34, align 1, !tbaa !17
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_fparams, ptr %36, i32 0, i32 12
  %38 = load i8, ptr %37, align 8, !tbaa !18
  %39 = call ptr @prepare_vertices_for_cluster_lib(ptr noundef %32, i8 noundef signext %35, i8 noundef signext %38)
  store ptr %39, ptr %13, align 8, !tbaa !5
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.s_lst_vvertice, ptr %40, i32 0, i32 5
  %42 = load i32, ptr %41, align 8, !tbaa !19
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %49, i32 0, i32 2
  %51 = getelementptr inbounds [3 x double], ptr %50, i64 0, i64 0
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !24
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %55, i32 0, i32 4
  %57 = load i8, ptr %56, align 4, !tbaa !25
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.s_clusterlib_vertices, ptr %58, i32 0, i32 5
  %60 = load i8, ptr %59, align 1, !tbaa !26
  %61 = call ptr @treecluster(i32 noundef %42, i32 noundef 3, ptr noundef %45, ptr noundef %48, ptr noundef %51, i32 noundef %54, i8 noundef signext %57, i8 noundef signext %60, ptr noundef null)
  store ptr %61, ptr %14, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = icmp eq ptr %62, null
  br i1 %63, label %64, label %67

64:                                               ; preds = %31
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str) #4
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %138

67:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.s_lst_vvertice, ptr %68, i32 0, i32 5
  %70 = load i32, ptr %69, align 8, !tbaa !19
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s_fparams, ptr %72, i32 0, i32 25
  %74 = load float, ptr %73, align 8, !tbaa !27
  %75 = call ptr @cuttree_distance(i32 noundef %70, ptr noundef %71, float noundef %74)
  store ptr %75, ptr %17, align 8, !tbaa !5
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  call void @transferClustersToVertices(ptr noundef %76, ptr noundef %77)
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.s_lst_vvertice, ptr %79, i32 0, i32 5
  %81 = load i32, ptr %80, align 8, !tbaa !19
  %82 = call i32 @free_cluster_lib_vertices(ptr noundef %78, i32 noundef %81)
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = call i32 @free_cluster_tree(ptr noundef %83)
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s_lst_vvertice, ptr %86, i32 0, i32 5
  %88 = load i32, ptr %87, align 8, !tbaa !19
  %89 = call i32 @free_cluster_ids(ptr noundef %85, i32 noundef %88)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %90

90:                                               ; preds = %67, %26, %3
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = icmp eq ptr %91, null
  br i1 %92, label %93, label %96

93:                                               ; preds = %90
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.1) #4
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %138

96:                                               ; preds = %90
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = call ptr @assign_pockets(ptr noundef %97)
  store ptr %98, ptr %12, align 8, !tbaa !5
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  call void @apply_clustering(ptr noundef %99)
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %136

102:                                              ; preds = %96
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  call void @reIndexPockets(ptr noundef %103)
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  call void @set_pockets_descriptors(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  call void @dropSmallNpolarPockets(ptr noundef %108, ptr noundef %109)
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  call void @reIndexPockets(ptr noundef %110)
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sort_pockets(ptr noundef %111, ptr noundef @compare_pockets_score)
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  call void @reIndexPockets(ptr noundef %112)
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s_fparams, ptr %113, i32 0, i32 16
  %115 = load i16, ptr %114, align 4, !tbaa !28
  %116 = sext i16 %115 to i32
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %135

118:                                              ; preds = %102
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.s_fparams, ptr %119, i32 0, i32 20
  %121 = load i16, ptr %120, align 4, !tbaa !29
  %122 = zext i16 %121 to i32
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %135

124:                                              ; preds = %118
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.s_fparams, ptr %125, i32 0, i32 1
  %127 = getelementptr inbounds [2000 x i8], ptr %126, i64 0, i64 0
  %128 = load i8, ptr %127, align 8, !tbaa !30
  %129 = sext i8 %128 to i32
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %135

131:                                              ; preds = %124
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  call void @calculate_pocket_energy_grids(ptr noundef %132, ptr noundef %133, ptr noundef %134)
  br label %135

135:                                              ; preds = %131, %124, %118, %102
  br label %136

136:                                              ; preds = %135, %96
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %137, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %138

138:                                              ; preds = %136, %93, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %139 = load ptr, ptr %4, align 8
  ret ptr %139
}

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

; Function Attrs: nounwind
declare i64 @clock() #2

declare ptr @load_vvertices(ptr noundef, ptr noundef, float noundef, float noundef, float noundef) #3

declare ptr @prepare_vertices_for_cluster_lib(ptr noundef, i8 noundef signext, i8 noundef signext) #3

declare ptr @treecluster(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i8 noundef signext, i8 noundef signext, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare ptr @cuttree_distance(i32 noundef, ptr noundef, float noundef) #3

declare void @transferClustersToVertices(ptr noundef, ptr noundef) #3

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

declare i32 @free_cluster_tree(ptr noundef) #3

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

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

declare ptr @assign_pockets(ptr noundef) #3

declare void @apply_clustering(ptr noundef) #3

declare void @reIndexPockets(ptr noundef) #3

declare void @set_pockets_descriptors(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @dropSmallNpolarPockets(ptr noundef, ptr noundef) #3

declare void @sort_pockets(ptr noundef, ptr noundef) #3

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

declare void @calculate_pocket_energy_grids(ptr noundef, ptr noundef, ptr noundef) #3

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 = { 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 #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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 14024}
!12 = !{!"s_fparams", !7, i64 0, !7, i64 2000, !7, i64 4000, !7, i64 6000, !6, i64 14000, !6, i64 14008, !6, i64 14016, !13, i64 14024, !13, i64 14028, !6, i64 14032, !6, i64 14040, !6, i64 14048, !7, i64 14056, !7, i64 14057, !13, i64 14060, !13, i64 14064, !14, i64 14068, !13, i64 14072, !13, i64 14076, !13, i64 14080, !14, i64 14084, !13, i64 14088, !13, i64 14092, !13, i64 14096, !14, i64 14100, !15, i64 14104, !15, i64 14108, !15, i64 14112, !15, i64 14116, !15, i64 14120, !7, i64 14128, !14, i64 14288, !14, i64 14290, !7, i64 14296, !13, i64 14456, !7, i64 14460}
!13 = !{!"int", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!12, !13, i64 14028}
!17 = !{!12, !7, i64 14057}
!18 = !{!12, !7, i64 14056}
!19 = !{!20, !13, i64 40}
!20 = !{!"s_lst_vvertice", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 44}
!21 = !{!22, !6, i64 0}
!22 = !{!"s_clusterlib_vertices", !6, i64 0, !6, i64 8, !7, i64 16, !13, i64 40, !7, i64 44, !7, i64 45}
!23 = !{!22, !6, i64 8}
!24 = !{!22, !13, i64 40}
!25 = !{!22, !7, i64 44}
!26 = !{!22, !7, i64 45}
!27 = !{!12, !15, i64 14104}
!28 = !{!12, !14, i64 14068}
!29 = !{!12, !14, i64 14084}
!30 = !{!7, !7, i64 0}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @search_pocket(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = tail call i64 @clock() #4
  %5 = tail call ptr @load_vvertices(ptr noundef %0, ptr noundef %1, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00) #4
  %6 = getelementptr inbounds i8, ptr %1, i64 14024
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = icmp eq i32 %7, -1
  br i1 %8, label %9, label %45

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %1, i64 14028
  %11 = load i32, ptr %10, align 4, !tbaa !13
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %45

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 14057
  %15 = load i8, ptr %14, align 1, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %1, i64 14056
  %17 = load i8, ptr %16, align 8, !tbaa !15
  %18 = tail call ptr @prepare_vertices_for_cluster_lib(ptr noundef %5, i8 noundef signext %15, i8 noundef signext %17) #4
  %19 = getelementptr inbounds i8, ptr %5, i64 40
  %20 = load i32, ptr %19, align 8, !tbaa !16
  %21 = load ptr, ptr %18, align 8, !tbaa !18
  %22 = getelementptr inbounds i8, ptr %18, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %18, i64 16
  %25 = getelementptr inbounds i8, ptr %18, i64 40
  %26 = load i32, ptr %25, align 8, !tbaa !21
  %27 = getelementptr inbounds i8, ptr %18, i64 44
  %28 = load i8, ptr %27, align 4, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %18, i64 45
  %30 = load i8, ptr %29, align 1, !tbaa !23
  %31 = tail call ptr @treecluster(i32 noundef %20, i32 noundef 3, ptr noundef %21, ptr noundef %23, ptr noundef nonnull %24, i32 noundef %26, i8 noundef signext %28, i8 noundef signext %30, ptr noundef null) #4
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %.thread

33:                                               ; preds = %13
  %34 = load ptr, ptr @stderr, align 8, !tbaa !24
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str) #5
  br label %62

.thread:                                          ; preds = %13
  %36 = load i32, ptr %19, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %1, i64 14104
  %38 = load float, ptr %37, align 8, !tbaa !25
  %39 = tail call ptr @cuttree_distance(i32 noundef %36, ptr noundef nonnull %31, float noundef %38) #4
  tail call void @transferClustersToVertices(ptr noundef %39, ptr noundef nonnull %5) #4
  %40 = load i32, ptr %19, align 8, !tbaa !16
  %41 = tail call i32 @free_cluster_lib_vertices(ptr noundef nonnull %18, i32 noundef %40) #4
  %42 = tail call i32 @free_cluster_tree(ptr noundef nonnull %31) #4
  %43 = load i32, ptr %19, align 8, !tbaa !16
  %44 = tail call i32 @free_cluster_ids(ptr noundef %39, i32 noundef %43) #4
  br label %50

45:                                               ; preds = %9, %3
  %46 = icmp eq ptr %5, null
  br i1 %46, label %47, label %50

47:                                               ; preds = %45
  %48 = load ptr, ptr @stderr, align 8, !tbaa !24
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.1) #5
  br label %62

50:                                               ; preds = %.thread, %45
  %51 = tail call ptr @assign_pockets(ptr noundef nonnull %5) #4
  tail call void @apply_clustering(ptr noundef %51) #4
  %.not = icmp eq ptr %51, null
  br i1 %.not, label %62, label %52

52:                                               ; preds = %50
  tail call void @reIndexPockets(ptr noundef nonnull %51) #4
  tail call void @set_pockets_descriptors(ptr noundef nonnull %51, ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2) #4
  tail call void @dropSmallNpolarPockets(ptr noundef nonnull %51, ptr noundef nonnull %1) #4
  tail call void @reIndexPockets(ptr noundef nonnull %51) #4
  tail call void @sort_pockets(ptr noundef nonnull %51, ptr noundef nonnull @compare_pockets_score) #4
  tail call void @reIndexPockets(ptr noundef nonnull %51) #4
  %53 = getelementptr inbounds i8, ptr %1, i64 14068
  %54 = load i16, ptr %53, align 4, !tbaa !26
  %.not50 = icmp eq i16 %54, 0
  br i1 %.not50, label %62, label %55

55:                                               ; preds = %52
  %56 = getelementptr inbounds i8, ptr %1, i64 14084
  %57 = load i16, ptr %56, align 4, !tbaa !27
  %.not51 = icmp eq i16 %57, 0
  br i1 %.not51, label %62, label %58

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %1, i64 2000
  %60 = load i8, ptr %59, align 8, !tbaa !28
  %.not52 = icmp eq i8 %60, 0
  br i1 %.not52, label %62, label %61

61:                                               ; preds = %58
  tail call void @calculate_pocket_energy_grids(ptr noundef nonnull %51, ptr noundef nonnull %1, ptr noundef %0) #4
  br label %62

62:                                               ; preds = %50, %61, %58, %55, %52, %47, %33
  %.0 = phi ptr [ null, %33 ], [ null, %47 ], [ %51, %52 ], [ %51, %55 ], [ %51, %58 ], [ %51, %61 ], [ null, %50 ]
  ret ptr %.0
}

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #1

declare ptr @load_vvertices(ptr noundef, ptr noundef, float noundef, float noundef, float noundef) local_unnamed_addr #2

declare ptr @prepare_vertices_for_cluster_lib(ptr noundef, i8 noundef signext, i8 noundef signext) local_unnamed_addr #2

declare ptr @treecluster(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i8 noundef signext, i8 noundef signext, ptr noundef) local_unnamed_addr #2

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

declare ptr @cuttree_distance(i32 noundef, ptr noundef, float noundef) local_unnamed_addr #2

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

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

declare i32 @free_cluster_tree(ptr noundef) local_unnamed_addr #2

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

declare ptr @assign_pockets(ptr noundef) local_unnamed_addr #2

declare void @apply_clustering(ptr noundef) local_unnamed_addr #2

declare void @reIndexPockets(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #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 = { nounwind }
attributes #5 = { cold 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, !10, i64 14024}
!6 = !{!"s_fparams", !7, i64 0, !7, i64 2000, !7, i64 4000, !7, i64 6000, !9, i64 14000, !9, i64 14008, !9, i64 14016, !10, i64 14024, !10, i64 14028, !9, i64 14032, !9, i64 14040, !9, i64 14048, !7, i64 14056, !7, i64 14057, !10, i64 14060, !10, i64 14064, !11, i64 14068, !10, i64 14072, !10, i64 14076, !10, i64 14080, !11, i64 14084, !10, i64 14088, !10, i64 14092, !10, i64 14096, !11, i64 14100, !12, i64 14104, !12, i64 14108, !12, i64 14112, !12, i64 14116, !12, i64 14120, !7, i64 14128, !11, i64 14288, !11, i64 14290, !7, i64 14296, !10, i64 14456, !7, i64 14460}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!6, !10, i64 14028}
!14 = !{!6, !7, i64 14057}
!15 = !{!6, !7, i64 14056}
!16 = !{!17, !10, i64 40}
!17 = !{!"s_lst_vvertice", !9, i64 0, !9, i64 8, !9, i64 16, !10, i64 24, !9, i64 32, !10, i64 40, !10, i64 44}
!18 = !{!19, !9, i64 0}
!19 = !{!"s_clusterlib_vertices", !9, i64 0, !9, i64 8, !7, i64 16, !10, i64 40, !7, i64 44, !7, i64 45}
!20 = !{!19, !9, i64 8}
!21 = !{!19, !10, i64 40}
!22 = !{!19, !7, i64 44}
!23 = !{!19, !7, i64 45}
!24 = !{!9, !9, i64 0}
!25 = !{!6, !12, i64 14104}
!26 = !{!6, !11, i64 14068}
!27 = !{!6, !11, i64 14084}
!28 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass