; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis (cmetis)

; 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.graphdef = type { i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr }
%struct.ContactInfoType = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.DKeyValueType = type { double, i64 }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [82 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

declare ptr @gk_malloc(i64 noundef, ptr noundef) #1

declare ptr @libmetis__idxsmalloc(i64 noundef, i64 noundef, ptr noundef) #1

declare ptr @libmetis__idxmalloc(i64 noundef, ptr noundef) #1

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

declare void @libmetis__idkeysort(i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @InduceDecissionTree(i64 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; 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

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

; Function Attrs: nounwind uwtable
declare dso_local void @CheckDTree(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @METIS_SetupContact(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %struct.graphdef, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca [3 x ptr], align 16
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, 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 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 248, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %36) #4
  %37 = call ptr @gk_malloc(i64 noundef 72, ptr noundef @.str)
  store ptr %37, ptr %35, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = add nsw i64 %39, 1
  %41 = call ptr @libmetis__idxsmalloc(i64 noundef %40, i64 noundef 0, ptr noundef @.str.1)
  %42 = load ptr, ptr %35, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ContactInfoType, ptr %42, i32 0, i32 3
  store ptr %41, ptr %43, align 8, !tbaa !11
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = call ptr @libmetis__idxsmalloc(i64 noundef %45, i64 noundef 0, ptr noundef @.str.2)
  %47 = load ptr, ptr %35, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ContactInfoType, ptr %47, i32 0, i32 4
  store ptr %46, ptr %48, align 8, !tbaa !13
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = call ptr @libmetis__idxsmalloc(i64 noundef %50, i64 noundef 0, ptr noundef @.str.3)
  %52 = load ptr, ptr %35, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ContactInfoType, ptr %52, i32 0, i32 5
  store ptr %51, ptr %53, align 8, !tbaa !14
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = call ptr @libmetis__idxsmalloc(i64 noundef %55, i64 noundef 0, ptr noundef @.str.4)
  %57 = load ptr, ptr %35, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ContactInfoType, ptr %57, i32 0, i32 6
  store ptr %56, ptr %58, align 8, !tbaa !15
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = call ptr @libmetis__idxmalloc(i64 noundef %60, ptr noundef @.str.5)
  %62 = load ptr, ptr %35, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ContactInfoType, ptr %62, i32 0, i32 7
  store ptr %61, ptr %63, align 8, !tbaa !16
  store ptr %61, ptr %29, align 8, !tbaa !5
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = mul i64 64, %65
  %67 = call ptr @gk_malloc(i64 noundef %66, ptr noundef @.str.6)
  %68 = load ptr, ptr %35, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ContactInfoType, ptr %68, i32 0, i32 8
  store ptr %67, ptr %69, align 8, !tbaa !17
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = load ptr, ptr %35, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ContactInfoType, ptr %72, i32 0, i32 0
  store i64 %71, ptr %73, align 8, !tbaa !18
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = call ptr @libmetis__idxmalloc(i64 noundef %75, ptr noundef @.str.10)
  store ptr %76, ptr %27, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load i64, ptr %77, align 8, !tbaa !9
  %79 = call ptr @libmetis__idxsmalloc(i64 noundef %78, i64 noundef 0, ptr noundef @.str.11)
  store ptr %79, ptr %28, align 8, !tbaa !5
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %125, %5
  %81 = load i64, ptr %14, align 8, !tbaa !9
  %82 = icmp slt i64 %81, 3
  br i1 %82, label %83, label %128

83:                                               ; preds = %80
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i64, ptr %84, align 8, !tbaa !9
  %86 = mul i64 16, %85
  %87 = call ptr @gk_malloc(i64 noundef %86, ptr noundef @.str.12)
  %88 = load i64, ptr %14, align 8, !tbaa !9
  %89 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %88
  store ptr %87, ptr %89, align 8, !tbaa !5
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %116, %83
  %91 = load i64, ptr %11, align 8, !tbaa !9
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp slt i64 %91, %93
  br i1 %94, label %95, label %119

95:                                               ; preds = %90
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i64, ptr %11, align 8, !tbaa !9
  %98 = mul nsw i64 3, %97
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = add nsw i64 %98, %99
  %101 = getelementptr inbounds double, ptr %96, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !19
  %103 = load i64, ptr %14, align 8, !tbaa !9
  %104 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = load i64, ptr %11, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.DKeyValueType, ptr %105, i64 %106
  %108 = getelementptr inbounds %struct.DKeyValueType, ptr %107, i32 0, i32 0
  store double %102, ptr %108, align 8, !tbaa !21
  %109 = load i64, ptr %11, align 8, !tbaa !9
  %110 = load i64, ptr %14, align 8, !tbaa !9
  %111 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i64, ptr %11, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.DKeyValueType, ptr %112, i64 %113
  %115 = getelementptr inbounds %struct.DKeyValueType, ptr %114, i32 0, i32 1
  store i64 %109, ptr %115, align 8, !tbaa !23
  br label %116

116:                                              ; preds = %95
  %117 = load i64, ptr %11, align 8, !tbaa !9
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %11, align 8, !tbaa !9
  br label %90, !llvm.loop !24

119:                                              ; preds = %90
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = load i64, ptr %14, align 8, !tbaa !9
  %123 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  call void @libmetis__idkeysort(i64 noundef %121, ptr noundef %124)
  br label %125

125:                                              ; preds = %119
  %126 = load i64, ptr %14, align 8, !tbaa !9
  %127 = add nsw i64 %126, 1
  store i64 %127, ptr %14, align 8, !tbaa !9
  br label %80, !llvm.loop !26

128:                                              ; preds = %80
  store i64 0, ptr %23, align 8, !tbaa !9
  store i64 0, ptr %22, align 8, !tbaa !9
  store i64 0, ptr %21, align 8, !tbaa !9
  store i64 0, ptr %20, align 8, !tbaa !9
  store i64 0, ptr %19, align 8, !tbaa !9
  store i64 0, ptr %18, align 8, !tbaa !9
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i64, ptr %129, align 8, !tbaa !9
  %131 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 0
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = load i64, ptr %133, align 8, !tbaa !9
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = load i64, ptr %136, align 8, !tbaa !9
  %138 = load ptr, ptr %35, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ContactInfoType, ptr %138, i32 0, i32 8
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  %141 = load ptr, ptr %29, align 8, !tbaa !5
  %142 = load ptr, ptr %27, align 8, !tbaa !5
  %143 = load ptr, ptr %28, align 8, !tbaa !5
  %144 = call i64 @InduceDecissionTree(i64 noundef %130, ptr noundef %131, ptr noundef %132, i64 noundef %134, ptr noundef %135, i64 noundef %137, i64 noundef 1, float noundef 1.000000e+00, ptr noundef %18, ptr noundef %19, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %143)
  %145 = load i64, ptr %18, align 8, !tbaa !9
  %146 = load i64, ptr %19, align 8, !tbaa !9
  %147 = load i64, ptr %20, align 8, !tbaa !9
  %148 = load i64, ptr %21, align 8, !tbaa !9
  %149 = load i64, ptr %22, align 8, !tbaa !9
  %150 = load i64, ptr %23, align 8, !tbaa !9
  %151 = call i32 (ptr, ...) @mprintf(ptr noundef @.str.13, i64 noundef %145, i64 noundef %146, i64 noundef %147, i64 noundef %148, i64 noundef %149, i64 noundef %150)
  %152 = load i64, ptr %18, align 8, !tbaa !9
  %153 = load ptr, ptr %35, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ContactInfoType, ptr %153, i32 0, i32 1
  store i64 %152, ptr %154, align 8, !tbaa !27
  %155 = load i64, ptr %19, align 8, !tbaa !9
  %156 = load ptr, ptr %35, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ContactInfoType, ptr %156, i32 0, i32 2
  store i64 %155, ptr %157, align 8, !tbaa !28
  %158 = load ptr, ptr %35, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.ContactInfoType, ptr %158, i32 0, i32 6
  %160 = load ptr, ptr %159, align 8, !tbaa !15
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = load i64, ptr %162, align 8, !tbaa !9
  %164 = mul i64 8, %163
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %160, ptr align 1 %161, i64 %164, i1 false)
  %165 = load ptr, ptr %35, align 8, !tbaa !5
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  call void @BuildDTLeafContents(ptr noundef %165, ptr noundef %166)
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i64, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = load ptr, ptr %35, align 8, !tbaa !5
  call void @CheckDTree(i64 noundef %168, ptr noundef %169, ptr noundef %170, ptr noundef %171)
  %172 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 0
  %173 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 1
  %174 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 2
  call void (ptr, ...) @gk_free(ptr noundef %27, ptr noundef %172, ptr noundef %173, ptr noundef %174, ptr noundef %28, ptr noundef null)
  %175 = load ptr, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 248, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %11) #4
  ret ptr %175
}

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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!13 = !{!12, !6, i64 32}
!14 = !{!12, !6, i64 40}
!15 = !{!12, !6, i64 48}
!16 = !{!12, !6, i64 56}
!17 = !{!12, !6, i64 64}
!18 = !{!12, !10, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!22, !20, i64 0}
!22 = !{!"", !20, i64 0, !10, i64 8}
!23 = !{!22, !10, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!12, !10, i64 8}
!28 = !{!12, !10, i64 16}


; 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.DKeyValueType = type { double, i64 }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [82 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

declare ptr @gk_malloc(i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @libmetis__idxsmalloc(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @libmetis__idxmalloc(i64 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mprintf(ptr noundef, ...) local_unnamed_addr #1

declare void @libmetis__idkeysort(i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @InduceDecissionTree(i64 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @CheckDTree(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @METIS_SetupContact(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [3 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  %15 = tail call ptr @gk_malloc(i64 noundef 72, ptr noundef nonnull @.str) #4
  %16 = load i64, ptr %0, align 8, !tbaa !5
  %17 = add nsw i64 %16, 1
  %18 = tail call ptr @libmetis__idxsmalloc(i64 noundef %17, i64 noundef 0, ptr noundef nonnull @.str.1) #4
  %19 = getelementptr inbounds i8, ptr %15, i64 24
  store ptr %18, ptr %19, align 8, !tbaa !9
  %20 = load i64, ptr %0, align 8, !tbaa !5
  %21 = tail call ptr @libmetis__idxsmalloc(i64 noundef %20, i64 noundef 0, ptr noundef nonnull @.str.2) #4
  %22 = getelementptr inbounds i8, ptr %15, i64 32
  store ptr %21, ptr %22, align 8, !tbaa !12
  %23 = load i64, ptr %0, align 8, !tbaa !5
  %24 = tail call ptr @libmetis__idxsmalloc(i64 noundef %23, i64 noundef 0, ptr noundef nonnull @.str.3) #4
  %25 = getelementptr inbounds i8, ptr %15, i64 40
  store ptr %24, ptr %25, align 8, !tbaa !13
  %26 = load i64, ptr %0, align 8, !tbaa !5
  %27 = tail call ptr @libmetis__idxsmalloc(i64 noundef %26, i64 noundef 0, ptr noundef nonnull @.str.4) #4
  %28 = getelementptr inbounds i8, ptr %15, i64 48
  store ptr %27, ptr %28, align 8, !tbaa !14
  %29 = load i64, ptr %0, align 8, !tbaa !5
  %30 = tail call ptr @libmetis__idxmalloc(i64 noundef %29, ptr noundef nonnull @.str.5) #4
  %31 = getelementptr inbounds i8, ptr %15, i64 56
  store ptr %30, ptr %31, align 8, !tbaa !15
  %32 = load i64, ptr %0, align 8, !tbaa !5
  %33 = shl i64 %32, 6
  %34 = tail call ptr @gk_malloc(i64 noundef %33, ptr noundef nonnull @.str.6) #4
  %35 = getelementptr inbounds i8, ptr %15, i64 64
  store ptr %34, ptr %35, align 8, !tbaa !16
  %36 = load i64, ptr %0, align 8, !tbaa !5
  store i64 %36, ptr %15, align 8, !tbaa !17
  %37 = tail call ptr @libmetis__idxmalloc(i64 noundef %36, ptr noundef nonnull @.str.10) #4
  store ptr %37, ptr %12, align 8, !tbaa !18
  %38 = load i64, ptr %0, align 8, !tbaa !5
  %39 = tail call ptr @libmetis__idxsmalloc(i64 noundef %38, i64 noundef 0, ptr noundef nonnull @.str.11) #4
  store ptr %39, ptr %13, align 8, !tbaa !18
  %40 = load i64, ptr %0, align 8, !tbaa !5
  %41 = shl i64 %40, 4
  %42 = tail call ptr @gk_malloc(i64 noundef %41, ptr noundef nonnull @.str.12) #4
  store ptr %42, ptr %14, align 16, !tbaa !18
  %43 = load i64, ptr %0, align 8, !tbaa !5
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5, %.lr.ph
  %.053 = phi i64 [ %48, %.lr.ph ], [ 0, %5 ]
  %.idx = mul i64 %.053, 24
  %gep = getelementptr i8, ptr %1, i64 %.idx
  %45 = load double, ptr %gep, align 8, !tbaa !19
  %46 = getelementptr inbounds %struct.DKeyValueType, ptr %42, i64 %.053
  store double %45, ptr %46, align 8, !tbaa !21
  %47 = getelementptr inbounds %struct.DKeyValueType, ptr %42, i64 %.053, i32 1
  store i64 %.053, ptr %47, align 8, !tbaa !23
  %48 = add nuw nsw i64 %.053, 1
  %49 = load i64, ptr %0, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph, %5
  %.lcssa = phi i64 [ %43, %5 ], [ %49, %.lr.ph ]
  tail call void @libmetis__idkeysort(i64 noundef %.lcssa, ptr noundef %42) #4
  %51 = load i64, ptr %0, align 8, !tbaa !5
  %52 = shl i64 %51, 4
  %53 = tail call ptr @gk_malloc(i64 noundef %52, ptr noundef nonnull @.str.12) #4
  %54 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %53, ptr %54, align 8, !tbaa !18
  %invariant.gep.1 = getelementptr i8, ptr %1, i64 8
  %55 = load i64, ptr %0, align 8, !tbaa !5
  %56 = icmp sgt i64 %55, 0
  br i1 %56, label %.lr.ph.1, label %._crit_edge.1

.lr.ph.1:                                         ; preds = %._crit_edge, %.lr.ph.1
  %.053.1 = phi i64 [ %60, %.lr.ph.1 ], [ 0, %._crit_edge ]
  %.idx.1 = mul i64 %.053.1, 24
  %gep.1 = getelementptr i8, ptr %invariant.gep.1, i64 %.idx.1
  %57 = load double, ptr %gep.1, align 8, !tbaa !19
  %58 = getelementptr inbounds %struct.DKeyValueType, ptr %53, i64 %.053.1
  store double %57, ptr %58, align 8, !tbaa !21
  %59 = getelementptr inbounds %struct.DKeyValueType, ptr %53, i64 %.053.1, i32 1
  store i64 %.053.1, ptr %59, align 8, !tbaa !23
  %60 = add nuw nsw i64 %.053.1, 1
  %61 = load i64, ptr %0, align 8, !tbaa !5
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !24

._crit_edge.1:                                    ; preds = %.lr.ph.1, %._crit_edge
  %.lcssa.1 = phi i64 [ %55, %._crit_edge ], [ %61, %.lr.ph.1 ]
  tail call void @libmetis__idkeysort(i64 noundef %.lcssa.1, ptr noundef %53) #4
  %63 = load i64, ptr %0, align 8, !tbaa !5
  %64 = shl i64 %63, 4
  %65 = tail call ptr @gk_malloc(i64 noundef %64, ptr noundef nonnull @.str.12) #4
  %66 = getelementptr inbounds i8, ptr %14, i64 16
  store ptr %65, ptr %66, align 16, !tbaa !18
  %invariant.gep.2 = getelementptr i8, ptr %1, i64 16
  %67 = load i64, ptr %0, align 8, !tbaa !5
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %.lr.ph.2, label %._crit_edge.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %.lr.ph.2
  %.053.2 = phi i64 [ %72, %.lr.ph.2 ], [ 0, %._crit_edge.1 ]
  %.idx.2 = mul i64 %.053.2, 24
  %gep.2 = getelementptr i8, ptr %invariant.gep.2, i64 %.idx.2
  %69 = load double, ptr %gep.2, align 8, !tbaa !19
  %70 = getelementptr inbounds %struct.DKeyValueType, ptr %65, i64 %.053.2
  store double %69, ptr %70, align 8, !tbaa !21
  %71 = getelementptr inbounds %struct.DKeyValueType, ptr %65, i64 %.053.2, i32 1
  store i64 %.053.2, ptr %71, align 8, !tbaa !23
  %72 = add nuw nsw i64 %.053.2, 1
  %73 = load i64, ptr %0, align 8, !tbaa !5
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !24

._crit_edge.2:                                    ; preds = %.lr.ph.2, %._crit_edge.1
  %.lcssa.2 = phi i64 [ %67, %._crit_edge.1 ], [ %73, %.lr.ph.2 ]
  tail call void @libmetis__idkeysort(i64 noundef %.lcssa.2, ptr noundef %65) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %8, align 8, !tbaa !5
  store i64 0, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %6, align 8, !tbaa !5
  %75 = load i64, ptr %0, align 8, !tbaa !5
  %76 = load i64, ptr %3, align 8, !tbaa !5
  %77 = load ptr, ptr %35, align 8, !tbaa !16
  %78 = call i64 @InduceDecissionTree(i64 noundef %75, ptr noundef nonnull %14, ptr noundef %2, i64 noundef %76, ptr noundef %4, i64 noundef %75, i64 noundef 1, float noundef 1.000000e+00, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %77, ptr noundef %30, ptr noundef %37, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %39)
  %79 = load i64, ptr %6, align 8, !tbaa !5
  %80 = load i64, ptr %7, align 8, !tbaa !5
  %81 = load i64, ptr %8, align 8, !tbaa !5
  %82 = load i64, ptr %9, align 8, !tbaa !5
  %83 = load i64, ptr %10, align 8, !tbaa !5
  %84 = load i64, ptr %11, align 8, !tbaa !5
  %85 = call i32 (ptr, ...) @mprintf(ptr noundef nonnull @.str.13, i64 noundef %79, i64 noundef %80, i64 noundef %81, i64 noundef %82, i64 noundef %83, i64 noundef %84) #4
  %86 = load i64, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %15, i64 8
  store i64 %86, ptr %87, align 8, !tbaa !26
  %88 = load i64, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %15, i64 16
  store i64 %88, ptr %89, align 8, !tbaa !27
  %90 = load ptr, ptr %28, align 8, !tbaa !14
  %91 = load i64, ptr %0, align 8, !tbaa !5
  %92 = shl i64 %91, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %90, ptr align 1 %4, i64 %92, i1 false)
  call void @BuildDTLeafContents(ptr noundef nonnull %15, ptr noundef %2)
  %93 = load i64, ptr %0, align 8, !tbaa !5
  call void @CheckDTree(i64 noundef %93, ptr noundef %1, ptr noundef %4, ptr noundef nonnull %15)
  call void (ptr, ...) @gk_free(ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef nonnull %54, ptr noundef nonnull %66, ptr noundef nonnull %13, ptr noundef null) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret ptr %15
}

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 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 24}
!10 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 32}
!13 = !{!10, !11, i64 40}
!14 = !{!10, !11, i64 48}
!15 = !{!10, !11, i64 56}
!16 = !{!10, !11, i64 64}
!17 = !{!10, !6, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!22, !20, i64 0}
!22 = !{!"", !20, i64 0, !6, i64 8}
!23 = !{!22, !6, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!10, !6, i64 8}
!27 = !{!10, !6, i64 16}


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