; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis/graph.ll_libmetis (SetUpGraph)

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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__SetUpGraph(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i64 noundef %8) #0 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, 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 ptr, align 8
  %24 = alloca [16 x i64], align 16
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i64 %1, ptr %11, align 8, !tbaa !9
  store i64 %2, ptr %12, align 8, !tbaa !9
  store i64 %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store i64 %8, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr %24) #3
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libmetis__InitGraph(ptr noundef %25)
  %26 = load i64, ptr %12, align 8, !tbaa !9
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.graphdef, ptr %27, i32 0, i32 0
  store i64 %26, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = load i64, ptr %12, align 8, !tbaa !9
  %31 = getelementptr inbounds i64, ptr %29, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.graphdef, ptr %33, i32 0, i32 1
  store i64 %32, ptr %34, align 8, !tbaa !14
  %35 = load i64, ptr %13, align 8, !tbaa !9
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.graphdef, ptr %36, i32 0, i32 28
  store i64 %35, ptr %37, align 8, !tbaa !15
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.graphdef, ptr %39, i32 0, i32 2
  store ptr %38, ptr %40, align 8, !tbaa !16
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 7
  store i32 0, ptr %42, align 8, !tbaa !17
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 5
  store ptr %43, ptr %45, align 8, !tbaa !18
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.graphdef, ptr %46, i32 0, i32 10
  store i32 0, ptr %47, align 4, !tbaa !19
  %48 = load i64, ptr %13, align 8, !tbaa !9
  %49 = icmp eq i64 %48, 1
  br i1 %49, label %50, label %66

50:                                               ; preds = %9
  %51 = load i64, ptr %18, align 8, !tbaa !9
  %52 = and i64 %51, 2
  %53 = icmp eq i64 %52, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %50
  %55 = load i64, ptr %12, align 8, !tbaa !9
  %56 = call ptr @libmetis__idxsmalloc(i64 noundef %55, i64 noundef 1, ptr noundef @.str)
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.graphdef, ptr %57, i32 0, i32 3
  store ptr %56, ptr %58, align 8, !tbaa !20
  store ptr %56, ptr %16, align 8, !tbaa !5
  br label %65

59:                                               ; preds = %50
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graphdef, ptr %61, i32 0, i32 3
  store ptr %60, ptr %62, align 8, !tbaa !20
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.graphdef, ptr %63, i32 0, i32 8
  store i32 0, ptr %64, align 4, !tbaa !21
  br label %65

65:                                               ; preds = %59, %54
  br label %132

66:                                               ; preds = %9
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %80, %66
  %68 = load i64, ptr %19, align 8, !tbaa !9
  %69 = load i64, ptr %13, align 8, !tbaa !9
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %71, label %83

71:                                               ; preds = %67
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = load ptr, ptr %16, align 8, !tbaa !5
  %74 = load i64, ptr %19, align 8, !tbaa !9
  %75 = getelementptr inbounds i64, ptr %73, i64 %74
  %76 = load i64, ptr %13, align 8, !tbaa !9
  %77 = call i64 @libmetis__idxsum(i64 noundef %72, ptr noundef %75, i64 noundef %76)
  %78 = load i64, ptr %19, align 8, !tbaa !9
  %79 = getelementptr inbounds [16 x i64], ptr %24, i64 0, i64 %78
  store i64 %77, ptr %79, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %71
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %19, align 8, !tbaa !9
  br label %67, !llvm.loop !22

83:                                               ; preds = %67
  %84 = load i64, ptr %13, align 8, !tbaa !9
  %85 = load i64, ptr %12, align 8, !tbaa !9
  %86 = mul nsw i64 %84, %85
  %87 = call ptr @gk_fmalloc(i64 noundef %86, ptr noundef @.str.1)
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.graphdef, ptr %88, i32 0, i32 29
  store ptr %87, ptr %89, align 8, !tbaa !24
  store ptr %87, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %128, %83
  %91 = load i64, ptr %19, align 8, !tbaa !9
  %92 = load i64, ptr %12, align 8, !tbaa !9
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %94, label %131

94:                                               ; preds = %90
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %95

95:                                               ; preds = %124, %94
  %96 = load i64, ptr %20, align 8, !tbaa !9
  %97 = load i64, ptr %13, align 8, !tbaa !9
  %98 = icmp slt i64 %96, %97
  br i1 %98, label %99, label %127

