; 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

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_SetupContact0(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 = %90, %5
  %81 = load i64, ptr %14, align 8, !tbaa !9
  %82 = icmp slt i64 %81, 3
  br i1 %82, label %83, label %93

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
  br label %90

90:                                               ; preds = %83
  %91 = load i64, ptr %14, align 8, !tbaa !9
  %92 = add nsw i64 %91, 1
  store i64 %92, ptr %14, align 8, !tbaa !9
  br label %80, !llvm.loop !19

93:                                               ; preds = %80
  store i64 0, ptr %15, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %137, %93
  %95 = load i64, ptr %11, align 8, !tbaa !9
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = icmp slt i64 %95, %97
  br i1 %98, label %99, label %140

99:                                               ; preds = %94
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = load i64, ptr %11, align 8, !tbaa !9
  %102 = getelementptr inbounds i64, ptr %100, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = icmp ne i64 %103, 0
  br i1 %104, label %105, label %136

105:                                              ; preds = %99
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %130, %105
  %107 = load i64, ptr %14, align 8, !tbaa !9
  %108 = icmp slt i64 %107, 3
  br i1 %108, label %109, label %133

109:                                              ; preds = %106
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load i64, ptr %11, align 8, !tbaa !9
  %112 = mul nsw i64 3, %111
  %113 = load i64, ptr %14, align 8, !tbaa !9
  %114 = add nsw i64 %112, %113
  %115 = getelementptr inbounds double, ptr %110, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !21
  %117 = load i64, ptr %14, align 8, !tbaa !9
  %118 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.DKeyValueType, ptr %119, i64 %120
  %122 = getelementptr inbounds %struct.DKeyValueType, ptr %121, i32 0, i32 0
  store double %116, ptr %122, align 8, !tbaa !23
  %123 = load i64, ptr %11, align 8, !tbaa !9
  %124 = load i64, ptr %14, align 8, !tbaa !9
  %125 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i64, ptr %15, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct.DKeyValueType, ptr %126, i64 %127
  %129 = getelementptr inbounds %struct.DKeyValueType, ptr %128, i32 0, i32 1
  store i64 %123, ptr %129, align 8, !tbaa !25
  br label %130

130:                                              ; preds = %109
  %131 = load i64, ptr %14, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %14, align 8, !tbaa !9
  br label %106, !llvm.loop !26

133:                                              ; preds = %106
  %134 = load i64, ptr %15, align 8, !tbaa !9
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %15, align 8, !tbaa !9
  br label %136

136:                                              ; preds = %133, %99
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %11, align 8, !tbaa !9
  br label %94, !llvm.loop !27

140:                                              ; preds = %94
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %149, %140
  %142 = load i64, ptr %14, align 8, !tbaa !9
  %143 = icmp slt i64 %142, 3
  br i1 %143, label %144, label %152

144:                                              ; preds = %141
  %145 = load i64, ptr %15, align 8, !tbaa !9
  %146 = load i64, ptr %14, align 8, !tbaa !9
  %147 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  call void @libmetis__idkeysort(i64 noundef %145, ptr noundef %148)
  br label %149

149:                                              ; preds = %144
  %150 = load i64, ptr %14, align 8, !tbaa !9
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %14, align 8, !tbaa !9
  br label %141, !llvm.loop !28

152:                                              ; preds = %141
  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
  %153 = load i64, ptr %15, align 8, !tbaa !9
  %154 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 0
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = load i64, ptr %156, align 8, !tbaa !9
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load i64, ptr %15, align 8, !tbaa !9
  %160 = load ptr, ptr %35, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.ContactInfoType, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !17
  %163 = load ptr, ptr %29, align 8, !tbaa !5
  %164 = load ptr, ptr %27, align 8, !tbaa !5
  %165 = load ptr, ptr %28, align 8, !tbaa !5
  %166 = call i64 @InduceDecissionTree(i64 noundef %153, ptr noundef %154, ptr noundef %155, i64 noundef %157, ptr noundef %158, i64 noundef %159, i64 noundef 1, float noundef 1.000000e+00, ptr noundef %18, ptr noundef %19, ptr noundef %162, ptr noundef %163, ptr noundef %164, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %165)
  %167 = load i64, ptr %18, align 8, !tbaa !9
  %168 = load i64, ptr %19, align 8, !tbaa !9
  %169 = load i64, ptr %20, align 8, !tbaa !9
  %170 = load i64, ptr %21, align 8, !tbaa !9
  %171 = load i64, ptr %22, align 8, !tbaa !9
  %172 = load i64, ptr %23, align 8, !tbaa !9
  %173 = call i32 (ptr, ...) @mprintf(ptr noundef @.str.13, i64 noundef %167, i64 noundef %168, i64 noundef %169, i64 noundef %170, i64 noundef %171, i64 noundef %172)
  %174 = load i64, ptr %18, align 8, !tbaa !9
  %175 = load ptr, ptr %35, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ContactInfoType, ptr %175, i32 0, i32 1
  store i64 %174, ptr %176, align 8, !tbaa !29
  %177 = load i64, ptr %19, align 8, !tbaa !9
  %178 = load ptr, ptr %35, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.ContactInfoType, ptr %178, i32 0, i32 2
  store i64 %177, ptr %179, align 8, !tbaa !30
  %180 = load ptr, ptr %35, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.ContactInfoType, ptr %180, i32 0, i32 6
  %182 = load ptr, ptr %181, align 8, !tbaa !15
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = load i64, ptr %184, align 8, !tbaa !9
  %186 = mul i64 8, %185
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %182, ptr align 1 %183, i64 %186, i1 false)
  %187 = load ptr, ptr %35, align 8, !tbaa !5
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  call void @BuildDTLeafContents(ptr noundef %187, ptr noundef %188)
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = load ptr, ptr %35, align 8, !tbaa !5
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  call void @CheckDTreeSurface(i64 noundef %190, ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %194)
  %195 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 0
  %196 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 1
  %197 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 2
  call void (ptr, ...) @gk_free(ptr noundef %27, ptr noundef %195, ptr noundef %196, ptr noundef %197, ptr noundef %28, ptr noundef null)
  %198 = 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 %198
}

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

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 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = !{!24, !22, i64 0}
!24 = !{!"", !22, i64 0, !10, i64 8}
!25 = !{!24, !10, i64 8}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = distinct !{!28, !20}
!29 = !{!12, !10, i64 8}
!30 = !{!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

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_SetupContact0(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr noundef %4) local_unnamed_addr #2 {
.preheader63:
  %5 = alloca i64, align 8
  %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 ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [3 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  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 24, ptr nonnull %13) #4
  %14 = tail call ptr @gk_malloc(i64 noundef 72, ptr noundef nonnull @.str) #4
  %15 = load i64, ptr %0, align 8, !tbaa !5
  %16 = add nsw i64 %15, 1
  %17 = tail call ptr @libmetis__idxsmalloc(i64 noundef %16, i64 noundef 0, ptr noundef nonnull @.str.1) #4
  %18 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr %17, ptr %18, align 8, !tbaa !9
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %20 = tail call ptr @libmetis__idxsmalloc(i64 noundef %19, i64 noundef 0, ptr noundef nonnull @.str.2) #4
  %21 = getelementptr inbounds i8, ptr %14, i64 32
  store ptr %20, ptr %21, align 8, !tbaa !12
  %22 = load i64, ptr %0, align 8, !tbaa !5
  %23 = tail call ptr @libmetis__idxsmalloc(i64 noundef %22, i64 noundef 0, ptr noundef nonnull @.str.3) #4
  %24 = getelementptr inbounds i8, ptr %14, i64 40
  store ptr %23, ptr %24, align 8, !tbaa !13
  %25 = load i64, ptr %0, align 8, !tbaa !5
  %26 = tail call ptr @libmetis__idxsmalloc(i64 noundef %25, i64 noundef 0, ptr noundef nonnull @.str.4) #4
  %27 = getelementptr inbounds i8, ptr %14, i64 48
  store ptr %26, ptr %27, align 8, !tbaa !14
  %28 = load i64, ptr %0, align 8, !tbaa !5
  %29 = tail call ptr @libmetis__idxmalloc(i64 noundef %28, ptr noundef nonnull @.str.5) #4
  %30 = getelementptr inbounds i8, ptr %14, i64 56
  store ptr %29, ptr %30, align 8, !tbaa !15
  %31 = load i64, ptr %0, align 8, !tbaa !5
  %32 = shl i64 %31, 6
  %33 = tail call ptr @gk_malloc(i64 noundef %32, ptr noundef nonnull @.str.6) #4
  %34 = getelementptr inbounds i8, ptr %14, i64 64
  store ptr %33, ptr %34, align 8, !tbaa !16
  %35 = load i64, ptr %0, align 8, !tbaa !5
  store i64 %35, ptr %14, align 8, !tbaa !17
  %36 = tail call ptr @libmetis__idxmalloc(i64 noundef %35, ptr noundef nonnull @.str.10) #4
  store ptr %36, ptr %11, align 8, !tbaa !18
  %37 = load i64, ptr %0, align 8, !tbaa !5
  %38 = tail call ptr @libmetis__idxsmalloc(i64 noundef %37, i64 noundef 0, ptr noundef nonnull @.str.11) #4
  store ptr %38, ptr %12, align 8, !tbaa !18
  %39 = load i64, ptr %0, align 8, !tbaa !5
  %40 = shl i64 %39, 4
  %41 = tail call ptr @gk_malloc(i64 noundef %40, ptr noundef nonnull @.str.12) #4
  store ptr %41, ptr %13, align 16, !tbaa !18
  %42 = load i64, ptr %0, align 8, !tbaa !5
  %43 = shl i64 %42, 4
  %44 = tail call ptr @gk_malloc(i64 noundef %43, ptr noundef nonnull @.str.12) #4
  %45 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %44, ptr %45, align 8, !tbaa !18
  %46 = load i64, ptr %0, align 8, !tbaa !5
  %47 = shl i64 %46, 4
  %48 = tail call ptr @gk_malloc(i64 noundef %47, ptr noundef nonnull @.str.12) #4
  %49 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr %48, ptr %49, align 16, !tbaa !18
  %50 = load i64, ptr %0, align 8, !tbaa !5
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %86, %.preheader63
  %.060.lcssa = phi i64 [ 0, %.preheader63 ], [ %.161, %86 ]
  tail call void @libmetis__idkeysort(i64 noundef %.060.lcssa, ptr noundef %41) #4
  tail call void @libmetis__idkeysort(i64 noundef %.060.lcssa, ptr noundef %44) #4
  tail call void @libmetis__idkeysort(i64 noundef %.060.lcssa, ptr noundef %48) #4
  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
  store i64 0, ptr %5, align 8, !tbaa !5
  %52 = load i64, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %34, align 8, !tbaa !16
  %54 = call i64 @InduceDecissionTree(i64 noundef %.060.lcssa, ptr noundef nonnull %13, ptr noundef %2, i64 noundef %52, ptr noundef %4, i64 noundef %.060.lcssa, i64 noundef 1, float noundef 1.000000e+00, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %53, ptr noundef %29, ptr noundef %36, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %38)
  %55 = load i64, ptr %5, align 8, !tbaa !5
  %56 = load i64, ptr %6, align 8, !tbaa !5
  %57 = load i64, ptr %7, align 8, !tbaa !5
  %58 = load i64, ptr %8, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %10, align 8, !tbaa !5
  %61 = call i32 (ptr, ...) @mprintf(ptr noundef nonnull @.str.13, i64 noundef %55, i64 noundef %56, i64 noundef %57, i64 noundef %58, i64 noundef %59, i64 noundef %60) #4
  %62 = load i64, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %14, i64 8
  store i64 %62, ptr %63, align 8, !tbaa !19
  %64 = load i64, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %14, i64 16
  store i64 %64, ptr %65, align 8, !tbaa !20
  %66 = load ptr, ptr %27, align 8, !tbaa !14
  %67 = load i64, ptr %0, align 8, !tbaa !5
  %68 = shl i64 %67, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %66, ptr align 1 %4, i64 %68, i1 false)
  call void @BuildDTLeafContents(ptr noundef nonnull %14, ptr noundef %2)
  %69 = load i64, ptr %0, align 8, !tbaa !5
  call void @CheckDTreeSurface(i64 noundef %69, ptr noundef %1, ptr noundef %4, ptr noundef nonnull %14, ptr noundef %2)
  call void (ptr, ...) @gk_free(ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %45, ptr noundef nonnull %49, ptr noundef nonnull %12, ptr noundef null) #4
  call void @llvm.lifetime.end.p0(i64 24, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret ptr %14

.lr.ph:                                           ; preds = %.preheader63, %86
  %70 = phi i64 [ %87, %86 ], [ %50, %.preheader63 ]
  %.067 = phi i64 [ %88, %86 ], [ 0, %.preheader63 ]
  %.06066 = phi i64 [ %.161, %86 ], [ 0, %.preheader63 ]
  %71 = getelementptr inbounds i64, ptr %2, i64 %.067
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %.not = icmp eq i64 %72, 0
  br i1 %.not, label %86, label %.preheader62

.preheader62:                                     ; preds = %.lr.ph
  %.idx = mul i64 %.067, 24
  %73 = getelementptr inbounds i8, ptr %1, i64 %.idx
  %74 = load double, ptr %73, align 8, !tbaa !21
  %75 = getelementptr inbounds %struct.DKeyValueType, ptr %41, i64 %.06066
  store double %74, ptr %75, align 8, !tbaa !23
  %76 = getelementptr inbounds %struct.DKeyValueType, ptr %41, i64 %.06066, i32 1
  store i64 %.067, ptr %76, align 8, !tbaa !25
  %77 = getelementptr inbounds i8, ptr %73, i64 8
  %78 = load double, ptr %77, align 8, !tbaa !21
  %79 = getelementptr inbounds %struct.DKeyValueType, ptr %44, i64 %.06066
  store double %78, ptr %79, align 8, !tbaa !23
  %80 = getelementptr inbounds %struct.DKeyValueType, ptr %44, i64 %.06066, i32 1
  store i64 %.067, ptr %80, align 8, !tbaa !25
  %81 = getelementptr inbounds i8, ptr %73, i64 16
  %82 = load double, ptr %81, align 8, !tbaa !21
  %83 = getelementptr inbounds %struct.DKeyValueType, ptr %48, i64 %.06066
  store double %82, ptr %83, align 8, !tbaa !23
  %84 = getelementptr inbounds %struct.DKeyValueType, ptr %48, i64 %.06066, i32 1
  store i64 %.067, ptr %84, align 8, !tbaa !25
  %85 = add nsw i64 %.06066, 1
  %.pre = load i64, ptr %0, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %.lr.ph, %.preheader62
  %87 = phi i64 [ %.pre, %.preheader62 ], [ %70, %.lr.ph ]
  %.161 = phi i64 [ %85, %.preheader62 ], [ %.06066, %.lr.ph ]
  %88 = add nuw nsw i64 %.067, 1
  %89 = icmp slt i64 %88, %87
  br i1 %89, label %.lr.ph, label %.preheader, !llvm.loop !26
}

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

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 = !{!10, !6, i64 8}
!20 = !{!10, !6, i64 16}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = !{!24, !22, i64 0}
!24 = !{!"", !22, i64 0, !6, i64 8}
!25 = !{!24, !6, i64 8}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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