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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare double @__seconds() #1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @__MCMatch_HEM(ptr noundef %0, ptr noundef %1) #2 {
  %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 i32, align 4
  %14 = alloca i32, align 4
  %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
  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 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = and i32 %24, 1
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %33

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

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

65:                                               ; preds = %173, %33
  %66 = load i32, ptr %6, align 4, !tbaa !18
  %67 = load i32, ptr %10, align 4, !tbaa !18
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %69, label %176

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

81:                                               ; preds = %69
  %82 = load i32, ptr %5, align 4, !tbaa !18
  store i32 %82, ptr %13, align 4, !tbaa !18
  store i32 0, ptr %14, align 4, !tbaa !18
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = load i32, ptr %5, align 4, !tbaa !18
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !18
  store i32 %87, ptr %7, align 4, !tbaa !18
  br label %88

88:                                               ; preds = %148, %81
  %89 = load i32, ptr %7, align 4, !tbaa !18
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = load i32, ptr %5, align 4, !tbaa !18
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %90, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !18
  %96 = icmp slt i32 %89, %95
  br i1 %96, label %97, label %151

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

109:                                              ; preds = %97
  %110 = load i32, ptr %14, align 4, !tbaa !18
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !18
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %111, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !18
  %116 = icmp sle i32 %110, %115
  br i1 %116, label %117, label %147

117:                                              ; preds = %109
  %118 = load i32, ptr %12, align 4, !tbaa !18
  %119 = load ptr, ptr %21, align 8, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !18
  %121 = load i32, ptr %12, align 4, !tbaa !18
  %122 = mul nsw i32 %120, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %119, i64 %123
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !18
  %127 = load i32, ptr %12, align 4, !tbaa !18
  %128 = mul nsw i32 %126, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %125, i64 %129
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.controldef, ptr %131, i32 0, i32 6
  %133 = load float, ptr %132, align 8, !tbaa !25
  %134 = call i32 @__AreAllVwgtsBelowFast(i32 noundef %118, ptr noundef %124, ptr noundef %130, float noundef %133)
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %147

136:                                              ; preds = %117
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  %138 = load i32, ptr %7, align 4, !tbaa !18
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !18
  store i32 %141, ptr %14, align 4, !tbaa !18
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = load i32, ptr %7, align 4, !tbaa !18
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr %142, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !18
  store i32 %146, ptr %13, align 4, !tbaa !18
  br label %147

147:                                              ; preds = %136, %117, %109, %97
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %7, align 4, !tbaa !18
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %7, align 4, !tbaa !18
  br label %88, !llvm.loop !26

151:                                              ; preds = %88
  %152 = load i32, ptr %11, align 4, !tbaa !18
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %11, align 4, !tbaa !18
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = load i32, ptr %13, align 4, !tbaa !18
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %154, i64 %156
  store i32 %152, ptr %157, align 4, !tbaa !18
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = load i32, ptr %5, align 4, !tbaa !18
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %158, i64 %160
  store i32 %152, ptr %161, align 4, !tbaa !18
  %162 = load i32, ptr %13, align 4, !tbaa !18
  %163 = load ptr, ptr %18, align 8, !tbaa !5
  %164 = load i32, ptr %5, align 4, !tbaa !18
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %163, i64 %165
  store i32 %162, ptr %166, align 4, !tbaa !18
  %167 = load i32, ptr %5, align 4, !tbaa !18
  %168 = load ptr, ptr %18, align 8, !tbaa !5
  %169 = load i32, ptr %13, align 4, !tbaa !18
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i32, ptr %168, i64 %170
  store i32 %167, ptr %171, align 4, !tbaa !18
  br label %172

172:                                              ; preds = %151, %69
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %6, align 4, !tbaa !18
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %6, align 4, !tbaa !18
  br label %65, !llvm.loop !28

176:                                              ; preds = %65
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.controldef, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = and i32 %179, 1
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %188

182:                                              ; preds = %176
  %183 = call double @__seconds()
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.controldef, ptr %184, i32 0, i32 14
  %186 = load double, ptr %185, align 8, !tbaa !15
  %187 = fadd double %186, %183
  store double %187, ptr %185, align 8, !tbaa !15
  br label %188

188:                                              ; preds = %182, %176
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = load i32, ptr %11, align 4, !tbaa !18
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  call void @__CreateCoarseGraph(ptr noundef %189, ptr noundef %190, i32 noundef %191, ptr noundef %192, ptr noundef %193)
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = load i32, ptr %10, align 4, !tbaa !18
  call void @__idxwspacefree(ptr noundef %194, i32 noundef %195)
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = load i32, ptr %10, align 4, !tbaa !18
  call void @__idxwspacefree(ptr noundef %196, i32 noundef %197)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 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 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
}

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, !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"

declare double @__seconds() local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @__MCMatch_HEM(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %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 56
  %23 = load ptr, ptr %22, align 8, !tbaa !21
  %24 = getelementptr inbounds i8, ptr %1, i64 80
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = tail call ptr @__idxwspacemalloc(ptr noundef nonnull %0, i32 noundef %13) #2
  %27 = tail call ptr @__idxset(i32 noundef %13, i32 noundef -1, ptr noundef %26) #2
  %28 = tail call ptr @__idxwspacemalloc(ptr noundef nonnull %0, i32 noundef %13) #2
  tail call void @__RandomPermute(i32 noundef %13, ptr noundef %28, i32 noundef 1) #2
  %29 = icmp sgt i32 %13, 0
  br i1 %29, label %.lr.ph86, label %._crit_edge87

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

31:                                               ; preds = %.lr.ph86, %75
  %indvars.iv90 = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next91, %75 ]
  %.07183 = phi i32 [ 0, %.lr.ph86 ], [ %.1, %75 ]
  %32 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv90
  %33 = load i32, ptr %32, align 4, !tbaa !23
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %27, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !23
  %37 = icmp eq i32 %36, -1
  br i1 %37, label %38, label %75

38:                                               ; preds = %31
  %39 = getelementptr inbounds i32, ptr %17, i64 %34
  %40 = load i32, ptr %39, align 4, !tbaa !23
  %41 = getelementptr i8, ptr %39, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %44 = mul nsw i32 %33, %15
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds float, ptr %19, i64 %45
  %47 = sext i32 %40 to i64
  br label %48

48:                                               ; preds = %.lr.ph, %67
  %indvars.iv = phi i64 [ %47, %.lr.ph ], [ %indvars.iv.next, %67 ]
  %.07281 = phi i32 [ %33, %.lr.ph ], [ %.173, %67 ]
  %.07480 = phi i32 [ 0, %.lr.ph ], [ %.175, %67 ]
  %49 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %50 = load i32, ptr %49, align 4, !tbaa !23
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %27, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !23
  %54 = icmp eq i32 %53, -1
  br i1 %54, label %55, label %67

55:                                               ; preds = %48
  %56 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv
  %57 = load i32, ptr %56, align 4, !tbaa !23
  %.not78 = icmp sgt i32 %.07480, %57
  br i1 %.not78, label %67, label %58

58:                                               ; preds = %55
  %59 = mul nsw i32 %50, %15
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %19, i64 %60
  %62 = load float, ptr %30, align 8, !tbaa !24
  %63 = tail call i32 @__AreAllVwgtsBelowFast(i32 noundef %15, ptr noundef %46, ptr noundef %61, float noundef %62)
  %.not79 = icmp eq i32 %63, 0
  br i1 %.not79, label %67, label %64

64:                                               ; preds = %58
  %65 = load i32, ptr %56, align 4, !tbaa !23
  %66 = load i32, ptr %49, align 4, !tbaa !23
  br label %67

67:                                               ; preds = %48, %55, %58, %64
  %.175 = phi i32 [ %65, %64 ], [ %.07480, %58 ], [ %.07480, %55 ], [ %.07480, %48 ]
  %.173 = phi i32 [ %66, %64 ], [ %.07281, %58 ], [ %.07281, %55 ], [ %.07281, %48 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %68 = load i32, ptr %41, align 4, !tbaa !23
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next, %69
  br i1 %70, label %48, label %._crit_edge.loopexit, !llvm.loop !25

._crit_edge.loopexit:                             ; preds = %67
  %.pre = sext i32 %.173 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %38
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %34, %38 ]
  %.072.lcssa = phi i32 [ %.173, %._crit_edge.loopexit ], [ %33, %38 ]
  %71 = add nsw i32 %.07183, 1
  %72 = getelementptr inbounds i32, ptr %25, i64 %.pre-phi
  store i32 %.07183, ptr %72, align 4, !tbaa !23
  %73 = getelementptr inbounds i32, ptr %25, i64 %34
  store i32 %.07183, ptr %73, align 4, !tbaa !23
  store i32 %.072.lcssa, ptr %35, align 4, !tbaa !23
  %74 = getelementptr inbounds i32, ptr %27, i64 %.pre-phi
  store i32 %33, ptr %74, align 4, !tbaa !23
  br label %75

75:                                               ; preds = %31, %._crit_edge
  %.1 = phi i32 [ %71, %._crit_edge ], [ %.07183, %31 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge87, label %31, !llvm.loop !27

._crit_edge87:                                    ; preds = %75, %11
  %.071.lcssa = phi i32 [ 0, %11 ], [ %.1, %75 ]
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = and i32 %76, 1
  %.not77 = icmp eq i32 %77, 0
  br i1 %.not77, label %83, label %78

78:                                               ; preds = %._crit_edge87
  %79 = tail call double @__seconds() #2
  %80 = getelementptr inbounds i8, ptr %0, i64 120
  %81 = load double, ptr %80, align 8, !tbaa !14
  %82 = fadd double %79, %81
  store double %82, ptr %80, align 8, !tbaa !14
  br label %83

83:                                               ; preds = %78, %._crit_edge87
  tail call void @__CreateCoarseGraph(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %.071.lcssa, ptr noundef %27, ptr noundef %28) #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
}

attributes #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 = { 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 #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 56}
!22 = !{!16, !12, i64 80}
!23 = !{!7, !7, i64 0}
!24 = !{!6, !10, i64 24}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


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