; LLVM IR from doyubkim/fluid-engine-dev :: src/jet/collocated_vector_grid3.ll (ZNK3jet21CollocatedVectorGrid315curlAtDataPointEmmm)

; 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.jet::Size3" = type { i64, i64, i64 }
%"class.jet::Vector" = type { double, double, double }
%"class.jet::CollocatedVectorGrid3" = type { %"class.jet::VectorGrid3", %"class.jet::Array", %"class.jet::LinearArraySampler", %"class.std::function" }
%"class.jet::VectorGrid3" = type { %"class.jet::VectorField3", %"class.jet::Grid3" }
%"class.jet::VectorField3" = type { %"class.jet::Field3" }
%"class.jet::Field3" = type { ptr }
%"class.jet::Grid3" = type { %"class.jet::Serializable", %"class.jet::Size3", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::BoundingBox" }
%"class.jet::Serializable" = type { ptr }
%"class.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Array" = type { %"class.jet::Size3", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.jet::LinearArraySampler" = type { %"class.jet::Vector", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::ConstArrayAccessor" }
%"class.jet::ConstArrayAccessor" = type { %"class.jet::Size3", ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; 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 nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, i64 noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.jet::Size3") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5Grid311gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(128)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet21CollocatedVectorGrid315curlAtDataPointEmmm(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.jet::Size3", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.jet::Vector", align 8
  %14 = alloca %"class.jet::Vector", align 8
  %15 = alloca %"class.jet::Vector", align 8
  %16 = alloca %"class.jet::Vector", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca %"class.jet::Vector", align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i64 %3, ptr %9, align 8, !tbaa !9
  store i64 %4, ptr %10, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %32 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  call void @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EE4sizeEv(ptr dead_on_unwind writable sret(%"class.jet::Size3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(48) %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %33 = getelementptr inbounds i8, ptr %31, i64 8
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5Grid311gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(128) %33)
  store ptr %34, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  %35 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %36 = load i64, ptr %8, align 8, !tbaa !9
  %37 = icmp ugt i64 %36, 0
  br i1 %37, label %38, label %41

38:                                               ; preds = %5
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = sub i64 %39, 1
  br label %43

41:                                               ; preds = %5
  %42 = load i64, ptr %8, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %41, %38
  %44 = phi i64 [ %40, %38 ], [ %42, %41 ]
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = load i64, ptr %10, align 8, !tbaa !9
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %35, i64 noundef %44, i64 noundef %45, i64 noundef %46)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %47)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %48 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = add i64 %49, 1
  %51 = getelementptr inbounds %"class.jet::Size3", ptr %11, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !11
  %53 = icmp ult i64 %50, %52
  br i1 %53, label %54, label %57

54:                                               ; preds = %43
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = add i64 %55, 1
  br label %59

57:                                               ; preds = %43
  %58 = load i64, ptr %8, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %57, %54
  %60 = phi i64 [ %56, %54 ], [ %58, %57 ]
  %61 = load i64, ptr %9, align 8, !tbaa !9
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %48, i64 noundef %60, i64 noundef %61, i64 noundef %62)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %63)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %64 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %65 = load i64, ptr %8, align 8, !tbaa !9
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = icmp ugt i64 %66, 0
  br i1 %67, label %68, label %71

68:                                               ; preds = %59
  %69 = load i64, ptr %9, align 8, !tbaa !9
  %70 = sub i64 %69, 1
  br label %73

71:                                               ; preds = %59
  %72 = load i64, ptr %9, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %71, %68
  %74 = phi i64 [ %70, %68 ], [ %72, %71 ]
  %75 = load i64, ptr %10, align 8, !tbaa !9
  %76 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %64, i64 noundef %65, i64 noundef %74, i64 noundef %75)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %76)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %77 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %78 = load i64, ptr %8, align 8, !tbaa !9
  %79 = load i64, ptr %9, align 8, !tbaa !9
  %80 = add i64 %79, 1
  %81 = getelementptr inbounds %"class.jet::Size3", ptr %11, i32 0, i32 1
  %82 = load i64, ptr %81, align 8, !tbaa !13
  %83 = icmp ult i64 %80, %82
  br i1 %83, label %84, label %87

84:                                               ; preds = %73
  %85 = load i64, ptr %9, align 8, !tbaa !9
  %86 = add i64 %85, 1
  br label %89

87:                                               ; preds = %73
  %88 = load i64, ptr %9, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %87, %84
  %90 = phi i64 [ %86, %84 ], [ %88, %87 ]
  %91 = load i64, ptr %10, align 8, !tbaa !9
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %77, i64 noundef %78, i64 noundef %90, i64 noundef %91)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %92)
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  %93 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %94 = load i64, ptr %8, align 8, !tbaa !9
  %95 = load i64, ptr %9, align 8, !tbaa !9
  %96 = load i64, ptr %10, align 8, !tbaa !9
  %97 = icmp ugt i64 %96, 0
  br i1 %97, label %98, label %101

98:                                               ; preds = %89
  %99 = load i64, ptr %10, align 8, !tbaa !9
  %100 = sub i64 %99, 1
  br label %103

101:                                              ; preds = %89
  %102 = load i64, ptr %10, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %101, %98
  %104 = phi i64 [ %100, %98 ], [ %102, %101 ]
  %105 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %93, i64 noundef %94, i64 noundef %95, i64 noundef %104)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %105)
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #4
  %106 = getelementptr inbounds %"class.jet::CollocatedVectorGrid3", ptr %31, i32 0, i32 1
  %107 = load i64, ptr %8, align 8, !tbaa !9
  %108 = load i64, ptr %9, align 8, !tbaa !9
  %109 = load i64, ptr %10, align 8, !tbaa !9
  %110 = add i64 %109, 1
  %111 = getelementptr inbounds %"class.jet::Size3", ptr %11, i32 0, i32 2
  %112 = load i64, ptr %111, align 8, !tbaa !14
  %113 = icmp ult i64 %110, %112
  br i1 %113, label %114, label %117

114:                                              ; preds = %103
  %115 = load i64, ptr %10, align 8, !tbaa !9
  %116 = add i64 %115, 1
  br label %119

117:                                              ; preds = %103
  %118 = load i64, ptr %10, align 8, !tbaa !9
  br label %119

119:                                              ; preds = %117, %114
  %120 = phi i64 [ %116, %114 ], [ %118, %117 ]
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %106, i64 noundef %107, i64 noundef %108, i64 noundef %120)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %121)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %122 = getelementptr inbounds %"class.jet::Vector", ptr %15, i32 0, i32 0
  %123 = load double, ptr %122, align 8, !tbaa !15
  store double %123, ptr %19, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %124 = getelementptr inbounds %"class.jet::Vector", ptr %16, i32 0, i32 0
  %125 = load double, ptr %124, align 8, !tbaa !15
  store double %125, ptr %20, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %126 = getelementptr inbounds %"class.jet::Vector", ptr %17, i32 0, i32 0
  %127 = load double, ptr %126, align 8, !tbaa !15
  store double %127, ptr %21, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %128 = getelementptr inbounds %"class.jet::Vector", ptr %18, i32 0, i32 0
  %129 = load double, ptr %128, align 8, !tbaa !15
  store double %129, ptr %22, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %130 = getelementptr inbounds %"class.jet::Vector", ptr %13, i32 0, i32 1
  %131 = load double, ptr %130, align 8, !tbaa !19
  store double %131, ptr %23, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %132 = getelementptr inbounds %"class.jet::Vector", ptr %14, i32 0, i32 1
  %133 = load double, ptr %132, align 8, !tbaa !19
  store double %133, ptr %24, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %134 = getelementptr inbounds %"class.jet::Vector", ptr %17, i32 0, i32 1
  %135 = load double, ptr %134, align 8, !tbaa !19
  store double %135, ptr %25, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %136 = getelementptr inbounds %"class.jet::Vector", ptr %18, i32 0, i32 1
  %137 = load double, ptr %136, align 8, !tbaa !19
  store double %137, ptr %26, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %138 = getelementptr inbounds %"class.jet::Vector", ptr %13, i32 0, i32 2
  %139 = load double, ptr %138, align 8, !tbaa !20
  store double %139, ptr %27, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %140 = getelementptr inbounds %"class.jet::Vector", ptr %14, i32 0, i32 2
  %141 = load double, ptr %140, align 8, !tbaa !20
  store double %141, ptr %28, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %142 = getelementptr inbounds %"class.jet::Vector", ptr %15, i32 0, i32 2
  %143 = load double, ptr %142, align 8, !tbaa !20
  store double %143, ptr %29, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %144 = getelementptr inbounds %"class.jet::Vector", ptr %16, i32 0, i32 2
  %145 = load double, ptr %144, align 8, !tbaa !20
  store double %145, ptr %30, align 8, !tbaa !18
  %146 = load double, ptr %30, align 8, !tbaa !18
  %147 = load double, ptr %29, align 8, !tbaa !18
  %148 = fsub double %146, %147
  %149 = fmul double 5.000000e-01, %148
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.jet::Vector", ptr %150, i32 0, i32 1
  %152 = load double, ptr %151, align 8, !tbaa !19
  %153 = fdiv double %149, %152
  %154 = load double, ptr %26, align 8, !tbaa !18
  %155 = load double, ptr %25, align 8, !tbaa !18
  %156 = fsub double %154, %155
  %157 = fmul double 5.000000e-01, %156
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = getelementptr inbounds %"class.jet::Vector", ptr %158, i32 0, i32 2
  %160 = load double, ptr %159, align 8, !tbaa !20
  %161 = fdiv double %157, %160
  %162 = fsub double %153, %161
  %163 = load double, ptr %22, align 8, !tbaa !18
  %164 = load double, ptr %21, align 8, !tbaa !18
  %165 = fsub double %163, %164
  %166 = fmul double 5.000000e-01, %165
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = getelementptr inbounds %"class.jet::Vector", ptr %167, i32 0, i32 2
  %169 = load double, ptr %168, align 8, !tbaa !20
  %170 = fdiv double %166, %169
  %171 = load double, ptr %28, align 8, !tbaa !18
  %172 = load double, ptr %27, align 8, !tbaa !18
  %173 = fsub double %171, %172
  %174 = fmul double 5.000000e-01, %173
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = getelementptr inbounds %"class.jet::Vector", ptr %175, i32 0, i32 0
  %177 = load double, ptr %176, align 8, !tbaa !15
  %178 = fdiv double %174, %177
  %179 = fsub double %170, %178
  %180 = load double, ptr %24, align 8, !tbaa !18
  %181 = load double, ptr %23, align 8, !tbaa !18
  %182 = fsub double %180, %181
  %183 = fmul double 5.000000e-01, %182
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  %185 = getelementptr inbounds %"class.jet::Vector", ptr %184, i32 0, i32 0
  %186 = load double, ptr %185, align 8, !tbaa !15
  %187 = fdiv double %183, %186
  %188 = load double, ptr %20, align 8, !tbaa !18
  %189 = load double, ptr %19, align 8, !tbaa !18
  %190 = fsub double %188, %189
  %191 = fmul double 5.000000e-01, %190
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = getelementptr inbounds %"class.jet::Vector", ptr %192, i32 0, i32 1
  %194 = load double, ptr %193, align 8, !tbaa !19
  %195 = fdiv double %191, %194
  %196 = fsub double %187, %195
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %162, double noundef %179, double noundef %196)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN3jet5Size3E", !10, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN3jet6VectorIdLm3EEE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"double", !7, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!16, !17, i64 8}
!20 = !{!16, !17, i64 16}


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

%"class.jet::Size3" = type { i64, i64, i64 }
%"class.jet::Vector" = type { double, double, double }

; 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 nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; 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 nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.jet::Size3") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5Grid311gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet21CollocatedVectorGrid315curlAtDataPointEmmm(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) local_unnamed_addr #2 align 2 {
  %6 = alloca %"class.jet::Size3", align 8
  %7 = alloca %"class.jet::Vector", align 8
  %8 = alloca %"class.jet::Vector", align 8
  %9 = alloca %"class.jet::Vector", align 8
  %10 = alloca %"class.jet::Vector", align 8
  %11 = alloca %"class.jet::Vector", align 16
  %12 = alloca %"class.jet::Vector", align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %13 = getelementptr inbounds i8, ptr %1, i64 136
  call void @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EE4sizeEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::Size3") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %13)
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5Grid311gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(128) %14)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %16 = call i64 @llvm.usub.sat.i64(i64 %2, i64 1)
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %16, i64 noundef %3, i64 noundef %4)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %17)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %18 = add i64 %2, 1
  %19 = load i64, ptr %6, align 8, !tbaa !5
  %20 = icmp ult i64 %18, %19
  %21 = select i1 %20, i64 %18, i64 %2
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %21, i64 noundef %3, i64 noundef %4)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  %23 = call i64 @llvm.usub.sat.i64(i64 %3, i64 1)
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %2, i64 noundef %23, i64 noundef %4)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %24)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %25 = add i64 %3, 1
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = load i64, ptr %26, align 8, !tbaa !10
  %28 = icmp ult i64 %25, %27
  %29 = select i1 %28, i64 %25, i64 %3
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %2, i64 noundef %29, i64 noundef %4)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %30)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  %31 = call i64 @llvm.usub.sat.i64(i64 %4, i64 1)
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %2, i64 noundef %3, i64 noundef %31)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %32)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #5
  %33 = add i64 %4, 1
  %34 = getelementptr inbounds i8, ptr %6, i64 16
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = icmp ult i64 %33, %35
  %37 = select i1 %36, i64 %33, i64 %4
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3jet5ArrayINS_6VectorIdLm3EEELm3EEclEmmm(ptr noundef nonnull align 8 dereferenceable(48) %13, i64 noundef %2, i64 noundef %3, i64 noundef %37)
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %38)
  %39 = load double, ptr %9, align 8, !tbaa !12
  %40 = load double, ptr %10, align 8, !tbaa !12
  %41 = load <2 x double>, ptr %11, align 16
  %42 = load <2 x double>, ptr %12, align 16
  %43 = getelementptr inbounds i8, ptr %7, i64 8
  %44 = load <2 x double>, ptr %43, align 8
  %45 = getelementptr inbounds i8, ptr %8, i64 8
  %46 = load <2 x double>, ptr %45, align 8
  %47 = getelementptr inbounds i8, ptr %11, i64 8
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = getelementptr inbounds i8, ptr %12, i64 8
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = getelementptr inbounds i8, ptr %7, i64 16
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds i8, ptr %8, i64 16
  %54 = load double, ptr %53, align 8, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %9, i64 16
  %56 = load double, ptr %55, align 8, !tbaa !16
  %57 = getelementptr inbounds i8, ptr %10, i64 16
  %58 = load double, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds i8, ptr %15, i64 8
  %60 = insertelement <2 x double> poison, double %58, i64 0
  %61 = insertelement <2 x double> %60, double %50, i64 1
  %62 = insertelement <2 x double> poison, double %56, i64 0
  %63 = insertelement <2 x double> %62, double %48, i64 1
  %64 = fsub <2 x double> %61, %63
  %65 = fmul <2 x double> %64, <double 5.000000e-01, double 5.000000e-01>
  %66 = load <2 x double>, ptr %59, align 8, !tbaa !17
  %67 = fdiv <2 x double> %65, %66
  %shift = shufflevector <2 x double> %67, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %68 = fsub <2 x double> %67, %shift
  %69 = extractelement <2 x double> %68, i64 0
  %70 = load double, ptr %15, align 8, !tbaa !12
  %71 = insertelement <2 x double> %42, double %54, i64 1
  %72 = insertelement <2 x double> %41, double %52, i64 1
  %73 = fsub <2 x double> %71, %72
  %74 = fmul <2 x double> %73, <double 5.000000e-01, double 5.000000e-01>
  %75 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %76 = insertelement <2 x double> %75, double %70, i64 1
  %77 = fdiv <2 x double> %74, %76
  %shift48 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %78 = fsub <2 x double> %77, %shift48
  %79 = extractelement <2 x double> %78, i64 0
  %80 = insertelement <2 x double> %46, double %40, i64 1
  %81 = insertelement <2 x double> %44, double %39, i64 1
  %82 = fsub <2 x double> %80, %81
  %83 = fmul <2 x double> %82, <double 5.000000e-01, double 5.000000e-01>
  %84 = insertelement <2 x double> %75, double %70, i64 0
  %85 = fdiv <2 x double> %83, %84
  %shift49 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %86 = fsub <2 x double> %85, %shift49
  %87 = extractelement <2 x double> %86, i64 0
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %69, double noundef %79, double noundef %87)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.usub.sat.i64(i64, i64) #4

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 = { 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 #3 = { "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"_ZTSN3jet5Size3E", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!6, !7, i64 16}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTSN3jet6VectorIdLm3EEE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"double", !8, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!13, !14, i64 16}
!17 = !{!14, !14, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass