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

; 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_lst_vvertice = type { ptr, ptr, ptr, i32, ptr, i32, i32 }
%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 }

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

declare ptr @my_malloc(i64 noundef) #1

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

declare void @my_free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @compare_vvertice_shifted_lists(ptr noundef %0, ptr noundef %1, float noundef %2, float noundef %3, float noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i16, align 2
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store float %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !9
  store float %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %24 = call ptr @my_malloc(i64 noundef 48)
  store ptr %24, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0.000000e+00, ptr %14, align 8, !tbaa !11
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.s_lst_vvertice, ptr %25, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.s_lst_vvertice, ptr %28, i32 0, i32 2
  store ptr %27, ptr %29, align 8, !tbaa !13
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.s_lst_vvertice, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %31, align 8, !tbaa !16
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s_lst_vvertice, ptr %33, i32 0, i32 3
  store i32 %32, ptr %34, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #5
  store i16 0, ptr %18, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store double 0.000000e+00, ptr %21, align 8, !tbaa !11
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.s_lst_vvertice, ptr %35, i32 0, i32 5
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = sext i32 %37 to i64
  %39 = mul i64 112, %38
  %40 = call ptr @my_malloc(i64 noundef %39)
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.s_lst_vvertice, ptr %41, i32 0, i32 0
  store ptr %40, ptr %42, align 8, !tbaa !21
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_lst_vvertice, ptr %43, i32 0, i32 5
  %45 = load i32, ptr %44, align 8, !tbaa !20
  %46 = sext i32 %45 to i64
  %47 = mul i64 8, %46
  %48 = call ptr @my_malloc(i64 noundef %47)
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.s_lst_vvertice, ptr %49, i32 0, i32 1
  store ptr %48, ptr %50, align 8, !tbaa !22
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %51

51:                                               ; preds = %64, %5
  %52 = load i32, ptr %17, align 4, !tbaa !17
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.s_lst_vvertice, ptr %53, i32 0, i32 5
  %55 = load i32, ptr %54, align 8, !tbaa !20
  %56 = icmp slt i32 %52, %55
  br i1 %56, label %57, label %67

57:                                               ; preds = %51
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.s_lst_vvertice, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !22
  %61 = load i32, ptr %17, align 4, !tbaa !17
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  store ptr null, ptr %63, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %57
  %65 = load i32, ptr %17, align 4, !tbaa !17
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %17, align 4, !tbaa !17
  br label %51, !llvm.loop !23

67:                                               ; preds = %51
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.s_lst_vvertice, ptr %68, i32 0, i32 5
  %70 = load i32, ptr %69, align 8, !tbaa !20
  %71 = sext i32 %70 to i64
  %72 = mul i64 %71, 4
  %73 = call ptr @my_malloc(i64 noundef %72)
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.s_lst_vvertice, ptr %74, i32 0, i32 4
  store ptr %73, ptr %75, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.s_lst_vvertice, ptr %76, i32 0, i32 5
  %78 = load i32, ptr %77, align 8, !tbaa !20
  %79 = sext i32 %78 to i64
  %80 = mul i64 2, %79
  %81 = call ptr @my_malloc(i64 noundef %80)
  store ptr %81, ptr %22, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %82

82:                                               ; preds = %93, %67
  %83 = load i32, ptr %17, align 4, !tbaa !17
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s_lst_vvertice, ptr %84, i32 0, i32 5
  %86 = load i32, ptr %85, align 8, !tbaa !20
  %87 = icmp slt i32 %83, %86
  br i1 %87, label %88, label %96

88:                                               ; preds = %82
  %89 = load ptr, ptr %22, align 8, !tbaa !5
  %90 = load i32, ptr %17, align 4, !tbaa !17
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i16, ptr %89, i64 %91
  store i16 0, ptr %92, align 2, !tbaa !18
  br label %93

93:                                               ; preds = %88
  %94 = load i32, ptr %17, align 4, !tbaa !17
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %17, align 4, !tbaa !17
  br label %82, !llvm.loop !26

96:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !17
  store i32 0, ptr %15, align 4, !tbaa !17
  br label %97

97:                                               ; preds = %217, %96
  %98 = load i32, ptr %15, align 4, !tbaa !17
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.s_lst_vvertice, ptr %99, i32 0, i32 5
  %101 = load i32, ptr %100, align 8, !tbaa !20
  %102 = icmp slt i32 %98, %101
  br i1 %102, label %103, label %220

103:                                              ; preds = %97
  store i16 0, ptr %18, align 2, !tbaa !18
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.s_lst_vvertice, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !22
  %107 = load i32, ptr %15, align 4, !tbaa !17
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %106, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  store ptr %110, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !17
  br label %111

111:                                              ; preds = %213, %103
  %112 = load i32, ptr %16, align 4, !tbaa !17
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s_lst_vvertice, ptr %113, i32 0, i32 5
  %115 = load i32, ptr %114, align 8, !tbaa !20
  %116 = icmp slt i32 %112, %115
  br i1 %116, label %117, label %121

117:                                              ; preds = %111
  %118 = load i16, ptr %18, align 2, !tbaa !18
  %119 = icmp ne i16 %118, 0
  %120 = xor i1 %119, true
  br label %121

121:                                              ; preds = %117, %111
  %122 = phi i1 [ false, %111 ], [ %120, %117 ]
  br i1 %122, label %123, label %216

123:                                              ; preds = %121
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.s_lst_vvertice, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = load i32, ptr %16, align 4, !tbaa !17
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  store ptr %130, ptr %12, align 8, !tbaa !5
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.s_vvertice, ptr %131, i32 0, i32 6
  %133 = load float, ptr %132, align 8, !tbaa !27
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.s_vvertice, ptr %134, i32 0, i32 6
  %136 = load float, ptr %135, align 8, !tbaa !27
  %137 = load float, ptr %8, align 4, !tbaa !9
  %138 = fsub float %136, %137
  %139 = fsub float %133, %138
  %140 = fpext float %139 to double
  store double %140, ptr %19, align 8, !tbaa !11
  %141 = load double, ptr %19, align 8, !tbaa !11
  %142 = load double, ptr %19, align 8, !tbaa !11
  %143 = fmul double %141, %142
  store double %143, ptr %19, align 8, !tbaa !11
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.s_vvertice, ptr %144, i32 0, i32 7
  %146 = load float, ptr %145, align 4, !tbaa !29
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.s_vvertice, ptr %147, i32 0, i32 7
  %149 = load float, ptr %148, align 4, !tbaa !29
  %150 = load float, ptr %9, align 4, !tbaa !9
  %151 = fsub float %149, %150
  %152 = fsub float %146, %151
  %153 = fpext float %152 to double
  store double %153, ptr %20, align 8, !tbaa !11
  %154 = load double, ptr %20, align 8, !tbaa !11
  %155 = load double, ptr %20, align 8, !tbaa !11
  %156 = fmul double %154, %155
  store double %156, ptr %20, align 8, !tbaa !11
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.s_vvertice, ptr %157, i32 0, i32 8
  %159 = load float, ptr %158, align 8, !tbaa !30
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.s_vvertice, ptr %160, i32 0, i32 8
  %162 = load float, ptr %161, align 8, !tbaa !30
  %163 = load float, ptr %10, align 4, !tbaa !9
  %164 = fsub float %162, %163
  %165 = fsub float %159, %164
  %166 = fpext float %165 to double
  store double %166, ptr %21, align 8, !tbaa !11
  %167 = load double, ptr %21, align 8, !tbaa !11
  %168 = load double, ptr %21, align 8, !tbaa !11
  %169 = fmul double %167, %168
  store double %169, ptr %21, align 8, !tbaa !11
  %170 = load double, ptr %19, align 8, !tbaa !11
  %171 = load double, ptr %20, align 8, !tbaa !11
  %172 = fadd double %170, %171
  %173 = load double, ptr %21, align 8, !tbaa !11
  %174 = fadd double %172, %173
  %175 = call double @sqrt(double noundef %174) #5
  store double %175, ptr %14, align 8, !tbaa !11
  %176 = load double, ptr %14, align 8, !tbaa !11
  %177 = fcmp olt double %176, 1.000000e-05
  br i1 %177, label %178, label %212

178:                                              ; preds = %123
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  %180 = load i32, ptr %16, align 4, !tbaa !17
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i16, ptr %179, i64 %181
  %183 = load i16, ptr %182, align 2, !tbaa !18
  %184 = sext i16 %183 to i32
  %185 = icmp slt i32 %184, 1
  br i1 %185, label %186, label %212

186:                                              ; preds = %178
  %187 = load ptr, ptr %22, align 8, !tbaa !5
  %188 = load i32, ptr %16, align 4, !tbaa !17
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i16, ptr %187, i64 %189
  store i16 1, ptr %190, align 2, !tbaa !18
  store i16 1, ptr %18, align 2, !tbaa !18
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.s_lst_vvertice, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !21
  %194 = load i32, ptr %23, align 4, !tbaa !17
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %struct.s_vvertice, ptr %193, i64 %195
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %196, ptr align 8 %197, i64 112, i1 false)
  %198 = load ptr, ptr %13, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.s_lst_vvertice, ptr %198, i32 0, i32 0
  %200 = load ptr, ptr %199, align 8, !tbaa !21
  %201 = load i32, ptr %23, align 4, !tbaa !17
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds %struct.s_vvertice, ptr %200, i64 %202
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.s_lst_vvertice, ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !22
  %207 = load i32, ptr %23, align 4, !tbaa !17
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds ptr, ptr %206, i64 %208
  store ptr %203, ptr %209, align 8, !tbaa !5
  %210 = load i32, ptr %23, align 4, !tbaa !17
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %23, align 4, !tbaa !17
  br label %212

212:                                              ; preds = %186, %178, %123
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %16, align 4, !tbaa !17
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %16, align 4, !tbaa !17
  br label %111, !llvm.loop !31

216:                                              ; preds = %121
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %15, align 4, !tbaa !17
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %15, align 4, !tbaa !17
  br label %97, !llvm.loop !32

220:                                              ; preds = %97
  %221 = load ptr, ptr %22, align 8, !tbaa !5
  call void @my_free(ptr noundef %221)
  %222 = load i32, ptr %23, align 4, !tbaa !17
  %223 = load ptr, ptr %13, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.s_lst_vvertice, ptr %223, i32 0, i32 5
  store i32 %222, ptr %224, align 8, !tbaa !20
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.s_lst_vvertice, ptr %225, i32 0, i32 6
  %227 = load i32, ptr %226, align 4, !tbaa !33
  %228 = load ptr, ptr %13, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.s_lst_vvertice, ptr %228, i32 0, i32 6
  store i32 %227, ptr %229, align 4, !tbaa !33
  %230 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret ptr %230
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"s_lst_vvertice", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !6, i64 32, !15, i64 40, !15, i64 44}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !15, i64 24}
!17 = !{!15, !15, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = !{!14, !15, i64 40}
!21 = !{!14, !6, i64 0}
!22 = !{!14, !6, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!14, !6, i64 32}
!26 = distinct !{!26, !24}
!27 = !{!28, !10, i64 24}
!28 = !{!"s_vvertice", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 36, !15, i64 40, !7, i64 44, !7, i64 64, !7, i64 96, !10, i64 108}
!29 = !{!28, !10, i64 28}
!30 = !{!28, !10, i64 32}
!31 = distinct !{!31, !24}
!32 = distinct !{!32, !24}
!33 = !{!14, !15, i64 44}


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

%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 }

declare ptr @my_malloc(i64 noundef) local_unnamed_addr #0

declare void @my_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @compare_vvertice_shifted_lists(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, float noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #1 {
  %6 = tail call ptr @my_malloc(i64 noundef 48) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %8, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 %11, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = load i32, ptr %13, align 8, !tbaa !12
  %15 = sext i32 %14 to i64
  %16 = mul nsw i64 %15, 112
  %17 = tail call ptr @my_malloc(i64 noundef %16) #5
  store ptr %17, ptr %6, align 8, !tbaa !13
  %18 = load i32, ptr %13, align 8, !tbaa !12
  %19 = sext i32 %18 to i64
  %20 = shl nsw i64 %19, 3
  %21 = tail call ptr @my_malloc(i64 noundef %20) #5
  %22 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %21, ptr %22, align 8, !tbaa !14
  %23 = load i32, ptr %13, align 8, !tbaa !12
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext nneg i32 %23 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %25 = icmp ult i32 %23, 4
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %26 = load ptr, ptr %22, align 8, !tbaa !14
  %27 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv
  store ptr null, ptr %27, align 8, !tbaa !15
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %28 = load ptr, ptr %22, align 8, !tbaa !14
  %29 = getelementptr inbounds ptr, ptr %28, i64 %indvars.iv.next
  store ptr null, ptr %29, align 8, !tbaa !15
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %30 = load ptr, ptr %22, align 8, !tbaa !14
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv.next.1
  store ptr null, ptr %31, align 8, !tbaa !15
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %32 = load ptr, ptr %22, align 8, !tbaa !14
  %33 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv.next.2
  store ptr null, ptr %33, align 8, !tbaa !15
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !16

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %34 = load ptr, ptr %22, align 8, !tbaa !14
  %35 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv.epil
  store ptr null, ptr %35, align 8, !tbaa !15
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %5
  %36 = sext i32 %23 to i64
  %37 = shl nsw i64 %36, 2
  %38 = tail call ptr @my_malloc(i64 noundef %37) #5
  %39 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %38, ptr %39, align 8, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %1, i64 40
  %41 = load i32, ptr %40, align 8, !tbaa !12
  %42 = sext i32 %41 to i64
  %43 = shl nsw i64 %42, 1
  %44 = tail call ptr @my_malloc(i64 noundef %43) #5
  %45 = load i32, ptr %40, align 8, !tbaa !12
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.preheader, label %._crit_edge88

.preheader:                                       ; preds = %._crit_edge
  %47 = shl nuw i32 %45, 1
  %48 = zext i32 %47 to i64
  tail call void @llvm.memset.p0.i64(ptr align 2 %44, i8 0, i64 %48, i1 false), !tbaa !21
  %49 = load i32, ptr %13, align 8, !tbaa !12
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph87.split.preheader, label %._crit_edge88

.lr.ph87.split.preheader:                         ; preds = %.preheader
  %51 = getelementptr inbounds i8, ptr %0, i64 8
  %52 = getelementptr inbounds i8, ptr %1, i64 8
  %53 = insertelement <2 x float> poison, float %2, i64 0
  %54 = insertelement <2 x float> %53, float %4, i64 1
  br label %.lr.ph87.split

.lr.ph87.split:                                   ; preds = %.lr.ph87.split.preheader, %._crit_edge83
  %55 = phi i32 [ %49, %.lr.ph87.split.preheader ], [ %112, %._crit_edge83 ]
  %56 = phi i32 [ %45, %.lr.ph87.split.preheader ], [ %113, %._crit_edge83 ]
  %57 = phi i32 [ %45, %.lr.ph87.split.preheader ], [ %114, %._crit_edge83 ]
  %indvars.iv98 = phi i64 [ 0, %.lr.ph87.split.preheader ], [ %indvars.iv.next99, %._crit_edge83 ]
  %.086 = phi i32 [ 0, %.lr.ph87.split.preheader ], [ %.1.lcssa, %._crit_edge83 ]
  %58 = load ptr, ptr %51, align 8, !tbaa !14
  %59 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv98
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = icmp sgt i32 %57, 0
  br i1 %61, label %.lr.ph82, label %._crit_edge83

.lr.ph82:                                         ; preds = %.lr.ph87.split
  %62 = getelementptr inbounds i8, ptr %60, i64 24
  %63 = getelementptr inbounds i8, ptr %60, i64 28
  %64 = getelementptr inbounds i8, ptr %60, i64 32
  %65 = load ptr, ptr %52, align 8, !tbaa !14
  %66 = load float, ptr %62, align 8, !tbaa !23
  %67 = load float, ptr %63, align 4, !tbaa !26
  %68 = load float, ptr %64, align 8, !tbaa !27
  %69 = sext i32 %56 to i64
  %70 = insertelement <2 x float> poison, float %66, i64 0
  %71 = insertelement <2 x float> %70, float %68, i64 1
  br label %72

72:                                               ; preds = %.lr.ph82, %109
  %indvars.iv95 = phi i64 [ 0, %.lr.ph82 ], [ %indvars.iv.next96, %109 ]
  %73 = getelementptr inbounds ptr, ptr %65, i64 %indvars.iv95
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = getelementptr inbounds i8, ptr %74, i64 24
  %76 = load float, ptr %75, align 8, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %74, i64 28
  %78 = load float, ptr %77, align 4, !tbaa !26
  %79 = fsub float %78, %3
  %80 = fsub float %67, %79
  %81 = fpext float %80 to double
  %82 = fmul double %81, %81
  %83 = getelementptr inbounds i8, ptr %74, i64 32
  %84 = load float, ptr %83, align 8, !tbaa !27
  %85 = insertelement <2 x float> poison, float %76, i64 0
  %86 = insertelement <2 x float> %85, float %84, i64 1
  %87 = fsub <2 x float> %86, %54
  %88 = fsub <2 x float> %71, %87
  %89 = fpext <2 x float> %88 to <2 x double>
  %90 = fmul <2 x double> %89, %89
  %91 = extractelement <2 x double> %90, i64 0
  %92 = fadd double %91, %82
  %93 = extractelement <2 x double> %90, i64 1
  %94 = fadd double %92, %93
  %sqrt = tail call double @llvm.sqrt.f64(double %94)
  %95 = fcmp olt double %sqrt, 1.000000e-05
  br i1 %95, label %96, label %109

96:                                               ; preds = %72
  %97 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv95
  %98 = load i16, ptr %97, align 2, !tbaa !21
  %99 = icmp slt i16 %98, 1
  br i1 %99, label %.thread, label %109

.thread:                                          ; preds = %96
  %100 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv95
  store i16 1, ptr %100, align 2, !tbaa !21
  %101 = load ptr, ptr %6, align 8, !tbaa !13
  %102 = sext i32 %.086 to i64
  %103 = getelementptr inbounds %struct.s_vvertice, ptr %101, i64 %102
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %103, ptr noundef nonnull align 8 dereferenceable(112) %60, i64 112, i1 false)
  %104 = load ptr, ptr %6, align 8, !tbaa !13
  %105 = getelementptr inbounds %struct.s_vvertice, ptr %104, i64 %102
  %106 = load ptr, ptr %22, align 8, !tbaa !14
  %107 = getelementptr inbounds ptr, ptr %106, i64 %102
  store ptr %105, ptr %107, align 8, !tbaa !15
  %108 = add nsw i32 %.086, 1
  %.pre = load i32, ptr %40, align 8, !tbaa !12
  br label %._crit_edge83.loopexit

109:                                              ; preds = %72, %96
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %110 = icmp slt i64 %indvars.iv.next96, %69
  br i1 %110, label %72, label %._crit_edge83.loopexit, !llvm.loop !28

._crit_edge83.loopexit:                           ; preds = %109, %.thread
  %.2105 = phi i32 [ %108, %.thread ], [ %.086, %109 ]
  %111 = phi i32 [ %.pre, %.thread ], [ %56, %109 ]
  %.pre101 = load i32, ptr %13, align 8, !tbaa !12
  br label %._crit_edge83

._crit_edge83:                                    ; preds = %._crit_edge83.loopexit, %.lr.ph87.split
  %112 = phi i32 [ %55, %.lr.ph87.split ], [ %.pre101, %._crit_edge83.loopexit ]
  %113 = phi i32 [ %56, %.lr.ph87.split ], [ %111, %._crit_edge83.loopexit ]
  %114 = phi i32 [ %57, %.lr.ph87.split ], [ %111, %._crit_edge83.loopexit ]
  %.1.lcssa = phi i32 [ %.086, %.lr.ph87.split ], [ %.2105, %._crit_edge83.loopexit ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %115 = sext i32 %112 to i64
  %116 = icmp slt i64 %indvars.iv.next99, %115
  br i1 %116, label %.lr.ph87.split, label %._crit_edge88, !llvm.loop !29

._crit_edge88:                                    ; preds = %._crit_edge83, %._crit_edge, %.preheader
  %.0.lcssa = phi i32 [ 0, %.preheader ], [ 0, %._crit_edge ], [ %.1.lcssa, %._crit_edge83 ]
  tail call void @my_free(ptr noundef %44) #5
  %117 = getelementptr inbounds i8, ptr %6, i64 40
  store i32 %.0.lcssa, ptr %117, align 8, !tbaa !12
  %118 = getelementptr inbounds i8, ptr %0, i64 44
  %119 = load i32, ptr %118, align 4, !tbaa !31
  %120 = getelementptr inbounds i8, ptr %6, i64 44
  store i32 %119, ptr %120, align 4, !tbaa !31
  ret ptr %6
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 16}
!6 = !{!"s_lst_vvertice", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 44}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 24}
!12 = !{!6, !10, i64 40}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 8}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = !{!6, !7, i64 32}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !8, i64 0}
!23 = !{!24, !25, i64 24}
!24 = !{!"s_vvertice", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !25, i64 20, !25, i64 24, !25, i64 28, !25, i64 32, !10, i64 36, !10, i64 40, !8, i64 44, !8, i64 64, !8, i64 96, !25, i64 108}
!25 = !{!"float", !8, i64 0}
!26 = !{!24, !25, i64 28}
!27 = !{!24, !25, i64 32}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !17, !30}
!30 = !{!"llvm.loop.unswitch.partial.disable"}
!31 = !{!6, !10, i64 44}


; Effective O3 passes: ADCEPass,AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass