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

; 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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@write_mode = external global [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @write_out_fpocket(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 [350 x i8], align 16
  %8 = alloca [350 x i8], align 16
  %9 = alloca [350 x i8], align 16
  %10 = alloca [350 x i8], align 16
  %11 = alloca [350 x i8], align 16
  %12 = alloca [350 x i8], align 16
  %13 = alloca [350 x i8], align 16
  %14 = alloca [350 x i8], align 16
  %15 = alloca [370 x i8], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 350, ptr %7) #6
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %8) #6
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %9) #6
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %10) #6
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %11) #6
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %12) #6
  call void @llvm.memset.p0.i64(ptr align 16 %12, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %13) #6
  call void @llvm.memset.p0.i64(ptr align 16 %13, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr %14) #6
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 370, ptr %15) #6
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 370, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %128

20:                                               ; preds = %3
  %21 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call ptr @strcpy(ptr noundef %21, ptr noundef %22) #6
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds [350 x i8], ptr %8, i64 0, i64 0
  call void @extract_path(ptr noundef %24, ptr noundef %25)
  %26 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  call void @remove_ext(ptr noundef %26)
  %27 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  call void @remove_path(ptr noundef %27)
  %28 = getelementptr inbounds [350 x i8], ptr %8, i64 0, i64 0
  %29 = call i64 @strlen(ptr noundef %28) #7
  %30 = icmp ugt i64 %29, 0
  br i1 %30, label %31, label %36

31:                                               ; preds = %20
  %32 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %33 = getelementptr inbounds [350 x i8], ptr %8, i64 0, i64 0
  %34 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %32, ptr noundef @.str, ptr noundef %33, ptr noundef %34) #6
  br label %40

36:                                               ; preds = %20
  %37 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %38 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %39 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %37, ptr noundef @.str.1, ptr noundef %38) #6
  br label %40

40:                                               ; preds = %36, %31
  %41 = getelementptr inbounds [370 x i8], ptr %15, i64 0, i64 0
  %42 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %43 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %41, ptr noundef @.str.2, ptr noundef %42) #6
  %44 = getelementptr inbounds [370 x i8], ptr %15, i64 0, i64 0
  %45 = call i32 @system(ptr noundef %44)
  store i32 %45, ptr %16, align 4, !tbaa !9
  %46 = load i32, ptr %16, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  store i32 1, ptr %17, align 4
  br label %129

49:                                               ; preds = %40
  %50 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %51 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %52 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %53 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %50, ptr noundef @.str.3, ptr noundef %51, ptr noundef %52) #6
  %54 = getelementptr inbounds [350 x i8], ptr %11, i64 0, i64 0
  %55 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %56 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %54, ptr noundef @.str.4, ptr noundef %55) #6
  %57 = getelementptr inbounds [350 x i8], ptr %13, i64 0, i64 0
  %58 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %59 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %57, ptr noundef @.str.5, ptr noundef %58) #6
  %60 = getelementptr inbounds [350 x i8], ptr %14, i64 0, i64 0
  %61 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %62 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %60, ptr noundef @.str.4, ptr noundef %61) #6
  %63 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %64 = getelementptr inbounds [350 x i8], ptr %14, i64 0, i64 0
  call void @write_visualization(ptr noundef %63, ptr noundef %64)
  %65 = load i8, ptr @write_mode, align 1, !tbaa !11
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %66, 112
  br i1 %67, label %72, label %68

68:                                               ; preds = %49
  %69 = load i8, ptr @write_mode, align 1, !tbaa !11
  %70 = sext i8 %69 to i32
  %71 = icmp eq i32 %70, 98
  br i1 %71, label %72, label %79

72:                                               ; preds = %68, %49
  %73 = getelementptr inbounds [350 x i8], ptr %11, i64 0, i64 0
  %74 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %75 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %73, ptr noundef @.str.4, ptr noundef %74) #6
  %76 = getelementptr inbounds [350 x i8], ptr %11, i64 0, i64 0
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_pockets_single_pdb(ptr noundef %76, ptr noundef %77, ptr noundef %78)
  br label %79

79:                                               ; preds = %72, %68
  %80 = load i8, ptr @write_mode, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 109
  br i1 %82, label %87, label %83

