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

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

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

38:                                               ; preds = %49, %4
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %52

42:                                               ; preds = %38
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %43, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %42
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !9
  br label %38, !llvm.loop !15

52:                                               ; preds = %38
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %65, %52
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  %57 = icmp slt i32 %54, %56
  br i1 %57, label %58, label %68

58:                                               ; preds = %53
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %58
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !9
  br label %53, !llvm.loop !17

68:                                               ; preds = %53
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = add nsw i32 %69, 5
  %71 = mul nsw i32 6, %70
  %72 = call ptr @__idxmalloc(i32 noundef %71, ptr noundef @.str.8)
  store ptr %72, ptr %18, align 8, !tbaa !5
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = getelementptr inbounds i32, ptr %76, i64 5
  store ptr %77, ptr %19, align 8, !tbaa !5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = getelementptr inbounds i32, ptr %81, i64 5
  store ptr %82, ptr %20, align 8, !tbaa !5
  %83 = load ptr, ptr %20, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = getelementptr inbounds i32, ptr %86, i64 5
  store ptr %87, ptr %21, align 8, !tbaa !5
  %88 = load ptr, ptr %21, align 8, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %88, i64 %90
  %92 = getelementptr inbounds i32, ptr %91, i64 5
  store ptr %92, ptr %22, align 8, !tbaa !5
  %93 = load ptr, ptr %22, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  %97 = getelementptr inbounds i32, ptr %96, i64 5
  store ptr %97, ptr %23, align 8, !tbaa !5
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  %105 = load ptr, ptr %22, align 8, !tbaa !5
  %106 = load ptr, ptr %23, align 8, !tbaa !5
  call void @__genmmd(i32 noundef %98, ptr noundef %99, ptr noundef %100, ptr noundef %101, ptr noundef %102, i32 noundef 1, ptr noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %106, i32 noundef 1073741824, ptr noundef %13)
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.graphdef, ptr %107, i32 0, i32 10
  %109 = load ptr, ptr %108, align 8, !tbaa !18
  store ptr %109, ptr %17, align 8, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !9
  %111 = load i32, ptr %12, align 4, !tbaa !9
  %112 = sub nsw i32 %110, %111
  store i32 %112, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %134, %68
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %137

117:                                              ; preds = %113
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = add nsw i32 %118, %123
  %125 = sub nsw i32 %124, 1
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %17, align 8, !tbaa !5
  %128 = load i32, ptr %9, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i32, ptr %127, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %126, i64 %132
  store i32 %125, ptr %133, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %117
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !9
  br label %113, !llvm.loop !19

137:                                              ; preds = %113
  %138 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %138) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %151, %137
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  %143 = icmp slt i32 %140, %142
  br i1 %143, label %144, label %154

144:                                              ; preds = %139
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %145, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = add nsw i32 %149, -1
  store i32 %150, ptr %148, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %144
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %9, align 4, !tbaa !9
  br label %139, !llvm.loop !20

154:                                              ; preds = %139
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %155, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !9
  store i32 %159, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %171, %154
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %164, label %174

164:                                              ; preds = %160
  %165 = load ptr, ptr %16, align 8, !tbaa !5
  %166 = load i32, ptr %9, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds i32, ptr %165, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !9
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %168, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %164
  %172 = load i32, ptr %9, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %9, align 4, !tbaa !9
  br label %160, !llvm.loop !21

174:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

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

declare void @__genmmd(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 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 16}
!12 = !{!"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}
!13 = !{!12, !6, i64 24}
!14 = !{!12, !6, i64 48}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!12, !6, i64 72}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}


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

@.str.8 = external hidden unnamed_addr constant [15 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 ptr @__idxmalloc(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @__MMDOrder(ptr nocapture noundef readnone %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %6 = getelementptr inbounds i8, ptr %1, i64 16
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %1, i64 48
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = sext i32 %7 to i64
  %13 = getelementptr inbounds i32, ptr %9, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !13
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %14 to i64
  %min.iters.check = icmp ult i32 %14, 8
  br i1 %min.iters.check, label %.lr.ph.preheader142, label %vector.ph

.lr.ph.preheader142:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.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 ]
  %16 = getelementptr inbounds i32, ptr %11, i64 %index
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %wide.load = load <4 x i32>, ptr %16, align 4, !tbaa !13
  %wide.load99 = load <4 x i32>, ptr %17, align 4, !tbaa !13
  %18 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %19 = add nsw <4 x i32> %wide.load99, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %18, ptr %16, align 4, !tbaa !13
  store <4 x i32> %19, ptr %17, align 4, !tbaa !13
  %index.next = add nuw i64 %index, 8
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !14

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

.preheader:                                       ; preds = %.lr.ph, %middle.block, %4
  %.not62 = icmp slt i32 %7, 0
  br i1 %.not62, label %._crit_edge, label %.lr.ph64.preheader

.lr.ph64.preheader:                               ; preds = %.preheader
  %21 = add nuw i32 %7, 1
  %wide.trip.count82 = zext i32 %21 to i64
  %min.iters.check102 = icmp ult i32 %7, 7
  br i1 %min.iters.check102, label %.lr.ph64.preheader141, label %vector.ph103

.lr.ph64.preheader141:                            ; preds = %middle.block100, %.lr.ph64.preheader
  %indvars.iv79.ph = phi i64 [ 0, %.lr.ph64.preheader ], [ %n.vec105, %middle.block100 ]
  br label %.lr.ph64

vector.ph103:                                     ; preds = %.lr.ph64.preheader
  %n.vec105 = and i64 %wide.trip.count82, 4294967288
  br label %vector.body107

vector.body107:                                   ; preds = %vector.body107, %vector.ph103
  %index108 = phi i64 [ 0, %vector.ph103 ], [ %index.next111, %vector.body107 ]
  %22 = getelementptr inbounds i32, ptr %9, i64 %index108
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load109 = load <4 x i32>, ptr %22, align 4, !tbaa !13
  %wide.load110 = load <4 x i32>, ptr %23, align 4, !tbaa !13
  %24 = add nsw <4 x i32> %wide.load109, <i32 1, i32 1, i32 1, i32 1>
  %25 = add nsw <4 x i32> %wide.load110, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %24, ptr %22, align 4, !tbaa !13
  store <4 x i32> %25, ptr %23, align 4, !tbaa !13
  %index.next111 = add nuw i64 %index108, 8
  %26 = icmp eq i64 %index.next111, %n.vec105
  br i1 %26, label %middle.block100, label %vector.body107, !llvm.loop !18

middle.block100:                                  ; preds = %vector.body107
  %cmp.n112 = icmp eq i64 %n.vec105, %wide.trip.count82
  br i1 %cmp.n112, label %._crit_edge, label %.lr.ph64.preheader141

.lr.ph:                                           ; preds = %.lr.ph.preheader142, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader142 ]
  %27 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !19

.lr.ph64:                                         ; preds = %.lr.ph64.preheader141, %.lr.ph64
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph64 ], [ %indvars.iv79.ph, %.lr.ph64.preheader141 ]
  %30 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv79
  %31 = load i32, ptr %30, align 4, !tbaa !13
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !13
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge, label %.lr.ph64, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph64, %middle.block100, %.preheader
  %33 = mul i32 %7, 6
  %34 = add i32 %33, 30
  %35 = tail call ptr @__idxmalloc(i32 noundef %34, ptr noundef nonnull @.str.8) #4
  %36 = getelementptr inbounds i32, ptr %35, i64 %12
  %37 = getelementptr inbounds i8, ptr %36, i64 20
  %38 = getelementptr inbounds i32, ptr %37, i64 %12
  %39 = getelementptr inbounds i8, ptr %38, i64 20
  %40 = getelementptr inbounds i32, ptr %39, i64 %12
  %41 = getelementptr inbounds i8, ptr %40, i64 20
  %42 = getelementptr inbounds i32, ptr %41, i64 %12
  %43 = getelementptr inbounds i8, ptr %42, i64 20
  %44 = getelementptr inbounds i32, ptr %43, i64 %12
  %45 = getelementptr inbounds i8, ptr %44, i64 20
  call void @__genmmd(i32 noundef %7, ptr noundef %9, ptr noundef %11, ptr noundef nonnull %37, ptr noundef %35, i32 noundef 1, ptr noundef nonnull %39, ptr noundef nonnull %41, ptr noundef nonnull %43, ptr noundef nonnull %45, i32 noundef 1073741824, ptr noundef nonnull %5) #4
  %46 = getelementptr inbounds i8, ptr %1, i64 72
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = icmp sgt i32 %7, 0
  br i1 %48, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %._crit_edge
  %49 = xor i32 %7, -1
  %50 = add i32 %49, %3
  %wide.trip.count87 = zext nneg i32 %7 to i64
  %xtraiter = and i64 %wide.trip.count87, 3
  %51 = icmp ult i32 %7, 4
  br i1 %51, label %._crit_edge68.loopexit.unr-lcssa, label %.lr.ph67.new

.lr.ph67.new:                                     ; preds = %.lr.ph67
  %unroll_iter = and i64 %wide.trip.count87, 2147483644
  br label %52

52:                                               ; preds = %52, %.lr.ph67.new
  %indvars.iv84 = phi i64 [ 0, %.lr.ph67.new ], [ %indvars.iv.next85.3, %52 ]
  %niter = phi i64 [ 0, %.lr.ph67.new ], [ %niter.next.3, %52 ]
  %53 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv84
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = add i32 %50, %54
  %56 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv84
  %57 = load i32, ptr %56, align 4, !tbaa !13
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %2, i64 %58
  store i32 %55, ptr %59, align 4, !tbaa !13
  %indvars.iv.next85 = or disjoint i64 %indvars.iv84, 1
  %60 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv.next85
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = add i32 %50, %61
  %63 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next85
  %64 = load i32, ptr %63, align 4, !tbaa !13
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %2, i64 %65
  store i32 %62, ptr %66, align 4, !tbaa !13
  %indvars.iv.next85.1 = or disjoint i64 %indvars.iv84, 2
  %67 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv.next85.1
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = add i32 %50, %68
  %70 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next85.1
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %2, i64 %72
  store i32 %69, ptr %73, align 4, !tbaa !13
  %indvars.iv.next85.2 = or disjoint i64 %indvars.iv84, 3
  %74 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv.next85.2
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = add i32 %50, %75
  %77 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next85.2
  %78 = load i32, ptr %77, align 4, !tbaa !13
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %2, i64 %79
  store i32 %76, ptr %80, align 4, !tbaa !13
  %indvars.iv.next85.3 = add nuw nsw i64 %indvars.iv84, 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_edge68.loopexit.unr-lcssa, label %52, !llvm.loop !22

._crit_edge68.loopexit.unr-lcssa:                 ; preds = %52, %.lr.ph67
  %indvars.iv84.unr = phi i64 [ 0, %.lr.ph67 ], [ %indvars.iv.next85.3, %52 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge68, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge68.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv84.epil = phi i64 [ %indvars.iv.next85.epil, %.epil.preheader ], [ %indvars.iv84.unr, %._crit_edge68.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge68.loopexit.unr-lcssa ]
  %81 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv84.epil
  %82 = load i32, ptr %81, align 4, !tbaa !13
  %83 = add i32 %50, %82
  %84 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv84.epil
  %85 = load i32, ptr %84, align 4, !tbaa !13
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %2, i64 %86
  store i32 %83, ptr %87, align 4, !tbaa !13
  %indvars.iv.next85.epil = add nuw nsw i64 %indvars.iv84.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_edge68, label %.epil.preheader, !llvm.loop !23

._crit_edge68:                                    ; preds = %._crit_edge68.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge
  call void @free(ptr noundef %35) #4
  br i1 %.not62, label %._crit_edge73, label %.lr.ph72.preheader

.lr.ph72.preheader:                               ; preds = %._crit_edge68
  %88 = add nuw i32 %7, 1
  %wide.trip.count92 = zext i32 %88 to i64
  %min.iters.check115 = icmp ult i32 %7, 7
  br i1 %min.iters.check115, label %.lr.ph72.preheader140, label %vector.ph116

vector.ph116:                                     ; preds = %.lr.ph72.preheader
  %n.vec118 = and i64 %wide.trip.count92, 4294967288
  br label %vector.body120

vector.body120:                                   ; preds = %vector.body120, %vector.ph116
  %index121 = phi i64 [ 0, %vector.ph116 ], [ %index.next124, %vector.body120 ]
  %89 = getelementptr inbounds i32, ptr %9, i64 %index121
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  %wide.load122 = load <4 x i32>, ptr %89, align 4, !tbaa !13
  %wide.load123 = load <4 x i32>, ptr %90, align 4, !tbaa !13
  %91 = add nsw <4 x i32> %wide.load122, <i32 -1, i32 -1, i32 -1, i32 -1>
  %92 = add nsw <4 x i32> %wide.load123, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %91, ptr %89, align 4, !tbaa !13
  store <4 x i32> %92, ptr %90, align 4, !tbaa !13
  %index.next124 = add nuw i64 %index121, 8
  %93 = icmp eq i64 %index.next124, %n.vec118
  br i1 %93, label %middle.block113, label %vector.body120, !llvm.loop !25

middle.block113:                                  ; preds = %vector.body120
  %cmp.n125 = icmp eq i64 %n.vec118, %wide.trip.count92
  br i1 %cmp.n125, label %._crit_edge73, label %.lr.ph72.preheader140

.lr.ph72.preheader140:                            ; preds = %middle.block113, %.lr.ph72.preheader
  %indvars.iv89.ph = phi i64 [ 0, %.lr.ph72.preheader ], [ %n.vec118, %middle.block113 ]
  br label %.lr.ph72

.lr.ph72:                                         ; preds = %.lr.ph72.preheader140, %.lr.ph72
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph72 ], [ %indvars.iv89.ph, %.lr.ph72.preheader140 ]
  %94 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv89
  %95 = load i32, ptr %94, align 4, !tbaa !13
  %96 = add nsw i32 %95, -1
  store i32 %96, ptr %94, align 4, !tbaa !13
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge73, label %.lr.ph72, !llvm.loop !26

._crit_edge73:                                    ; preds = %.lr.ph72, %middle.block113, %._crit_edge68
  %97 = load i32, ptr %13, align 4, !tbaa !13
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph76.preheader, label %._crit_edge77

.lr.ph76.preheader:                               ; preds = %._crit_edge73
  %wide.trip.count97 = zext nneg i32 %97 to i64
  %min.iters.check128 = icmp ult i32 %97, 8
  br i1 %min.iters.check128, label %.lr.ph76.preheader139, label %vector.ph129

vector.ph129:                                     ; preds = %.lr.ph76.preheader
  %n.vec131 = and i64 %wide.trip.count97, 2147483640
  br label %vector.body133

vector.body133:                                   ; preds = %vector.body133, %vector.ph129
  %index134 = phi i64 [ 0, %vector.ph129 ], [ %index.next137, %vector.body133 ]
  %99 = getelementptr inbounds i32, ptr %11, i64 %index134
  %100 = getelementptr inbounds i8, ptr %99, i64 16
  %wide.load135 = load <4 x i32>, ptr %99, align 4, !tbaa !13
  %wide.load136 = load <4 x i32>, ptr %100, align 4, !tbaa !13
  %101 = add nsw <4 x i32> %wide.load135, <i32 -1, i32 -1, i32 -1, i32 -1>
  %102 = add nsw <4 x i32> %wide.load136, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %101, ptr %99, align 4, !tbaa !13
  store <4 x i32> %102, ptr %100, align 4, !tbaa !13
  %index.next137 = add nuw i64 %index134, 8
  %103 = icmp eq i64 %index.next137, %n.vec131
  br i1 %103, label %middle.block126, label %vector.body133, !llvm.loop !27

middle.block126:                                  ; preds = %vector.body133
  %cmp.n138 = icmp eq i64 %n.vec131, %wide.trip.count97
  br i1 %cmp.n138, label %._crit_edge77, label %.lr.ph76.preheader139

.lr.ph76.preheader139:                            ; preds = %middle.block126, %.lr.ph76.preheader
  %indvars.iv94.ph = phi i64 [ 0, %.lr.ph76.preheader ], [ %n.vec131, %middle.block126 ]
  br label %.lr.ph76

.lr.ph76:                                         ; preds = %.lr.ph76.preheader139, %.lr.ph76
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph76 ], [ %indvars.iv94.ph, %.lr.ph76.preheader139 ]
  %104 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv94
  %105 = load i32, ptr %104, align 4, !tbaa !13
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %104, align 4, !tbaa !13
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge77, label %.lr.ph76, !llvm.loop !28

._crit_edge77:                                    ; preds = %.lr.ph76, %middle.block126, %._crit_edge73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #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

declare void @__genmmd(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 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, !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 24}
!12 = !{!6, !7, i64 48}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15, !16, !17}
!19 = distinct !{!19, !15, !17, !16}
!20 = distinct !{!20, !15, !17, !16}
!21 = !{!6, !7, i64 72}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = distinct !{!25, !15, !16, !17}
!26 = distinct !{!26, !15, !17, !16}
!27 = distinct !{!27, !15, !16, !17}
!28 = distinct !{!28, !15, !17, !16}


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