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

; 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_tparams = type { ptr, ptr, ptr, ptr, ptr, [128 x i8], [128 x i8], float, i32, i32, ptr }
%struct.s_pdb = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, float, float, float, float, float, float, [83 x i8], [500 x i8], float, float, float, i32, i32 }
%struct.c_lst_pockets = type { ptr, ptr, ptr, i64, ptr }
%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] }

@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.41 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [46 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare i32 @fflush(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @test_set(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s_tparams, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds ptr, ptr %24, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %28, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.s_tparams, ptr %29, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds ptr, ptr %31, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %35, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_tparams, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds ptr, ptr %38, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %42, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.s_tparams, ptr %45, i32 0, i32 10
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = call ptr @rpdb_open(ptr noundef %43, ptr noundef %44, i32 noundef 0, i32 noundef 0, ptr noundef %47)
  store ptr %48, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.s_tparams, ptr %51, i32 0, i32 10
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  %54 = call ptr @rpdb_open(ptr noundef %49, ptr noundef %50, i32 noundef 1, i32 noundef 0, ptr noundef %53)
  store ptr %54, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s_tparams, ptr %57, i32 0, i32 10
  %59 = load ptr, ptr %58, align 8, !tbaa !16
  %60 = call ptr @rpdb_open(ptr noundef %55, ptr noundef %56, i32 noundef 0, i32 noundef 0, ptr noundef %59)
  store ptr %60, ptr %19, align 8, !tbaa !5
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %66

63:                                               ; preds = %4
  %64 = load ptr, ptr %18, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %84, label %66

66:                                               ; preds = %63, %4
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = load ptr, ptr %18, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.41, ptr noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72) #4
  %74 = load ptr, ptr %18, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %78

76:                                               ; preds = %66
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free_pdb_atoms(ptr noundef %77)
  br label %78

78:                                               ; preds = %76, %66
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free_pdb_atoms(ptr noundef %82)
  br label %83

83:                                               ; preds = %81, %78
  store i32 -2, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %222

84:                                               ; preds = %63
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.s_pdb, ptr %85, i32 0, i32 12
  %87 = load i32, ptr %86, align 4, !tbaa !17
  %88 = icmp sle i32 %87, 0
  br i1 %88, label %89, label %94

89:                                               ; preds = %84
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.42, ptr noundef %91, ptr noundef %92) #4
  store i32 -2, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %222

94:                                               ; preds = %84
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.s_tparams, ptr %97, i32 0, i32 10
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  call void @rpdb_read(ptr noundef %95, ptr noundef %96, i32 noundef 0, i32 noundef 0, ptr noundef %99)
  %100 = load ptr, ptr %18, align 8, !tbaa !5
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.s_tparams, ptr %102, i32 0, i32 10
  %104 = load ptr, ptr %103, align 8, !tbaa !16
  call void @rpdb_read(ptr noundef %100, ptr noundef %101, i32 noundef 1, i32 noundef 0, ptr noundef %104)
  %105 = load ptr, ptr %19, align 8, !tbaa !5
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s_tparams, ptr %107, i32 0, i32 10
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  call void @rpdb_read(ptr noundef %105, ptr noundef %106, i32 noundef 0, i32 noundef 0, ptr noundef %109)
  call void @print_number_of_objects_in_memory()
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s_tparams, ptr %111, i32 0, i32 10
  %113 = load ptr, ptr %112, align 8, !tbaa !16
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = call ptr @search_pocket(ptr noundef %110, ptr noundef %113, ptr noundef %114)
  store ptr %115, ptr %21, align 8, !tbaa !5
  call void @print_number_of_objects_in_memory()
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  call void @set_pockets_bary(ptr noundef %116)
  %117 = load ptr, ptr %21, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %124

119:                                              ; preds = %94
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.c_lst_pockets, ptr %120, i32 0, i32 3
  %122 = load i64, ptr %121, align 8, !tbaa !19
  %123 = icmp ule i64 %122, 0
  br i1 %123, label %124, label %130

124:                                              ; preds = %119, %94
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %129

127:                                              ; preds = %124
  %128 = load ptr, ptr %21, align 8, !tbaa !5
  call void @c_lst_pocket_free(ptr noundef %128)
  br label %129

129:                                              ; preds = %127, %124
  store i32 1, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %221

130:                                              ; preds = %119
  %131 = load ptr, ptr %21, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.c_lst_pockets, ptr %131, i32 0, i32 3
  %133 = load i64, ptr %132, align 8, !tbaa !19
  %134 = trunc i64 %133 to i32
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [9 x i32], ptr %135, i64 %137
  %139 = getelementptr inbounds [9 x i32], ptr %138, i64 0, i64 0
  store i32 %134, ptr %139, align 4, !tbaa !9
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.s_pdb, ptr %140, i32 0, i32 5
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.s_pdb, ptr %143, i32 0, i32 12
  %145 = load i32, ptr %144, align 4, !tbaa !17
  %146 = call float @get_mol_mass_ptr(ptr noundef %142, i32 noundef %145)
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = load i32, ptr %7, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [16 x float], ptr %147, i64 %149
  %151 = getelementptr inbounds [16 x float], ptr %150, i64 0, i64 12
  store float %146, ptr %151, align 4, !tbaa !23
  %152 = load ptr, ptr %18, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.s_pdb, ptr %152, i32 0, i32 5
  %154 = load ptr, ptr %153, align 8, !tbaa !22
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.s_pdb, ptr %155, i32 0, i32 12
  %157 = load i32, ptr %156, align 4, !tbaa !17
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.s_tparams, ptr %158, i32 0, i32 10
  %160 = load ptr, ptr %159, align 8, !tbaa !16
  %161 = getelementptr inbounds %struct.s_fparams, ptr %160, i32 0, i32 22
  %162 = load i32, ptr %161, align 4, !tbaa !24
  %163 = call float @get_mol_volume_ptr(ptr noundef %154, i32 noundef %157, i32 noundef %162)
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load i32, ptr %7, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [16 x float], ptr %164, i64 %166
  %168 = getelementptr inbounds [16 x float], ptr %167, i64 0, i64 13
  store float %163, ptr %168, align 4, !tbaa !23
  %169 = load ptr, ptr %18, align 8, !tbaa !5
  %170 = call ptr @get_actual_pocket_DEPRECATED(ptr noundef %169, float noundef 3.000000e+00, ptr noundef %15)
  store ptr %170, ptr %10, align 8, !tbaa !5
  %171 = load ptr, ptr %18, align 8, !tbaa !5
  %172 = load ptr, ptr %19, align 8, !tbaa !5
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = call ptr @get_actual_pocket(ptr noundef %171, ptr noundef %172, i32 noundef %173, ptr noundef %174, ptr noundef %16)
  store ptr %175, ptr %11, align 8, !tbaa !5
  %176 = load ptr, ptr @stdout, align 8, !tbaa !5
  %177 = call i32 @fflush(ptr noundef %176)
  %178 = load i32, ptr %16, align 4, !tbaa !9
  %179 = icmp sle i32 %178, 0
  br i1 %179, label %180, label %185

180:                                              ; preds = %130
  %181 = load ptr, ptr @stdout, align 8, !tbaa !5
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load i32, ptr %16, align 4, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.43, ptr noundef %182, i32 noundef %183) #4
  br label %185

185:                                              ; preds = %180, %130
  %186 = load ptr, ptr %21, align 8, !tbaa !5
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = load i32, ptr %16, align 4, !tbaa !9
  %189 = load ptr, ptr %18, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s_pdb, ptr %189, i32 0, i32 5
  %191 = load ptr, ptr %190, align 8, !tbaa !22
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.s_pdb, ptr %192, i32 0, i32 12
  %194 = load i32, ptr %193, align 4, !tbaa !17
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = load i32, ptr %7, align 4, !tbaa !9
  call void @check_pockets(ptr noundef %186, ptr noundef %187, i32 noundef %188, ptr noundef %191, i32 noundef %194, ptr noundef %195, i32 noundef %196, ptr noundef %197, ptr noundef %198, i32 noundef %199)
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.s_tparams, ptr %200, i32 0, i32 9
  %202 = load i32, ptr %201, align 8, !tbaa !27
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %214

204:                                              ; preds = %185
  %205 = load ptr, ptr %21, align 8, !tbaa !5
  %206 = load ptr, ptr %17, align 8, !tbaa !5
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.s_tparams, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !11
  %210 = load i32, ptr %7, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds ptr, ptr %209, i64 %211
  %213 = load ptr, ptr %212, align 8, !tbaa !5
  call void @write_out_fpocket(ptr noundef %205, ptr noundef %206, ptr noundef %213)
  br label %214

214:                                              ; preds = %204, %185
  call void @print_number_of_objects_in_memory()
  %215 = load ptr, ptr %21, align 8, !tbaa !5
  call void @c_lst_pocket_free(ptr noundef %215)
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  call void @my_free(ptr noundef %216)
  %217 = load ptr, ptr %11, align 8, !tbaa !5
  call void @my_free(ptr noundef %217)
  %218 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free_pdb_atoms(ptr noundef %218)
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free_pdb_atoms(ptr noundef %219)
  %220 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free_pdb_atoms(ptr noundef %220)
  call void @print_number_of_objects_in_memory()
  store i32 0, ptr %5, align 4
  store i32 1, ptr %20, align 4
  br label %221

221:                                              ; preds = %214, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %222

222:                                              ; preds = %221, %89, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, 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
  %223 = load i32, ptr %5, align 4
  ret i32 %223
}

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

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

declare void @free_pdb_atoms(ptr noundef) #2

declare void @rpdb_read(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare void @print_number_of_objects_in_memory() #2

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

declare void @set_pockets_bary(ptr noundef) #2

declare void @c_lst_pocket_free(ptr noundef) #2

declare float @get_mol_mass_ptr(ptr noundef, i32 noundef) #2

declare float @get_mol_volume_ptr(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_actual_pocket_DEPRECATED(ptr noundef, float noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_actual_pocket(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @check_pockets(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

declare void @my_free(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"s_tparams", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 168, !13, i64 296, !10, i64 300, !10, i64 304, !6, i64 312}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !6, i64 312}
!17 = !{!18, !10, i64 84}
!18 = !{!"s_pdb", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !7, i64 116, !7, i64 199, !13, i64 700, !13, i64 704, !13, i64 708, !10, i64 712, !10, i64 716}
!19 = !{!20, !21, i64 24}
!20 = !{!"c_lst_pockets", !6, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !6, i64 32}
!21 = !{!"long", !7, i64 0}
!22 = !{!18, !6, i64 40}
!23 = !{!13, !13, i64 0}
!24 = !{!25, !10, i64 14092}
!25 = !{!"s_fparams", !7, i64 0, !7, i64 2000, !7, i64 4000, !7, i64 6000, !6, i64 14000, !6, i64 14008, !6, i64 14016, !10, i64 14024, !10, i64 14028, !6, i64 14032, !6, i64 14040, !6, i64 14048, !7, i64 14056, !7, i64 14057, !10, i64 14060, !10, i64 14064, !26, i64 14068, !10, i64 14072, !10, i64 14076, !10, i64 14080, !26, i64 14084, !10, i64 14088, !10, i64 14092, !10, i64 14096, !26, i64 14100, !13, i64 14104, !13, i64 14108, !13, i64 14112, !13, i64 14116, !13, i64 14120, !7, i64 14128, !26, i64 14288, !26, i64 14290, !7, i64 14296, !10, i64 14456, !7, i64 14460}
!26 = !{!"short", !7, i64 0}
!27 = !{!12, !10, i64 304}


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

@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.41 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [46 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2, 2) i32 @test_set(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = load ptr, ptr %0, align 8, !tbaa !5
  %8 = sext i32 %1 to i64
  %9 = getelementptr inbounds ptr, ptr %7, i64 %8
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !13
  %13 = getelementptr inbounds ptr, ptr %12, i64 %8
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = getelementptr inbounds ptr, ptr %16, i64 %8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 312
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = tail call ptr @rpdb_open(ptr noundef %10, ptr noundef %18, i32 noundef 0, i32 noundef 0, ptr noundef %20) #4
  %22 = load ptr, ptr %19, align 8, !tbaa !16
  %23 = tail call ptr @rpdb_open(ptr noundef %14, ptr noundef %18, i32 noundef 1, i32 noundef 0, ptr noundef %22) #4
  %24 = load ptr, ptr %19, align 8, !tbaa !16
  %25 = tail call ptr @rpdb_open(ptr noundef %14, ptr noundef %18, i32 noundef 0, i32 noundef 0, ptr noundef %24) #4
  %26 = icmp ne ptr %21, null
  %27 = icmp ne ptr %23, null
  %or.cond = select i1 %26, i1 %27, i1 false
  br i1 %or.cond, label %34, label %28

28:                                               ; preds = %4
  %29 = load ptr, ptr @stderr, align 8, !tbaa !12
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.41, ptr noundef %14, ptr noundef %10, ptr noundef %18, ptr noundef %21, ptr noundef %23) #5
  br i1 %27, label %31, label %32

31:                                               ; preds = %28
  tail call void @free_pdb_atoms(ptr noundef nonnull %23) #4
  br label %32

32:                                               ; preds = %31, %28
  br i1 %26, label %33, label %.critedge

33:                                               ; preds = %32
  tail call void @free_pdb_atoms(ptr noundef nonnull %21) #4
  br label %.critedge

34:                                               ; preds = %4
  %35 = getelementptr inbounds i8, ptr %23, i64 84
  %36 = load i32, ptr %35, align 4, !tbaa !17
  %37 = icmp slt i32 %36, 1
  br i1 %37, label %38, label %41

38:                                               ; preds = %34
  %39 = load ptr, ptr @stderr, align 8, !tbaa !12
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.42, ptr noundef %18, ptr noundef %14) #5
  br label %.critedge

41:                                               ; preds = %34
  %42 = load ptr, ptr %19, align 8, !tbaa !16
  tail call void @rpdb_read(ptr noundef nonnull %21, ptr noundef %18, i32 noundef 0, i32 noundef 0, ptr noundef %42) #4
  %43 = load ptr, ptr %19, align 8, !tbaa !16
  tail call void @rpdb_read(ptr noundef nonnull %23, ptr noundef %18, i32 noundef 1, i32 noundef 0, ptr noundef %43) #4
  %44 = load ptr, ptr %19, align 8, !tbaa !16
  tail call void @rpdb_read(ptr noundef %25, ptr noundef %18, i32 noundef 0, i32 noundef 0, ptr noundef %44) #4
  tail call void @print_number_of_objects_in_memory() #4
  %45 = load ptr, ptr %19, align 8, !tbaa !16
  %46 = tail call ptr @search_pocket(ptr noundef nonnull %21, ptr noundef %45, ptr noundef nonnull %23) #4
  tail call void @print_number_of_objects_in_memory() #4
  tail call void @set_pockets_bary(ptr noundef %46) #4
  %.not = icmp eq ptr %46, null
  br i1 %.not, label %.critedge, label %47

47:                                               ; preds = %41
  %48 = getelementptr inbounds i8, ptr %46, i64 24
  %49 = load i64, ptr %48, align 8, !tbaa !19
  %50 = icmp eq i64 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  tail call void @c_lst_pocket_free(ptr noundef nonnull %46) #4
  br label %.critedge

52:                                               ; preds = %47
  %53 = trunc i64 %49 to i32
  %54 = getelementptr inbounds [9 x i32], ptr %3, i64 %8
  store i32 %53, ptr %54, align 4, !tbaa !15
  %55 = getelementptr inbounds i8, ptr %23, i64 40
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = load i32, ptr %35, align 4, !tbaa !17
  %58 = tail call float @get_mol_mass_ptr(ptr noundef %56, i32 noundef %57) #4
  %59 = getelementptr inbounds [16 x float], ptr %2, i64 %8
  %60 = getelementptr inbounds i8, ptr %59, i64 48
  store float %58, ptr %60, align 4, !tbaa !23
  %61 = load ptr, ptr %55, align 8, !tbaa !22
  %62 = load i32, ptr %35, align 4, !tbaa !17
  %63 = load ptr, ptr %19, align 8, !tbaa !16
  %64 = getelementptr inbounds i8, ptr %63, i64 14092
  %65 = load i32, ptr %64, align 4, !tbaa !24
  %66 = tail call float @get_mol_volume_ptr(ptr noundef %61, i32 noundef %62, i32 noundef %65) #4
  %67 = getelementptr inbounds i8, ptr %59, i64 52
  store float %66, ptr %67, align 4, !tbaa !23
  %68 = call ptr @get_actual_pocket_DEPRECATED(ptr noundef nonnull %23, float noundef 3.000000e+00, ptr noundef nonnull %5)
  %69 = call ptr @get_actual_pocket(ptr noundef nonnull %23, ptr noundef %25, i32 noundef %1, ptr noundef nonnull %0, ptr noundef nonnull %6)
  %70 = load ptr, ptr @stdout, align 8, !tbaa !12
  %71 = call i32 @fflush(ptr noundef %70)
  %72 = load i32, ptr %6, align 4, !tbaa !15
  %73 = icmp slt i32 %72, 1
  br i1 %73, label %74, label %77

74:                                               ; preds = %52
  %75 = load ptr, ptr @stdout, align 8, !tbaa !12
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.43, ptr noundef %10, i32 noundef %72) #4
  %.pre = load i32, ptr %6, align 4, !tbaa !15
  br label %77

77:                                               ; preds = %74, %52
  %78 = phi i32 [ %.pre, %74 ], [ %72, %52 ]
  %79 = load ptr, ptr %55, align 8, !tbaa !22
  %80 = load i32, ptr %35, align 4, !tbaa !17
  %81 = load i32, ptr %5, align 4, !tbaa !15
  call void @check_pockets(ptr noundef nonnull %46, ptr noundef %69, i32 noundef %78, ptr noundef %79, i32 noundef %80, ptr noundef %68, i32 noundef %81, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %1)
  %82 = getelementptr inbounds i8, ptr %0, i64 304
  %83 = load i32, ptr %82, align 8, !tbaa !27
  %.not92 = icmp eq i32 %83, 0
  br i1 %.not92, label %88, label %84

84:                                               ; preds = %77
  %85 = load ptr, ptr %0, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i64 %8
  %87 = load ptr, ptr %86, align 8, !tbaa !12
  call void @write_out_fpocket(ptr noundef nonnull %46, ptr noundef nonnull %21, ptr noundef %87) #4
  br label %88

88:                                               ; preds = %84, %77
  call void @print_number_of_objects_in_memory() #4
  call void @c_lst_pocket_free(ptr noundef nonnull %46) #4
  call void @my_free(ptr noundef %68) #4
  call void @my_free(ptr noundef %69) #4
  call void @free_pdb_atoms(ptr noundef nonnull %21) #4
  call void @free_pdb_atoms(ptr noundef nonnull %23) #4
  call void @free_pdb_atoms(ptr noundef %25) #4
  call void @print_number_of_objects_in_memory() #4
  br label %.critedge

.critedge:                                        ; preds = %88, %41, %51, %32, %33, %38
  %.1 = phi i32 [ -2, %38 ], [ -2, %33 ], [ -2, %32 ], [ 0, %88 ], [ 1, %41 ], [ 1, %51 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret i32 %.1
}

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

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

declare void @free_pdb_atoms(ptr noundef) local_unnamed_addr #3

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

declare void @print_number_of_objects_in_memory() local_unnamed_addr #3

declare ptr @search_pocket(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @set_pockets_bary(ptr noundef) local_unnamed_addr #3

declare void @c_lst_pocket_free(ptr noundef) local_unnamed_addr #3

declare float @get_mol_mass_ptr(ptr noundef, i32 noundef) local_unnamed_addr #3

declare float @get_mol_volume_ptr(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_actual_pocket_DEPRECATED(ptr noundef, float noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_actual_pocket(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @check_pockets(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @write_out_fpocket(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @my_free(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 }
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, !7, i64 0}
!6 = !{!"s_tparams", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !8, i64 40, !8, i64 168, !10, i64 296, !11, i64 300, !11, i64 304, !7, i64 312}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 16}
!15 = !{!11, !11, i64 0}
!16 = !{!6, !7, i64 312}
!17 = !{!18, !11, i64 84}
!18 = !{!"s_pdb", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !8, i64 116, !8, i64 199, !10, i64 700, !10, i64 704, !10, i64 708, !11, i64 712, !11, i64 716}
!19 = !{!20, !21, i64 24}
!20 = !{!"c_lst_pockets", !7, i64 0, !7, i64 8, !7, i64 16, !21, i64 24, !7, i64 32}
!21 = !{!"long", !8, i64 0}
!22 = !{!18, !7, i64 40}
!23 = !{!10, !10, i64 0}
!24 = !{!25, !11, i64 14092}
!25 = !{!"s_fparams", !8, i64 0, !8, i64 2000, !8, i64 4000, !8, i64 6000, !7, i64 14000, !7, i64 14008, !7, i64 14016, !11, i64 14024, !11, i64 14028, !7, i64 14032, !7, i64 14040, !7, i64 14048, !8, i64 14056, !8, i64 14057, !11, i64 14060, !11, i64 14064, !26, i64 14068, !11, i64 14072, !11, i64 14076, !11, i64 14080, !26, i64 14084, !11, i64 14088, !11, i64 14092, !11, i64 14096, !26, i64 14100, !10, i64 14104, !10, i64 14108, !10, i64 14112, !10, i64 14116, !10, i64 14120, !8, i64 14128, !26, i64 14288, !26, i64 14290, !8, i64 14296, !11, i64 14456, !8, i64 14460}
!26 = !{!"short", !8, i64 0}
!27 = !{!6, !11, i64 304}


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