; LLVM IR from siconos/siconos :: externals/lbl/metis4/kmetis.ll_ (MlevelKWayPartitioning)

; 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.controldef = type { i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i32, i32, ptr, ptr, i32, ptr, ptr }
%struct.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [37 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare double @__seconds() #1

; Function Attrs: nounwind uwtable
define dso_local i32 @__MlevelKWayPartitioning(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, float noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca [2 x i32], align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca [10 x i32], align 16
  %22 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store float %5, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 3, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call ptr @__Coarsen2Way(ptr noundef %23, ptr noundef %24)
  store ptr %25, ptr %18, align 8, !tbaa !5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = and i32 %28, 1
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %37

31:                                               ; preds = %6
  %32 = call double @__seconds()
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.controldef, ptr %33, i32 0, i32 13
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = fsub double %35, %32
  store double %36, ptr %34, align 8, !tbaa !17
  br label %37

37:                                               ; preds = %31, %6
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = load i32, ptr %9, align 4, !tbaa !9
  call void @__AllocateKWayPartitionMemory(ptr noundef %38, ptr noundef %39, i32 noundef %40)
  %41 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 0
  store i32 1, ptr %41, align 16, !tbaa !9
  %42 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 1
  store i32 4, ptr %42, align 4, !tbaa !9
  %43 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 2
  store i32 1, ptr %43, align 8, !tbaa !9
  %44 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 3
  store i32 1, ptr %44, align 4, !tbaa !9
  %45 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 4
  store i32 0, ptr %45, align 16, !tbaa !9
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.graphdef, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.graphdef, ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.graphdef, ptr %51, i32 0, i32 7
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = load ptr, ptr %18, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.graphdef, ptr %54, i32 0, i32 5
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.graphdef, ptr %57, i32 0, i32 8
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = getelementptr inbounds [10 x i32], ptr %21, i64 0, i64 0
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graphdef, ptr %62, i32 0, i32 14
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  call void @METIS_WPartGraphRecursive(ptr noundef %47, ptr noundef %50, ptr noundef %53, ptr noundef %56, ptr noundef %59, ptr noundef %19, ptr noundef %20, ptr noundef %9, ptr noundef %60, ptr noundef %61, ptr noundef %22, ptr noundef %64)
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.controldef, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = and i32 %67, 1
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %76

70:                                               ; preds = %37
  %71 = call double @__seconds()
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.controldef, ptr %72, i32 0, i32 13
  %74 = load double, ptr %73, align 8, !tbaa !17
  %75 = fadd double %74, %71
  store double %75, ptr %73, align 8, !tbaa !17
  br label %76

76:                                               ; preds = %70, %37
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.controldef, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !13
  %80 = and i32 %79, 16
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %86

82:                                               ; preds = %76
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = load i32, ptr %22, align 4, !tbaa !9
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %83, i32 noundef %84)
  br label %86

86:                                               ; preds = %82, %76
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.controldef, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !13
  %90 = and i32 %89, 64
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %98

92:                                               ; preds = %86
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.graphdef, ptr %95, i32 0, i32 14
  %97 = load ptr, ptr %96, align 8, !tbaa !23
  call void @__ComputePartitionInfo(ptr noundef %93, i32 noundef %94, ptr noundef %97)
  br label %98

98:                                               ; preds = %92, %86
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = load float, ptr %12, align 4, !tbaa !11
  call void @__RefineKWay(ptr noundef %99, ptr noundef %100, ptr noundef %101, i32 noundef %102, ptr noundef %103, float noundef %104)
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.graphdef, ptr %106, i32 0, i32 14
  %108 = load ptr, ptr %107, align 8, !tbaa !23
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.graphdef, ptr %109, i32 0, i32 2
  %111 = load i32, ptr %110, align 8, !tbaa !24
  %112 = sext i32 %111 to i64
  %113 = mul i64 4, %112
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 1 %108, i64 %113, i1 false)
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.graphdef, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.graphdef, ptr %116, i32 0, i32 1
  call void (ptr, ...) @GKfree(ptr noundef %115, ptr noundef %117, ptr noundef null)
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.graphdef, ptr %118, i32 0, i32 12
  %120 = load i32, ptr %119, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret i32 %120
}

declare ptr @__Coarsen2Way(ptr noundef, ptr noundef) #1

declare void @__AllocateKWayPartitionMemory(ptr noundef, ptr noundef, i32 noundef) #1

declare void @METIS_WPartGraphRecursive(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

declare void @__ComputePartitionInfo(ptr noundef, i32 noundef, ptr noundef) #1

declare void @__RefineKWay(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, float noundef) #1

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

declare void @GKfree(ptr noundef, ...) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 4}
!14 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !15, i64 48, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !16, i64 224}
!15 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48}
!16 = !{!"double", !7, i64 0}
!17 = !{!14, !16, i64 112}
!18 = !{!19, !6, i64 24}
!19 = !{!"graphdef", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!20 = !{!19, !6, i64 48}
!21 = !{!19, !6, i64 32}
!22 = !{!19, !6, i64 56}
!23 = !{!19, !6, i64 96}
!24 = !{!19, !10, i64 16}
!25 = !{!19, !10, i64 88}


; 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.1 = external hidden unnamed_addr constant [37 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare double @__seconds() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @__MlevelKWayPartitioning(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef writeonly %3, ptr noundef %4, float noundef %5) local_unnamed_addr #2 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [10 x i32], align 16
  %11 = alloca i32, align 4
  store i32 %2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %12 = tail call ptr @__Coarsen2Way(ptr noundef %0, ptr noundef %1) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = and i32 %14, 1
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %21, label %16

16:                                               ; preds = %6
  %17 = tail call double @__seconds() #5
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  %19 = load double, ptr %18, align 8, !tbaa !15
  %20 = fsub double %19, %17
  store double %20, ptr %18, align 8, !tbaa !15
  br label %21

21:                                               ; preds = %16, %6
  tail call void @__AllocateKWayPartitionMemory(ptr noundef nonnull %0, ptr noundef %12, i32 noundef %2) #5
  store <4 x i32> <i32 1, i32 4, i32 1, i32 1>, ptr %10, align 16, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %10, i64 16
  store i32 0, ptr %22, align 16, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %12, i64 16
  %24 = getelementptr inbounds i8, ptr %12, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %12, i64 48
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  %28 = getelementptr inbounds i8, ptr %12, i64 32
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %12, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = getelementptr inbounds i8, ptr %12, i64 96
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  call void @METIS_WPartGraphRecursive(ptr noundef nonnull %23, ptr noundef %25, ptr noundef %27, ptr noundef %29, ptr noundef %31, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %33) #5
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = and i32 %34, 1
  %.not30 = icmp eq i32 %35, 0
  br i1 %.not30, label %41, label %36

36:                                               ; preds = %21
  %37 = call double @__seconds() #5
  %38 = getelementptr inbounds i8, ptr %0, i64 112
  %39 = load double, ptr %38, align 8, !tbaa !15
  %40 = fadd double %37, %39
  store double %40, ptr %38, align 8, !tbaa !15
  %.pre = load i32, ptr %13, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %36, %21
  %42 = phi i32 [ %.pre, %36 ], [ %34, %21 ]
  %43 = and i32 %42, 16
  %.not31 = icmp eq i32 %43, 0
  br i1 %.not31, label %48, label %44

44:                                               ; preds = %41
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %45, i32 noundef %46)
  %.pre33 = load i32, ptr %13, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %44, %41
  %49 = phi i32 [ %.pre33, %44 ], [ %42, %41 ]
  %50 = and i32 %49, 64
  %.not32 = icmp eq i32 %50, 0
  br i1 %.not32, label %54, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load ptr, ptr %32, align 8, !tbaa !21
  call void @__ComputePartitionInfo(ptr noundef nonnull %12, i32 noundef %52, ptr noundef %53) #5
  br label %54

54:                                               ; preds = %51, %48
  %55 = load i32, ptr %7, align 4, !tbaa !5
  call void @__RefineKWay(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %12, i32 noundef %55, ptr noundef %4, float noundef %5) #5
  %56 = getelementptr inbounds i8, ptr %1, i64 96
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = getelementptr inbounds i8, ptr %1, i64 16
  %59 = load i32, ptr %58, align 8, !tbaa !22
  %60 = sext i32 %59 to i64
  %61 = shl nsw i64 %60, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 %57, i64 %61, i1 false)
  %62 = getelementptr inbounds i8, ptr %1, i64 8
  call void (ptr, ...) @GKfree(ptr noundef %1, ptr noundef nonnull %62, ptr noundef null) #5
  %63 = getelementptr inbounds i8, ptr %1, i64 88
  %64 = load i32, ptr %63, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  ret i32 %64
}

declare ptr @__Coarsen2Way(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @METIS_WPartGraphRecursive(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

declare void @GKfree(ptr noundef, ...) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { 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 #4 = { mustprogress 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"controldef", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !12, i64 48, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224}
!11 = !{!"float", !7, i64 0}
!12 = !{!"workspacedef", !13, i64 0, !6, i64 8, !6, i64 12, !13, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 48}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !14, i64 112}
!16 = !{!17, !13, i64 24}
!17 = !{!"graphdef", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !6, i64 88, !6, i64 92, !13, i64 96, !13, i64 104, !6, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !6, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208}
!18 = !{!17, !13, i64 48}
!19 = !{!17, !13, i64 32}
!20 = !{!17, !13, i64 56}
!21 = !{!17, !13, i64 96}
!22 = !{!17, !6, i64 16}
!23 = !{!17, !6, i64 88}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass