; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/iterate.ll (ZNK3ipx7Iterate16ComputeResidualsEv)

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

%"class.std::_Expr" = type { %"struct.std::__detail::_BinClos" }
%"struct.std::__detail::_BinClos" = type { %"class.std::__detail::_BinBase" }
%"class.std::__detail::_BinBase" = type { %"struct.std::__detail::_BinClos.15", ptr }
%"struct.std::__detail::_BinClos.15" = type { %"class.std::__detail::_BinBase.16" }
%"class.std::__detail::_BinBase.16" = type { ptr, ptr }
%"class.std::_Expr.17" = type { %"struct.std::__detail::_BinClos.15" }
%"class.ipx::Iterate" = type { ptr, %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::vector", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", double, double, double, double, double, double, double, double, double, i8, i8, double, double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ipx::Iterate::StateDetail, std::allocator<ipx::Iterate::StateDetail>>::_Vector_impl" }
%"struct.std::_Vector_base<ipx::Iterate::StateDetail, std::allocator<ipx::Iterate::StateDetail>>::_Vector_impl" = type { %"struct.std::_Vector_base<ipx::Iterate::StateDetail, std::allocator<ipx::Iterate::StateDetail>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ipx::Iterate::StateDetail, std::allocator<ipx::Iterate::StateDetail>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::valarray" = type { i64, ptr }

@.str.12 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [15 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2lbEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2ubEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx7Iterate7StateOfEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_lbEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_ubEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

declare noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx7Iterate16ComputeResidualsEv(ptr noundef nonnull align 8 dereferenceable(296) %0) #6 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::_Expr", align 8
  %9 = alloca %"class.std::_Expr.17", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %16 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %17)
  store i32 %18, ptr %3, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %19 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %20)
  store i32 %21, ptr %4, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %22 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2lbEv(ptr noundef nonnull align 8 dereferenceable(704) %23)
  store ptr %24, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %25 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2ubEv(ptr noundef nonnull align 8 dereferenceable(704) %26)
  store ptr %27, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %28 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %29)
  store ptr %30, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704) %32)
  %34 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 8
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 1
  %38 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 8
  call void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128) %36, ptr noundef nonnull align 8 dereferenceable(16) %37, double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %38, i8 noundef signext 78)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %39 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704) %40)
  %42 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 5
  %43 = call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %42)
  %44 = getelementptr inbounds %"class.std::_Expr.17", ptr %9, i32 0, i32 0
  %45 = getelementptr inbounds %"struct.std::__detail::_BinClos.15", ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds { ptr, ptr }, ptr %45, i32 0, i32 0
  %47 = extractvalue { ptr, ptr } %43, 0
  store ptr %47, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, ptr }, ptr %45, i32 0, i32 1
  %49 = extractvalue { ptr, ptr } %43, 1
  store ptr %49, ptr %48, align 8
  %50 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 6
  call void @_ZStplINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt6__plusS5_S3_T_NS7_10value_typeEEENSt5__funIS6_S8_E11result_typeEERKS5_IS7_S8_ERKSt8valarrayIS8_E(ptr dead_on_unwind writable sret(%"class.std::_Expr") align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %50)
  %51 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 11
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSINSt8__detail8_BinClosISt6__plusSt5_ExprSt9_ValArrayNS3_ISt7__minusS6_S6_ddEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 4
  %55 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 11
  call void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128) %53, ptr noundef nonnull align 8 dereferenceable(16) %54, double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %55, i8 noundef signext 84)
  %56 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 22
  %57 = load i8, ptr %56, align 1, !tbaa !21, !range !22, !noundef !23
  %58 = trunc i8 %57 to i1
  br i1 %58, label %81, label %59

59:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !19
  br label %60

60:                                               ; preds = %77, %59
  %61 = load i32, ptr %10, align 4, !tbaa !19
  %62 = load i32, ptr %4, align 4, !tbaa !19
  %63 = load i32, ptr %3, align 4, !tbaa !19
  %64 = add nsw i32 %62, %63
  %65 = icmp slt i32 %61, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %80

67:                                               ; preds = %60
  %68 = load i32, ptr %10, align 4, !tbaa !19
  %69 = call noundef i32 @_ZNK3ipx7Iterate7StateOfEi(ptr noundef nonnull align 8 dereferenceable(296) %15, i32 noundef %68)
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %76

71:                                               ; preds = %67
  %72 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 11
  %73 = load i32, ptr %10, align 4, !tbaa !19
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %72, i64 noundef %74) #7
  store double 0.000000e+00, ptr %75, align 8, !tbaa !24
  br label %76

76:                                               ; preds = %71, %67
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %10, align 4, !tbaa !19
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %10, align 4, !tbaa !19
  br label %60, !llvm.loop !25

80:                                               ; preds = %66
  br label %81

81:                                               ; preds = %80, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !19
  br label %82

82:                                               ; preds = %120, %81
  %83 = load i32, ptr %11, align 4, !tbaa !19
  %84 = load i32, ptr %4, align 4, !tbaa !19
  %85 = load i32, ptr %3, align 4, !tbaa !19
  %86 = add nsw i32 %84, %85
  %87 = icmp slt i32 %83, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %123

89:                                               ; preds = %82
  %90 = load i32, ptr %11, align 4, !tbaa !19
  %91 = call noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_lbEi(ptr noundef nonnull align 8 dereferenceable(296) %15, i32 noundef %90)
  br i1 %91, label %92, label %114

92:                                               ; preds = %89
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %11, align 4, !tbaa !19
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %93, i64 noundef %95) #7
  %97 = load double, ptr %96, align 8, !tbaa !24
  %98 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 1
  %99 = load i32, ptr %11, align 4, !tbaa !19
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %98, i64 noundef %100) #7
  %102 = load double, ptr %101, align 8, !tbaa !24
  %103 = fsub double %97, %102
  %104 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 2
  %105 = load i32, ptr %11, align 4, !tbaa !19
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %104, i64 noundef %106) #7
  %108 = load double, ptr %107, align 8, !tbaa !24
  %109 = fadd double %103, %108
  %110 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 9
  %111 = load i32, ptr %11, align 4, !tbaa !19
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %110, i64 noundef %112) #7
  store double %109, ptr %113, align 8, !tbaa !24
  br label %119

114:                                              ; preds = %89
  %115 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 9
  %116 = load i32, ptr %11, align 4, !tbaa !19
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %115, i64 noundef %117) #7
  store double 0.000000e+00, ptr %118, align 8, !tbaa !24
  br label %119

119:                                              ; preds = %114, %92
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %11, align 4, !tbaa !19
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %11, align 4, !tbaa !19
  br label %82, !llvm.loop !27

123:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !19
  br label %124

124:                                              ; preds = %162, %123
  %125 = load i32, ptr %12, align 4, !tbaa !19
  %126 = load i32, ptr %4, align 4, !tbaa !19
  %127 = load i32, ptr %3, align 4, !tbaa !19
  %128 = add nsw i32 %126, %127
  %129 = icmp slt i32 %125, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %165

131:                                              ; preds = %124
  %132 = load i32, ptr %12, align 4, !tbaa !19
  %133 = call noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_ubEi(ptr noundef nonnull align 8 dereferenceable(296) %15, i32 noundef %132)
  br i1 %133, label %134, label %156

134:                                              ; preds = %131
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !19
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %135, i64 noundef %137) #7
  %139 = load double, ptr %138, align 8, !tbaa !24
  %140 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 1
  %141 = load i32, ptr %12, align 4, !tbaa !19
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %140, i64 noundef %142) #7
  %144 = load double, ptr %143, align 8, !tbaa !24
  %145 = fsub double %139, %144
  %146 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 3
  %147 = load i32, ptr %12, align 4, !tbaa !19
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %146, i64 noundef %148) #7
  %150 = load double, ptr %149, align 8, !tbaa !24
  %151 = fsub double %145, %150
  %152 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 10
  %153 = load i32, ptr %12, align 4, !tbaa !19
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %152, i64 noundef %154) #7
  store double %151, ptr %155, align 8, !tbaa !24
  br label %161

156:                                              ; preds = %131
  %157 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 10
  %158 = load i32, ptr %12, align 4, !tbaa !19
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %157, i64 noundef %159) #7
  store double 0.000000e+00, ptr %160, align 8, !tbaa !24
  br label %161

161:                                              ; preds = %156, %134
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %12, align 4, !tbaa !19
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %12, align 4, !tbaa !19
  br label %124, !llvm.loop !28

165:                                              ; preds = %130
  %166 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 8
  %167 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %166)
  br i1 %167, label %168, label %169

168:                                              ; preds = %165
  br label %171

169:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.51, ptr noundef @.str.12, i32 noundef 597, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

170:                                              ; No predecessors!
  br label %171

171:                                              ; preds = %170, %168
  %172 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 11
  %173 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %172)
  br i1 %173, label %174, label %175

174:                                              ; preds = %171
  br label %177

175:                                              ; preds = %171
  call void @__assert_fail(ptr noundef @.str.52, ptr noundef @.str.12, i32 noundef 598, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

176:                                              ; No predecessors!
  br label %177

177:                                              ; preds = %176, %174
  %178 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 9
  %179 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %178)
  br i1 %179, label %180, label %181

180:                                              ; preds = %177
  br label %183

181:                                              ; preds = %177
  call void @__assert_fail(ptr noundef @.str.53, ptr noundef @.str.12, i32 noundef 599, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

182:                                              ; No predecessors!
  br label %183

183:                                              ; preds = %182, %180
  %184 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 10
  %185 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %184)
  br i1 %185, label %186, label %187

186:                                              ; preds = %183
  br label %189

187:                                              ; preds = %183
  call void @__assert_fail(ptr noundef @.str.54, ptr noundef @.str.12, i32 noundef 600, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

188:                                              ; No predecessors!
  br label %189

189:                                              ; preds = %188, %186
  %190 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 8
  %191 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %190)
  %192 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 14
  store double %191, ptr %192, align 8, !tbaa !29
  %193 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 11
  %194 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %193)
  %195 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 15
  store double %194, ptr %195, align 8, !tbaa !30
  %196 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %197 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 9
  %198 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %197)
  store double %198, ptr %13, align 8, !tbaa !24
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %200 = load double, ptr %199, align 8, !tbaa !24
  %201 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 14
  store double %200, ptr %201, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %202 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 14
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %203 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 10
  %204 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %203)
  store double %204, ptr %14, align 8, !tbaa !24
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %206 = load double, ptr %205, align 8, !tbaa !24
  %207 = getelementptr inbounds %"class.ipx::Iterate", ptr %15, i32 0, i32 14
  store double %206, ptr %207, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

declare void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), double noundef, ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt6__plusS5_S3_T_NS7_10value_typeEEENSt5__funIS6_S8_E11result_typeEERKS5_IS7_S8_ERKSt8valarrayIS8_E(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSINSt8__detail8_BinClosISt6__plusSt5_ExprSt9_ValArrayNS3_ISt7__minusS6_S6_ddEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { 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 #4 = { inlinehint mustprogress 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 #5 = { "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 #6 = { mustprogress 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 #7 = { nounwind }
attributes #8 = { 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++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN3ipx7IterateE", !6, i64 0, !11, i64 8, !11, i64 24, !11, i64 40, !11, i64 56, !11, i64 72, !11, i64 88, !13, i64 104, !11, i64 128, !11, i64 144, !11, i64 160, !11, i64 176, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !17, i64 224, !17, i64 232, !17, i64 240, !17, i64 248, !17, i64 256, !18, i64 264, !18, i64 265, !17, i64 272, !17, i64 280, !17, i64 288}
!11 = !{!"_ZTSSt8valarrayIdE", !12, i64 0, !6, i64 8}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIN3ipx7Iterate11StateDetailESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"double", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!10, !18, i64 265}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!17, !17, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = !{!10, !17, i64 208}
!30 = !{!10, !17, i64 216}


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

%"class.std::_Expr" = type { %"struct.std::__detail::_BinClos" }
%"struct.std::__detail::_BinClos" = type { %"class.std::__detail::_BinBase" }
%"class.std::__detail::_BinBase" = type { %"struct.std::__detail::_BinClos.15", ptr }
%"struct.std::__detail::_BinClos.15" = type { %"class.std::__detail::_BinBase.16" }
%"class.std::__detail::_BinBase.16" = type { ptr, ptr }
%"class.std::_Expr.17" = type { %"struct.std::__detail::_BinClos.15" }

@.str.12 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [15 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2lbEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2ubEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx7Iterate7StateOfEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_lbEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_ubEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx7Iterate16ComputeResidualsEv(ptr noundef nonnull align 8 dereferenceable(296) %0) local_unnamed_addr #6 align 2 {
  %2 = alloca %"class.std::_Expr", align 8
  %3 = alloca %"class.std::_Expr.17", align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %6)
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %8)
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2lbEv(ptr noundef nonnull align 8 dereferenceable(704) %10)
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model2ubEv(ptr noundef nonnull align 8 dereferenceable(704) %12)
  %14 = load ptr, ptr %0, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %14)
  %16 = load ptr, ptr %0, align 8, !tbaa !5
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704) %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 128
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(16) %20, double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %18, i8 noundef signext 78)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704) %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 72
  %24 = tail call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %25 = extractvalue { ptr, ptr } %24, 0
  store ptr %25, ptr %3, align 8
  %26 = getelementptr inbounds i8, ptr %3, i64 8
  %27 = extractvalue { ptr, ptr } %24, 1
  store ptr %27, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr %0, i64 88
  call void @_ZStplINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt6__plusS5_S3_T_NS7_10value_typeEEENSt5__funIS6_S8_E11result_typeEERKS5_IS7_S8_ERKSt8valarrayIS8_E(ptr dead_on_unwind nonnull writable sret(%"class.std::_Expr") align 8 %2, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %28)
  %29 = getelementptr inbounds i8, ptr %0, i64 176
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSINSt8__detail8_BinClosISt6__plusSt5_ExprSt9_ValArrayNS3_ISt7__minusS6_S6_ddEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  %31 = getelementptr inbounds i8, ptr %0, i64 56
  call void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(16) %31, double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %29, i8 noundef signext 84)
  %32 = getelementptr inbounds i8, ptr %0, i64 265
  %33 = load i8, ptr %32, align 1, !tbaa !18, !range !19, !noundef !20
  %34 = trunc nuw i8 %33 to i1
  %.pre = add nsw i32 %9, %7
  br i1 %34, label %.loopexit, label %.preheader33

.preheader33:                                     ; preds = %1
  %35 = icmp sgt i32 %.pre, 0
  br i1 %35, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader33
  %wide.trip.count = zext nneg i32 %.pre to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %41
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %41 ]
  %36 = trunc nuw nsw i64 %indvars.iv to i32
  %37 = call noundef i32 @_ZNK3ipx7Iterate7StateOfEi(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %36)
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %.lr.ph
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %indvars.iv) #7
  store double 0.000000e+00, ptr %40, align 8, !tbaa !21
  br label %41

41:                                               ; preds = %.lr.ph, %39
  %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 %.loopexit, label %.lr.ph, !llvm.loop !22

.loopexit:                                        ; preds = %41, %1
  %42 = icmp sgt i32 %.pre, 0
  br i1 %42, label %.lr.ph36, label %._crit_edge

.lr.ph36:                                         ; preds = %.loopexit
  %43 = getelementptr inbounds i8, ptr %0, i64 144
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count43 = zext nneg i32 %.pre to i64
  br label %47

.preheader:                                       ; preds = %59
  br i1 %42, label %.lr.ph38, label %._crit_edge

.lr.ph38:                                         ; preds = %.preheader
  %45 = getelementptr inbounds i8, ptr %0, i64 160
  %46 = getelementptr inbounds i8, ptr %0, i64 40
  %wide.trip.count48 = zext nneg i32 %.pre to i64
  br label %62

47:                                               ; preds = %.lr.ph36, %59
  %indvars.iv40 = phi i64 [ 0, %.lr.ph36 ], [ %indvars.iv.next41, %59 ]
  %48 = trunc nuw nsw i64 %indvars.iv40 to i32
  %49 = call noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_lbEi(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %48)
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %11, i64 noundef %indvars.iv40) #7
  %52 = load double, ptr %51, align 8, !tbaa !21
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %indvars.iv40) #7
  %54 = load double, ptr %53, align 8, !tbaa !21
  %55 = fsub double %52, %54
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %44, i64 noundef %indvars.iv40) #7
  %57 = load double, ptr %56, align 8, !tbaa !21
  %58 = fadd double %55, %57
  br label %59

59:                                               ; preds = %47, %50
  %.sink = phi double [ %58, %50 ], [ 0.000000e+00, %47 ]
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %43, i64 noundef %indvars.iv40) #7
  store double %.sink, ptr %60, align 8, !tbaa !21
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %exitcond44.not = icmp eq i64 %indvars.iv.next41, %wide.trip.count43
  br i1 %exitcond44.not, label %.preheader, label %47, !llvm.loop !24

._crit_edge:                                      ; preds = %74, %.preheader33, %.loopexit, %.preheader
  %61 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %18)
  br i1 %61, label %77, label %76

62:                                               ; preds = %.lr.ph38, %74
  %indvars.iv45 = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next46, %74 ]
  %63 = trunc nuw nsw i64 %indvars.iv45 to i32
  %64 = call noundef zeroext i1 @_ZNK3ipx7Iterate14has_barrier_ubEi(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %63)
  br i1 %64, label %65, label %74

65:                                               ; preds = %62
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv45) #7
  %67 = load double, ptr %66, align 8, !tbaa !21
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %indvars.iv45) #7
  %69 = load double, ptr %68, align 8, !tbaa !21
  %70 = fsub double %67, %69
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv45) #7
  %72 = load double, ptr %71, align 8, !tbaa !21
  %73 = fsub double %70, %72
  br label %74

74:                                               ; preds = %62, %65
  %.sink54 = phi double [ %73, %65 ], [ 0.000000e+00, %62 ]
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %45, i64 noundef %indvars.iv45) #7
  store double %.sink54, ptr %75, align 8, !tbaa !21
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count48
  br i1 %exitcond49.not, label %._crit_edge, label %62, !llvm.loop !25

76:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.12, i32 noundef 597, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

77:                                               ; preds = %._crit_edge
  %78 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %29)
  br i1 %78, label %80, label %79

79:                                               ; preds = %77
  call void @__assert_fail(ptr noundef nonnull @.str.52, ptr noundef nonnull @.str.12, i32 noundef 598, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

80:                                               ; preds = %77
  %81 = getelementptr inbounds i8, ptr %0, i64 144
  %82 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %81)
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  call void @__assert_fail(ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.12, i32 noundef 599, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

84:                                               ; preds = %80
  %85 = getelementptr inbounds i8, ptr %0, i64 160
  %86 = call noundef zeroext i1 @_ZN3ipx9AllFiniteERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %85)
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.12, i32 noundef 600, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx7Iterate16ComputeResidualsEv) #8
  unreachable

88:                                               ; preds = %84
  %89 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %90 = getelementptr inbounds i8, ptr %0, i64 208
  store double %89, ptr %90, align 8, !tbaa !26
  %91 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %29)
  %92 = getelementptr inbounds i8, ptr %0, i64 216
  store double %91, ptr %92, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %93 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %81)
  store double %93, ptr %4, align 8, !tbaa !21
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %95 = load double, ptr %94, align 8, !tbaa !21
  store double %95, ptr %90, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %96 = call noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16) %85)
  store double %96, ptr %5, align 8, !tbaa !21
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %98 = load double, ptr %97, align 8, !tbaa !21
  store double %98, ptr %90, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

declare void @_ZN3ipx11MultiplyAddERKNS_12SparseMatrixERKSt8valarrayIdEdRS4_c(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), double noundef, ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt6__plusS5_S3_T_NS7_10value_typeEEENSt5__funIS6_S8_E11result_typeEERKS5_IS7_S8_ERKSt8valarrayIS8_E(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSINSt8__detail8_BinClosISt6__plusSt5_ExprSt9_ValArrayNS3_ISt7__minusS6_S6_ddEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

declare noundef double @_ZN3ipx7InfnormERKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { 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 #4 = { inlinehint mustprogress 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 #5 = { "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 #6 = { mustprogress 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 #7 = { nounwind }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"_ZTSN3ipx7IterateE", !7, i64 0, !10, i64 8, !10, i64 24, !10, i64 40, !10, i64 56, !10, i64 72, !10, i64 88, !12, i64 104, !10, i64 128, !10, i64 144, !10, i64 160, !10, i64 176, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !16, i64 224, !16, i64 232, !16, i64 240, !16, i64 248, !16, i64 256, !17, i64 264, !17, i64 265, !16, i64 272, !16, i64 280, !16, i64 288}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt8valarrayIdE", !11, i64 0, !7, i64 8}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSSt6vectorIN3ipx7Iterate11StateDetailESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3ipx7Iterate11StateDetailESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!16 = !{!"double", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!6, !17, i64 265}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!16, !16, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = !{!6, !16, i64 208}
!27 = !{!6, !16, i64 216}


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