; LLVM IR from siconos/siconos :: externals/lbl/metis4/parmetis.ll_ (MlevelNestedDissectionP)

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

@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

declare i32 @__idxsum(i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @__MlevelNestedDissectionP(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [2 x i32], align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.graphdef, align 8
  %24 = alloca %struct.graphdef, align 8
  %25 = alloca float, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, 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 216, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 216, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.graphdef, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !11
  store i32 %29, ptr %17, align 4, !tbaa !9
  %30 = load i32, ptr %17, align 4, !tbaa !9
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %39

32:                                               ; preds = %7
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.graphdef, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graphdef, ptr %37, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %34, ptr noundef %36, ptr noundef %38, ptr noundef null)
  store i32 1, ptr %26, align 4
  br label %239

39:                                               ; preds = %7
  %40 = load i32, ptr %17, align 4, !tbaa !9
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 5
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = call i32 @__idxsum(i32 noundef %40, ptr noundef %43)
  store i32 %44, ptr %19, align 4, !tbaa !9
  %45 = load i32, ptr %19, align 4, !tbaa !9
  %46 = sdiv i32 %45, 2
  %47 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 0
  store i32 %46, ptr %47, align 4, !tbaa !9
  %48 = load i32, ptr %19, align 4, !tbaa !9
  %49 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 0
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = sub nsw i32 %48, %50
  %52 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 1
  store i32 %51, ptr %52, align 4, !tbaa !9
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = sub nsw i32 %54, 1
  %56 = icmp sge i32 %53, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %39
  store float 0x3FF19999A0000000, ptr %25, align 4, !tbaa !14
  br label %59

58:                                               ; preds = %39
  store float 0x3FF0CCCCC0000000, ptr %25, align 4, !tbaa !14
  br label %59

59:                                               ; preds = %58, %57
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 0
  %63 = load float, ptr %25, align 4, !tbaa !14
  call void @__MlevelNodeBisectionMultiple(ptr noundef %60, ptr noundef %61, ptr noundef %62, float noundef %63)
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.controldef, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !16
  %67 = and i32 %66, 128
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %89

69:                                               ; preds = %59
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.graphdef, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.graphdef, ptr %73, i32 0, i32 15
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = getelementptr inbounds i32, ptr %75, i64 0
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.graphdef, ptr %78, i32 0, i32 15
  %80 = load ptr, ptr %79, align 8, !tbaa !20
  %81 = getelementptr inbounds i32, ptr %80, i64 1
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.graphdef, ptr %83, i32 0, i32 15
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = getelementptr inbounds i32, ptr %85, i64 2
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %72, i32 noundef %77, i32 noundef %82, i32 noundef %87)
  br label %89

89:                                               ; preds = %69, %59
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = sub nsw i32 %91, 1
  %93 = icmp slt i32 %90, %92
  br i1 %93, label %94, label %138

94:                                               ; preds = %89
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.graphdef, ptr %95, i32 0, i32 15
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  %98 = getelementptr inbounds i32, ptr %97, i64 2
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = mul nsw i32 2, %101
  %103 = sub nsw i32 %102, 2
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = sub nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %100, i64 %106
  store i32 %99, ptr %107, align 4, !tbaa !9
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.graphdef, ptr %108, i32 0, i32 15
  %110 = load ptr, ptr %109, align 8, !tbaa !20
  %111 = getelementptr inbounds i32, ptr %110, i64 1
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = mul nsw i32 2, %114
  %116 = sub nsw i32 %115, 2
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = mul nsw i32 2, %117
  %119 = add nsw i32 %118, 1
  %120 = sub nsw i32 %116, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %113, i64 %121
  store i32 %112, ptr %122, align 4, !tbaa !9
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.graphdef, ptr %123, i32 0, i32 15
  %125 = load ptr, ptr %124, align 8, !tbaa !20
  %126 = getelementptr inbounds i32, ptr %125, i64 0
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = mul nsw i32 2, %129
  %131 = sub nsw i32 %130, 2
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = mul nsw i32 2, %132
  %134 = add nsw i32 %133, 2
  %135 = sub nsw i32 %131, %134
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr %128, i64 %136
  store i32 %127, ptr %137, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %94, %89
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.graphdef, ptr %139, i32 0, i32 16
  %141 = load i32, ptr %140, align 8, !tbaa !21
  store i32 %141, ptr %18, align 4, !tbaa !9
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.graphdef, ptr %142, i32 0, i32 18
  %144 = load ptr, ptr %143, align 8, !tbaa !22
  store ptr %144, ptr %22, align 8, !tbaa !5
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.graphdef, ptr %145, i32 0, i32 10
  %147 = load ptr, ptr %146, align 8, !tbaa !23
  store ptr %147, ptr %21, align 8, !tbaa !5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %167, %138
  %149 = load i32, ptr %15, align 4, !tbaa !9
  %150 = load i32, ptr %18, align 4, !tbaa !9
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %152, label %170

152:                                              ; preds = %148
  %153 = load i32, ptr %11, align 4, !tbaa !9
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %11, align 4, !tbaa !9
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = load ptr, ptr %21, align 8, !tbaa !5
  %157 = load ptr, ptr %22, align 8, !tbaa !5
  %158 = load i32, ptr %15, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i32, ptr %157, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %156, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %155, i64 %165
  store i32 %154, ptr %166, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %152
  %168 = load i32, ptr %15, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %15, align 4, !tbaa !9
  br label %148, !llvm.loop !24

170:                                              ; preds = %148
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  call void @__SplitGraphOrder(ptr noundef %171, ptr noundef %172, ptr noundef %23, ptr noundef %24)
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.graphdef, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.graphdef, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.graphdef, ptr %177, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %174, ptr noundef %176, ptr noundef %178, ptr noundef null)
  %179 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 2
  %180 = load i32, ptr %179, align 8, !tbaa !11
  %181 = icmp sgt i32 %180, 200
  br i1 %181, label %189, label %182

182:                                              ; preds = %170
  %183 = load i32, ptr %13, align 4, !tbaa !9
  %184 = mul nsw i32 2, %183
  %185 = add nsw i32 %184, 1
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = sub nsw i32 %186, 1
  %188 = icmp slt i32 %185, %187
  br i1 %188, label %189, label %198

189:                                              ; preds = %182, %170
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = load i32, ptr %11, align 4, !tbaa !9
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = load i32, ptr %13, align 4, !tbaa !9
  %195 = mul nsw i32 2, %194
  %196 = add nsw i32 %195, 1
  %197 = load ptr, ptr %14, align 8, !tbaa !5
  call void @__MlevelNestedDissectionP(ptr noundef %190, ptr noundef %24, ptr noundef %191, i32 noundef %192, i32 noundef %193, i32 noundef %196, ptr noundef %197)
  br label %205

198:                                              ; preds = %182
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = load i32, ptr %11, align 4, !tbaa !9
  call void @__MMDOrder(ptr noundef %199, ptr noundef %24, ptr noundef %200, i32 noundef %201)
  %202 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 0
  %203 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 1
  %204 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %202, ptr noundef %203, ptr noundef %204, ptr noundef null)
  br label %205

205:                                              ; preds = %198, %189
  %206 = getelementptr inbounds %struct.graphdef, ptr %23, i32 0, i32 2
  %207 = load i32, ptr %206, align 8, !tbaa !11
  %208 = icmp sgt i32 %207, 200
  br i1 %208, label %216, label %209

209:                                              ; preds = %205
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = mul nsw i32 2, %210
  %212 = add nsw i32 %211, 2
  %213 = load i32, ptr %12, align 4, !tbaa !9
  %214 = sub nsw i32 %213, 1
  %215 = icmp slt i32 %212, %214
  br i1 %215, label %216, label %228

216:                                              ; preds = %209, %205
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = load i32, ptr %11, align 4, !tbaa !9
  %220 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 2
  %221 = load i32, ptr %220, align 8, !tbaa !11
  %222 = sub nsw i32 %219, %221
  %223 = load i32, ptr %12, align 4, !tbaa !9
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = mul nsw i32 2, %224
  %226 = add nsw i32 %225, 2
  %227 = load ptr, ptr %14, align 8, !tbaa !5
  call void @__MlevelNestedDissectionP(ptr noundef %217, ptr noundef %23, ptr noundef %218, i32 noundef %222, i32 noundef %223, i32 noundef %226, ptr noundef %227)
  br label %238

228:                                              ; preds = %209
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = load ptr, ptr %10, align 8, !tbaa !5
  %231 = load i32, ptr %11, align 4, !tbaa !9
  %232 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 2
  %233 = load i32, ptr %232, align 8, !tbaa !11
  %234 = sub nsw i32 %231, %233
  call void @__MMDOrder(ptr noundef %229, ptr noundef %23, ptr noundef %230, i32 noundef %234)
  %235 = getelementptr inbounds %struct.graphdef, ptr %23, i32 0, i32 0
  %236 = getelementptr inbounds %struct.graphdef, ptr %23, i32 0, i32 1
  %237 = getelementptr inbounds %struct.graphdef, ptr %23, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %235, ptr noundef %236, ptr noundef %237, ptr noundef null)
  br label %238

238:                                              ; preds = %228, %216
  store i32 0, ptr %26, align 4
  br label %239

239:                                              ; preds = %238, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 216, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 216, 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 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %240 = load i32, ptr %26, align 4
  switch i32 %240, label %242 [
    i32 0, label %241
    i32 1, label %241
  ]

241:                                              ; preds = %239, %239
  ret void

242:                                              ; preds = %239
  unreachable
}

declare void @__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef, ptr noundef, float noundef) #1

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 16}
!12 = !{!"graphdef", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!13 = !{!12, !6, i64 32}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !10, i64 4}
!17 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !15, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !18, i64 48, !19, i64 104, !19, i64 112, !19, i64 120, !19, i64 128, !19, i64 136, !19, i64 144, !19, i64 152, !19, i64 160, !19, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !19, i64 200, !19, i64 208, !19, i64 216, !19, i64 224}
!18 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48}
!19 = !{!"double", !7, i64 0}
!20 = !{!12, !6, i64 104}
!21 = !{!12, !10, i64 112}
!22 = !{!12, !6, i64 128}
!23 = !{!12, !6, i64 72}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; 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.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @__MlevelNestedDissectionP(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca [2 x i32], align 4
  %9 = alloca %struct.graphdef, align 8
  %10 = alloca %struct.graphdef, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %10) #4
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %17

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = getelementptr inbounds i8, ptr %1, i64 72
  tail call void (ptr, ...) @GKfree(ptr noundef nonnull %1, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef null) #4
  br label %127

17:                                               ; preds = %7
  %18 = getelementptr inbounds i8, ptr %1, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = tail call i32 @__idxsum(i32 noundef %12, ptr noundef %19) #4
  %21 = sdiv i32 %20, 2
  store i32 %21, ptr %8, align 4, !tbaa !12
  %22 = sub nsw i32 %20, %21
  %23 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %22, ptr %23, align 4, !tbaa !12
  %24 = add nsw i32 %4, -1
  %.not = icmp sgt i32 %24, %5
  %. = select i1 %.not, float 0x3FF0CCCCC0000000, float 0x3FF19999A0000000
  call void @__MlevelNodeBisectionMultiple(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %8, float noundef %.) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !13
  %27 = and i32 %26, 128
  %.not74 = icmp eq i32 %27, 0
  br i1 %.not74, label %38, label %28

28:                                               ; preds = %17
  %29 = load i32, ptr %11, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %1, i64 104
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %31, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %31, i64 8
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %29, i32 noundef %32, i32 noundef %34, i32 noundef %36)
  br label %38

38:                                               ; preds = %28, %17
  br i1 %.not, label %39, label %60

39:                                               ; preds = %38
  %40 = getelementptr inbounds i8, ptr %1, i64 104
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  %43 = load i32, ptr %42, align 4, !tbaa !12
  %44 = shl nsw i32 %4, 1
  %45 = add nsw i32 %44, -2
  %46 = sub nsw i32 %45, %5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %6, i64 %47
  store i32 %43, ptr %48, align 4, !tbaa !12
  %49 = getelementptr inbounds i8, ptr %41, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !12
  %51 = shl nsw i32 %5, 1
  %.neg = xor i32 %51, -1
  %52 = add i32 %45, %.neg
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %6, i64 %53
  store i32 %50, ptr %54, align 4, !tbaa !12
  %55 = load i32, ptr %41, align 4, !tbaa !12
  %56 = sub i32 %44, %51
  %57 = add i32 %56, -4
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %6, i64 %58
  store i32 %55, ptr %59, align 4, !tbaa !12
  br label %60

60:                                               ; preds = %39, %38
  %61 = getelementptr inbounds i8, ptr %1, i64 112
  %62 = load i32, ptr %61, align 8, !tbaa !19
  %63 = getelementptr inbounds i8, ptr %1, i64 128
  %64 = load ptr, ptr %63, align 8, !tbaa !20
  %65 = getelementptr inbounds i8, ptr %1, i64 72
  %66 = load ptr, ptr %65, align 8, !tbaa !21
  %67 = icmp sgt i32 %62, 0
  br i1 %67, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %60
  %wide.trip.count = zext nneg i32 %62 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %68 = icmp ult i32 %62, 4
  br i1 %68, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.07078 = phi i32 [ %3, %.lr.ph.preheader.new ], [ %93, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %69 = add nsw i32 %.07078, -1
  %70 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv
  %71 = load i32, ptr %70, align 4, !tbaa !12
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %66, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !12
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %2, i64 %75
  store i32 %69, ptr %76, align 4, !tbaa !12
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %77 = add nsw i32 %.07078, -2
  %78 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv.next
  %79 = load i32, ptr %78, align 4, !tbaa !12
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %66, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !12
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %2, i64 %83
  store i32 %77, ptr %84, align 4, !tbaa !12
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %85 = add nsw i32 %.07078, -3
  %86 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv.next.1
  %87 = load i32, ptr %86, align 4, !tbaa !12
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %66, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !12
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %2, i64 %91
  store i32 %85, ptr %92, align 4, !tbaa !12
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %93 = add nsw i32 %.07078, -4
  %94 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv.next.2
  %95 = load i32, ptr %94, align 4, !tbaa !12
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %66, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !12
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %2, i64 %99
  store i32 %93, ptr %100, align 4, !tbaa !12
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !22

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %93, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.07078.unr = phi i32 [ %3, %.lr.ph.preheader ], [ %93, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.07078.epil = phi i32 [ %101, %.lr.ph.epil ], [ %.07078.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %101 = add nsw i32 %.07078.epil, -1
  %102 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv.epil
  %103 = load i32, ptr %102, align 4, !tbaa !12
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %66, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !12
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %2, i64 %107
  store i32 %101, ptr %108, align 4, !tbaa !12
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !24

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %60
  %.070.lcssa = phi i32 [ %3, %60 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %101, %.lr.ph.epil ]
  call void @__SplitGraphOrder(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %9, ptr noundef nonnull %10) #4
  %109 = getelementptr inbounds i8, ptr %1, i64 8
  call void (ptr, ...) @GKfree(ptr noundef %1, ptr noundef nonnull %109, ptr noundef nonnull %65, ptr noundef null) #4
  %110 = getelementptr inbounds i8, ptr %10, i64 16
  %111 = load i32, ptr %110, align 8, !tbaa !5
  %112 = icmp sgt i32 %111, 200
  %.pre = shl nsw i32 %5, 1
  %.pre81 = or disjoint i32 %.pre, 1
  %113 = icmp slt i32 %.pre81, %24
  %or.cond = select i1 %112, i1 true, i1 %113
  br i1 %or.cond, label %._crit_edge._crit_edge, label %114

._crit_edge._crit_edge:                           ; preds = %._crit_edge
  call void @__MlevelNestedDissectionP(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %2, i32 noundef %.070.lcssa, i32 noundef %4, i32 noundef %.pre81, ptr noundef %6)
  br label %117

114:                                              ; preds = %._crit_edge
  call void @__MMDOrder(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %2, i32 noundef %.070.lcssa) #4
  %115 = getelementptr inbounds i8, ptr %10, i64 8
  %116 = getelementptr inbounds i8, ptr %10, i64 72
  call void (ptr, ...) @GKfree(ptr noundef nonnull %10, ptr noundef nonnull %115, ptr noundef nonnull %116, ptr noundef null) #4
  br label %117

117:                                              ; preds = %114, %._crit_edge._crit_edge
  %118 = getelementptr inbounds i8, ptr %9, i64 16
  %119 = load i32, ptr %118, align 8, !tbaa !5
  %120 = icmp sgt i32 %119, 200
  %.pre83 = shl nsw i32 %5, 1
  %.pre85 = add nsw i32 %.pre83, 2
  %121 = icmp slt i32 %.pre85, %24
  %or.cond87 = select i1 %120, i1 true, i1 %121
  %122 = load i32, ptr %110, align 8, !tbaa !5
  %123 = sub nsw i32 %.070.lcssa, %122
  br i1 %or.cond87, label %._crit_edge80, label %124

._crit_edge80:                                    ; preds = %117
  call void @__MlevelNestedDissectionP(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2, i32 noundef %123, i32 noundef %4, i32 noundef %.pre85, ptr noundef %6)
  br label %127

124:                                              ; preds = %117
  call void @__MMDOrder(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2, i32 noundef %123) #4
  %125 = getelementptr inbounds i8, ptr %9, i64 8
  %126 = getelementptr inbounds i8, ptr %9, i64 72
  call void (ptr, ...) @GKfree(ptr noundef nonnull %9, ptr noundef nonnull %125, ptr noundef nonnull %126, ptr noundef null) #4
  br label %127

127:                                              ; preds = %._crit_edge80, %124, %14
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  ret void
}

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 16}
!6 = !{!"graphdef", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !10, i64 4}
!14 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !15, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !16, i64 48, !17, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !17, i64 224}
!15 = !{!"float", !8, i64 0}
!16 = !{!"workspacedef", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !7, i64 48}
!17 = !{!"double", !8, i64 0}
!18 = !{!6, !7, i64 104}
!19 = !{!6, !10, i64 112}
!20 = !{!6, !7, i64 128}
!21 = !{!6, !7, i64 72}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}


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