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

; 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_pocket = type { ptr, ptr, float, float, float, float, [3 x float], i32, i32, i32, i32 }
%struct.c_lst_vertices = type { ptr, ptr, ptr, i64 }
%struct.node_vertice = type { ptr, ptr, 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.s_atm = type { i32, float, float, float, float, float, float, float, [5 x i8], [7 x i8], [16 x i8], [16 x i8], [3 x i8], [8 x i8], i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i8, i8, float, float, float, float, i16, ptr, i32 }

@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@atomSiteHeader = external hidden constant [372 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [3 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 uwtable
define dso_local void @write_pocket_mmcif_DB(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [250 x i8], align 16
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  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 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %17 = call ptr @my_malloc(i64 noundef 80)
  store ptr %17, 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 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  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 250, ptr %14) #4
  %18 = getelementptr inbounds [250 x i8], ptr %14, i64 0, i64 0
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call ptr @strcpy(ptr noundef %18, ptr noundef %19) #4
  %21 = getelementptr inbounds [250 x i8], ptr %14, i64 0, i64 0
  call void @remove_ext(ptr noundef %21)
  %22 = getelementptr inbounds [250 x i8], ptr %14, i64 0, i64 0
  call void @remove_path(ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noalias ptr @fopen(ptr noundef %23, ptr noundef @.str.6)
  store ptr %24, ptr %15, align 8, !tbaa !5
  %25 = load ptr, ptr %15, align 8, !tbaa !5
  %26 = getelementptr inbounds [250 x i8], ptr %14, i64 0, i64 0
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.9, ptr noundef %26) #4
  %28 = load ptr, ptr %15, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.10, ptr noundef @atomSiteHeader) #4
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %151

32:                                               ; preds = %3
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %151

35:                                               ; preds = %32
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_pocket, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.c_lst_vertices, ptr %38, i32 0, i32 3
  %40 = load i64, ptr %39, align 8, !tbaa !14
  %41 = mul i64 %40, 8
  %42 = call ptr @my_malloc(i64 noundef %41)
  store ptr %42, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_pocket, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.c_lst_vertices, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  store ptr %47, ptr %16, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %51, %35
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %64

51:                                               ; preds = %48
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.node_vertice, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  store ptr %54, ptr %58, align 8, !tbaa !5
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.node_vertice, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  store ptr %61, ptr %16, align 8, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %8, align 4, !tbaa !9
  br label %48, !llvm.loop !21

64:                                               ; preds = %48
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call ptr @get_surrounding_atoms_idx(ptr noundef %65, i32 noundef %66, ptr noundef %67, ptr noundef %11)
  store ptr %68, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %143, %64
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %146

73:                                               ; preds = %69
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.s_pdb, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %76, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  store ptr %84, ptr %10, align 8, !tbaa !5
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s_atm, ptr %86, i32 0, i32 9
  %88 = getelementptr inbounds [7 x i8], ptr %87, i64 0, i64 0
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.s_atm, ptr %89, i32 0, i32 14
  %91 = load i32, ptr %90, align 8, !tbaa !25
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.s_atm, ptr %92, i32 0, i32 8
  %94 = getelementptr inbounds [5 x i8], ptr %93, i64 0, i64 0
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.s_atm, ptr %95, i32 0, i32 29
  %97 = load i8, ptr %96, align 1, !tbaa !28
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.s_atm, ptr %98, i32 0, i32 13
  %100 = getelementptr inbounds [8 x i8], ptr %99, i64 0, i64 0
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s_atm, ptr %101, i32 0, i32 10
  %103 = getelementptr inbounds [16 x i8], ptr %102, i64 0, i64 0
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.s_atm, ptr %104, i32 0, i32 16
  %106 = load i32, ptr %105, align 8, !tbaa !29
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s_atm, ptr %107, i32 0, i32 11
  %109 = getelementptr inbounds [16 x i8], ptr %108, i64 0, i64 0
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.s_atm, ptr %110, i32 0, i32 17
  %112 = load i32, ptr %111, align 4, !tbaa !30
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s_atm, ptr %113, i32 0, i32 28
  %115 = load i8, ptr %114, align 8, !tbaa !31
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.s_atm, ptr %116, i32 0, i32 5
  %118 = load float, ptr %117, align 4, !tbaa !32
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.s_atm, ptr %119, i32 0, i32 6
  %121 = load float, ptr %120, align 8, !tbaa !33
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.s_atm, ptr %122, i32 0, i32 7
  %124 = load float, ptr %123, align 4, !tbaa !34
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.s_atm, ptr %125, i32 0, i32 26
  %127 = load float, ptr %126, align 8, !tbaa !35
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.s_atm, ptr %128, i32 0, i32 25
  %130 = load float, ptr %129, align 4, !tbaa !36
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.s_atm, ptr %131, i32 0, i32 20
  %133 = load i32, ptr %132, align 8, !tbaa !37
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.s_atm, ptr %134, i32 0, i32 12
  %136 = getelementptr inbounds [3 x i8], ptr %135, i64 0, i64 0
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.s_atm, ptr %137, i32 0, i32 19
  %139 = load i32, ptr %138, align 4, !tbaa !38
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.s_atm, ptr %140, i32 0, i32 27
  %142 = load float, ptr %141, align 4, !tbaa !39
  call void @write_mmcif_atom_line(ptr noundef %85, ptr noundef %88, i32 noundef %91, ptr noundef %94, i8 noundef signext %97, ptr noundef %100, ptr noundef %103, i32 noundef %106, ptr noundef %109, i32 noundef %112, i8 noundef signext %115, float noundef %118, float noundef %121, float noundef %124, float noundef %127, float noundef %130, i32 noundef %133, ptr noundef %136, i32 noundef %139, float noundef %142)
  br label %143

143:                                              ; preds = %73
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %7, align 4, !tbaa !9
  br label %69, !llvm.loop !40

146:                                              ; preds = %69
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.11) #4
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = call i32 @fclose(ptr noundef %149)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %162

151:                                              ; preds = %32, %3
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = icmp ne ptr %152, null
  br i1 %153, label %158, label %154

154:                                              ; preds = %151
  %155 = load ptr, ptr @stderr, align 8, !tbaa !5
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.5, ptr noundef %156) #4
  br label %161

158:                                              ; preds = %151
  %159 = load ptr, ptr @stderr, align 8, !tbaa !5
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.8) #4
  br label %161

161:                                              ; preds = %158, %154
  br label %162

162:                                              ; preds = %161, %146
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  call void @my_free(ptr noundef %163)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 250, 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 4, 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 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

declare ptr @my_malloc(i64 noundef) #3

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

declare void @my_free(ptr noundef) #3

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

declare void @remove_ext(ptr noundef) #3

declare void @remove_path(ptr noundef) #3

declare void @write_mmcif_atom_line(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i8 noundef signext, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i8 noundef signext, float noundef, float noundef, float noundef, float noundef, float noundef, i32 noundef, ptr noundef, i32 noundef, float noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"s_pocket", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !7, i64 32, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !16, i64 24}
!15 = !{!"c_lst_vertices", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !6, i64 0}
!18 = !{!19, !6, i64 16}
!19 = !{!"node_vertice", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !6, i64 24}
!24 = !{!"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}
!25 = !{!26, !10, i64 88}
!26 = !{!"s_atm", !10, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !7, i64 32, !7, i64 37, !7, i64 44, !7, i64 60, !7, i64 76, !7, i64 79, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !7, i64 144, !7, i64 145, !13, i64 148, !13, i64 152, !13, i64 156, !13, i64 160, !27, i64 164, !6, i64 168, !10, i64 176}
!27 = !{!"short", !7, i64 0}
!28 = !{!26, !7, i64 145}
!29 = !{!26, !10, i64 96}
!30 = !{!26, !10, i64 100}
!31 = !{!26, !7, i64 144}
!32 = !{!26, !13, i64 20}
!33 = !{!26, !13, i64 24}
!34 = !{!26, !13, i64 28}
!35 = !{!26, !13, i64 136}
!36 = !{!26, !13, i64 132}
!37 = !{!26, !10, i64 112}
!38 = !{!26, !10, i64 108}
!39 = !{!26, !13, i64 140}
!40 = distinct !{!40, !22}


; 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.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@atomSiteHeader = external hidden constant [372 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [3 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: nounwind uwtable
define dso_local void @write_pocket_mmcif_DB(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca i32, align 4
  %5 = alloca [250 x i8], align 16
  %6 = tail call ptr @my_malloc(i64 noundef 80) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 250, ptr nonnull %5) #5
  %7 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %0) #5
  call void @remove_ext(ptr noundef nonnull %5) #5
  call void @remove_path(ptr noundef nonnull %5) #5
  %8 = call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.6)
  %9 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.9, ptr noundef nonnull %5) #5
  %10 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.10, ptr noundef nonnull @atomSiteHeader) #5
  %11 = icmp ne ptr %8, null
  %12 = icmp ne ptr %1, null
  %or.cond = and i1 %12, %11
  br i1 %or.cond, label %13, label %73

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = shl i64 %17, 3
  %19 = call ptr @my_malloc(i64 noundef %18) #5
  %20 = load ptr, ptr %14, align 8, !tbaa !9
  %.051 = load ptr, ptr %20, align 8, !tbaa !16
  %.not52 = icmp eq ptr %.051, null
  br i1 %.not52, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %13 ]
  %.054 = phi ptr [ %.0, %.lr.ph ], [ %.051, %13 ]
  %21 = getelementptr inbounds i8, ptr %.054, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv
  store ptr %22, ptr %23, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.0 = load ptr, ptr %.054, align 8, !tbaa !16
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !19

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %24 = trunc nuw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %13
  %.048.lcssa = phi i32 [ 0, %13 ], [ %24, %._crit_edge.loopexit ]
  %25 = call ptr @get_surrounding_atoms_idx(ptr noundef %19, i32 noundef %.048.lcssa, ptr noundef %2, ptr noundef nonnull %4) #5
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %._crit_edge
  %28 = getelementptr inbounds i8, ptr %2, i64 24
  br label %29

