; LLVM IR from GGiecold-zz/Cluster_Ensembles :: src/Cluster_Ensembles/Hypergraph_Partitioning/metis-5.1.0/libmetis (coarsen)

; 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.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [140 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__CoarsenGraph = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @libmetis__CoarsenGraph(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.ctrl_t, ptr %8, i32 0, i32 2
  %10 = load i32, ptr %9, align 8, !tbaa !11
  %11 = and i32 %10, 2
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %19

13:                                               ; preds = %2
  %14 = call double @gk_CPUSeconds()
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ctrl_t, ptr %15, i32 0, i32 31
  %17 = load double, ptr %16, align 8, !tbaa !16
  %18 = fsub double %17, %14
  store double %18, ptr %16, align 8, !tbaa !16
  br label %19

19:                                               ; preds = %13, %2
  store i32 1, ptr %6, align 4, !tbaa !9
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %42, %19
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.graph_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !17
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %26, label %45

26:                                               ; preds = %20
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.graph_t, ptr %27, i32 0, i32 7
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = getelementptr inbounds i32, ptr %29, i64 0
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graph_t, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %34, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp ne i32 %31, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %26
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %45

41:                                               ; preds = %26
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !9
  br label %20, !llvm.loop !20

45:                                               ; preds = %40, %20
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %74, %45
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.graph_t, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !22
  %51 = icmp slt i32 %47, %50
  br i1 %51, label %52, label %77

52:                                               ; preds = %46
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graph_t, ptr %53, i32 0, i32 8
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %55, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = sitofp i32 %59 to double
  %61 = fmul double 1.500000e+00, %60
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ctrl_t, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %63, align 8, !tbaa !24
  %65 = sitofp i32 %64 to double
  %66 = fdiv double %61, %65
  %67 = fptosi double %66 to i32
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ctrl_t, ptr %68, i32 0, i32 19
  %70 = load ptr, ptr %69, align 8, !tbaa !25
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  store i32 %67, ptr %73, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %52
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %5, align 4, !tbaa !9
  br label %46, !llvm.loop !26

77:                                               ; preds = %46
  br label %78

78:                                               ; preds = %177, %77
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ctrl_t, ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = and i32 %81, 4
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %87

84:                                               ; preds = %78
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__PrintCGraphStats(ptr noundef %85, ptr noundef %86)
  br label %87

87:                                               ; preds = %84, %78
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.graph_t, ptr %88, i32 0, i32 16
  %90 = load ptr, ptr %89, align 8, !tbaa !27
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %100

92:                                               ; preds = %87
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.graph_t, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !28
  %96 = sext i32 %95 to i64
  %97 = call ptr @libmetis__imalloc(i64 noundef %96, ptr noundef @.str)
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.graph_t, ptr %98, i32 0, i32 16
  store ptr %97, ptr %99, align 8, !tbaa !27
  br label %100

100:                                              ; preds = %92, %87
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ctrl_t, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 4, !tbaa !29
  switch i32 %103, label %125 [
    i32 0, label %104
    i32 1, label %108
  ]

104:                                              ; preds = %100
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = call i32 @libmetis__Match_RM(ptr noundef %105, ptr noundef %106)
  br label %129

108:                                              ; preds = %100
  %109 = load i32, ptr %6, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %116, label %111

111:                                              ; preds = %108
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.graph_t, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !17
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %120

116:                                              ; preds = %111, %108
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = call i32 @libmetis__Match_RM(ptr noundef %117, ptr noundef %118)
  br label %124

120:                                              ; preds = %111
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = call i32 @libmetis__Match_SHEM(ptr noundef %121, ptr noundef %122)
  br label %124

124:                                              ; preds = %120, %116
  br label %129

125:                                              ; preds = %100
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ctrl_t, ptr %126, i32 0, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !29
  call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef @.str.1, i32 noundef %128)
  br label %129

129:                                              ; preds = %125, %124, %104
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.graph_t, ptr %130, i32 0, i32 29
  %132 = load ptr, ptr %131, align 8, !tbaa !30
  store ptr %132, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !9
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %7, align 4, !tbaa !9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = call i32 @libmetis__CheckGraph(ptr noundef %135, i32 noundef 0, i32 noundef 1)
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %146, label %138

138:                                              ; preds = %129
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef 67, ptr noundef @.str.3)
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = call i32 @libmetis__CheckGraph(ptr noundef %140, i32 noundef 0, i32 noundef 1)
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %138
  br label %145

144:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 67, ptr noundef @__PRETTY_FUNCTION__.libmetis__CoarsenGraph) #5
  unreachable

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %129
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.graph_t, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 8, !tbaa !28
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ctrl_t, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %152, align 8, !tbaa !24
  %154 = icmp sgt i32 %150, %153
  br i1 %154, label %155, label %177

155:                                              ; preds = %147
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.graph_t, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !28
  %159 = sitofp i32 %158 to double
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.graph_t, ptr %160, i32 0, i32 30
  %162 = load ptr, ptr %161, align 8, !tbaa !31
  %163 = getelementptr inbounds %struct.graph_t, ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 8, !tbaa !28
  %165 = sitofp i32 %164 to double
  %166 = fmul double 8.500000e-01, %165
  %167 = fcmp olt double %159, %166
  br i1 %167, label %168, label %177

168:                                              ; preds = %155
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.graph_t, ptr %169, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !17
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.graph_t, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !28
  %175 = sdiv i32 %174, 2
  %176 = icmp sgt i32 %171, %175
  br label %177

177:                                              ; preds = %168, %155, %147
  %178 = phi i1 [ false, %155 ], [ false, %147 ], [ %176, %168 ]
  br i1 %178, label %78, label %179, !llvm.loop !32

179:                                              ; preds = %177
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.ctrl_t, ptr %180, i32 0, i32 2
  %182 = load i32, ptr %181, align 8, !tbaa !11
  %183 = and i32 %182, 4
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %188

185:                                              ; preds = %179
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__PrintCGraphStats(ptr noundef %186, ptr noundef %187)
  br label %188

188:                                              ; preds = %185, %179
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ctrl_t, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 8, !tbaa !11
  %192 = and i32 %191, 2
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %200

194:                                              ; preds = %188
  %195 = call double @gk_CPUSeconds()
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.ctrl_t, ptr %196, i32 0, i32 31
  %198 = load double, ptr %197, align 8, !tbaa !16
  %199 = fadd double %198, %195
  store double %199, ptr %197, align 8, !tbaa !16
  br label %200

200:                                              ; preds = %194, %188
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret ptr %201
}

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

declare double @gk_CPUSeconds() #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__Match_RM(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__Match_SHEM(ptr noundef, ptr noundef) #0

declare void @gk_errexit(i32 noundef, ptr noundef, ...) #2