99:                                               ; preds = %95
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i64, ptr %19, align 8, !tbaa !9
  %102 = load i64, ptr %13, align 8, !tbaa !9
  %103 = mul nsw i64 %101, %102
  %104 = load i64, ptr %20, align 8, !tbaa !9
  %105 = add nsw i64 %103, %104
  %106 = getelementptr inbounds i64, ptr %100, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = sitofp i64 %107 to double
  %109 = fmul double 1.000000e+00, %108
  %110 = load i64, ptr %20, align 8, !tbaa !9
  %111 = getelementptr inbounds [16 x i64], ptr %24, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = sitofp i64 %112 to double
  %114 = fmul double 1.000000e+00, %113
  %115 = fdiv double %109, %114
  %116 = fptrunc double %115 to float
  %117 = load ptr, ptr %23, align 8, !tbaa !5
  %118 = load i64, ptr %19, align 8, !tbaa !9
  %119 = load i64, ptr %13, align 8, !tbaa !9
  %120 = mul nsw i64 %118, %119
  %121 = load i64, ptr %20, align 8, !tbaa !9
  %122 = add nsw i64 %120, %121
  %123 = getelementptr inbounds float, ptr %117, i64 %122
  store float %116, ptr %123, align 4, !tbaa !25
  br label %124

124:                                              ; preds = %99
  %125 = load i64, ptr %20, align 8, !tbaa !9
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %20, align 8, !tbaa !9
  br label %95, !llvm.loop !27

127:                                              ; preds = %95
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %19, align 8, !tbaa !9
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %19, align 8, !tbaa !9
  br label %90, !llvm.loop !28

131:                                              ; preds = %90
  br label %132

132:                                              ; preds = %131, %65
  %133 = load i64, ptr %18, align 8, !tbaa !9
  %134 = and i64 %133, 1
  %135 = icmp eq i64 %134, 0
  br i1 %135, label %136, label %143

136:                                              ; preds = %132
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.graphdef, ptr %137, i32 0, i32 1
  %139 = load i64, ptr %138, align 8, !tbaa !14
  %140 = call ptr @libmetis__idxsmalloc(i64 noundef %139, i64 noundef 1, ptr noundef @.str.2)
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.graphdef, ptr %141, i32 0, i32 6
  store ptr %140, ptr %142, align 8, !tbaa !29
  store ptr %140, ptr %17, align 8, !tbaa !5
  br label %149

143:                                              ; preds = %132
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.graphdef, ptr %145, i32 0, i32 6
  store ptr %144, ptr %146, align 8, !tbaa !29
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.graphdef, ptr %147, i32 0, i32 11
  store i32 0, ptr %148, align 8, !tbaa !30
  br label %149

149:                                              ; preds = %143, %136
  %150 = load i64, ptr %12, align 8, !tbaa !9
  %151 = call ptr @libmetis__idxmalloc(i64 noundef %150, ptr noundef @.str.3)
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.graphdef, ptr %152, i32 0, i32 13
  store ptr %151, ptr %153, align 8, !tbaa !31
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %154

154:                                              ; preds = %188, %149
  %155 = load i64, ptr %19, align 8, !tbaa !9
  %156 = load i64, ptr %12, align 8, !tbaa !9
  %157 = icmp slt i64 %155, %156
  br i1 %157, label %158, label %191

158:                                              ; preds = %154
  store i64 0, ptr %22, align 8, !tbaa !9
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  %160 = load i64, ptr %19, align 8, !tbaa !9
  %161 = getelementptr inbounds i64, ptr %159, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !9
  store i64 %162, ptr %20, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %178, %158
  %164 = load i64, ptr %20, align 8, !tbaa !9
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = load i64, ptr %19, align 8, !tbaa !9
  %167 = add nsw i64 %166, 1
  %168 = getelementptr inbounds i64, ptr %165, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !9
  %170 = icmp slt i64 %164, %169
  br i1 %170, label %171, label %181

171:                                              ; preds = %163
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = load i64, ptr %20, align 8, !tbaa !9
  %174 = getelementptr inbounds i64, ptr %172, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = load i64, ptr %22, align 8, !tbaa !9
  %177 = add nsw i64 %176, %175
  store i64 %177, ptr %22, align 8, !tbaa !9
  br label %178

178:                                              ; preds = %171
  %179 = load i64, ptr %20, align 8, !tbaa !9
  %180 = add nsw i64 %179, 1
  store i64 %180, ptr %20, align 8, !tbaa !9
  br label %163, !llvm.loop !32

