; LLVM IR from siconos/siconos :: externals/lbl/metis4/pmetis.ll_ (MlevelRecursiveBisection)

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

@.str.2 = external hidden unnamed_addr constant [105 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

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

33:                                               ; preds = %7
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 0, ptr %8, align 4
  store i32 1, ptr %27, align 4
  br label %189

35:                                               ; preds = %7
  %36 = load i32, ptr %18, align 4, !tbaa !9
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graphdef, ptr %37, i32 0, i32 5
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = call i32 @__idxsum(i32 noundef %36, ptr noundef %39)
  store i32 %40, ptr %20, align 4, !tbaa !9
  %41 = load i32, ptr %20, align 4, !tbaa !9
  %42 = sitofp i32 %41 to float
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = sdiv i32 %43, 2
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = call float @__ssum(i32 noundef %44, ptr noundef %45)
  %47 = fmul float %42, %46
  %48 = fptosi float %47 to i32
  %49 = getelementptr inbounds [2 x i32], ptr %21, i64 0, i64 0
  store i32 %48, ptr %49, align 4, !tbaa !9
  %50 = load i32, ptr %20, align 4, !tbaa !9
  %51 = getelementptr inbounds [2 x i32], ptr %21, i64 0, i64 0
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = sub nsw i32 %50, %52
  %54 = getelementptr inbounds [2 x i32], ptr %21, i64 0, i64 1
  store i32 %53, ptr %54, align 4, !tbaa !9
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds [2 x i32], ptr %21, i64 0, i64 0
  %58 = load float, ptr %14, align 4, !tbaa !11
  call void @__MlevelEdgeBisection(ptr noundef %55, ptr noundef %56, ptr noundef %57, float noundef %58)
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 12
  %61 = load i32, ptr %60, align 8, !tbaa !16
  store i32 %61, ptr %19, align 4, !tbaa !9
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graphdef, ptr %62, i32 0, i32 10
  %64 = load ptr, ptr %63, align 8, !tbaa !17
  store ptr %64, ptr %22, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graphdef, ptr %65, i32 0, i32 14
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  store ptr %67, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %88, %35
  %69 = load i32, ptr %16, align 4, !tbaa !9
  %70 = load i32, ptr %18, align 4, !tbaa !9
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %91

72:                                               ; preds = %68
  %73 = load ptr, ptr %23, align 8, !tbaa !5
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = add nsw i32 %77, %78
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr %22, align 8, !tbaa !5
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %80, i64 %86
  store i32 %79, ptr %87, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %72
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %16, align 4, !tbaa !9
  br label %68, !llvm.loop !19

91:                                               ; preds = %68
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = icmp sgt i32 %92, 2
  br i1 %93, label %94, label %97

94:                                               ; preds = %91
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  call void @__SplitGraphPart(ptr noundef %95, ptr noundef %96, ptr noundef %24, ptr noundef %25)
  br label %97

97:                                               ; preds = %94, %91
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.graphdef, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.graphdef, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.graphdef, ptr %102, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %99, ptr noundef %101, ptr noundef %103, ptr noundef null)
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = sdiv i32 %104, 2
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = call float @__ssum(i32 noundef %105, ptr noundef %106)
  store float %107, ptr %26, align 4, !tbaa !11
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = sdiv i32 %108, 2
  %110 = load float, ptr %26, align 4, !tbaa !11
  %111 = fpext float %110 to double
  %112 = fdiv double 1.000000e+00, %111
  %113 = fptrunc double %112 to float
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  call void @__sscale(i32 noundef %109, float noundef %113, ptr noundef %114)
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = sdiv i32 %116, 2
  %118 = sub nsw i32 %115, %117
  %119 = load float, ptr %26, align 4, !tbaa !11
  %120 = fpext float %119 to double
  %121 = fsub double 1.000000e+00, %120
  %122 = fdiv double 1.000000e+00, %121
  %123 = fptrunc double %122 to float
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = sdiv i32 %125, 2
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds float, ptr %124, i64 %127
  call void @__sscale(i32 noundef %118, float noundef %123, ptr noundef %128)
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = icmp sgt i32 %129, 3
  br i1 %130, label %131, label %161

131:                                              ; preds = %97
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = sdiv i32 %133, 2
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load float, ptr %14, align 4, !tbaa !11
  %138 = load i32, ptr %15, align 4, !tbaa !9
  %139 = call i32 @__MlevelRecursiveBisection(ptr noundef %132, ptr noundef %24, i32 noundef %134, ptr noundef %135, ptr noundef %136, float noundef %137, i32 noundef %138)
  %140 = load i32, ptr %19, align 4, !tbaa !9
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr %19, align 4, !tbaa !9
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = load i32, ptr %11, align 4, !tbaa !9
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = sdiv i32 %144, 2
  %146 = sub nsw i32 %143, %145
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load i32, ptr %11, align 4, !tbaa !9
  %150 = sdiv i32 %149, 2
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds float, ptr %148, i64 %151
  %153 = load float, ptr %14, align 4, !tbaa !11
  %154 = load i32, ptr %15, align 4, !tbaa !9
  %155 = load i32, ptr %11, align 4, !tbaa !9
  %156 = sdiv i32 %155, 2
  %157 = add nsw i32 %154, %156
  %158 = call i32 @__MlevelRecursiveBisection(ptr noundef %142, ptr noundef %25, i32 noundef %146, ptr noundef %147, ptr noundef %152, float noundef %153, i32 noundef %157)
  %159 = load i32, ptr %19, align 4, !tbaa !9
  %160 = add nsw i32 %159, %158
  store i32 %160, ptr %19, align 4, !tbaa !9
  br label %187

161:                                              ; preds = %97
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = icmp eq i32 %162, 3
  br i1 %163, label %164, label %186

164:                                              ; preds = %161
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = load i32, ptr %11, align 4, !tbaa !9
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = sdiv i32 %167, 2
  %169 = sub nsw i32 %166, %168
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  %172 = load i32, ptr %11, align 4, !tbaa !9
  %173 = sdiv i32 %172, 2
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds float, ptr %171, i64 %174
  %176 = load float, ptr %14, align 4, !tbaa !11
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = load i32, ptr %11, align 4, !tbaa !9
  %179 = sdiv i32 %178, 2
  %180 = add nsw i32 %177, %179
  %181 = call i32 @__MlevelRecursiveBisection(ptr noundef %165, ptr noundef %25, i32 noundef %169, ptr noundef %170, ptr noundef %175, float noundef %176, i32 noundef %180)
  %182 = load i32, ptr %19, align 4, !tbaa !9
  %183 = add nsw i32 %182, %181
  store i32 %183, ptr %19, align 4, !tbaa !9
  %184 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 0
  %185 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 10
  call void (ptr, ...) @GKfree(ptr noundef %184, ptr noundef %185, ptr noundef null)
  br label %186

186:                                              ; preds = %164, %161
  br label %187

187:                                              ; preds = %186, %131
  %188 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %188, ptr %8, align 4
  store i32 1, ptr %27, align 4
  br label %189

189:                                              ; preds = %187, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 216, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 216, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  %190 = load i32, ptr %8, align 4
  ret i32 %190
}

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

declare float @__ssum(i32 noundef, ptr noundef) #1

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

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

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

declare void @__sscale(i32 noundef, float noundef, ptr 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 16}
!14 = !{!"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}
!15 = !{!14, !6, i64 32}
!16 = !{!14, !10, i64 88}
!17 = !{!14, !6, i64 72}
!18 = !{!14, !6, i64 96}
!19 = distinct !{!19, !20}
!20 = !{!"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.2 = external hidden unnamed_addr constant [105 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

; Function Attrs: nounwind uwtable
define dso_local i32 @__MlevelRecursiveBisection(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, float noundef %5, i32 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 %16

14:                                               ; preds = %7
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %97

16:                                               ; preds = %7
  %17 = getelementptr inbounds i8, ptr %1, i64 32
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = tail call i32 @__idxsum(i32 noundef %12, ptr noundef %18) #4
  %20 = sitofp i32 %19 to float
  %21 = sdiv i32 %2, 2
  %22 = tail call float @__ssum(i32 noundef %21, ptr noundef %4) #4
  %23 = fmul float %22, %20
  %24 = fptosi float %23 to i32
  store i32 %24, ptr %8, align 4, !tbaa !12
  %25 = sub nsw i32 %19, %24
  %26 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %25, ptr %26, align 4, !tbaa !12
  call void @__MlevelEdgeBisection(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %8, float noundef %5)
  %27 = getelementptr inbounds i8, ptr %1, i64 88
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds i8, ptr %1, i64 72
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %1, i64 96
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = icmp sgt i32 %12, 0
  br i1 %33, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %16
  %wide.trip.count = zext nneg i32 %12 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %34 = icmp ult i32 %12, 4
  br i1 %34, 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 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %35 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = add nsw i32 %36, %6
  %38 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %3, i64 %40
  store i32 %37, ptr %41, align 4, !tbaa !12
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %42 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv.next
  %43 = load i32, ptr %42, align 4, !tbaa !12
  %44 = add nsw i32 %43, %6
  %45 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %3, i64 %47
  store i32 %44, ptr %48, align 4, !tbaa !12
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %49 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv.next.1
  %50 = load i32, ptr %49, align 4, !tbaa !12
  %51 = add nsw i32 %50, %6
  %52 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next.1
  %53 = load i32, ptr %52, align 4, !tbaa !12
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr %3, i64 %54
  store i32 %51, ptr %55, align 4, !tbaa !12
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %56 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv.next.2
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = add nsw i32 %57, %6
  %59 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next.2
  %60 = load i32, ptr %59, align 4, !tbaa !12
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %3, i64 %61
  store i32 %58, ptr %62, 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 !16

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.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 ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %63 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv.epil
  %64 = load i32, ptr %63, align 4, !tbaa !12
  %65 = add nsw i32 %64, %6
  %66 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.epil
  %67 = load i32, ptr %66, align 4, !tbaa !12
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %3, i64 %68
  store i32 %65, ptr %69, 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 !18

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %16
  %70 = icmp sgt i32 %2, 2
  br i1 %70, label %71, label %72

71:                                               ; preds = %._crit_edge
  call void @__SplitGraphPart(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %9, ptr noundef nonnull %10)
  br label %72

72:                                               ; preds = %71, %._crit_edge
  %73 = getelementptr inbounds i8, ptr %1, i64 8
  call void (ptr, ...) @GKfree(ptr noundef %1, ptr noundef nonnull %73, ptr noundef nonnull %29, ptr noundef null) #4
  %74 = call float @__ssum(i32 noundef %21, ptr noundef %4) #4
  %75 = fpext float %74 to double
  %76 = fdiv float 1.000000e+00, %74
  call void @__sscale(i32 noundef %21, float noundef %76, ptr noundef %4) #4
  %77 = sub nsw i32 %2, %21
  %78 = fsub double 1.000000e+00, %75
  %79 = fdiv double 1.000000e+00, %78
  %80 = fptrunc double %79 to float
  %81 = sext i32 %21 to i64
  %82 = getelementptr inbounds float, ptr %4, i64 %81
  call void @__sscale(i32 noundef %77, float noundef %80, ptr noundef %82) #4
  %83 = icmp sgt i32 %2, 3
  br i1 %83, label %84, label %90

84:                                               ; preds = %72
  %85 = call i32 @__MlevelRecursiveBisection(ptr noundef %0, ptr noundef nonnull %9, i32 noundef %21, ptr noundef %3, ptr noundef %4, float noundef %5, i32 noundef %6)
  %86 = add nsw i32 %85, %28
  %87 = add nsw i32 %21, %6
  %88 = call i32 @__MlevelRecursiveBisection(ptr noundef %0, ptr noundef nonnull %10, i32 noundef %77, ptr noundef %3, ptr noundef %82, float noundef %5, i32 noundef %87)
  %89 = add nsw i32 %86, %88
  br label %97

90:                                               ; preds = %72
  %91 = icmp eq i32 %2, 3
  br i1 %91, label %92, label %97

92:                                               ; preds = %90
  %93 = add nsw i32 %21, %6
  %94 = call i32 @__MlevelRecursiveBisection(ptr noundef %0, ptr noundef nonnull %10, i32 noundef %77, ptr noundef %3, ptr noundef nonnull %82, float noundef %5, i32 noundef %93)
  %95 = add nsw i32 %94, %28
  %96 = getelementptr inbounds i8, ptr %9, i64 72
  call void (ptr, ...) @GKfree(ptr noundef nonnull %9, ptr noundef nonnull %96, ptr noundef null) #4
  br label %97

97:                                               ; preds = %84, %92, %90, %14
  %.0 = phi i32 [ 0, %14 ], [ %89, %84 ], [ %95, %92 ], [ %28, %90 ]
  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 i32 %.0
}

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

declare float @__ssum(i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

declare void @__sscale(i32 noundef, float noundef, ptr 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 = !{!6, !10, i64 88}
!14 = !{!6, !7, i64 72}
!15 = !{!6, !7, i64 96}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}


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