; 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_vvertice = type { i32, i32, i32, i32, i32, float, float, float, float, i32, i32, [4 x i32], [4 x ptr], [3 x float], float }
%struct.s_desc = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i32, [20 x i32], i32, i32, i32, float, float, i32, i32, i32, i32, i32, [255 x i8], [255 x i8], [8 x i8] }

@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.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [54 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

; 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) #2

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

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @write_pocket_pqr(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = call noalias ptr @fopen(ptr noundef %8, ptr noundef @.str.6)
  store ptr %9, ptr %7, align 8, !tbaa !5
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %12, label %165

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %165

15:                                               ; preds = %12
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str.15) #4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str.16) #4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.19) #4
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.20) #4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str.21) #4
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.s_pocket, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %struct.c_lst_vertices, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = getelementptr inbounds %struct.node_vertice, ptr %31, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds %struct.s_vvertice, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !19
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.22, i32 noundef %35) #4
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.s_pocket, ptr %38, i32 0, i32 2
  %40 = load float, ptr %39, align 8, !tbaa !21
  %41 = fpext float %40 to double
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.23, double noundef %41) #4
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.s_pocket, ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = getelementptr inbounds %struct.s_desc, ptr %46, i32 0, i32 33
  %48 = load float, ptr %47, align 4, !tbaa !23
  %49 = fpext float %48 to double
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.24, double noundef %49) #4
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.s_pocket, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  %55 = getelementptr inbounds %struct.s_desc, ptr %54, i32 0, i32 29
  %56 = load i32, ptr %55, align 4, !tbaa !25
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.25, i32 noundef %56) #4
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.s_pocket, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds %struct.s_desc, ptr %61, i32 0, i32 5
  %63 = load float, ptr %62, align 4, !tbaa !26
  %64 = fpext float %63 to double
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.26, double noundef %64) #4
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.s_pocket, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = getelementptr inbounds %struct.s_desc, ptr %69, i32 0, i32 6
  %71 = load float, ptr %70, align 4, !tbaa !27
  %72 = fpext float %71 to double
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.27, double noundef %72) #4
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.s_pocket, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !22
  %78 = getelementptr inbounds %struct.s_desc, ptr %77, i32 0, i32 11
  %79 = load float, ptr %78, align 4, !tbaa !28
  %80 = fpext float %79 to double
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.28, double noundef %80) #4
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s_pocket, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = getelementptr inbounds %struct.s_desc, ptr %85, i32 0, i32 0
  %87 = load float, ptr %86, align 4, !tbaa !29
  %88 = fpext float %87 to double
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.29, double noundef %88) #4
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.s_pocket, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !22
  %94 = getelementptr inbounds %struct.s_desc, ptr %93, i32 0, i32 30
  %95 = load i32, ptr %94, align 4, !tbaa !30
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.30, i32 noundef %95) #4
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.s_pocket, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !22
  %101 = getelementptr inbounds %struct.s_desc, ptr %100, i32 0, i32 1
  %102 = load float, ptr %101, align 4, !tbaa !31
  %103 = fpext float %102 to double
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.31, double noundef %103) #4
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.s_pocket, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !22
  %109 = getelementptr inbounds %struct.s_desc, ptr %108, i32 0, i32 2
  %110 = load float, ptr %109, align 4, !tbaa !32
  %111 = fpext float %110 to double
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.32, double noundef %111) #4
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.s_pocket, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !22
  %117 = getelementptr inbounds %struct.s_desc, ptr %116, i32 0, i32 31
  %118 = load i32, ptr %117, align 4, !tbaa !33
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef @.str.33, i32 noundef %118) #4
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.s_pocket, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = getelementptr inbounds %struct.s_desc, ptr %123, i32 0, i32 8
  %125 = load float, ptr %124, align 4, !tbaa !34
  %126 = fpext float %125 to double
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.34, double noundef %126) #4
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.s_pocket, ptr %129, i32 0, i32 9
  %131 = load i32, ptr %130, align 4, !tbaa !35
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.35, i32 noundef %131) #4
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.s_pocket, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !22
  %137 = getelementptr inbounds %struct.s_desc, ptr %136, i32 0, i32 7
  %138 = load float, ptr %137, align 4, !tbaa !36
  %139 = fpext float %138 to double
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.36, double noundef %139) #4
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.s_pocket, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds %struct.c_lst_vertices, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !14
  store ptr %145, ptr %5, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %149, %15
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %160

149:                                              ; preds = %146
  %150 = load i32, ptr %6, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %6, align 4, !tbaa !9
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.node_vertice, ptr %153, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !17
  %156 = load i32, ptr %6, align 4, !tbaa !9
  call void @write_pqr_vert(ptr noundef %152, ptr noundef %155, i32 noundef %156)
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.node_vertice, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !37
  store ptr %159, ptr %5, align 8, !tbaa !5
  br label %146, !llvm.loop !38

160:                                              ; preds = %146
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.7) #4
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = call i32 @fclose(ptr noundef %163)
  br label %176

165:                                              ; preds = %12, %2
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = icmp ne ptr %166, null
  br i1 %167, label %172, label %168

168:                                              ; preds = %165
  %169 = load ptr, ptr @stderr, align 8, !tbaa !5
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.5, ptr noundef %170) #4
  br label %175

172:                                              ; preds = %165
  %173 = load ptr, ptr @stderr, align 8, !tbaa !5
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef @.str.8) #4
  br label %175

175:                                              ; preds = %172, %168
  br label %176

176:                                              ; preds = %175, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

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 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, !6, i64 0}
!15 = !{!"c_lst_vertices", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !6, i64 16}
!18 = !{!"node_vertice", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!20, !10, i64 0}
!20 = !{!"s_vvertice", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !10, i64 36, !10, i64 40, !7, i64 44, !7, i64 64, !7, i64 96, !13, i64 108}
!21 = !{!12, !13, i64 16}
!22 = !{!12, !6, i64 0}
!23 = !{!24, !13, i64 208}
!24 = !{!"s_desc", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !10, i64 108, !7, i64 112, !10, i64 192, !10, i64 196, !10, i64 200, !13, i64 204, !13, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !7, i64 232, !7, i64 487, !7, i64 742}
!25 = !{!24, !10, i64 192}
!26 = !{!24, !13, i64 20}
!27 = !{!24, !13, i64 24}
!28 = !{!24, !13, i64 44}
!29 = !{!24, !13, i64 0}
!30 = !{!24, !10, i64 196}
!31 = !{!24, !13, i64 4}
!32 = !{!24, !13, i64 8}
!33 = !{!24, !10, i64 200}
!34 = !{!24, !13, i64 32}
!35 = !{!12, !10, i64 52}
!36 = !{!24, !13, i64 28}
!37 = !{!18, !6, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@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.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [54 x i8], align 1

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

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

declare void @write_pqr_vert(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @write_pocket_pqr(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #2 {
  %3 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.6)
  %4 = icmp ne ptr %3, null
  %5 = icmp ne ptr %1, null
  %or.cond = and i1 %5, %4
  br i1 %or.cond, label %6, label %88

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.15) #3
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.16) #3
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.19) #3
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.20) #3
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.21) #3
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  %17 = load i32, ptr %16, align 8, !tbaa !17
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.22, i32 noundef %17) #3
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = load float, ptr %19, align 8, !tbaa !19
  %21 = fpext float %20 to double
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.23, double noundef %21) #3
  %23 = load ptr, ptr %1, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %23, i64 208
  %25 = load float, ptr %24, align 4, !tbaa !21
  %26 = fpext float %25 to double
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.24, double noundef %26) #3
  %28 = load ptr, ptr %1, align 8, !tbaa !20
  %29 = getelementptr inbounds i8, ptr %28, i64 192
  %30 = load i32, ptr %29, align 4, !tbaa !23
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.25, i32 noundef %30) #3
  %32 = load ptr, ptr %1, align 8, !tbaa !20
  %33 = getelementptr inbounds i8, ptr %32, i64 20
  %34 = load float, ptr %33, align 4, !tbaa !24
  %35 = fpext float %34 to double
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.26, double noundef %35) #3
  %37 = load ptr, ptr %1, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  %39 = load float, ptr %38, align 4, !tbaa !25
  %40 = fpext float %39 to double
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.27, double noundef %40) #3
  %42 = load ptr, ptr %1, align 8, !tbaa !20
  %43 = getelementptr inbounds i8, ptr %42, i64 44
  %44 = load float, ptr %43, align 4, !tbaa !26
  %45 = fpext float %44 to double
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.28, double noundef %45) #3
  %47 = load ptr, ptr %1, align 8, !tbaa !20
  %48 = load float, ptr %47, align 4, !tbaa !27
  %49 = fpext float %48 to double
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.29, double noundef %49) #3
  %51 = load ptr, ptr %1, align 8, !tbaa !20
  %52 = getelementptr inbounds i8, ptr %51, i64 196
  %53 = load i32, ptr %52, align 4, !tbaa !28
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.30, i32 noundef %53) #3
  %55 = load ptr, ptr %1, align 8, !tbaa !20
  %56 = getelementptr inbounds i8, ptr %55, i64 4
  %57 = load float, ptr %56, align 4, !tbaa !29
  %58 = fpext float %57 to double
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.31, double noundef %58) #3
  %60 = load ptr, ptr %1, align 8, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = load float, ptr %61, align 4, !tbaa !30
  %63 = fpext float %62 to double
  %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.32, double noundef %63) #3
  %65 = load ptr, ptr %1, align 8, !tbaa !20
  %66 = getelementptr inbounds i8, ptr %65, i64 200
  %67 = load i32, ptr %66, align 4, !tbaa !31
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.33, i32 noundef %67) #3
  %69 = load ptr, ptr %1, align 8, !tbaa !20
  %70 = getelementptr inbounds i8, ptr %69, i64 32
  %71 = load float, ptr %70, align 4, !tbaa !32
  %72 = fpext float %71 to double
  %73 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.34, double noundef %72) #3
  %74 = getelementptr inbounds i8, ptr %1, i64 52
  %75 = load i32, ptr %74, align 4, !tbaa !33
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.35, i32 noundef %75) #3
  %77 = load ptr, ptr %1, align 8, !tbaa !20
  %78 = getelementptr inbounds i8, ptr %77, i64 28
  %79 = load float, ptr %78, align 4, !tbaa !34
  %80 = fpext float %79 to double
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.36, double noundef %80) #3
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %.052 = load ptr, ptr %82, align 8, !tbaa !35
  %.not53 = icmp eq ptr %.052, null
  br i1 %.not53, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6, %.lr.ph
  %.055 = phi ptr [ %.0, %.lr.ph ], [ %.052, %6 ]
  %.04954 = phi i32 [ %83, %.lr.ph ], [ 0, %6 ]
  %83 = add nuw nsw i32 %.04954, 1
  %84 = getelementptr inbounds i8, ptr %.055, i64 16
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  tail call void @write_pqr_vert(ptr noundef %3, ptr noundef %85, i32 noundef %83) #3
  %.0 = load ptr, ptr %.055, align 8, !tbaa !35
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !36

._crit_edge:                                      ; preds = %.lr.ph, %6
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str.7) #3
  %87 = tail call i32 @fclose(ptr noundef %3)
  br label %94

88:                                               ; preds = %2
  %89 = load ptr, ptr @stderr, align 8, !tbaa !35
  br i1 %4, label %92, label %90

90:                                               ; preds = %88
  %91 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.5, ptr noundef %0) #4
  br label %94

92:                                               ; preds = %88
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.8) #4
  br label %94

94:                                               ; preds = %90, %92, %._crit_edge
  ret void
}

attributes #0 = { 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 #1 = { "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 = { nounwind }
attributes #4 = { 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 8}
!6 = !{!"s_pocket", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !8, i64 32, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56}
!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 = !{!13, !7, i64 0}
!13 = !{!"c_lst_vertices", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24}
!14 = !{!"long", !8, i64 0}
!15 = !{!16, !7, i64 16}
!16 = !{!"node_vertice", !7, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!18, !11, i64 0}
!18 = !{!"s_vvertice", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 36, !11, i64 40, !8, i64 44, !8, i64 64, !8, i64 96, !10, i64 108}
!19 = !{!6, !10, i64 16}
!20 = !{!6, !7, i64 0}
!21 = !{!22, !10, i64 208}
!22 = !{!"s_desc", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !11, i64 108, !8, i64 112, !11, i64 192, !11, i64 196, !11, i64 200, !10, i64 204, !10, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !8, i64 232, !8, i64 487, !8, i64 742}
!23 = !{!22, !11, i64 192}
!24 = !{!22, !10, i64 20}
!25 = !{!22, !10, i64 24}
!26 = !{!22, !10, i64 44}
!27 = !{!22, !10, i64 0}
!28 = !{!22, !11, i64 196}
!29 = !{!22, !10, i64 4}
!30 = !{!22, !10, i64 8}
!31 = !{!22, !11, i64 200}
!32 = !{!22, !10, i64 32}
!33 = !{!6, !11, i64 52}
!34 = !{!22, !10, i64 28}
!35 = !{!7, !7, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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