181:                                              ; preds = %163
  %182 = load i64, ptr %22, align 8, !tbaa !9
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.graphdef, ptr %183, i32 0, i32 13
  %185 = load ptr, ptr %184, align 8, !tbaa !31
  %186 = load i64, ptr %19, align 8, !tbaa !9
  %187 = getelementptr inbounds i64, ptr %185, i64 %186
  store i64 %182, ptr %187, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %181
  %189 = load i64, ptr %19, align 8, !tbaa !9
  %190 = add nsw i64 %189, 1
  store i64 %190, ptr %19, align 8, !tbaa !9
  br label %154, !llvm.loop !33

191:                                              ; preds = %154
  %192 = load i64, ptr %12, align 8, !tbaa !9
  %193 = call ptr @libmetis__idxmalloc(i64 noundef %192, ptr noundef @.str.4)
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.graphdef, ptr %194, i32 0, i32 15
  store ptr %193, ptr %195, align 8, !tbaa !34
  %196 = load i64, ptr %11, align 8, !tbaa !9
  %197 = icmp ne i64 %196, 2
  br i1 %197, label %198, label %221

198:                                              ; preds = %191
  %199 = load i64, ptr %11, align 8, !tbaa !9
  %200 = icmp ne i64 %199, 6
  br i1 %200, label %201, label %221

201:                                              ; preds = %198
  %202 = load i64, ptr %12, align 8, !tbaa !9
  %203 = call ptr @libmetis__idxmalloc(i64 noundef %202, ptr noundef @.str.5)
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.graphdef, ptr %204, i32 0, i32 14
  store ptr %203, ptr %205, align 8, !tbaa !35
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %217, %201
  %207 = load i64, ptr %19, align 8, !tbaa !9
  %208 = load i64, ptr %12, align 8, !tbaa !9
  %209 = icmp slt i64 %207, %208
  br i1 %209, label %210, label %220

210:                                              ; preds = %206
  %211 = load i64, ptr %19, align 8, !tbaa !9
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.graphdef, ptr %212, i32 0, i32 14
  %214 = load ptr, ptr %213, align 8, !tbaa !35
  %215 = load i64, ptr %19, align 8, !tbaa !9
  %216 = getelementptr inbounds i64, ptr %214, i64 %215
  store i64 %211, ptr %216, align 8, !tbaa !9
  br label %217

217:                                              ; preds = %210
  %218 = load i64, ptr %19, align 8, !tbaa !9
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %19, align 8, !tbaa !9
  br label %206, !llvm.loop !36

220:                                              ; preds = %206
  br label %221

221:                                              ; preds = %220, %198, %191
  call void @llvm.lifetime.end.p0(i64 128, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  ret void
}

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

declare void @libmetis__InitGraph(ptr noundef) #2

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

declare i64 @libmetis__idxsum(i64 noundef, ptr noundef, i64 noundef) #2

declare ptr @gk_fmalloc(i64 noundef, ptr noundef) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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, !10, i64 0}
!12 = !{!"graphdef", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 208}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !13, i64 56}
!18 = !{!12, !6, i64 40}
!19 = !{!12, !13, i64 68}
!20 = !{!12, !6, i64 24}
!21 = !{!12, !13, i64 60}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !6, i64 216}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}
!29 = !{!12, !6, i64 48}
!30 = !{!12, !13, i64 72}
!31 = !{!12, !6, i64 88}
!32 = distinct !{!32, !23}
!33 = distinct !{!33, !23}
!34 = !{!12, !6, i64 104}
!35 = !{!12, !6, i64 96}
!36 = distinct !{!36, !23}


