; 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.71 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [10 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 @r82row_part_quick_a(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [2 x double], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !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 16, 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
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 1
  br i1 %17, label %18, label %25

18:                                               ; preds = %4
  %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.71) #4
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.72) #4
  call void @exit(i32 noundef 1) #5
  unreachable

25:                                               ; preds = %4
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %29, align 4, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 2, ptr %30, align 4, !tbaa !5
  store i32 1, ptr %15, align 4
  br label %187

31:                                               ; preds = %25
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %32, i64 0
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 0
  store double %34, ptr %35, align 16, !tbaa !11
  %36 = load ptr, ptr %6, align 8, !tbaa !9
  %37 = getelementptr inbounds double, ptr %36, i64 1
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 1
  store double %38, ptr %39, align 8, !tbaa !11
  store i32 1, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %12, align 4, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %14, align 4, !tbaa !5
  store i32 2, ptr %9, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %109, %31
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = icmp sle i32 %43, %44
  br i1 %45, label %46, label %112

46:                                               ; preds = %42
  %47 = load ptr, ptr %6, align 8, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = mul nsw i32 2, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %47, i64 %50
  %52 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 0
  %53 = call i32 @r8vec_gt(i32 noundef 2, ptr noundef %51, ptr noundef %52)
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %69

55:                                               ; preds = %46
  %56 = load i32, ptr %14, align 4, !tbaa !5
  %57 = sub nsw i32 %56, 1
  store i32 %57, ptr %14, align 4, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !9
  %59 = load i32, ptr %14, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = mul nsw i32 2, %60
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds double, ptr %58, i64 %62
  %64 = load ptr, ptr %6, align 8, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = mul nsw i32 2, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %64, i64 %67
  call void @r8vec_swap(i32 noundef 2, ptr noundef %63, ptr noundef %68)
  br label %108

69:                                               ; preds = %46
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = mul nsw i32 2, %71
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %70, i64 %73
  %75 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 0
  %76 = call i32 @r8vec_eq(i32 noundef 2, ptr noundef %74, ptr noundef %75)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %94

78:                                               ; preds = %69
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %13, align 4, !tbaa !5
  %81 = load ptr, ptr %6, align 8, !tbaa !9
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = mul nsw i32 2, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %81, i64 %85
  %87 = load ptr, ptr %6, align 8, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = mul nsw i32 2, %88
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %87, i64 %90
  call void @r8vec_swap(i32 noundef 2, ptr noundef %86, ptr noundef %91)
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %12, align 4, !tbaa !5
  br label %107

94:                                               ; preds = %69
  %95 = load ptr, ptr %6, align 8, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = mul nsw i32 2, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %95, i64 %98
  %100 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 0
  %101 = call i32 @r8vec_lt(i32 noundef 2, ptr noundef %99, ptr noundef %100)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %94
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %12, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %103, %94
  br label %107

107:                                              ; preds = %106, %78
  br label %108

108:                                              ; preds = %107, %55
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %9, align 4, !tbaa !5
  br label %42, !llvm.loop !13

112:                                              ; preds = %42
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %145, %112
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = sub nsw i32 %115, %116
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %119, label %148

119:                                              ; preds = %113
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %141, %119
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = icmp slt i32 %121, 2
  br i1 %122, label %123, label %144

123:                                              ; preds = %120
  %124 = load ptr, ptr %6, align 8, !tbaa !9
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = add nsw i32 %125, %126
  %128 = mul nsw i32 2, %127
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = add nsw i32 %128, %129
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds double, ptr %124, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !11
  %134 = load ptr, ptr %6, align 8, !tbaa !9
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = mul nsw i32 2, %135
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = add nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %134, i64 %139
  store double %133, ptr %140, align 8, !tbaa !11
  br label %141

141:                                              ; preds = %123
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %10, align 4, !tbaa !5
  br label %120, !llvm.loop !15

144:                                              ; preds = %120
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %9, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %9, align 4, !tbaa !5
  br label %113, !llvm.loop !16

148:                                              ; preds = %113
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = sub nsw i32 %149, %150
  store i32 %151, ptr %12, align 4, !tbaa !5
  %152 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %152, ptr %9, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %179, %148
  %154 = load i32, ptr %9, align 4, !tbaa !5
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = load i32, ptr %13, align 4, !tbaa !5
  %157 = add nsw i32 %155, %156
  %158 = icmp slt i32 %154, %157
  br i1 %158, label %159, label %182

159:                                              ; preds = %153
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %175, %159
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = icmp slt i32 %161, 2
  br i1 %162, label %163, label %178

163:                                              ; preds = %160
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [2 x double], ptr %11, i64 0, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = load ptr, ptr %6, align 8, !tbaa !9
  %169 = load i32, ptr %9, align 4, !tbaa !5
  %170 = mul nsw i32 2, %169
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = add nsw i32 %170, %171
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %168, i64 %173
  store double %167, ptr %174, align 8, !tbaa !11
  br label %175

175:                                              ; preds = %163
  %176 = load i32, ptr %10, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %10, align 4, !tbaa !5
  br label %160, !llvm.loop !17

178:                                              ; preds = %160
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %9, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %9, align 4, !tbaa !5
  br label %153, !llvm.loop !18

182:                                              ; preds = %153
  %183 = load i32, ptr %12, align 4, !tbaa !5
  %184 = load ptr, ptr %7, align 8, !tbaa !9
  store i32 %183, ptr %184, align 4, !tbaa !5
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 %185, ptr %186, align 4, !tbaa !5
  store i32 1, ptr %15, align 4
  br label %187

187:                                              ; preds = %182, %28
  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 16, 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 uwtable
declare dso_local i32 @r8vec_gt(i32 noundef, ptr noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @r8vec_lt(i32 noundef, ptr 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


; 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.71 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [10 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @r82row_part_quick_a(i32 noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #3 {
  %5 = alloca [2 x double], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %6 = icmp slt i32 %0, 1
  br i1 %6, label %7, label %14

7:                                                ; preds = %4
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str) #6
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.71) #6
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.72) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

14:                                               ; preds = %4
  %15 = icmp eq i32 %0, 1
  br i1 %15, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %14
  %16 = load <2 x double>, ptr %1, align 8, !tbaa !9
  store <2 x double> %16, ptr %5, align 16, !tbaa !9
  %17 = add nuw i32 %0, 1
  br label %.lr.ph

.preheader73:                                     ; preds = %64
  %18 = sub nsw i32 %.160, %.158
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.preheader72.preheader, label %.preheader71

.preheader72.preheader:                           ; preds = %.preheader73
  %20 = sext i32 %.158 to i64
  %wide.trip.count = zext nneg i32 %18 to i64
  %min.iters.check = icmp ult i32 %18, 32
  br i1 %min.iters.check, label %.preheader72.preheader127, label %vector.scevcheck

.preheader72.preheader127:                        ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.preheader72.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %vector.scevcheck ], [ 0, %.preheader72.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader72.prol.loopexit, label %.preheader72.prol

.preheader72.prol:                                ; preds = %.preheader72.preheader127
  %21 = add nsw i64 %indvars.iv.ph, %20
  %.idx125.prol = shl nsw i64 %21, 4
  %22 = getelementptr inbounds i8, ptr %1, i64 %.idx125.prol
  %.idx126.prol = shl nuw nsw i64 %indvars.iv.ph, 4
  %23 = getelementptr inbounds i8, ptr %1, i64 %.idx126.prol
  %24 = load <2 x double>, ptr %22, align 8, !tbaa !9
  store <2 x double> %24, ptr %23, align 8, !tbaa !9
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.preheader72.prol.loopexit

.preheader72.prol.loopexit:                       ; preds = %.preheader72.prol, %.preheader72.preheader127
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.preheader72.preheader127 ], [ %indvars.iv.next.prol, %.preheader72.prol ]
  %25 = add nsw i64 %wide.trip.count, -1
  %26 = icmp eq i64 %indvars.iv.ph, %25
  br i1 %26, label %.preheader71, label %.preheader72

vector.scevcheck:                                 ; preds = %.preheader72.preheader
  %27 = add nsw i64 %wide.trip.count, -1
  %28 = shl nsw i64 %20, 4
  %scevgep93 = getelementptr i8, ptr %1, i64 %28
  %mul.result = shl nsw i64 %27, 4
  %29 = getelementptr i8, ptr %scevgep93, i64 %mul.result
  %30 = icmp ult ptr %29, %scevgep93
  %scevgep94 = getelementptr i8, ptr %1, i64 8
  %scevgep95 = getelementptr i8, ptr %scevgep94, i64 %28
  %mul.result97 = shl nsw i64 %27, 4
  %mul.overflow98 = icmp ugt i64 %27, 1152921504606846975
  %31 = getelementptr i8, ptr %scevgep95, i64 %mul.result97
  %32 = icmp ult ptr %31, %scevgep95
  %33 = or i1 %32, %mul.overflow98
  %34 = or i1 %30, %33
  br i1 %34, label %.preheader72.preheader127, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %scevgep99 = getelementptr i8, ptr %1, i64 -8
  %35 = shl nuw nsw i64 %wide.trip.count, 4
  %scevgep100 = getelementptr i8, ptr %scevgep99, i64 %35
  %scevgep101 = getelementptr i8, ptr %1, i64 8
  %scevgep102 = getelementptr i8, ptr %1, i64 %35
  %36 = shl nsw i64 %20, 4
  %scevgep103 = getelementptr i8, ptr %1, i64 %36
  %scevgep104 = getelementptr i8, ptr %1, i64 -8
  %37 = add nsw i64 %36, %35
  %scevgep105 = getelementptr i8, ptr %scevgep104, i64 %37
  %scevgep106 = getelementptr i8, ptr %1, i64 8
  %scevgep107 = getelementptr i8, ptr %scevgep106, i64 %36
  %scevgep108 = getelementptr i8, ptr %1, i64 %37
  %bound0 = icmp ugt ptr %scevgep102, %1
  %bound1 = icmp ult ptr %scevgep101, %scevgep100
  %found.conflict = and i1 %bound0, %bound1
  %bound0109 = icmp ugt ptr %scevgep105, %1
  %bound1110 = icmp ult ptr %scevgep103, %scevgep100
  %found.conflict111 = and i1 %bound0109, %bound1110
  %conflict.rdx = or i1 %found.conflict, %found.conflict111
  %bound0112 = icmp ugt ptr %scevgep108, %1
  %bound1113 = icmp ult ptr %scevgep107, %scevgep100
  %found.conflict114 = and i1 %bound0112, %bound1113
  %conflict.rdx115 = or i1 %conflict.rdx, %found.conflict114
  %bound0116 = icmp ult ptr %scevgep101, %scevgep105
  %bound1117 = icmp ult ptr %scevgep103, %scevgep102
  %found.conflict118 = and i1 %bound0116, %bound1117
  %conflict.rdx119 = or i1 %conflict.rdx115, %found.conflict118
  %bound0120 = icmp ult ptr %scevgep101, %scevgep108
  %bound1121 = icmp ult ptr %scevgep107, %scevgep102
  %found.conflict122 = and i1 %bound0120, %bound1121
  %conflict.rdx123 = or i1 %conflict.rdx119, %found.conflict122
  br i1 %conflict.rdx123, label %.preheader72.preheader127, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483646
  %invariant.gep = getelementptr i8, ptr %1, i64 -8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %38 = add nsw i64 %index, %20
  %39 = shl nuw nsw i64 %index, 1
  %.idx = shl nsw i64 %38, 4
  %40 = getelementptr inbounds i8, ptr %1, i64 %.idx
  %wide.vec = load <4 x double>, ptr %40, align 8, !tbaa !9
  %41 = or disjoint i64 %39, 1
  %gep = getelementptr double, ptr %invariant.gep, i64 %41
  store <4 x double> %wide.vec, ptr %gep, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader71, label %.preheader72.preheader127

.lr.ph:                                           ; preds = %.lr.ph.preheader, %64
  %.078 = phi i32 [ %.1, %64 ], [ %17, %.lr.ph.preheader ]
  %.05777 = phi i32 [ %.158, %64 ], [ 1, %.lr.ph.preheader ]
  %.05976 = phi i32 [ %.160, %64 ], [ 1, %.lr.ph.preheader ]
  %.06375 = phi i32 [ %65, %64 ], [ 2, %.lr.ph.preheader ]
  %43 = shl nsw i32 %.05976, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds double, ptr %1, i64 %44
  %46 = call i32 @r8vec_gt(i32 noundef 2, ptr noundef nonnull %45, ptr noundef nonnull %5)
  %.not68 = icmp eq i32 %46, 0
  br i1 %.not68, label %53, label %47

47:                                               ; preds = %.lr.ph
  %48 = add nsw i32 %.078, -1
  %49 = shl i32 %.078, 1
  %50 = add i32 %49, -4
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %1, i64 %51
  call void @r8vec_swap(i32 noundef 2, ptr noundef nonnull %52, ptr noundef nonnull %45)
  br label %64

53:                                               ; preds = %.lr.ph
  %54 = call i32 @r8vec_eq(i32 noundef 2, ptr noundef nonnull %45, ptr noundef nonnull %5)
  %.not69 = icmp eq i32 %54, 0
  br i1 %.not69, label %61, label %55

55:                                               ; preds = %53
  %56 = add nsw i32 %.05777, 1
  %57 = shl nsw i32 %.05777, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds double, ptr %1, i64 %58
  call void @r8vec_swap(i32 noundef 2, ptr noundef nonnull %59, ptr noundef nonnull %45)
  %60 = add nsw i32 %.05976, 1
  br label %64

61:                                               ; preds = %53
  %62 = call i32 @r8vec_lt(i32 noundef 2, ptr noundef nonnull %45, ptr noundef nonnull %5)
  %.not70 = icmp ne i32 %62, 0
  %63 = zext i1 %.not70 to i32
  %spec.select = add nsw i32 %.05976, %63
  br label %64

64:                                               ; preds = %61, %47, %55
  %.160 = phi i32 [ %.05976, %47 ], [ %60, %55 ], [ %spec.select, %61 ]
  %.158 = phi i32 [ %.05777, %47 ], [ %56, %55 ], [ %.05777, %61 ]
  %.1 = phi i32 [ %48, %47 ], [ %.078, %55 ], [ %.078, %61 ]
  %65 = add nuw i32 %.06375, 1
  %exitcond.not = icmp eq i32 %.06375, %0
  br i1 %exitcond.not, label %.preheader73, label %.lr.ph, !llvm.loop !15

.preheader72:                                     ; preds = %.preheader72.prol.loopexit, %.preheader72
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.preheader72 ], [ %indvars.iv.unr, %.preheader72.prol.loopexit ]
  %66 = add nsw i64 %indvars.iv, %20
  %.idx125 = shl nsw i64 %66, 4
  %67 = getelementptr inbounds i8, ptr %1, i64 %.idx125
  %.idx126 = shl nsw i64 %indvars.iv, 4
  %68 = getelementptr inbounds i8, ptr %1, i64 %.idx126
  %69 = load <2 x double>, ptr %67, align 8, !tbaa !9
  store <2 x double> %69, ptr %68, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = add nsw i64 %indvars.iv.next, %20
  %.idx125.1 = shl nsw i64 %70, 4
  %71 = getelementptr inbounds i8, ptr %1, i64 %.idx125.1
  %.idx126.1 = shl nsw i64 %indvars.iv.next, 4
  %72 = getelementptr inbounds i8, ptr %1, i64 %.idx126.1
  %73 = load <2 x double>, ptr %71, align 8, !tbaa !9
  store <2 x double> %73, ptr %72, align 8, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond89.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond89.not.1, label %.preheader71, label %.preheader72, !llvm.loop !16

.preheader71:                                     ; preds = %.preheader72.prol.loopexit, %.preheader72, %middle.block, %.preheader73
  %74 = icmp sgt i32 %.158, 0
  br i1 %74, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %.preheader71
  %75 = sub i32 %.160, %.158
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvar = phi i32 [ 0, %.preheader.preheader ], [ %indvar.next, %.preheader ]
  %.285 = phi i32 [ %18, %.preheader.preheader ], [ %80, %.preheader ]
  %76 = add i32 %75, %indvar
  %77 = shl i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = shl nsw i64 %78, 3
  %scevgep = getelementptr i8, ptr %1, i64 %79
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %scevgep, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false), !tbaa !9
  %80 = add nsw i32 %.285, 1
  %81 = icmp slt i32 %80, %.160
  %indvar.next = add i32 %indvar, 1
  br i1 %81, label %.preheader, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %.preheader, %.preheader71, %14
  %storemerge67 = phi i32 [ 0, %14 ], [ %18, %.preheader71 ], [ %18, %.preheader ]
  %storemerge = phi i32 [ 2, %14 ], [ %.1, %.preheader71 ], [ %.1, %.preheader ]
  store i32 %storemerge67, ptr %2, align 4, !tbaa !18
  store i32 %storemerge, ptr %3, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  ret void
}

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { cold nounwind }
attributes #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !13}
!17 = distinct !{!17, !12}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !7, i64 0}


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