declare i32 @libmetis__CheckGraph(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"ctrl_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !13, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !6, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!13 = !{!"float", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !14, i64 168}
!17 = !{!18, !10, i64 4}
!18 = !{!"graph_t", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!19 = !{!18, !6, i64 48}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !10, i64 8}
!23 = !{!18, !6, i64 56}
!24 = !{!12, !10, i64 24}
!25 = !{!12, !6, i64 80}
!26 = distinct !{!26, !21}
!27 = !{!18, !6, i64 104}
!28 = !{!18, !10, i64 0}
!29 = !{!12, !10, i64 12}
!30 = !{!18, !6, i64 200}
!31 = !{!18, !6, i64 208}
!32 = distinct !{!32, !21}


; 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 [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [140 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__CoarsenGraph = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @libmetis__CoarsenGraph(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = and i32 %4, 2
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %7 = tail call double @gk_CPUSeconds() #4
  %8 = getelementptr inbounds i8, ptr %0, i64 168
  %9 = load double, ptr %8, align 8, !tbaa !14
  %10 = fsub double %9, %7
  store double %10, ptr %8, align 8, !tbaa !14
  br label %11

11:                                               ; preds = %6, %2
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !15
  %14 = icmp sgt i32 %13, 1
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 48
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = load i32, ptr %16, align 4, !tbaa !18
  %wide.trip.count = zext nneg i32 %13 to i64
  br label %18

18:                                               ; preds = %18, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %18 ]
  %19 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !18
  %.not52.not = icmp ne i32 %17, %20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  %or.cond = select i1 %.not52.not, i1 true, i1 %exitcond.not
  br i1 %or.cond, label %._crit_edge, label %18, !llvm.loop !19

._crit_edge:                                      ; preds = %18, %11
  %21 = phi i1 [ false, %11 ], [ %.not52.not, %18 ]
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load i32, ptr %22, align 8, !tbaa !21
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph65, label %.preheader

.lr.ph65:                                         ; preds = %._crit_edge
  %25 = getelementptr inbounds i8, ptr %1, i64 56
  %26 = load ptr, ptr %25, align 8, !tbaa !22
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  %28 = getelementptr inbounds i8, ptr %0, i64 80
  %29 = load ptr, ptr %28, align 8, !tbaa !23
  br label %80

.preheader:                                       ; preds = %80, %._crit_edge
  %30 = getelementptr inbounds i8, ptr %0, i64 12
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load i32, ptr %3, align 8, !tbaa !5
  %33 = and i32 %32, 4
  %.not53.peel = icmp eq i32 %33, 0
  br i1 %.not53.peel, label %35, label %34

34:                                               ; preds = %.preheader
  tail call void @libmetis__PrintCGraphStats(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %35

35:                                               ; preds = %34, %.preheader
  %36 = getelementptr inbounds i8, ptr %1, i64 104
  %37 = load ptr, ptr %36, align 8, !tbaa !24
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = load i32, ptr %1, align 8, !tbaa !25
  %41 = sext i32 %40 to i64
  %42 = tail call ptr @libmetis__imalloc(i64 noundef %41, ptr noundef nonnull @.str) #4
  store ptr %42, ptr %36, align 8, !tbaa !24
  br label %43

43:                                               ; preds = %39, %35
  %44 = load i32, ptr %30, align 4, !tbaa !26
  switch i32 %44, label %55 [
    i32 0, label %53
    i32 1, label %45
  ]

45:                                               ; preds = %43
  br i1 %21, label %46, label %51

46:                                               ; preds = %45
  %47 = load i32, ptr %12, align 4, !tbaa !15
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %51, label %49

49:                                               ; preds = %46
  %50 = tail call i32 @libmetis__Match_SHEM(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %56

51:                                               ; preds = %46, %45
  %52 = tail call i32 @libmetis__Match_RM(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %56

53:                                               ; preds = %43
  %54 = tail call i32 @libmetis__Match_RM(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %56

55:                                               ; preds = %43
  tail call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef nonnull @.str.1, i32 noundef %44) #4
  br label %56

56:                                               ; preds = %55, %53, %51, %49
  %57 = getelementptr inbounds i8, ptr %1, i64 200
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = tail call i32 @libmetis__CheckGraph(ptr noundef %58, i32 noundef 0, i32 noundef 1) #4
  %.not55.peel = icmp eq i32 %59, 0
  br i1 %.not55.peel, label %60, label %63

60:                                               ; preds = %56
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, ptr noundef nonnull @.str.3)
  %62 = tail call i32 @libmetis__CheckGraph(ptr noundef %58, i32 noundef 0, i32 noundef 1) #4
  %.not56.peel = icmp eq i32 %62, 0
  br i1 %.not56.peel, label %.loopexit, label %63

63:                                               ; preds = %60, %56
  %64 = load i32, ptr %58, align 8, !tbaa !25
  %65 = load i32, ptr %31, align 8, !tbaa !28
  %66 = icmp sgt i32 %64, %65
  br i1 %66, label %67, label %.critedge

67:                                               ; preds = %63
  %68 = sitofp i32 %64 to double
  %69 = getelementptr inbounds i8, ptr %58, i64 208
  %70 = load ptr, ptr %69, align 8, !tbaa !29
  %71 = load i32, ptr %70, align 8, !tbaa !25
  %72 = sitofp i32 %71 to double
  %73 = fmul double %72, 8.500000e-01
  %74 = fcmp ogt double %73, %68
  br i1 %74, label %75, label %.critedge

75:                                               ; preds = %67
  %76 = getelementptr inbounds i8, ptr %58, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = sdiv i32 %64, 2
  %79 = icmp sgt i32 %77, %78
  br i1 %79, label %.peel.next, label %.critedge

80:                                               ; preds = %.lr.ph65, %80
  %indvars.iv68 = phi i64 [ 0, %.lr.ph65 ], [ %indvars.iv.next69, %80 ]
  %81 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv68
  %82 = load i32, ptr %81, align 4, !tbaa !18
  %83 = sitofp i32 %82 to double
  %84 = fmul double %83, 1.500000e+00
  %85 = load i32, ptr %27, align 8, !tbaa !28
  %86 = sitofp i32 %85 to double
  %87 = fdiv double %84, %86
  %88 = fptosi double %87 to i32
  %89 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv68
  store i32 %88, ptr %89, align 4, !tbaa !18
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %90 = load i32, ptr %22, align 8, !tbaa !21
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next69, %91
  br i1 %92, label %80, label %.preheader, !llvm.loop !30

.peel.next:                                       ; preds = %75, %136
  %.050 = phi ptr [ %119, %136 ], [ %58, %75 ]
  %93 = load i32, ptr %3, align 8, !tbaa !5
  %94 = and i32 %93, 4
  %.not53 = icmp eq i32 %94, 0
  br i1 %.not53, label %96, label %95

95:                                               ; preds = %.peel.next
  tail call void @libmetis__PrintCGraphStats(ptr noundef nonnull %0, ptr noundef nonnull %.050)
  br label %96

96:                                               ; preds = %95, %.peel.next
  %97 = getelementptr inbounds i8, ptr %.050, i64 104
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %104

100:                                              ; preds = %96
  %101 = load i32, ptr %.050, align 8, !tbaa !25
  %102 = sext i32 %101 to i64
  %103 = tail call ptr @libmetis__imalloc(i64 noundef %102, ptr noundef nonnull @.str) #4
  store ptr %103, ptr %97, align 8, !tbaa !24
  br label %104

104:                                              ; preds = %100, %96
  %105 = load i32, ptr %30, align 4, !tbaa !26
  switch i32 %105, label %116 [
    i32 0, label %106
    i32 1, label %108
  ]

106:                                              ; preds = %104
  %107 = tail call i32 @libmetis__Match_RM(ptr noundef nonnull %0, ptr noundef nonnull %.050)
  br label %117

108:                                              ; preds = %104
  %109 = getelementptr inbounds i8, ptr %.050, i64 4
  %110 = load i32, ptr %109, align 4, !tbaa !15
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %108
  %113 = tail call i32 @libmetis__Match_RM(ptr noundef nonnull %0, ptr noundef nonnull %.050)
  br label %117

114:                                              ; preds = %108
  %115 = tail call i32 @libmetis__Match_SHEM(ptr noundef nonnull %0, ptr noundef nonnull %.050)
  br label %117

116:                                              ; preds = %104
  tail call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef nonnull @.str.1, i32 noundef %105) #4
  br label %117

117:                                              ; preds = %112, %114, %116, %106
  %118 = getelementptr inbounds i8, ptr %.050, i64 200
  %119 = load ptr, ptr %118, align 8, !tbaa !27
  %120 = tail call i32 @libmetis__CheckGraph(ptr noundef %119, i32 noundef 0, i32 noundef 1) #4
  %.not55 = icmp eq i32 %120, 0
  br i1 %.not55, label %121, label %124

121:                                              ; preds = %117
  %122 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, ptr noundef nonnull @.str.3)
  %123 = tail call i32 @libmetis__CheckGraph(ptr noundef %119, i32 noundef 0, i32 noundef 1) #4
  %.not56 = icmp eq i32 %123, 0
  br i1 %.not56, label %.loopexit, label %124

.loopexit:                                        ; preds = %121, %60
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 67, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__CoarsenGraph) #5
  unreachable

124:                                              ; preds = %117, %121
  %125 = load i32, ptr %119, align 8, !tbaa !25
  %126 = load i32, ptr %31, align 8, !tbaa !28
  %127 = icmp sgt i32 %125, %126
  br i1 %127, label %128, label %.critedge

128:                                              ; preds = %124
  %129 = sitofp i32 %125 to double
  %130 = getelementptr inbounds i8, ptr %119, i64 208
  %131 = load ptr, ptr %130, align 8, !tbaa !29
  %132 = load i32, ptr %131, align 8, !tbaa !25
  %133 = sitofp i32 %132 to double
  %134 = fmul double %133, 8.500000e-01
  %135 = fcmp ogt double %134, %129
  br i1 %135, label %136, label %.critedge

136:                                              ; preds = %128
  %137 = getelementptr inbounds i8, ptr %119, i64 4
  %138 = load i32, ptr %137, align 4, !tbaa !15
  %139 = sdiv i32 %125, 2
  %140 = icmp sgt i32 %138, %139
  br i1 %140, label %.peel.next, label %.critedge, !llvm.loop !31

.critedge:                                        ; preds = %128, %124, %136, %75, %67, %63
  %.lcssa66 = phi ptr [ %58, %63 ], [ %58, %67 ], [ %58, %75 ], [ %119, %136 ], [ %119, %124 ], [ %119, %128 ]
  %141 = load i32, ptr %3, align 8, !tbaa !5
  %142 = and i32 %141, 4
  %.not57 = icmp eq i32 %142, 0
  br i1 %.not57, label %144, label %143

143:                                              ; preds = %.critedge
  tail call void @libmetis__PrintCGraphStats(ptr noundef nonnull %0, ptr noundef nonnull %.lcssa66)
  %.pre = load i32, ptr %3, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %143, %.critedge
  %145 = phi i32 [ %.pre, %143 ], [ %141, %.critedge ]
  %146 = and i32 %145, 2
  %.not58 = icmp eq i32 %146, 0
  br i1 %.not58, label %152, label %147

147:                                              ; preds = %144
  %148 = tail call double @gk_CPUSeconds() #4
  %149 = getelementptr inbounds i8, ptr %0, i64 168
  %150 = load double, ptr %149, align 8, !tbaa !14
  %151 = fadd double %148, %150
  store double %151, ptr %149, align 8, !tbaa !14
  br label %152

152:                                              ; preds = %147, %144
  ret ptr %.lcssa66
}

declare double @gk_CPUSeconds() local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__Match_RM(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__Match_SHEM(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare i32 @libmetis__CheckGraph(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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 8}
!6 = !{!"ctrl_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!6, !12, i64 168}
!15 = !{!16, !7, i64 4}
!16 = !{!"graph_t", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208}
!17 = !{!16, !10, i64 48}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!16, !7, i64 8}
!22 = !{!16, !10, i64 56}
!23 = !{!6, !10, i64 80}
!24 = !{!16, !10, i64 104}
!25 = !{!16, !7, i64 0}
!26 = !{!6, !7, i64 12}
!27 = !{!16, !10, i64 200}
!28 = !{!6, !7, i64 24}
!29 = !{!16, !10, i64 208}
!30 = distinct !{!30, !20}
!31 = distinct !{!31, !20, !32}
!32 = !{!"llvm.loop.peeled.count", i32 1}


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