29:                                               ; preds = %.lr.ph57, %29
  %indvars.iv60 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next61, %29 ]
  %30 = load ptr, ptr %28, align 8, !tbaa !21
  %31 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv60
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds ptr, ptr %30, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %35, i64 37
  %37 = getelementptr inbounds i8, ptr %35, i64 88
  %38 = load i32, ptr %37, align 8, !tbaa !23
  %39 = getelementptr inbounds i8, ptr %35, i64 32
  %40 = getelementptr inbounds i8, ptr %35, i64 145
  %41 = load i8, ptr %40, align 1, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %35, i64 79
  %43 = getelementptr inbounds i8, ptr %35, i64 44
  %44 = getelementptr inbounds i8, ptr %35, i64 96
  %45 = load i32, ptr %44, align 8, !tbaa !27
  %46 = getelementptr inbounds i8, ptr %35, i64 60
  %47 = getelementptr inbounds i8, ptr %35, i64 100
  %48 = load i32, ptr %47, align 4, !tbaa !28
  %49 = getelementptr inbounds i8, ptr %35, i64 144
  %50 = load i8, ptr %49, align 8, !tbaa !29
  %51 = getelementptr inbounds i8, ptr %35, i64 20
  %52 = load float, ptr %51, align 4, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %35, i64 24
  %54 = load float, ptr %53, align 8, !tbaa !31
  %55 = getelementptr inbounds i8, ptr %35, i64 28
  %56 = load float, ptr %55, align 4, !tbaa !32
  %57 = getelementptr inbounds i8, ptr %35, i64 136
  %58 = load float, ptr %57, align 8, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %35, i64 132
  %60 = load float, ptr %59, align 4, !tbaa !34
  %61 = getelementptr inbounds i8, ptr %35, i64 112
  %62 = load i32, ptr %61, align 8, !tbaa !35
  %63 = getelementptr inbounds i8, ptr %35, i64 76
  %64 = getelementptr inbounds i8, ptr %35, i64 108
  %65 = load i32, ptr %64, align 4, !tbaa !36
  %66 = getelementptr inbounds i8, ptr %35, i64 140
  %67 = load float, ptr %66, align 4, !tbaa !37
  call void @write_mmcif_atom_line(ptr noundef nonnull %8, ptr noundef nonnull %36, i32 noundef %38, ptr noundef nonnull %39, i8 noundef signext %41, ptr noundef nonnull %42, ptr noundef nonnull %43, i32 noundef %45, ptr noundef nonnull %46, i32 noundef %48, i8 noundef signext %50, float noundef %52, float noundef %54, float noundef %56, float noundef %58, float noundef %60, i32 noundef %62, ptr noundef nonnull %63, i32 noundef %65, float noundef %67) #5
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next61, %69
  br i1 %70, label %29, label %._crit_edge58, !llvm.loop !38

