; LLVM IR from siconos/siconos :: externals/lbl/metis4/mmatch.ll_ (MCMatch_RM)

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

; Function Attrs: nounwind uwtable
define dso_local void @__MCMatch_RM(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.controldef, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = and i32 %22, 1
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %2
  %26 = call double @__seconds()
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.controldef, ptr %27, i32 0, i32 14
  %29 = load double, ptr %28, align 8, !tbaa !15
  %30 = fsub double %29, %26
  store double %30, ptr %28, align 8, !tbaa !15
  br label %31

31:                                               ; preds = %25, %2
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graphdef, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 8, !tbaa !16
  store i32 %34, ptr %9, align 4, !tbaa !18
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 24
  %37 = load i32, ptr %36, align 8, !tbaa !19
  store i32 %37, ptr %10, align 4, !tbaa !18
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  store ptr %40, ptr %13, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 25
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  store ptr %43, ptr %19, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 7
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  store ptr %46, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 8
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  store ptr %49, ptr %15, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graphdef, ptr %50, i32 0, i32 11
  %52 = load ptr, ptr %51, align 8, !tbaa !24
  store ptr %52, ptr %17, align 8, !tbaa !5
  %53 = load i32, ptr %9, align 4, !tbaa !18
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i32, ptr %9, align 4, !tbaa !18
  %56 = call ptr @__idxwspacemalloc(ptr noundef %54, i32 noundef %55)
  %57 = call ptr @__idxset(i32 noundef %53, i32 noundef -1, ptr noundef %56)
  store ptr %57, ptr %16, align 8, !tbaa !5
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !18
  %60 = call ptr @__idxwspacemalloc(ptr noundef %58, i32 noundef %59)
  store ptr %60, ptr %18, align 8, !tbaa !5
  %61 = load i32, ptr %9, align 4, !tbaa !18
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  call void @__RandomPermute(i32 noundef %61, ptr noundef %62, i32 noundef 1)
  store i32 0, ptr %11, align 4, !tbaa !18
  store i32 0, ptr %6, align 4, !tbaa !18
  br label %63

63:                                               ; preds = %154, %31
  %64 = load i32, ptr %6, align 4, !tbaa !18
  %65 = load i32, ptr %9, align 4, !tbaa !18
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %157

67:                                               ; preds = %63
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !18
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !18
  store i32 %72, ptr %5, align 4, !tbaa !18
  %73 = load ptr, ptr %16, align 8, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !18
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !18
  %78 = icmp eq i32 %77, -1
  br i1 %78, label %79, label %153

79:                                               ; preds = %67
  %80 = load i32, ptr %5, align 4, !tbaa !18
  store i32 %80, ptr %12, align 4, !tbaa !18
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load i32, ptr %5, align 4, !tbaa !18
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !18
  store i32 %85, ptr %7, align 4, !tbaa !18
  br label %86

86:                                               ; preds = %129, %79
  %87 = load i32, ptr %7, align 4, !tbaa !18
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !18
  %90 = add nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %88, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !18
  %94 = icmp slt i32 %87, %93
  br i1 %94, label %95, label %132

95:                                               ; preds = %86
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = load i32, ptr %7, align 4, !tbaa !18
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !18
  store i32 %100, ptr %8, align 4, !tbaa !18
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !18
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !18
  %106 = icmp eq i32 %105, -1
  br i1 %106, label %107, label %128

107:                                              ; preds = %95
  %108 = load i32, ptr %10, align 4, !tbaa !18
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !18
  %111 = load i32, ptr %10, align 4, !tbaa !18
  %112 = mul nsw i32 %110, %111
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %109, i64 %113
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !18
  %117 = load i32, ptr %10, align 4, !tbaa !18
  %118 = mul nsw i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds float, ptr %115, i64 %119
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.controldef, ptr %121, i32 0, i32 6
  %123 = load float, ptr %122, align 8, !tbaa !25
  %124 = call i32 @__AreAllVwgtsBelowFast(i32 noundef %108, ptr noundef %114, ptr noundef %120, float noundef %123)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %107
  %127 = load i32, ptr %8, align 4, !tbaa !18
  store i32 %127, ptr %12, align 4, !tbaa !18
  br label %132

128:                                              ; preds = %107, %95
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %7, align 4, !tbaa !18
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !18
  br label %86, !llvm.loop !26

132:                                              ; preds = %126, %86
  %133 = load i32, ptr %11, align 4, !tbaa !18
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %11, align 4, !tbaa !18
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !18
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %135, i64 %137
  store i32 %133, ptr %138, align 4, !tbaa !18
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = load i32, ptr %5, align 4, !tbaa !18
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  store i32 %133, ptr %142, align 4, !tbaa !18
  %143 = load i32, ptr %12, align 4, !tbaa !18
  %144 = load ptr, ptr %16, align 8, !tbaa !5
  %145 = load i32, ptr %5, align 4, !tbaa !18
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %144, i64 %146
  store i32 %143, ptr %147, align 4, !tbaa !18
  %148 = load i32, ptr %5, align 4, !tbaa !18
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = load i32, ptr %12, align 4, !tbaa !18
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i32, ptr %149, i64 %151
  store i32 %148, ptr %152, align 4, !tbaa !18
  br label %153

153:                                              ; preds = %132, %67
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %6, align 4, !tbaa !18
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %6, align 4, !tbaa !18
  br label %63, !llvm.loop !28

157:                                              ; preds = %63
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.controldef, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = and i32 %160, 1
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %169

163:                                              ; preds = %157
  %164 = call double @__seconds()
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.controldef, ptr %165, i32 0, i32 14
  %167 = load double, ptr %166, align 8, !tbaa !15
  %168 = fadd double %167, %164
  store double %168, ptr %166, align 8, !tbaa !15
  br label %169

169:                                              ; preds = %163, %157
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = load i32, ptr %11, align 4, !tbaa !18
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = load ptr, ptr %18, align 8, !tbaa !5
  call void @__CreateCoarseGraph(ptr noundef %170, ptr noundef %171, i32 noundef %172, ptr noundef %173, ptr noundef %174)
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = load i32, ptr %9, align 4, !tbaa !18
  call void @__idxwspacefree(ptr noundef %175, i32 noundef %176)
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = load i32, ptr %9, align 4, !tbaa !18
  call void @__idxwspacefree(ptr noundef %177, i32 noundef %178)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void
}

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

declare double @__seconds() #2

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

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

declare void @__RandomPermute(i32 noundef, ptr noundef, i32 noundef) #2

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

declare void @__CreateCoarseGraph(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare void @__idxwspacefree(ptr noundef, i32 noundef) #2

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

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


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

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

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

11:                                               ; preds = %6, %2
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %1, i64 176
  %15 = load i32, ptr %14, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %1, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %1, i64 184
  %19 = load ptr, ptr %18, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %1, i64 48
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  %22 = getelementptr inbounds i8, ptr %1, i64 80
  %23 = load ptr, ptr %22, align 8, !tbaa !21
  %24 = tail call ptr @__idxwspacemalloc(ptr noundef nonnull %0, i32 noundef %13) #2
  %25 = tail call ptr @__idxset(i32 noundef %13, i32 noundef -1, ptr noundef %24) #2
  %26 = tail call ptr @__idxwspacemalloc(ptr noundef nonnull %0, i32 noundef %13) #2
  tail call void @__RandomPermute(i32 noundef %13, ptr noundef %26, i32 noundef 1) #2
  %27 = icmp sgt i32 %13, 0
  br i1 %27, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %11
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count = zext nneg i32 %13 to i64
  br label %29

29:                                               ; preds = %.lr.ph76, %67
  %indvars.iv80 = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next81, %67 ]
  %.06573 = phi i32 [ 0, %.lr.ph76 ], [ %.1, %67 ]
  %30 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv80
  %31 = load i32, ptr %30, align 4, !tbaa !22
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %25, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !22
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %36, label %67

36:                                               ; preds = %29
  %37 = getelementptr inbounds i32, ptr %17, i64 %32
  %38 = load i32, ptr %37, align 4, !tbaa !22
  %39 = mul nsw i32 %31, %15
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds float, ptr %19, i64 %40
  %42 = getelementptr i8, ptr %37, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !22
  %44 = icmp slt i32 %38, %43
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %36
  %45 = sext i32 %38 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %46 = phi i32 [ %43, %.lr.ph.preheader ], [ %60, %59 ]
  %indvars.iv = phi i64 [ %45, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  %47 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !22
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %25, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !22
  %52 = icmp eq i32 %51, -1
  br i1 %52, label %53, label %59

53:                                               ; preds = %.lr.ph
  %54 = mul nsw i32 %48, %15
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %19, i64 %55
  %57 = load float, ptr %28, align 8, !tbaa !23
  %58 = tail call i32 @__AreAllVwgtsBelowFast(i32 noundef %15, ptr noundef %41, ptr noundef %56, float noundef %57)
  %.not69 = icmp eq i32 %58, 0
  br i1 %.not69, label %._crit_edge83, label %._crit_edge

._crit_edge83:                                    ; preds = %53
  %.pre = load i32, ptr %42, align 4, !tbaa !22
  br label %59

59:                                               ; preds = %._crit_edge83, %.lr.ph
  %60 = phi i32 [ %.pre, %._crit_edge83 ], [ %46, %.lr.ph ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %59, %53, %36
  %.pre-phi = phi i64 [ %32, %36 ], [ %32, %59 ], [ %49, %53 ]
  %.066 = phi i32 [ %31, %36 ], [ %31, %59 ], [ %48, %53 ]
  %63 = add nsw i32 %.06573, 1
  %64 = getelementptr inbounds i32, ptr %23, i64 %.pre-phi
  store i32 %.06573, ptr %64, align 4, !tbaa !22
  %65 = getelementptr inbounds i32, ptr %23, i64 %32
  store i32 %.06573, ptr %65, align 4, !tbaa !22
  store i32 %.066, ptr %33, align 4, !tbaa !22
  %66 = getelementptr inbounds i32, ptr %25, i64 %.pre-phi
  store i32 %31, ptr %66, align 4, !tbaa !22
  br label %67

67:                                               ; preds = %29, %._crit_edge
  %.1 = phi i32 [ %63, %._crit_edge ], [ %.06573, %29 ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge77, label %29, !llvm.loop !26

._crit_edge77:                                    ; preds = %67, %11
  %.065.lcssa = phi i32 [ 0, %11 ], [ %.1, %67 ]
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = and i32 %68, 1
  %.not68 = icmp eq i32 %69, 0
  br i1 %.not68, label %75, label %70

70:                                               ; preds = %._crit_edge77
  %71 = tail call double @__seconds() #2
  %72 = getelementptr inbounds i8, ptr %0, i64 120
  %73 = load double, ptr %72, align 8, !tbaa !14
  %74 = fadd double %71, %73
  store double %74, ptr %72, align 8, !tbaa !14
  br label %75

75:                                               ; preds = %70, %._crit_edge77
  tail call void @__CreateCoarseGraph(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %.065.lcssa, ptr noundef %25, ptr noundef %26) #2
  tail call void @__idxwspacefree(ptr noundef nonnull %0, i32 noundef %13) #2
  tail call void @__idxwspacefree(ptr noundef nonnull %0, i32 noundef %13) #2
  ret void
}

declare double @__seconds() local_unnamed_addr #1

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 4}
!6 = !{!"controldef", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !11, i64 48, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"workspacedef", !12, i64 0, !7, i64 8, !7, i64 12, !12, i64 16, !12, i64 24, !7, i64 32, !12, i64 40, !12, i64 48}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!6, !13, i64 120}
!15 = !{!16, !7, i64 16}
!16 = !{!"graphdef", !12, i64 0, !12, i64 8, !7, i64 16, !7, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !7, i64 88, !7, i64 92, !12, i64 96, !12, i64 104, !7, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !7, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208}
!17 = !{!16, !7, i64 176}
!18 = !{!16, !12, i64 24}
!19 = !{!16, !12, i64 184}
!20 = !{!16, !12, i64 48}
!21 = !{!16, !12, i64 80}
!22 = !{!7, !7, i64 0}
!23 = !{!6, !10, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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