; LLVM IR from siconos/siconos :: externals/lbl/metis4/ometis.ll_ (MlevelNestedDissectionCC)

; 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
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

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

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

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

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

50:                                               ; preds = %5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.graphdef, ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 8, !tbaa !13
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.graphdef, ptr %54, i32 0, i32 15
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %57 = getelementptr inbounds i32, ptr %56, i64 0
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 15
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = getelementptr inbounds i32, ptr %61, i64 1
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.graphdef, ptr %64, i32 0, i32 15
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds i32, ptr %66, i64 2
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %53, i32 noundef %58, i32 noundef %63, i32 noundef %68)
  br label %70

70:                                               ; preds = %50, %5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.graphdef, ptr %71, i32 0, i32 16
  %73 = load i32, ptr %72, align 8, !tbaa !21
  store i32 %73, ptr %14, align 4, !tbaa !11
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.graphdef, ptr %74, i32 0, i32 18
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  store ptr %76, ptr %21, align 8, !tbaa !5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.graphdef, ptr %77, i32 0, i32 10
  %79 = load ptr, ptr %78, align 8, !tbaa !23
  store ptr %79, ptr %20, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %99, %70
  %81 = load i32, ptr %11, align 4, !tbaa !11
  %82 = load i32, ptr %14, align 4, !tbaa !11
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %84, label %102

84:                                               ; preds = %80
  %85 = load i32, ptr %10, align 4, !tbaa !11
  %86 = add nsw i32 %85, -1
  store i32 %86, ptr %10, align 4, !tbaa !11
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load ptr, ptr %21, align 8, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %89, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !11
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %88, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %87, i64 %97
  store i32 %86, ptr %98, align 4, !tbaa !11
  br label %99

99:                                               ; preds = %84
  %100 = load i32, ptr %11, align 4, !tbaa !11
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !11
  br label %80, !llvm.loop !24

102:                                              ; preds = %80
  %103 = load i32, ptr %13, align 4, !tbaa !11
  %104 = call ptr @__idxmalloc(i32 noundef %103, ptr noundef @.str.4)
  store ptr %104, ptr %22, align 8, !tbaa !5
  %105 = load i32, ptr %13, align 4, !tbaa !11
  %106 = call ptr @__idxmalloc(i32 noundef %105, ptr noundef @.str.5)
  store ptr %106, ptr %23, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load ptr, ptr %22, align 8, !tbaa !5
  %110 = load ptr, ptr %23, align 8, !tbaa !5
  %111 = call i32 @__FindComponents(ptr noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef %110)
  store i32 %111, ptr %18, align 4, !tbaa !11
  %112 = load i32, ptr %18, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = mul i64 %113, 216
  %115 = trunc i64 %114 to i32
  %116 = call ptr @__GKmalloc(i32 noundef %115, ptr noundef @.str.6)
  store ptr %116, ptr %24, align 8, !tbaa !5
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = load ptr, ptr %24, align 8, !tbaa !5
  %120 = load i32, ptr %18, align 4, !tbaa !11
  %121 = load ptr, ptr %22, align 8, !tbaa !5
  %122 = load ptr, ptr %23, align 8, !tbaa !5
  %123 = call i32 @__SplitGraphOrderCC(ptr noundef %117, ptr noundef %118, ptr noundef %119, i32 noundef %120, ptr noundef %121, ptr noundef %122)
  store i32 %123, ptr %17, align 4, !tbaa !11
  call void (ptr, ...) @GKfree(ptr noundef %22, ptr noundef %23, ptr noundef null)
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.graphdef, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.graphdef, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.graphdef, ptr %128, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %125, ptr noundef %127, ptr noundef %129, ptr noundef null)
  store i32 0, ptr %11, align 4, !tbaa !11
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %130

130:                                              ; preds = %182, %102
  %131 = load i32, ptr %11, align 4, !tbaa !11
  %132 = load i32, ptr %17, align 4, !tbaa !11
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %134, label %185

134:                                              ; preds = %130
  %135 = load ptr, ptr %24, align 8, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !11
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.graphdef, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.graphdef, ptr %138, i32 0, i32 8
  %140 = load ptr, ptr %139, align 8, !tbaa !26
  %141 = icmp eq ptr %140, null
  br i1 %141, label %142, label %162

142:                                              ; preds = %134
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = load i32, ptr %11, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.graphdef, ptr %144, i64 %146
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = load i32, ptr %10, align 4, !tbaa !11
  %150 = load i32, ptr %19, align 4, !tbaa !11
  %151 = sub nsw i32 %149, %150
  call void @__MMDOrder(ptr noundef %143, ptr noundef %147, ptr noundef %148, i32 noundef %151)
  %152 = load ptr, ptr %24, align 8, !tbaa !5
  %153 = load i32, ptr %11, align 4, !tbaa !11
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %struct.graphdef, ptr %152, i64 %154
  %156 = getelementptr inbounds %struct.graphdef, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %24, align 8, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !11
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %struct.graphdef, ptr %157, i64 %159
  %161 = getelementptr inbounds %struct.graphdef, ptr %160, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %156, ptr noundef %161, ptr noundef null)
  br label %173

162:                                              ; preds = %134
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = load ptr, ptr %24, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds %struct.graphdef, ptr %164, i64 %166
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = load float, ptr %9, align 4, !tbaa !9
  %170 = load i32, ptr %10, align 4, !tbaa !11
  %171 = load i32, ptr %19, align 4, !tbaa !11
  %172 = sub nsw i32 %170, %171
  call void @__MlevelNestedDissectionCC(ptr noundef %163, ptr noundef %167, ptr noundef %168, float noundef %169, i32 noundef %172)
  br label %173

173:                                              ; preds = %162, %142
  %174 = load ptr, ptr %24, align 8, !tbaa !5
  %175 = load i32, ptr %11, align 4, !tbaa !11
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.graphdef, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.graphdef, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 8, !tbaa !13
  %180 = load i32, ptr %19, align 4, !tbaa !11
  %181 = add nsw i32 %180, %179
  store i32 %181, ptr %19, align 4, !tbaa !11
  br label %182

182:                                              ; preds = %173
  %183 = load i32, ptr %11, align 4, !tbaa !11
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %11, align 4, !tbaa !11
  br label %130, !llvm.loop !27

185:                                              ; preds = %130
  %186 = load ptr, ptr %24, align 8, !tbaa !5
  call void @free(ptr noundef %186) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

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 "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, !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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"graphdef", !6, i64 0, !6, i64 8, !12, i64 16, !12, 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, !12, i64 88, !12, i64 92, !6, i64 96, !6, i64 104, !12, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !12, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!15 = !{!14, !6, i64 32}
!16 = !{!17, !12, i64 4}
!17 = !{!"controldef", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !10, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, 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, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !12, i64 32, !6, i64 40, !6, i64 48}
!19 = !{!"double", !7, i64 0}
!20 = !{!14, !6, i64 104}
!21 = !{!14, !12, i64 112}
!22 = !{!14, !6, i64 128}
!23 = !{!14, !6, i64 72}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !6, i64 56}
!27 = distinct !{!27, !25}


; 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
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

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

declare ptr @__idxmalloc(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 @__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = alloca [2 x i32], align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 32
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = tail call i32 @__idxsum(i32 noundef %10, ptr noundef %12) #5
  %14 = sdiv i32 %13, 2
  store i32 %14, ptr %6, align 4, !tbaa !12
  %15 = sub nsw i32 %13, %14
  %16 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 %15, ptr %16, align 4, !tbaa !12
  call void @__MlevelNodeBisectionMultiple(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, float noundef %3)
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !13
  %19 = and i32 %18, 128
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %30, label %20

20:                                               ; preds = %5
  %21 = load i32, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %1, i64 104
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = load i32, ptr %23, align 4, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %23, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %23, i64 8
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %21, i32 noundef %24, i32 noundef %26, i32 noundef %28)
  br label %30

30:                                               ; preds = %20, %5
  %31 = getelementptr inbounds i8, ptr %1, i64 112
  %32 = load i32, ptr %31, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %1, i64 128
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %1, i64 72
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = icmp sgt i32 %32, 0
  br i1 %37, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %30
  %wide.trip.count = zext nneg i32 %32 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %38 = icmp ult i32 %32, 4
  br i1 %38, 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 ]
  %.064 = phi i32 [ %4, %.lr.ph.preheader.new ], [ %63, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %39 = add nsw i32 %.064, -1
  %40 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %36, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !12
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %2, i64 %45
  store i32 %39, ptr %46, align 4, !tbaa !12
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %47 = add nsw i32 %.064, -2
  %48 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next
  %49 = load i32, ptr %48, align 4, !tbaa !12
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %36, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !12
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %2, i64 %53
  store i32 %47, ptr %54, align 4, !tbaa !12
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %55 = add nsw i32 %.064, -3
  %56 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next.1
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %36, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !12
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %2, i64 %61
  store i32 %55, ptr %62, align 4, !tbaa !12
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %63 = add nsw i32 %.064, -4
  %64 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next.2
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %36, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !12
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %2, i64 %69
  store i32 %63, ptr %70, 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 ], [ %63, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.064.unr = phi i32 [ %4, %.lr.ph.preheader ], [ %63, %.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 ]
  %.064.epil = phi i32 [ %71, %.lr.ph.epil ], [ %.064.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %71 = add nsw i32 %.064.epil, -1
  %72 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.epil
  %73 = load i32, ptr %72, align 4, !tbaa !12
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %36, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !12
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %2, i64 %77
  store i32 %71, ptr %78, 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, %30
  %.0.lcssa = phi i32 [ %4, %30 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %71, %.lr.ph.epil ]
  %79 = call ptr @__idxmalloc(i32 noundef %10, ptr noundef nonnull @.str.4) #5
  store ptr %79, ptr %7, align 8, !tbaa !26
  %80 = call ptr @__idxmalloc(i32 noundef %10, ptr noundef nonnull @.str.5) #5
  store ptr %80, ptr %8, align 8, !tbaa !26
  %81 = call i32 @__FindComponents(ptr noundef %0, ptr noundef %1, ptr noundef %79, ptr noundef %80) #5
  %82 = mul i32 %81, 216
  %83 = call ptr @__GKmalloc(i32 noundef %82, ptr noundef nonnull @.str.6) #5
  %84 = call i32 @__SplitGraphOrderCC(ptr noundef %0, ptr noundef %1, ptr noundef %83, i32 noundef %81, ptr noundef %79, ptr noundef %80)
  call void (ptr, ...) @GKfree(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef null) #5
  %85 = getelementptr inbounds i8, ptr %1, i64 8
  call void (ptr, ...) @GKfree(ptr noundef %1, ptr noundef nonnull %85, ptr noundef nonnull %35, ptr noundef null) #5
  %86 = icmp sgt i32 %84, 0
  br i1 %86, label %.lr.ph68.preheader, label %._crit_edge69

.lr.ph68.preheader:                               ; preds = %._crit_edge
  %wide.trip.count74 = zext nneg i32 %84 to i64
  br label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68.preheader, %95
  %indvars.iv71 = phi i64 [ 0, %.lr.ph68.preheader ], [ %indvars.iv.next72, %95 ]
  %.06265 = phi i32 [ 0, %.lr.ph68.preheader ], [ %98, %95 ]
  %87 = getelementptr inbounds %struct.graphdef, ptr %83, i64 %indvars.iv71
  %88 = getelementptr inbounds i8, ptr %87, i64 56
  %89 = load ptr, ptr %88, align 8, !tbaa !27
  %90 = icmp eq ptr %89, null
  %91 = sub nsw i32 %.0.lcssa, %.06265
  br i1 %90, label %92, label %94

92:                                               ; preds = %.lr.ph68
  call void @__MMDOrder(ptr noundef %0, ptr noundef nonnull %87, ptr noundef %2, i32 noundef %91)
  %93 = getelementptr inbounds i8, ptr %87, i64 72
  call void (ptr, ...) @GKfree(ptr noundef nonnull %87, ptr noundef nonnull %93, ptr noundef null) #5
  br label %95

94:                                               ; preds = %.lr.ph68
  call void @__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef nonnull %87, ptr noundef %2, float noundef %3, i32 noundef %91)
  br label %95

95:                                               ; preds = %94, %92
  %96 = getelementptr inbounds i8, ptr %87, i64 16
  %97 = load i32, ptr %96, align 8, !tbaa !5
  %98 = add nsw i32 %97, %.06265
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge69, label %.lr.ph68, !llvm.loop !28

._crit_edge69:                                    ; preds = %95, %._crit_edge
  call void @free(ptr noundef %83) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { 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"}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !7, i64 56}
!28 = distinct !{!28, !23}


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