._crit_edge58:                                    ; preds = %29, %._crit_edge
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.11) #5
  %72 = call i32 @fclose(ptr noundef nonnull %8)
  br label %79

73:                                               ; preds = %3
  %74 = load ptr, ptr @stderr, align 8, !tbaa !16
  br i1 %11, label %77, label %75

75:                                               ; preds = %73
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.5, ptr noundef %0) #6
  br label %79

77:                                               ; preds = %73
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.8) #6
  br label %79

79:                                               ; preds = %75, %77, %._crit_edge58
  call void @my_free(ptr noundef %6) #5
  call void @llvm.lifetime.end.p0(i64 250, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret void
}

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

declare ptr @my_malloc(i64 noundef) local_unnamed_addr #3

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

declare void @my_free(ptr noundef) local_unnamed_addr #3

; 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 #4

declare void @remove_ext(ptr noundef) local_unnamed_addr #3

declare void @remove_path(ptr noundef) local_unnamed_addr #3

declare void @write_mmcif_atom_line(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i8 noundef signext, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i8 noundef signext, float noundef, float noundef, float noundef, float noundef, float noundef, i32 noundef, ptr noundef, i32 noundef, float noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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: 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 #5 = { nounwind }
attributes #6 = { 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"s_pocket", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !7, i64 32, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !15, i64 24}
!14 = !{!"c_lst_vertices", !11, i64 0, !11, i64 8, !11, i64 16, !15, i64 24}
!15 = !{!"long", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !11, i64 16}
!18 = !{!"node_vertice", !11, i64 0, !11, i64 8, !11, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !11, i64 24}
!22 = !{!"s_pdb", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !7, i64 116, !7, i64 199, !12, i64 700, !12, i64 704, !12, i64 708, !6, i64 712, !6, i64 716}
!23 = !{!24, !6, i64 88}
!24 = !{!"s_atm", !6, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !7, i64 32, !7, i64 37, !7, i64 44, !7, i64 60, !7, i64 76, !7, i64 79, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !7, i64 144, !7, i64 145, !12, i64 148, !12, i64 152, !12, i64 156, !12, i64 160, !25, i64 164, !11, i64 168, !6, i64 176}
!25 = !{!"short", !7, i64 0}
!26 = !{!24, !7, i64 145}
!27 = !{!24, !6, i64 96}
!28 = !{!24, !6, i64 100}
!29 = !{!24, !7, i64 144}
!30 = !{!24, !12, i64 20}
!31 = !{!24, !12, i64 24}
!32 = !{!24, !12, i64 28}
!33 = !{!24, !12, i64 136}
!34 = !{!24, !12, i64 132}
!35 = !{!24, !6, i64 112}
!36 = !{!24, !6, i64 108}
!37 = !{!24, !12, i64 140}
!38 = distinct !{!38, !20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass