; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @i4vec_permute(i32 noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  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
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !9
  %15 = call i32 @perm0_check(i32 noundef %13, ptr noundef %14)
  store i32 %15, ptr %9, align 4, !tbaa !5
  %16 = load i32, ptr %9, align 4, !tbaa !5
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %25

18:                                               ; preds = %3
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str) #4
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.14) #4
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.15) #4
  call void @exit(i32 noundef 1) #5
  unreachable

25:                                               ; preds = %3
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %41, %25
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %44

30:                                               ; preds = %26
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %31, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = load i32, ptr %8, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  store i32 %36, ptr %40, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %30
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %8, align 4, !tbaa !5
  br label %26, !llvm.loop !11

44:                                               ; preds = %26
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %151, %44
  %46 = load i32, ptr %12, align 4, !tbaa !5
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %49, label %154

49:                                               ; preds = %45
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = sub nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %50, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  br label %151

58:                                               ; preds = %49
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = sub nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %59, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %80

67:                                               ; preds = %58
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %68, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sub nsw i32 0, %73
  %75 = load ptr, ptr %5, align 8, !tbaa !9
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %75, i64 %78
  store i32 %74, ptr %79, align 4, !tbaa !5
  br label %151

80:                                               ; preds = %58
  %81 = load ptr, ptr %6, align 8, !tbaa !9
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %81, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr %7, align 4, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %87, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %136, %80
  %89 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %89, ptr %11, align 4, !tbaa !5
  %90 = load ptr, ptr %5, align 8, !tbaa !9
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sub 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 !5
  store i32 %95, ptr %10, align 4, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !9
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %96, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sub nsw i32 0, %101
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %103, i64 %106
  store i32 %102, ptr %107, align 4, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = icmp slt i32 %108, 1
  br i1 %109, label %114, label %110

110:                                              ; preds = %88
  %111 = load i32, ptr %4, align 4, !tbaa !5
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %114, label %125

114:                                              ; preds = %110, %88
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str) #4
  %117 = load ptr, ptr @stderr, align 8, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.14) #4
  %119 = load ptr, ptr @stderr, align 8, !tbaa !9
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.16, i32 noundef %120) #4
  %122 = load ptr, ptr @stderr, align 8, !tbaa !9
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.17, i32 noundef %123) #4
  call void @exit(i32 noundef 1) #5
  unreachable

125:                                              ; preds = %110
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = icmp eq i32 %126, %127
  br i1 %128, label %129, label %136

129:                                              ; preds = %125
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = load ptr, ptr %6, align 8, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %131, i64 %134
  store i32 %130, ptr %135, align 4, !tbaa !5
  br label %148

136:                                              ; preds = %125
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %137, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = load ptr, ptr %6, align 8, !tbaa !9
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sub nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %143, i64 %146
  store i32 %142, ptr %147, align 4, !tbaa !5
  br label %88

148:                                              ; preds = %129
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150, %67, %57
  %152 = load i32, ptr %12, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %12, align 4, !tbaa !5
  br label %45, !llvm.loop !13

154:                                              ; preds = %45
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %170, %154
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = load i32, ptr %4, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %173

159:                                              ; preds = %155
  %160 = load ptr, ptr %5, align 8, !tbaa !9
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = sub nsw i32 0, %164
  %166 = load ptr, ptr %5, align 8, !tbaa !9
  %167 = load i32, ptr %8, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  store i32 %165, ptr %169, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %159
  %171 = load i32, ptr %8, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %8, align 4, !tbaa !5
  br label %155, !llvm.loop !14

173:                                              ; preds = %155
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %189, %173
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = load i32, ptr %4, align 4, !tbaa !5
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %178, label %192

178:                                              ; preds = %174
  %179 = load ptr, ptr %5, align 8, !tbaa !9
  %180 = load i32, ptr %8, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i32, ptr %179, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sub nsw i32 %183, 1
  %185 = load ptr, ptr %5, align 8, !tbaa !9
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %185, i64 %187
  store i32 %184, ptr %188, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %178
  %190 = load i32, ptr %8, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %8, align 4, !tbaa !5
  br label %174, !llvm.loop !15

192:                                              ; preds = %174
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @perm0_check(i32 noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @i4vec_permute(i32 noundef %0, ptr noundef %1, ptr nocapture noundef %2) local_unnamed_addr #2 {
  %4 = tail call i32 @perm0_check(i32 noundef %0, ptr noundef %1)
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.preheader67, label %11

.preheader67:                                     ; preds = %3
  %5 = icmp sgt i32 %0, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge86

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

.lr.ph.preheader173:                              ; 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 ]
  %6 = getelementptr inbounds i32, ptr %1, i64 %index
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %wide.load = load <4 x i32>, ptr %6, align 4, !tbaa !5
  %wide.load134 = load <4 x i32>, ptr %7, align 4, !tbaa !5
  %8 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %9 = add nsw <4 x i32> %wide.load134, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %8, ptr %6, align 4, !tbaa !5
  store <4 x i32> %9, ptr %7, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %10 = icmp eq i64 %index.next, %n.vec
  br i1 %10, label %middle.block, label %vector.body, !llvm.loop !9

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

11:                                               ; preds = %3
  %12 = load ptr, ptr @stderr, align 8, !tbaa !13
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str) #3
  %14 = load ptr, ptr @stderr, align 8, !tbaa !13
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.14) #3
  %16 = load ptr, ptr @stderr, align 8, !tbaa !13
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.15) #3
  tail call void @exit(i32 noundef 1) #4
  unreachable

.lr.ph81:                                         ; preds = %.lr.ph, %middle.block
  %invariant.gep = getelementptr i8, ptr %2, i64 -4
  %18 = add nuw i32 %0, 1
  %wide.trip.count101 = zext i32 %18 to i64
  br label %27

.lr.ph:                                           ; preds = %.lr.ph.preheader173, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader173 ]
  %19 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr %19, align 4, !tbaa !5
  %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 %.lr.ph81, label %.lr.ph, !llvm.loop !15

.preheader65:                                     ; preds = %68
  br i1 %5, label %.lr.ph83.preheader, label %._crit_edge86

.lr.ph83.preheader:                               ; preds = %.preheader65
  %wide.trip.count106 = zext nneg i32 %0 to i64
  %min.iters.check137 = icmp ult i32 %0, 8
  br i1 %min.iters.check137, label %.lr.ph83.preheader162, label %vector.ph138

.lr.ph83.preheader162:                            ; preds = %middle.block135, %.lr.ph83.preheader
  %indvars.iv103.ph = phi i64 [ 0, %.lr.ph83.preheader ], [ %n.vec140, %middle.block135 ]
  br label %.lr.ph83

vector.ph138:                                     ; preds = %.lr.ph83.preheader
  %n.vec140 = and i64 %wide.trip.count, 2147483640
  br label %vector.body142

vector.body142:                                   ; preds = %vector.body142, %vector.ph138
  %index143 = phi i64 [ 0, %vector.ph138 ], [ %index.next146, %vector.body142 ]
  %22 = getelementptr inbounds i32, ptr %1, i64 %index143
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load144 = load <4 x i32>, ptr %22, align 4, !tbaa !5
  %wide.load145 = load <4 x i32>, ptr %23, align 4, !tbaa !5
  %24 = sub nsw <4 x i32> zeroinitializer, %wide.load144
  %25 = sub nsw <4 x i32> zeroinitializer, %wide.load145
  store <4 x i32> %24, ptr %22, align 4, !tbaa !5
  store <4 x i32> %25, ptr %23, align 4, !tbaa !5
  %index.next146 = add nuw i64 %index143, 8
  %26 = icmp eq i64 %index.next146, %n.vec140
  br i1 %26, label %middle.block135, label %vector.body142, !llvm.loop !16

middle.block135:                                  ; preds = %vector.body142
  %cmp.n147 = icmp eq i64 %n.vec140, %wide.trip.count
  br i1 %cmp.n147, label %.preheader, label %.lr.ph83.preheader162

27:                                               ; preds = %.lr.ph81, %68
  %indvars.iv98 = phi i64 [ 1, %.lr.ph81 ], [ %indvars.iv.next99, %68 ]
  %28 = add nsw i64 %indvars.iv98, -1
  %29 = getelementptr inbounds i32, ptr %1, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %68, label %32

32:                                               ; preds = %27
  %33 = zext nneg i32 %30 to i64
  %34 = icmp eq i64 %indvars.iv98, %33
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = sub nsw i32 0, %30
  store i32 %36, ptr %29, align 4, !tbaa !5
  br label %68

37:                                               ; preds = %32
  %38 = getelementptr inbounds i32, ptr %2, i64 %28
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sub nsw i32 0, %30
  store i32 %40, ptr %29, align 4, !tbaa !5
  %41 = icmp eq i32 %30, 0
  %42 = icmp sgt i32 %30, %0
  %or.cond73 = or i1 %41, %42
  br i1 %or.cond73, label %._crit_edge.loopexit87, label %.lr.ph74

._crit_edge.loopexit87:                           ; preds = %37
  %43 = trunc nuw nsw i64 %indvars.iv98 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %58, %._crit_edge.loopexit87
  %.060.lcssa = phi i32 [ %43, %._crit_edge.loopexit87 ], [ %52, %58 ]
  %.lcssa = phi i32 [ %30, %._crit_edge.loopexit87 ], [ %64, %58 ]
  %44 = load ptr, ptr @stderr, align 8, !tbaa !13
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str) #3
  %46 = load ptr, ptr @stderr, align 8, !tbaa !13
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.14) #3
  %48 = load ptr, ptr @stderr, align 8, !tbaa !13
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.16, i32 noundef %.060.lcssa) #3
  %50 = load ptr, ptr @stderr, align 8, !tbaa !13
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.17, i32 noundef %.lcssa) #3
  tail call void @exit(i32 noundef 1) #4
  unreachable

.lr.ph74:                                         ; preds = %37, %58
  %52 = phi i32 [ %64, %58 ], [ %30, %37 ]
  %53 = phi i64 [ %62, %58 ], [ %28, %37 ]
  %54 = zext nneg i32 %52 to i64
  %55 = icmp eq i64 %indvars.iv98, %54
  br i1 %55, label %56, label %58

56:                                               ; preds = %.lr.ph74
  %57 = getelementptr inbounds i32, ptr %2, i64 %53
  store i32 %39, ptr %57, align 4, !tbaa !5
  br label %68

58:                                               ; preds = %.lr.ph74
  %gep = getelementptr i32, ptr %invariant.gep, i64 %54
  %59 = load i32, ptr %gep, align 4, !tbaa !5
  %60 = getelementptr inbounds i32, ptr %2, i64 %53
  store i32 %59, ptr %60, align 4, !tbaa !5
  %61 = add nsw i32 %52, -1
  %62 = zext nneg i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %1, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sub nsw i32 0, %64
  store i32 %65, ptr %63, align 4, !tbaa !5
  %66 = icmp slt i32 %64, 1
  %67 = icmp sgt i32 %64, %0
  %or.cond = or i1 %66, %67
  br i1 %or.cond, label %._crit_edge, label %.lr.ph74

68:                                               ; preds = %27, %56, %35
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count101
  br i1 %exitcond102.not, label %.preheader65, label %27, !llvm.loop !17

.preheader:                                       ; preds = %.lr.ph83, %middle.block135
  br i1 %5, label %.lr.ph85.preheader, label %._crit_edge86

.lr.ph85.preheader:                               ; preds = %.preheader
  %wide.trip.count111 = zext nneg i32 %0 to i64
  %min.iters.check150 = icmp ult i32 %0, 8
  br i1 %min.iters.check150, label %.lr.ph85.preheader161, label %vector.ph151

.lr.ph85.preheader161:                            ; preds = %middle.block148, %.lr.ph85.preheader
  %indvars.iv108.ph = phi i64 [ 0, %.lr.ph85.preheader ], [ %n.vec153, %middle.block148 ]
  br label %.lr.ph85

vector.ph151:                                     ; preds = %.lr.ph85.preheader
  %n.vec153 = and i64 %wide.trip.count, 2147483640
  br label %vector.body155

vector.body155:                                   ; preds = %vector.body155, %vector.ph151
  %index156 = phi i64 [ 0, %vector.ph151 ], [ %index.next159, %vector.body155 ]
  %69 = getelementptr inbounds i32, ptr %1, i64 %index156
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load157 = load <4 x i32>, ptr %69, align 4, !tbaa !5
  %wide.load158 = load <4 x i32>, ptr %70, align 4, !tbaa !5
  %71 = add nsw <4 x i32> %wide.load157, <i32 -1, i32 -1, i32 -1, i32 -1>
  %72 = add nsw <4 x i32> %wide.load158, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %71, ptr %69, align 4, !tbaa !5
  store <4 x i32> %72, ptr %70, align 4, !tbaa !5
  %index.next159 = add nuw i64 %index156, 8
  %73 = icmp eq i64 %index.next159, %n.vec153
  br i1 %73, label %middle.block148, label %vector.body155, !llvm.loop !18

middle.block148:                                  ; preds = %vector.body155
  %cmp.n160 = icmp eq i64 %n.vec153, %wide.trip.count
  br i1 %cmp.n160, label %._crit_edge86, label %.lr.ph85.preheader161

.lr.ph83:                                         ; preds = %.lr.ph83.preheader162, %.lr.ph83
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.lr.ph83 ], [ %indvars.iv103.ph, %.lr.ph83.preheader162 ]
  %74 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv103
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = sub nsw i32 0, %75
  store i32 %76, ptr %74, align 4, !tbaa !5
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count106
  br i1 %exitcond107.not, label %.preheader, label %.lr.ph83, !llvm.loop !19

.lr.ph85:                                         ; preds = %.lr.ph85.preheader161, %.lr.ph85
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %.lr.ph85 ], [ %indvars.iv108.ph, %.lr.ph85.preheader161 ]
  %77 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv108
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr %77, align 4, !tbaa !5
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count111
  br i1 %exitcond112.not, label %._crit_edge86, label %.lr.ph85, !llvm.loop !20

._crit_edge86:                                    ; preds = %.lr.ph85, %middle.block148, %.preheader67, %.preheader65, %.preheader
  ret void
}

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

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn 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 #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 = { cold nounwind }
attributes #4 = { noreturn 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 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10, !11, !12}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !11, !12}
!19 = distinct !{!19, !10, !12, !11}
!20 = distinct !{!20, !10, !12, !11}


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