; 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 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__SetUpGraph(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i64 noundef %8) local_unnamed_addr #0 {
  %10 = alloca [16 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #4
  tail call void @libmetis__InitGraph(ptr noundef %0) #4
  store i64 %2, ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i64, ptr %4, i64 %2
  %12 = load i64, ptr %11, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %12, ptr %13, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  store i64 %3, ptr %14, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %4, ptr %15, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 0, ptr %16, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %5, ptr %17, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 0, ptr %18, align 4, !tbaa !18
  %19 = icmp eq i64 %3, 1
  br i1 %19, label %21, label %.preheader89

.preheader89:                                     ; preds = %9
  %20 = icmp slt i64 %3, 1
  br i1 %20, label %._crit_edge, label %.lr.ph

21:                                               ; preds = %9
  %22 = and i64 %8, 2
  %23 = icmp eq i64 %22, 0
  br i1 %23, label %24, label %27

24:                                               ; preds = %21
  %25 = tail call ptr @libmetis__idxsmalloc(i64 noundef %2, i64 noundef 1, ptr noundef nonnull @.str) #4
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %25, ptr %26, align 8, !tbaa !19
  br label %.loopexit88

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %6, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 0, ptr %29, align 4, !tbaa !20
  br label %.loopexit88

.lr.ph:                                           ; preds = %.preheader89, %.lr.ph
  %.08490 = phi i64 [ %33, %.lr.ph ], [ 0, %.preheader89 ]
  %30 = getelementptr inbounds i64, ptr %6, i64 %.08490
  %31 = tail call i64 @libmetis__idxsum(i64 noundef %2, ptr noundef %30, i64 noundef %3) #4
  %32 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 %.08490
  store i64 %31, ptr %32, align 8, !tbaa !12
  %33 = add nuw nsw i64 %.08490, 1
  %exitcond.not = icmp eq i64 %33, %3
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %.preheader89
  %34 = mul nsw i64 %3, %2
  %35 = tail call ptr @gk_fmalloc(i64 noundef %34, ptr noundef nonnull @.str.1) #4
  %36 = getelementptr inbounds i8, ptr %0, i64 216
  store ptr %35, ptr %36, align 8, !tbaa !23
  %37 = icmp slt i64 %2, 1
  %brmerge = or i1 %37, %20
  br i1 %brmerge, label %.loopexit88, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %._crit_edge
  %n.vec = and i64 %3, 9223372036854775806
  %cmp.n = icmp eq i64 %n.vec, %3
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge93.us
  %.18594.us = phi i64 [ %59, %._crit_edge93.us ], [ 0, %.preheader.us.preheader ]
  %38 = mul nuw nsw i64 %.18594.us, %3
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader.us
  %index = phi i64 [ 0, %.preheader.us ], [ %index.next, %vector.body ]
  %39 = add nuw nsw i64 %index, %38
  %40 = getelementptr inbounds i64, ptr %6, i64 %39
  %wide.load = load <2 x i64>, ptr %40, align 8, !tbaa !12
  %41 = sitofp <2 x i64> %wide.load to <2 x double>
  %42 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 %index
  %wide.load115 = load <2 x i64>, ptr %42, align 16, !tbaa !12
  %43 = sitofp <2 x i64> %wide.load115 to <2 x double>
  %44 = fdiv <2 x double> %41, %43
  %45 = fptrunc <2 x double> %44 to <2 x float>
  %46 = getelementptr inbounds float, ptr %35, i64 %39
  store <2 x float> %45, ptr %46, align 4, !tbaa !24
  %index.next = add nuw i64 %index, 2
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge93.us, label %scalar.ph

scalar.ph:                                        ; preds = %middle.block, %scalar.ph
  %.08391.us = phi i64 [ %58, %scalar.ph ], [ %n.vec, %middle.block ]
  %48 = add nuw nsw i64 %.08391.us, %38
  %49 = getelementptr inbounds i64, ptr %6, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !12
  %51 = sitofp i64 %50 to double
  %52 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 %.08391.us
  %53 = load i64, ptr %52, align 8, !tbaa !12
  %54 = sitofp i64 %53 to double
  %55 = fdiv double %51, %54
  %56 = fptrunc double %55 to float
  %57 = getelementptr inbounds float, ptr %35, i64 %48
  store float %56, ptr %57, align 4, !tbaa !24
  %58 = add nuw nsw i64 %.08391.us, 1
  %exitcond109.not = icmp eq i64 %58, %3
  br i1 %exitcond109.not, label %._crit_edge93.us, label %scalar.ph, !llvm.loop !29

._crit_edge93.us:                                 ; preds = %scalar.ph, %middle.block
  %59 = add nuw nsw i64 %.18594.us, 1
  %exitcond110.not = icmp eq i64 %59, %2
  br i1 %exitcond110.not, label %.loopexit88, label %.preheader.us, !llvm.loop !30

.loopexit88:                                      ; preds = %._crit_edge93.us, %._crit_edge, %24, %27
  %60 = and i64 %8, 1
  %61 = icmp eq i64 %60, 0
  br i1 %61, label %62, label %65

62:                                               ; preds = %.loopexit88
  %63 = load i64, ptr %13, align 8, !tbaa !13
  %64 = tail call ptr @libmetis__idxsmalloc(i64 noundef %63, i64 noundef 1, ptr noundef nonnull @.str.2) #4
  br label %67

65:                                               ; preds = %.loopexit88
  %66 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 0, ptr %66, align 8, !tbaa !31
  br label %67

67:                                               ; preds = %65, %62
  %.sink = phi ptr [ %64, %62 ], [ %7, %65 ]
  %68 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %.sink, ptr %68, align 8
  %69 = tail call ptr @libmetis__idxmalloc(i64 noundef %2, ptr noundef nonnull @.str.3) #4
  %70 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %69, ptr %70, align 8, !tbaa !32
  %71 = icmp sgt i64 %2, 0
  br i1 %71, label %.lr.ph103, label %._crit_edge104

.lr.ph103:                                        ; preds = %67, %._crit_edge99
  %.2101 = phi i64 [ %74, %._crit_edge99 ], [ 0, %67 ]
  %72 = getelementptr inbounds i64, ptr %4, i64 %.2101
  %73 = load i64, ptr %72, align 8, !tbaa !12
  %74 = add nuw nsw i64 %.2101, 1
  %75 = getelementptr inbounds i64, ptr %4, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !12
  %77 = icmp slt i64 %73, %76
  br i1 %77, label %.lr.ph98.preheader, label %._crit_edge99

.lr.ph98.preheader:                               ; preds = %.lr.ph103
  %78 = sub i64 %76, %73
  %min.iters.check118 = icmp ult i64 %78, 4
  br i1 %min.iters.check118, label %.lr.ph98.preheader143, label %vector.ph119

vector.ph119:                                     ; preds = %.lr.ph98.preheader
  %n.vec121 = and i64 %78, -4
  %ind.end = add i64 %73, %n.vec121
  br label %vector.body123

vector.body123:                                   ; preds = %vector.body123, %vector.ph119
  %index124 = phi i64 [ 0, %vector.ph119 ], [ %index.next128, %vector.body123 ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph119 ], [ %81, %vector.body123 ]
  %vec.phi125 = phi <2 x i64> [ zeroinitializer, %vector.ph119 ], [ %82, %vector.body123 ]
  %offset.idx = add i64 %73, %index124
  %79 = getelementptr inbounds i64, ptr %.sink, i64 %offset.idx
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %wide.load126 = load <2 x i64>, ptr %79, align 8, !tbaa !12
  %wide.load127 = load <2 x i64>, ptr %80, align 8, !tbaa !12
  %81 = add <2 x i64> %wide.load126, %vec.phi
  %82 = add <2 x i64> %wide.load127, %vec.phi125
  %index.next128 = add nuw i64 %index124, 4
  %83 = icmp eq i64 %index.next128, %n.vec121
  br i1 %83, label %middle.block116, label %vector.body123, !llvm.loop !33

middle.block116:                                  ; preds = %vector.body123
  %bin.rdx = add <2 x i64> %82, %81
  %84 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n129 = icmp eq i64 %78, %n.vec121
  br i1 %cmp.n129, label %._crit_edge99, label %.lr.ph98.preheader143

.lr.ph98.preheader143:                            ; preds = %middle.block116, %.lr.ph98.preheader
  %.096.ph = phi i64 [ 0, %.lr.ph98.preheader ], [ %84, %middle.block116 ]
  %.195.ph = phi i64 [ %73, %.lr.ph98.preheader ], [ %ind.end, %middle.block116 ]
  br label %.lr.ph98

.lr.ph98:                                         ; preds = %.lr.ph98.preheader143, %.lr.ph98
  %.096 = phi i64 [ %87, %.lr.ph98 ], [ %.096.ph, %.lr.ph98.preheader143 ]
  %.195 = phi i64 [ %88, %.lr.ph98 ], [ %.195.ph, %.lr.ph98.preheader143 ]
  %85 = getelementptr inbounds i64, ptr %.sink, i64 %.195
  %86 = load i64, ptr %85, align 8, !tbaa !12
  %87 = add nsw i64 %86, %.096
  %88 = add nsw i64 %.195, 1
  %exitcond111.not = icmp eq i64 %88, %76
  br i1 %exitcond111.not, label %._crit_edge99, label %.lr.ph98, !llvm.loop !34

._crit_edge99:                                    ; preds = %.lr.ph98, %middle.block116, %.lr.ph103
  %.0.lcssa = phi i64 [ 0, %.lr.ph103 ], [ %84, %middle.block116 ], [ %87, %.lr.ph98 ]
  %89 = getelementptr inbounds i64, ptr %69, i64 %.2101
  store i64 %.0.lcssa, ptr %89, align 8, !tbaa !12
  %exitcond112.not = icmp eq i64 %74, %2
  br i1 %exitcond112.not, label %._crit_edge104, label %.lr.ph103, !llvm.loop !35

._crit_edge104:                                   ; preds = %._crit_edge99, %67
  %90 = tail call ptr @libmetis__idxmalloc(i64 noundef %2, ptr noundef nonnull @.str.4) #4
  %91 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %90, ptr %91, align 8, !tbaa !36
  %92 = and i64 %1, -5
  %or.cond.not = icmp eq i64 %92, 2
  br i1 %or.cond.not, label %.loopexit, label %93

93:                                               ; preds = %._crit_edge104
  %94 = tail call ptr @libmetis__idxmalloc(i64 noundef %2, ptr noundef nonnull @.str.5) #4
  %95 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %94, ptr %95, align 8, !tbaa !37
  br i1 %71, label %.lr.ph107.preheader, label %.loopexit

.lr.ph107.preheader:                              ; preds = %93
  %min.iters.check132 = icmp ult i64 %2, 4
  br i1 %min.iters.check132, label %.lr.ph107.preheader142, label %vector.ph133

vector.ph133:                                     ; preds = %.lr.ph107.preheader
  %n.vec135 = and i64 %2, 9223372036854775804
  br label %vector.body137

vector.body137:                                   ; preds = %vector.body137, %vector.ph133
  %index138 = phi i64 [ 0, %vector.ph133 ], [ %index.next140, %vector.body137 ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph133 ], [ %vec.ind.next, %vector.body137 ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %96 = getelementptr inbounds i64, ptr %94, i64 %index138
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  store <2 x i64> %vec.ind, ptr %96, align 8, !tbaa !12
  store <2 x i64> %step.add, ptr %97, align 8, !tbaa !12
  %index.next140 = add nuw i64 %index138, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %98 = icmp eq i64 %index.next140, %n.vec135
  br i1 %98, label %middle.block130, label %vector.body137, !llvm.loop !38

middle.block130:                                  ; preds = %vector.body137
  %cmp.n141 = icmp eq i64 %n.vec135, %2
  br i1 %cmp.n141, label %.loopexit, label %.lr.ph107.preheader142

.lr.ph107.preheader142:                           ; preds = %middle.block130, %.lr.ph107.preheader
  %.3105.ph = phi i64 [ 0, %.lr.ph107.preheader ], [ %n.vec135, %middle.block130 ]
  br label %.lr.ph107

.lr.ph107:                                        ; preds = %.lr.ph107.preheader142, %.lr.ph107
  %.3105 = phi i64 [ %100, %.lr.ph107 ], [ %.3105.ph, %.lr.ph107.preheader142 ]
  %99 = getelementptr inbounds i64, ptr %94, i64 %.3105
  store i64 %.3105, ptr %99, align 8, !tbaa !12
  %100 = add nuw nsw i64 %.3105, 1
  %exitcond113.not = icmp eq i64 %100, %2
  br i1 %exitcond113.not, label %.loopexit, label %.lr.ph107, !llvm.loop !39

.loopexit:                                        ; preds = %.lr.ph107, %middle.block130, %93, %._crit_edge104
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #4
  ret void
}

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

declare void @libmetis__InitGraph(ptr noundef) local_unnamed_addr #2

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

declare i64 @libmetis__idxsum(i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @gk_fmalloc(i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!6 = !{!"graphdef", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 120, !10, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !7, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 208}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !11, i64 56}
!17 = !{!6, !10, i64 40}
!18 = !{!6, !11, i64 68}
!19 = !{!6, !10, i64 24}
!20 = !{!6, !11, i64 60}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !10, i64 216}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !8, i64 0}
!26 = distinct !{!26, !22, !27, !28}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !22, !28, !27}
!30 = distinct !{!30, !22}
!31 = !{!6, !11, i64 72}
!32 = !{!6, !10, i64 88}
!33 = distinct !{!33, !22, !27, !28}
!34 = distinct !{!34, !22, !28, !27}
!35 = distinct !{!35, !22}
!36 = !{!6, !10, i64 104}
!37 = !{!6, !10, i64 96}
!38 = distinct !{!38, !22, !27, !28}
!39 = distinct !{!39, !22, !28, !27}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass