; LLVM IR from darnstrom/daqp :: src (auxiliary)

; 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.DAQPWorkspace = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i32, ptr, i32, i32, i32, double, ptr, ptr, i32, ptr }
%struct.DAQPSettings = type { double, double, double, double, double, i32, i32, double, double, double, double, double, double }

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @remove_blocking(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 -1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store double 1.000000e+30, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.DAQPWorkspace, ptr %10, i32 0, i32 28
  %12 = load ptr, ptr %11, align 8, !tbaa !13
  %13 = getelementptr inbounds %struct.DAQPSettings, ptr %12, i32 0, i32 1
  %14 = load double, ptr %13, align 8, !tbaa !15
  store double %14, ptr %8, align 8, !tbaa !11
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %134, %1
  %16 = load i32, ptr %4, align 4, !tbaa !9
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.DAQPWorkspace, ptr %17, i32 0, i32 24
  %19 = load i32, ptr %18, align 8, !tbaa !17
  %20 = icmp slt i32 %16, %19
  br i1 %20, label %21, label %137

21:                                               ; preds = %15
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.DAQPWorkspace, ptr %22, i32 0, i32 9
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.DAQPWorkspace, ptr %25, i32 0, i32 23
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i32, ptr %27, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %24, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = and i32 %34, 4
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %21
  br label %134

38:                                               ; preds = %21
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.DAQPWorkspace, ptr %39, i32 0, i32 9
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.DAQPWorkspace, ptr %42, i32 0, i32 23
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %41, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = and i32 %51, 2
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %66

54:                                               ; preds = %38
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.DAQPWorkspace, ptr %55, i32 0, i32 15
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = load i32, ptr %4, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = load double, ptr %8, align 8, !tbaa !11
  %63 = fcmp olt double %61, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %54
  br label %134

65:                                               ; preds = %54
  br label %79

66:                                               ; preds = %38
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.DAQPWorkspace, ptr %67, i32 0, i32 15
  %69 = load ptr, ptr %68, align 8, !tbaa !20
  %70 = load i32, ptr %4, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = load double, ptr %8, align 8, !tbaa !11
  %75 = fneg double %74
  %76 = fcmp ogt double %73, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %66
  br label %134

78:                                               ; preds = %66
  br label %79

79:                                               ; preds = %78, %65
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.DAQPWorkspace, ptr %80, i32 0, i32 26
  %82 = load i32, ptr %81, align 8, !tbaa !21
  %83 = icmp eq i32 %82, -1
  br i1 %83, label %84, label %109

84:                                               ; preds = %79
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.DAQPWorkspace, ptr %85, i32 0, i32 14
  %87 = load ptr, ptr %86, align 8, !tbaa !22
  %88 = load i32, ptr %4, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !11
  %92 = fneg double %91
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.DAQPWorkspace, ptr %93, i32 0, i32 15
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = load i32, ptr %4, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds double, ptr %95, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.DAQPWorkspace, ptr %100, i32 0, i32 14
  %102 = load ptr, ptr %101, align 8, !tbaa !22
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = fsub double %99, %106
  %108 = fdiv double %92, %107
  store double %108, ptr %7, align 8, !tbaa !11
  br label %126

109:                                              ; preds = %79
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.DAQPWorkspace, ptr %110, i32 0, i32 14
  %112 = load ptr, ptr %111, align 8, !tbaa !22
  %113 = load i32, ptr %4, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = fneg double %116
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.DAQPWorkspace, ptr %118, i32 0, i32 15
  %120 = load ptr, ptr %119, align 8, !tbaa !20
  %121 = load i32, ptr %4, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds double, ptr %120, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = fdiv double %117, %124
  store double %125, ptr %7, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %109, %84
  %127 = load double, ptr %7, align 8, !tbaa !11
  %128 = load double, ptr %6, align 8, !tbaa !11
  %129 = fcmp olt double %127, %128
  br i1 %129, label %130, label %133

130:                                              ; preds = %126
  %131 = load double, ptr %7, align 8, !tbaa !11
  store double %131, ptr %6, align 8, !tbaa !11
  %132 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %132, ptr %5, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %130, %126
  br label %134

134:                                              ; preds = %133, %77, %64, %37
  %135 = load i32, ptr %4, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %4, align 4, !tbaa !9
  br label %15, !llvm.loop !23

137:                                              ; preds = %15
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = icmp eq i32 %138, -1
  br i1 %139, label %140, label %141

140:                                              ; preds = %137
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %215

141:                                              ; preds = %137
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.DAQPWorkspace, ptr %142, i32 0, i32 26
  %144 = load i32, ptr %143, align 8, !tbaa !21
  %145 = icmp eq i32 %144, -1
  br i1 %145, label %146, label %182

146:                                              ; preds = %141
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %178, %146
  %148 = load i32, ptr %4, align 4, !tbaa !9
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.DAQPWorkspace, ptr %149, i32 0, i32 24
  %151 = load i32, ptr %150, align 8, !tbaa !17
  %152 = icmp slt i32 %148, %151
  br i1 %152, label %153, label %181

153:                                              ; preds = %147
  %154 = load double, ptr %6, align 8, !tbaa !11
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.DAQPWorkspace, ptr %155, i32 0, i32 15
  %157 = load ptr, ptr %156, align 8, !tbaa !20
  %158 = load i32, ptr %4, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %157, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.DAQPWorkspace, ptr %162, i32 0, i32 14
  %164 = load ptr, ptr %163, align 8, !tbaa !22
  %165 = load i32, ptr %4, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = fsub double %161, %168
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.DAQPWorkspace, ptr %170, i32 0, i32 14
  %172 = load ptr, ptr %171, align 8, !tbaa !22
  %173 = load i32, ptr %4, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds double, ptr %172, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !11
  %177 = call double @llvm.fmuladd.f64(double %154, double %169, double %176)
  store double %177, ptr %175, align 8, !tbaa !11
  br label %178

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

181:                                              ; preds = %147
  br label %210

182:                                              ; preds = %141
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %206, %182
  %184 = load i32, ptr %4, align 4, !tbaa !9
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.DAQPWorkspace, ptr %185, i32 0, i32 24
  %187 = load i32, ptr %186, align 8, !tbaa !17
  %188 = icmp slt i32 %184, %187
  br i1 %188, label %189, label %209

189:                                              ; preds = %183
  %190 = load double, ptr %6, align 8, !tbaa !11
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.DAQPWorkspace, ptr %191, i32 0, i32 15
  %193 = load ptr, ptr %192, align 8, !tbaa !20
  %194 = load i32, ptr %4, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds double, ptr %193, i64 %195
  %197 = load double, ptr %196, align 8, !tbaa !11
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.DAQPWorkspace, ptr %198, i32 0, i32 14
  %200 = load ptr, ptr %199, align 8, !tbaa !22
  %201 = load i32, ptr %4, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %200, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !11
  %205 = call double @llvm.fmuladd.f64(double %190, double %197, double %204)
  store double %205, ptr %203, align 8, !tbaa !11
  br label %206

206:                                              ; preds = %189
  %207 = load i32, ptr %4, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %4, align 4, !tbaa !9
  br label %183, !llvm.loop !26

209:                                              ; preds = %183
  br label %210

210:                                              ; preds = %209, %181
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.DAQPWorkspace, ptr %211, i32 0, i32 26
  store i32 -1, ptr %212, align 8, !tbaa !21
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = load i32, ptr %5, align 4, !tbaa !9
  call void @remove_constraint(ptr noundef %213, i32 noundef %214)
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %215

215:                                              ; preds = %210, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %216 = load i32, ptr %2, align 4
  ret i32 %216
}

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @remove_blocking(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 208
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 8
  %5 = load double, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %0, i64 184
  %7 = load i32, ptr %6, align 8, !tbaa !14
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = load ptr, ptr %9, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %0, i64 176
  %12 = load ptr, ptr %11, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %0, i64 112
  %14 = fneg double %5
  %15 = getelementptr inbounds i8, ptr %0, i64 192
  %16 = getelementptr inbounds i8, ptr %0, i64 104
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %17

17:                                               ; preds = %.lr.ph, %45
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %45 ]
  %.05565 = phi double [ 1.000000e+30, %.lr.ph ], [ %.1, %45 ]
  %.05664 = phi i32 [ -1, %.lr.ph ], [ %.157, %45 ]
  %18 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr %10, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = and i32 %22, 4
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %24, label %45

24:                                               ; preds = %17
  %25 = and i32 %22, 2
  %.not60 = icmp eq i32 %25, 0
  %26 = load ptr, ptr %13, align 8, !tbaa !18
  %27 = getelementptr inbounds double, ptr %26, i64 %indvars.iv
  %28 = load double, ptr %27, align 8, !tbaa !19
  br i1 %.not60, label %31, label %29

29:                                               ; preds = %24
  %30 = fcmp olt double %28, %5
  br i1 %30, label %45, label %33

31:                                               ; preds = %24
  %32 = fcmp ogt double %28, %14
  br i1 %32, label %45, label %33

33:                                               ; preds = %31, %29
  %34 = load i32, ptr %15, align 8, !tbaa !20
  %35 = icmp eq i32 %34, -1
  %36 = load ptr, ptr %16, align 8, !tbaa !21
  %37 = getelementptr inbounds double, ptr %36, i64 %indvars.iv
  %38 = load double, ptr %37, align 8, !tbaa !19
  %39 = fneg double %38
  %40 = fsub double %28, %38
  %.sink = select i1 %35, double %40, double %28
  %41 = fdiv double %39, %.sink
  %42 = fcmp olt double %41, %.05565
  br i1 %42, label %43, label %45

43:                                               ; preds = %33
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  br label %45

45:                                               ; preds = %33, %43, %31, %29, %17
  %.157 = phi i32 [ %.05664, %17 ], [ %.05664, %29 ], [ %44, %43 ], [ %.05664, %33 ], [ %.05664, %31 ]
  %.1 = phi double [ %.05565, %17 ], [ %.05565, %29 ], [ %41, %43 ], [ %.05565, %33 ], [ %.05565, %31 ]
  %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 %._crit_edge, label %17, !llvm.loop !22

._crit_edge:                                      ; preds = %45
  %46 = icmp eq i32 %.157, -1
  br i1 %46, label %._crit_edge.thread, label %47

47:                                               ; preds = %._crit_edge
  %48 = getelementptr inbounds i8, ptr %0, i64 192
  %49 = load i32, ptr %48, align 8, !tbaa !20
  %50 = icmp eq i32 %49, -1
  br i1 %50, label %.preheader, label %.preheader61

.preheader61:                                     ; preds = %47
  br i1 %8, label %.lr.ph69, label %.loopexit

.lr.ph69:                                         ; preds = %.preheader61
  %51 = getelementptr inbounds i8, ptr %0, i64 112
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  %53 = getelementptr inbounds i8, ptr %0, i64 104
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  %wide.trip.count77 = zext nneg i32 %7 to i64
  %min.iters.check = icmp ult i32 %7, 6
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph69
  %indvars.iv74.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph69 ], [ %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 %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %55 = getelementptr inbounds double, ptr %52, i64 %indvars.iv74.ph
  %56 = load double, ptr %55, align 8, !tbaa !19
  %57 = getelementptr inbounds double, ptr %54, i64 %indvars.iv74.ph
  %58 = load double, ptr %57, align 8, !tbaa !19
  %59 = tail call double @llvm.fmuladd.f64(double %.1, double %56, double %58)
  store double %59, ptr %57, align 8, !tbaa !19
  %indvars.iv.next75.prol = or disjoint i64 %indvars.iv74.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv74.unr = phi i64 [ %indvars.iv74.ph, %scalar.ph.preheader ], [ %indvars.iv.next75.prol, %scalar.ph.prol ]
  %60 = add nsw i64 %wide.trip.count, -1
  %61 = icmp eq i64 %indvars.iv74.ph, %60
  br i1 %61, label %.loopexit, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph69
  %62 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %54, i64 %62
  %scevgep88 = getelementptr i8, ptr %52, i64 %62
  %bound0 = icmp ult ptr %54, %scevgep88
  %bound1 = icmp ult ptr %52, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.1, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %63 = getelementptr inbounds double, ptr %52, i64 %index
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %wide.load = load <2 x double>, ptr %63, align 8, !tbaa !19, !alias.scope !24
  %wide.load89 = load <2 x double>, ptr %64, align 8, !tbaa !19, !alias.scope !24
  %65 = getelementptr inbounds double, ptr %54, i64 %index
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %wide.load90 = load <2 x double>, ptr %65, align 8, !tbaa !19, !alias.scope !27, !noalias !24
  %wide.load91 = load <2 x double>, ptr %66, align 8, !tbaa !19, !alias.scope !27, !noalias !24
  %67 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %wide.load90)
  %68 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load89, <2 x double> %wide.load91)
  store <2 x double> %67, ptr %65, align 8, !tbaa !19, !alias.scope !27, !noalias !24
  store <2 x double> %68, ptr %66, align 8, !tbaa !19, !alias.scope !27, !noalias !24
  %index.next = add nuw i64 %index, 4
  %69 = icmp eq i64 %index.next, %n.vec
  br i1 %69, label %middle.block, label %vector.body, !llvm.loop !29

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

.preheader:                                       ; preds = %47
  br i1 %8, label %.lr.ph71, label %.loopexit

.lr.ph71:                                         ; preds = %.preheader
  %70 = getelementptr inbounds i8, ptr %0, i64 112
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = getelementptr inbounds i8, ptr %0, i64 104
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  %wide.trip.count82 = zext nneg i32 %7 to i64
  %min.iters.check100 = icmp ult i32 %7, 4
  br i1 %min.iters.check100, label %scalar.ph99.preheader, label %vector.memcheck92

vector.memcheck92:                                ; preds = %.lr.ph71
  %74 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep93 = getelementptr i8, ptr %73, i64 %74
  %scevgep94 = getelementptr i8, ptr %71, i64 %74
  %bound095 = icmp ult ptr %73, %scevgep94
  %bound196 = icmp ult ptr %71, %scevgep93
  %found.conflict97 = and i1 %bound095, %bound196
  br i1 %found.conflict97, label %scalar.ph99.preheader, label %vector.ph101

vector.ph101:                                     ; preds = %vector.memcheck92
  %n.vec103 = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert111 = insertelement <2 x double> poison, double %.1, i64 0
  %broadcast.splat112 = shufflevector <2 x double> %broadcast.splatinsert111, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body105

vector.body105:                                   ; preds = %vector.body105, %vector.ph101
  %index106 = phi i64 [ 0, %vector.ph101 ], [ %index.next113, %vector.body105 ]
  %75 = getelementptr inbounds double, ptr %71, i64 %index106
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %wide.load107 = load <2 x double>, ptr %75, align 8, !tbaa !19, !alias.scope !32
  %wide.load108 = load <2 x double>, ptr %76, align 8, !tbaa !19, !alias.scope !32
  %77 = getelementptr inbounds double, ptr %73, i64 %index106
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %wide.load109 = load <2 x double>, ptr %77, align 8, !tbaa !19, !alias.scope !35, !noalias !32
  %wide.load110 = load <2 x double>, ptr %78, align 8, !tbaa !19, !alias.scope !35, !noalias !32
  %79 = fsub <2 x double> %wide.load107, %wide.load109
  %80 = fsub <2 x double> %wide.load108, %wide.load110
  %81 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat112, <2 x double> %79, <2 x double> %wide.load109)
  %82 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat112, <2 x double> %80, <2 x double> %wide.load110)
  store <2 x double> %81, ptr %77, align 8, !tbaa !19, !alias.scope !35, !noalias !32
  store <2 x double> %82, ptr %78, align 8, !tbaa !19, !alias.scope !35, !noalias !32
  %index.next113 = add nuw i64 %index106, 4
  %83 = icmp eq i64 %index.next113, %n.vec103
  br i1 %83, label %middle.block98, label %vector.body105, !llvm.loop !37

middle.block98:                                   ; preds = %vector.body105
  %cmp.n114 = icmp eq i64 %n.vec103, %wide.trip.count
  br i1 %cmp.n114, label %.loopexit, label %scalar.ph99.preheader

scalar.ph99.preheader:                            ; preds = %middle.block98, %vector.memcheck92, %.lr.ph71
  %indvars.iv79.ph = phi i64 [ 0, %vector.memcheck92 ], [ 0, %.lr.ph71 ], [ %n.vec103, %middle.block98 ]
  %xtraiter116 = and i64 %wide.trip.count, 1
  %lcmp.mod117.not = icmp eq i64 %xtraiter116, 0
  br i1 %lcmp.mod117.not, label %scalar.ph99.prol.loopexit, label %scalar.ph99.prol

scalar.ph99.prol:                                 ; preds = %scalar.ph99.preheader
  %84 = getelementptr inbounds double, ptr %71, i64 %indvars.iv79.ph
  %85 = load double, ptr %84, align 8, !tbaa !19
  %86 = getelementptr inbounds double, ptr %73, i64 %indvars.iv79.ph
  %87 = load double, ptr %86, align 8, !tbaa !19
  %88 = fsub double %85, %87
  %89 = tail call double @llvm.fmuladd.f64(double %.1, double %88, double %87)
  store double %89, ptr %86, align 8, !tbaa !19
  %indvars.iv.next80.prol = or disjoint i64 %indvars.iv79.ph, 1
  br label %scalar.ph99.prol.loopexit

scalar.ph99.prol.loopexit:                        ; preds = %scalar.ph99.prol, %scalar.ph99.preheader
  %indvars.iv79.unr = phi i64 [ %indvars.iv79.ph, %scalar.ph99.preheader ], [ %indvars.iv.next80.prol, %scalar.ph99.prol ]
  %90 = add nsw i64 %wide.trip.count, -1
  %91 = icmp eq i64 %indvars.iv79.ph, %90
  br i1 %91, label %.loopexit, label %scalar.ph99

scalar.ph99:                                      ; preds = %scalar.ph99.prol.loopexit, %scalar.ph99
  %indvars.iv79 = phi i64 [ %indvars.iv.next80.1, %scalar.ph99 ], [ %indvars.iv79.unr, %scalar.ph99.prol.loopexit ]
  %92 = getelementptr inbounds double, ptr %71, i64 %indvars.iv79
  %93 = load double, ptr %92, align 8, !tbaa !19
  %94 = getelementptr inbounds double, ptr %73, i64 %indvars.iv79
  %95 = load double, ptr %94, align 8, !tbaa !19
  %96 = fsub double %93, %95
  %97 = tail call double @llvm.fmuladd.f64(double %.1, double %96, double %95)
  store double %97, ptr %94, align 8, !tbaa !19
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %98 = getelementptr inbounds double, ptr %71, i64 %indvars.iv.next80
  %99 = load double, ptr %98, align 8, !tbaa !19
  %100 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next80
  %101 = load double, ptr %100, align 8, !tbaa !19
  %102 = fsub double %99, %101
  %103 = tail call double @llvm.fmuladd.f64(double %.1, double %102, double %101)
  store double %103, ptr %100, align 8, !tbaa !19
  %indvars.iv.next80.1 = add nuw nsw i64 %indvars.iv79, 2
  %exitcond83.not.1 = icmp eq i64 %indvars.iv.next80.1, %wide.trip.count82
  br i1 %exitcond83.not.1, label %.loopexit, label %scalar.ph99, !llvm.loop !38

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv74 = phi i64 [ %indvars.iv.next75.1, %scalar.ph ], [ %indvars.iv74.unr, %scalar.ph.prol.loopexit ]
  %104 = getelementptr inbounds double, ptr %52, i64 %indvars.iv74
  %105 = load double, ptr %104, align 8, !tbaa !19
  %106 = getelementptr inbounds double, ptr %54, i64 %indvars.iv74
  %107 = load double, ptr %106, align 8, !tbaa !19
  %108 = tail call double @llvm.fmuladd.f64(double %.1, double %105, double %107)
  store double %108, ptr %106, align 8, !tbaa !19
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %109 = getelementptr inbounds double, ptr %52, i64 %indvars.iv.next75
  %110 = load double, ptr %109, align 8, !tbaa !19
  %111 = getelementptr inbounds double, ptr %54, i64 %indvars.iv.next75
  %112 = load double, ptr %111, align 8, !tbaa !19
  %113 = tail call double @llvm.fmuladd.f64(double %.1, double %110, double %112)
  store double %113, ptr %111, align 8, !tbaa !19
  %indvars.iv.next75.1 = add nuw nsw i64 %indvars.iv74, 2
  %exitcond78.not.1 = icmp eq i64 %indvars.iv.next75.1, %wide.trip.count77
  br i1 %exitcond78.not.1, label %.loopexit, label %scalar.ph, !llvm.loop !39

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %scalar.ph99.prol.loopexit, %scalar.ph99, %middle.block, %middle.block98, %.preheader61, %.preheader
  store i32 -1, ptr %48, align 8, !tbaa !20
  tail call void @remove_constraint(ptr noundef nonnull %0, i32 noundef %.157)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %1, %._crit_edge, %.loopexit
  %.0 = phi i32 [ 1, %.loopexit ], [ 0, %._crit_edge ], [ 0, %1 ]
  ret i32 %.0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 208}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !11, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !10, i64 168, !7, i64 176, !10, i64 184, !10, i64 188, !10, i64 192, !11, i64 200, !7, i64 208, !7, i64 216, !10, i64 224, !7, i64 232}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !11, i64 8}
!13 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!14 = !{!6, !10, i64 184}
!15 = !{!6, !7, i64 64}
!16 = !{!6, !7, i64 176}
!17 = !{!10, !10, i64 0}
!18 = !{!6, !7, i64 112}
!19 = !{!11, !11, i64 0}
!20 = !{!6, !10, i64 192}
!21 = !{!6, !7, i64 104}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25}
!25 = distinct !{!25, !26}
!26 = distinct !{!26, !"LVerDomain"}
!27 = !{!28}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !23, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = !{!33}
!33 = distinct !{!33, !34}
!34 = distinct !{!34, !"LVerDomain"}
!35 = !{!36}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !23, !30, !31}
!38 = distinct !{!38, !23, !30}
!39 = distinct !{!39, !23, !30}


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