83:                                               ; preds = %79
  %84 = load i8, ptr @write_mode, align 1, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 98
  br i1 %86, label %87, label %94

87:                                               ; preds = %83, %79
  %88 = getelementptr inbounds [350 x i8], ptr %13, i64 0, i64 0
  %89 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %90 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %88, ptr noundef @.str.5, ptr noundef %89) #6
  %91 = getelementptr inbounds [350 x i8], ptr %13, i64 0, i64 0
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_pockets_single_mmcif(ptr noundef %91, ptr noundef %92, ptr noundef %93)
  br label %94

94:                                               ; preds = %87, %83
  %95 = getelementptr inbounds [350 x i8], ptr %12, i64 0, i64 0
  %96 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %97 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %95, ptr noundef @.str.6, ptr noundef %96) #6
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds [350 x i8], ptr %12, i64 0, i64 0
  call void @write_out_fpocket_info_file(ptr noundef %98, ptr noundef %99)
  %100 = getelementptr inbounds [350 x i8], ptr %14, i64 0, i64 0
  %101 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %102 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %100, ptr noundef @.str.7, ptr noundef %101) #6
  %103 = getelementptr inbounds [350 x i8], ptr %14, i64 0, i64 0
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_pockets_single_pqr(ptr noundef %103, ptr noundef %104)
  %105 = getelementptr inbounds [350 x i8], ptr %8, i64 0, i64 0
  %106 = call i64 @strlen(ptr noundef %105) #7
  %107 = icmp ugt i64 %106, 0
  br i1 %107, label %108, label %113

108:                                              ; preds = %94
  %109 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %110 = getelementptr inbounds [350 x i8], ptr %8, i64 0, i64 0
  %111 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %112 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %109, ptr noundef @.str, ptr noundef %110, ptr noundef %111) #6
  br label %117

113:                                              ; preds = %94
  %114 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %115 = getelementptr inbounds [350 x i8], ptr %7, i64 0, i64 0
  %116 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %114, ptr noundef @.str.1, ptr noundef %115) #6
  br label %117

117:                                              ; preds = %113, %108
  %118 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %119 = getelementptr inbounds [350 x i8], ptr %9, i64 0, i64 0
  %120 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %118, ptr noundef @.str.8, ptr noundef %119) #6
  %121 = getelementptr inbounds [370 x i8], ptr %15, i64 0, i64 0
  %122 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %123 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %121, ptr noundef @.str.9, ptr noundef %122) #6
  %124 = getelementptr inbounds [370 x i8], ptr %15, i64 0, i64 0
  %125 = call i32 @system(ptr noundef %124)
  store i32 %125, ptr %16, align 4, !tbaa !9
  %126 = getelementptr inbounds [350 x i8], ptr %10, i64 0, i64 0
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_each_pocket(ptr noundef %126, ptr noundef %127)
  br label %128

128:                                              ; preds = %117, %3
  store i32 0, ptr %17, align 4
  br label %129

129:                                              ; preds = %128, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 370, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 350, ptr %7) #6
  %130 = load i32, ptr %17, align 4
  switch i32 %130, label %132 [
    i32 0, label %131
    i32 1, label %131
  ]

131:                                              ; preds = %129, %129
  ret void

132:                                              ; preds = %129
  unreachable
}

; 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 ptr @strcpy(ptr noundef, ptr noundef) #3

declare void @extract_path(ptr noundef, ptr noundef) #4

declare void @remove_ext(ptr noundef) #4

declare void @remove_path(ptr noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

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

declare i32 @system(ptr noundef) #4

declare void @write_visualization(ptr noundef, ptr noundef) #4

declare void @write_pockets_single_pdb(ptr noundef, ptr noundef, ptr noundef) #4

declare void @write_pockets_single_mmcif(ptr noundef, ptr noundef, ptr noundef) #4

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

declare void @write_pockets_single_pqr(ptr noundef, ptr noundef) #4

declare void @write_each_pocket(ptr noundef, ptr noundef) #4

; 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 = { 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 = { "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 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 #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 = !{!"int", !7, i64 0}
!11 = !{!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"

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@write_mode = external local_unnamed_addr global [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @write_out_fpocket(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca [350 x i8], align 16
  %5 = alloca [350 x i8], align 16
  %6 = alloca [350 x i8], align 16
  %7 = alloca [350 x i8], align 16
  %8 = alloca [350 x i8], align 16
  %9 = alloca [350 x i8], align 16
  %10 = alloca [350 x i8], align 16
  %11 = alloca [350 x i8], align 16
  %12 = alloca [370 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %4, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %5) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %5, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %6, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %7, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %8) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %8, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %9) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %9, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %10) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %10, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 350, ptr nonnull %11) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(350) %11, i8 0, i64 350, i1 false)
  call void @llvm.lifetime.start.p0(i64 370, ptr nonnull %12) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(370) %12, i8 0, i64 370, i1 false)
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %45, label %13

13:                                               ; preds = %3
  %14 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %2) #7
  call void @extract_path(ptr noundef %2, ptr noundef nonnull %5) #7
  call void @remove_ext(ptr noundef nonnull %4) #7
  call void @remove_path(ptr noundef nonnull %4) #7
  %char0 = load i8, ptr %5, align 16
  %.not15 = icmp eq i8 %char0, 0
  br i1 %.not15, label %17, label %15

15:                                               ; preds = %13
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %5, ptr noundef nonnull %4) #7
  br label %19

17:                                               ; preds = %13
  %18 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %4) #7
  br label %19

19:                                               ; preds = %17, %15
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %6) #7
  %21 = call i32 @system(ptr noundef nonnull %12) #7
  %.not16 = icmp eq i32 %21, 0
  br i1 %.not16, label %22, label %45

22:                                               ; preds = %19
  %23 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull %6, ptr noundef nonnull %4) #7
  %24 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %7) #7
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull %7) #7
  %26 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %4) #7
  call void @write_visualization(ptr noundef nonnull %7, ptr noundef nonnull %11) #7
  %27 = load i8, ptr @write_mode, align 1
  switch i8 %27, label %30 [
    i8 112, label %28
    i8 98, label %28
  ]

28:                                               ; preds = %22, %22
  %29 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %7) #7
  call void @write_pockets_single_pdb(ptr noundef nonnull %8, ptr noundef %1, ptr noundef nonnull %0) #7
  %.pr = load i8, ptr @write_mode, align 1
  br label %30

30:                                               ; preds = %22, %28
  %31 = phi i8 [ %27, %22 ], [ %.pr, %28 ]
  switch i8 %31, label %34 [
    i8 109, label %32
    i8 98, label %32
  ]

32:                                               ; preds = %30, %30
  %33 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull %7) #7
  call void @write_pockets_single_mmcif(ptr noundef nonnull %10, ptr noundef %1, ptr noundef nonnull %0) #7
  br label %34

34:                                               ; preds = %30, %32
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %7) #7
  call void @write_out_fpocket_info_file(ptr noundef nonnull %0, ptr noundef nonnull %9)
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull %7) #7
  call void @write_pockets_single_pqr(ptr noundef nonnull %11, ptr noundef nonnull %0) #7
  %char017 = load i8, ptr %5, align 16
  %.not18 = icmp eq i8 %char017, 0
  br i1 %.not18, label %39, label %37

37:                                               ; preds = %34
  %38 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %5, ptr noundef nonnull %4) #7
  br label %41

39:                                               ; preds = %34
  %40 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %4) #7
  br label %41

41:                                               ; preds = %39, %37
  %42 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %6) #7
  %43 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %7) #7
  %44 = call i32 @system(ptr noundef nonnull %12) #7
  call void @write_each_pocket(ptr noundef nonnull %7, ptr noundef nonnull %0) #7
  br label %45

45:                                               ; preds = %3, %41, %19
  call void @llvm.lifetime.end.p0(i64 370, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 350, ptr nonnull %4) #7
  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: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

declare void @extract_path(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @remove_ext(ptr noundef) local_unnamed_addr #4

declare void @remove_path(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #6

declare void @write_visualization(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @write_pockets_single_pdb(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @write_pockets_single_mmcif(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @write_pockets_single_pqr(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @write_each_pocket(ptr noundef, ptr noundef) local_unnamed_addr #4

; 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 = { 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 #4 = { "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 = { 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 #6 = { nofree "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 #7 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass