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

; 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.1 = external hidden unnamed_addr constant [18 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 ptr @__fmalloc(i32 noundef, ptr noundef) #1

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

33:                                               ; preds = %12
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = load ptr, ptr %15, align 8, !tbaa !5
  call void @__Change2CNumbering(i32 noundef %35, ptr noundef %36, ptr noundef %37)
  br label %38

38:                                               ; preds = %33, %12
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  %44 = load ptr, ptr %17, align 8, !tbaa !5
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  %46 = load i32, ptr %45, align 4, !tbaa !9
  call void @__SetUpGraph(ptr noundef %27, i32 noundef 1, i32 noundef %40, i32 noundef 1, ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44, i32 noundef %46)
  %47 = load ptr, ptr %22, align 8, !tbaa !5
  %48 = getelementptr inbounds i32, ptr %47, i64 0
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %56

51:                                               ; preds = %38
  %52 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 2
  store i32 3, ptr %52, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 3
  store i32 1, ptr %53, align 4, !tbaa !16
  %54 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 4
  store i32 1, ptr %54, align 8, !tbaa !17
  %55 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  store i32 0, ptr %55, align 4, !tbaa !18
  br label %73

56:                                               ; preds = %38
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %57, i64 1
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 2
  store i32 %59, ptr %60, align 8, !tbaa !11
  %61 = load ptr, ptr %22, align 8, !tbaa !5
  %62 = getelementptr inbounds i32, ptr %61, i64 2
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 3
  store i32 %63, ptr %64, align 4, !tbaa !16
  %65 = load ptr, ptr %22, align 8, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %65, i64 3
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 4
  store i32 %67, ptr %68, align 8, !tbaa !17
  %69 = load ptr, ptr %22, align 8, !tbaa !5
  %70 = getelementptr inbounds i32, ptr %69, i64 4
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  store i32 %71, ptr %72, align 4, !tbaa !18
  br label %73

73:                                               ; preds = %56, %51
  %74 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 7
  store i32 1, ptr %74, align 4, !tbaa !19
  %75 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 0
  store i32 20, ptr %75, align 8, !tbaa !20
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = getelementptr inbounds %struct.graphdef, ptr %27, i32 0, i32 5
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = call i32 @__idxsum(i32 noundef %77, ptr noundef %79)
  %81 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !20
  %83 = sdiv i32 %80, %82
  %84 = sitofp i32 %83 to double
  %85 = fmul double 1.500000e+00, %84
  %86 = fptosi double %85 to i32
  %87 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 5
  store i32 %86, ptr %87, align 4, !tbaa !23
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = call ptr @__fmalloc(i32 noundef %89, ptr noundef @.str.1)
  store ptr %90, ptr %29, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %106, %73
  %92 = load i32, ptr %25, align 4, !tbaa !9
  %93 = load ptr, ptr %20, align 8, !tbaa !5
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = icmp slt i32 %92, %94
  br i1 %95, label %96, label %109

96:                                               ; preds = %91
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = load i32, ptr %25, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds float, ptr %97, i64 %99
  %101 = load float, ptr %100, align 4, !tbaa !24
  %102 = load ptr, ptr %29, align 8, !tbaa !5
  %103 = load i32, ptr %25, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds float, ptr %102, i64 %104
  store float %101, ptr %105, align 4, !tbaa !24
  br label %106

106:                                              ; preds = %96
  %107 = load i32, ptr %25, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %25, align 4, !tbaa !9
  br label %91, !llvm.loop !25

109:                                              ; preds = %91
  call void @__InitRandom(i32 noundef -1)
  %110 = load ptr, ptr %20, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  call void @__AllocateWorkSpace(ptr noundef %28, ptr noundef %27, i32 noundef %111)
  %112 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !18
  %114 = and i32 %113, 1
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %109
  call void @__InitTimers(ptr noundef %28)
  br label %117

117:                                              ; preds = %116, %109
  %118 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !18
  %120 = and i32 %119, 1
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %127

122:                                              ; preds = %117
  %123 = call double @__seconds()
  %124 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 12
  %125 = load double, ptr %124, align 8, !tbaa !27
  %126 = fsub double %125, %123
  store double %126, ptr %124, align 8, !tbaa !27
  br label %127

127:                                              ; preds = %122, %117
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = load ptr, ptr %24, align 8, !tbaa !5
  %131 = load ptr, ptr %29, align 8, !tbaa !5
  %132 = call i32 @__MlevelRecursiveBisection(ptr noundef %28, ptr noundef %27, i32 noundef %129, ptr noundef %130, ptr noundef %131, float noundef 1.000000e+00, i32 noundef 0)
  %133 = load ptr, ptr %23, align 8, !tbaa !5
  store i32 %132, ptr %133, align 4, !tbaa !9
  %134 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !18
  %136 = and i32 %135, 1
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %143

138:                                              ; preds = %127
  %139 = call double @__seconds()
  %140 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 12
  %141 = load double, ptr %140, align 8, !tbaa !27
  %142 = fadd double %141, %139
  store double %142, ptr %140, align 8, !tbaa !27
  br label %143

143:                                              ; preds = %138, %127
  %144 = getelementptr inbounds %struct.controldef, ptr %28, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !18
  %146 = and i32 %145, 1
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  call void @__PrintTimers(ptr noundef %28)
  br label %149

149:                                              ; preds = %148, %143
  call void @__FreeWorkSpace(ptr noundef %28, ptr noundef %27)
  %150 = load ptr, ptr %29, align 8, !tbaa !5
  call void @free(ptr noundef %150) #4
  %151 = load ptr, ptr %19, align 8, !tbaa !5
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = icmp eq i32 %152, 1
  br i1 %153, label %154, label %160

154:                                              ; preds = %149
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = load ptr, ptr %24, align 8, !tbaa !5
  call void @__Change2FNumbering(i32 noundef %156, ptr noundef %157, ptr noundef %158, ptr noundef %159)
  br label %160

160:                                              ; preds = %154, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 232, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  ret void
}

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

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

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

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

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

declare void @__InitRandom(i32 noundef) #1

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

declare void @__InitTimers(ptr noundef) #1

declare double @__seconds() #1

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

declare void @__PrintTimers(ptr noundef) #1

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

declare void @__Change2FNumbering(i32 noundef, ptr noundef, ptr 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 "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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !14, i64 48, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !15, i64 216, !15, i64 224}
!13 = !{!"float", !7, i64 0}
!14 = !{!"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}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !10, i64 12}
!17 = !{!12, !10, i64 16}
!18 = !{!12, !10, i64 4}
!19 = !{!12, !10, i64 28}
!20 = !{!12, !10, i64 0}
!21 = !{!22, !6, i64 32}
!22 = !{!"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}
!23 = !{!12, !10, i64 20}
!24 = !{!13, !13, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !15, i64 104}


; 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 }
%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.1 = external hidden unnamed_addr constant [18 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 ptr @__fmalloc(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @METIS_WPartGraphRecursive(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6, ptr nocapture noundef readonly %7, ptr nocapture noundef readonly %8, ptr nocapture noundef readonly %9, ptr nocapture noundef writeonly %10, ptr noundef %11) local_unnamed_addr #2 {
  %13 = ptrtoint ptr %8 to i64
  %14 = alloca %struct.graphdef, align 8
  %15 = alloca %struct.controldef, align 8
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 232, ptr nonnull %15) #4
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %18, label %20

18:                                               ; preds = %12
  %19 = load i32, ptr %0, align 4, !tbaa !5
  tail call void @__Change2CNumbering(i32 noundef %19, ptr noundef %1, ptr noundef %2) #4
  br label %20

20:                                               ; preds = %18, %12
  %21 = load i32, ptr %0, align 4, !tbaa !5
  %22 = load i32, ptr %5, align 4, !tbaa !5
  call void @__SetUpGraph(ptr noundef nonnull %14, i32 noundef 1, i32 noundef %21, i32 noundef 1, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %22) #4
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %20
  %26 = getelementptr inbounds i8, ptr %9, i64 4
  %27 = load <4 x i32>, ptr %26, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %20, %25
  %29 = phi <4 x i32> [ %27, %25 ], [ <i32 3, i32 1, i32 1, i32 0>, %20 ]
  %30 = getelementptr inbounds i8, ptr %15, i64 4
  %31 = shufflevector <4 x i32> %29, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
  store <4 x i32> %31, ptr %30, align 4
  %32 = getelementptr inbounds i8, ptr %15, i64 28
  store i32 1, ptr %32, align 4, !tbaa !9
  store i32 20, ptr %15, align 8, !tbaa !15
  %33 = load i32, ptr %0, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %14, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = call i32 @__idxsum(i32 noundef %33, ptr noundef %35) #4
  %37 = sdiv i32 %36, 20
  %38 = sitofp i32 %37 to double
  %39 = fmul double %38, 1.500000e+00
  %40 = fptosi double %39 to i32
  %41 = getelementptr inbounds i8, ptr %15, i64 20
  store i32 %40, ptr %41, align 4, !tbaa !18
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = call ptr @__fmalloc(i32 noundef %42, ptr noundef nonnull @.str.1) #4
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %28
  %46 = ptrtoint ptr %43 to i64
  %wide.trip.count = zext nneg i32 %44 to i64
  %min.iters.check = icmp ult i32 %44, 8
  %47 = sub i64 %46, %13
  %diff.check = icmp ult i64 %47, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph.preheader50, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %48 = getelementptr inbounds float, ptr %8, i64 %index
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load = load <4 x float>, ptr %48, align 4, !tbaa !19
  %wide.load49 = load <4 x float>, ptr %49, align 4, !tbaa !19
  %50 = getelementptr inbounds float, ptr %43, i64 %index
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <4 x float> %wide.load, ptr %50, align 4, !tbaa !19
  store <4 x float> %wide.load49, ptr %51, align 4, !tbaa !19
  %index.next = add nuw i64 %index, 8
  %52 = icmp eq i64 %index.next, %n.vec
  br i1 %52, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader50

.lr.ph.preheader50:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader50, %.lr.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader50 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader50 ]
  %53 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.prol
  %54 = load float, ptr %53, align 4, !tbaa !19
  %55 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.prol
  store float %54, ptr %55, align 4, !tbaa !19
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !24

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader50
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader50 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %56 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %57 = icmp ugt i64 %56, -4
  br i1 %57, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %58 = getelementptr inbounds float, ptr %8, i64 %indvars.iv
  %59 = load float, ptr %58, align 4, !tbaa !19
  %60 = getelementptr inbounds float, ptr %43, i64 %indvars.iv
  store float %59, ptr %60, align 4, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.next
  %62 = load float, ptr %61, align 4, !tbaa !19
  %63 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.next
  store float %62, ptr %63, align 4, !tbaa !19
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %64 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.next.1
  %65 = load float, ptr %64, align 4, !tbaa !19
  %66 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.next.1
  store float %65, ptr %66, align 4, !tbaa !19
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %67 = getelementptr inbounds float, ptr %8, i64 %indvars.iv.next.2
  %68 = load float, ptr %67, align 4, !tbaa !19
  %69 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.next.2
  store float %68, ptr %69, align 4, !tbaa !19
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %28
  call void @__InitRandom(i32 noundef -1) #4
  %70 = load i32, ptr %7, align 4, !tbaa !5
  call void @__AllocateWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14, i32 noundef %70) #4
  %71 = load i32, ptr %30, align 4, !tbaa !27
  %72 = and i32 %71, 1
  %.not = icmp eq i32 %72, 0
  br i1 %.not, label %.thread, label %73

73:                                               ; preds = %._crit_edge
  call void @__InitTimers(ptr noundef nonnull %15) #4
  %.pre = load i32, ptr %30, align 4, !tbaa !27
  %.pre43 = and i32 %.pre, 1
  %74 = icmp eq i32 %.pre43, 0
  br i1 %74, label %.thread, label %75

75:                                               ; preds = %73
  %76 = call double @__seconds() #4
  %77 = getelementptr inbounds i8, ptr %15, i64 104
  %78 = load double, ptr %77, align 8, !tbaa !28
  %79 = fsub double %78, %76
  store double %79, ptr %77, align 8, !tbaa !28
  br label %.thread

.thread:                                          ; preds = %._crit_edge, %75, %73
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = call i32 @__MlevelRecursiveBisection(ptr noundef nonnull %15, ptr noundef nonnull %14, i32 noundef %80, ptr noundef %11, ptr noundef %43, float noundef 1.000000e+00, i32 noundef 0)
  store i32 %81, ptr %10, align 4, !tbaa !5
  %82 = load i32, ptr %30, align 4, !tbaa !27
  %83 = and i32 %82, 1
  %.not35 = icmp eq i32 %83, 0
  br i1 %.not35, label %.thread47, label %84

84:                                               ; preds = %.thread
  %85 = call double @__seconds() #4
  %86 = getelementptr inbounds i8, ptr %15, i64 104
  %87 = load double, ptr %86, align 8, !tbaa !28
  %88 = fadd double %85, %87
  store double %88, ptr %86, align 8, !tbaa !28
  %.pre42 = load i32, ptr %30, align 4, !tbaa !27
  %.pre44 = and i32 %.pre42, 1
  %89 = icmp eq i32 %.pre44, 0
  br i1 %89, label %.thread47, label %90

90:                                               ; preds = %84
  call void @__PrintTimers(ptr noundef nonnull %15) #4
  br label %.thread47

.thread47:                                        ; preds = %.thread, %90, %84
  call void @__FreeWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14) #4
  call void @free(ptr noundef %43) #4
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %93, label %95

93:                                               ; preds = %.thread47
  %94 = load i32, ptr %0, align 4, !tbaa !5
  call void @__Change2FNumbering(i32 noundef %94, ptr noundef %1, ptr noundef %2, ptr noundef %11) #4
  br label %95

95:                                               ; preds = %93, %.thread47
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %14) #4
  ret void
}

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

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

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

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

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

declare void @__InitRandom(i32 noundef) local_unnamed_addr #1

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

declare void @__InitTimers(ptr noundef) local_unnamed_addr #1

declare double @__seconds() local_unnamed_addr #1

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

declare void @__PrintTimers(ptr noundef) local_unnamed_addr #1

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

declare void @__Change2FNumbering(i32 noundef, ptr noundef, ptr 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 28}
!10 = !{!"controldef", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !12, i64 48, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224}
!11 = !{!"float", !7, i64 0}
!12 = !{!"workspacedef", !13, i64 0, !6, i64 8, !6, i64 12, !13, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 48}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !6, i64 0}
!16 = !{!17, !13, i64 32}
!17 = !{!"graphdef", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !6, i64 88, !6, i64 92, !13, i64 96, !13, i64 104, !6, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !6, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208}
!18 = !{!10, !6, i64 20}
!19 = !{!11, !11, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !21, !22}
!27 = !{!10, !6, i64 4}
!28 = !{!10, !14, i64 104}


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