; LLVM IR from kylechampley/XrayPhysics :: src/xscatter.ll (ZN8xscatter21getCoherentFormFactorEdi)

; 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.xscatter::element_property_s" = type { i32, float, float, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.xscatter = type { %class.xsec, %"class.std::vector.3", double, double, double, double }
%class.xsec = type { [101 x i32], %"class.std::vector", %"class.std::vector", %"class.std::vector", [101 x i32], %"class.std::vector", %"class.std::vector", %"class.std::vector", [101 x i32], %"class.std::vector", %"class.std::vector", %"class.std::vector", [101 x i32], %"class.std::vector", %"class.std::vector", %"class.std::vector", [101 x i32], %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float *, std::allocator<float *>>::_Vector_impl" }
%"struct.std::_Vector_base<float *, std::allocator<float *>>::_Vector_impl" = type { %"struct.std::_Vector_base<float *, std::allocator<float *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float *, std::allocator<float *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<xscatter::IncoherentAndCoherentScatterFunctions_elem_s, std::allocator<xscatter::IncoherentAndCoherentScatterFunctions_elem_s>>::_Vector_impl" }
%"struct.std::_Vector_base<xscatter::IncoherentAndCoherentScatterFunctions_elem_s, std::allocator<xscatter::IncoherentAndCoherentScatterFunctions_elem_s>>::_Vector_impl" = type { %"struct.std::_Vector_base<xscatter::IncoherentAndCoherentScatterFunctions_elem_s, std::allocator<xscatter::IncoherentAndCoherentScatterFunctions_elem_s>>::_Vector_impl_data" }
%"struct.std::_Vector_base<xscatter::IncoherentAndCoherentScatterFunctions_elem_s, std::allocator<xscatter::IncoherentAndCoherentScatterFunctions_elem_s>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s" = type { %"struct.xscatter::reaction_record_s", %"struct.xscatter::reaction_record_s", %"struct.xscatter::reaction_record_s", %"struct.xscatter::reaction_record_s" }
%"struct.xscatter::reaction_record_s" = type { %"struct.xscatter::header_s", %"class.std::vector.8" }
%"struct.xscatter::header_s" = type { i32, i32, i32, i32, double, %"class.std::__cxx11::basic_string", i32, i32, i32, i32, double }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<xscatter::data, std::allocator<xscatter::data>>::_Vector_impl" }
%"struct.std::_Vector_base<xscatter::data, std::allocator<xscatter::data>>::_Vector_impl" = type { %"struct.std::_Vector_base<xscatter::data, std::allocator<xscatter::data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<xscatter::data, std::allocator<xscatter::data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.xscatter::data" = type { double, double }

@_ZN8xscatter20elementProperty_ListE = external dso_local global [100 x %"struct.xscatter::element_property_s"], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN8xscatter21getCoherentFormFactorEdi(ptr noundef nonnull align 8 dereferenceable(2456) %0, double noundef %1, i32 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store double %1, ptr %5, align 8, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %21 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %6, align 4, !tbaa !11
  %23 = sub nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %24) #5
  %26 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %25, i32 0, i32 1
  %27 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %26, i32 0, i32 1
  %28 = call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = trunc i64 %28 to i32
  store i32 %29, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !11
  %30 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %31 = load i32, ptr %6, align 4, !tbaa !11
  %32 = sub nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %33) #5
  %35 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %35, i32 0, i32 1
  %37 = load i32, ptr %7, align 4, !tbaa !11
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39) #5
  %41 = getelementptr inbounds %"struct.xscatter::data", ptr %40, i32 0, i32 0
  %42 = load double, ptr %41, align 8, !tbaa !13
  %43 = load double, ptr %5, align 8, !tbaa !9
  %44 = fcmp ole double %42, %43
  br i1 %44, label %45, label %59

45:                                               ; preds = %3
  %46 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %47 = load i32, ptr %6, align 4, !tbaa !11
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %49) #5
  %51 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %51, i32 0, i32 1
  %53 = load i32, ptr %7, align 4, !tbaa !11
  %54 = sub nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %55) #5
  %57 = getelementptr inbounds %"struct.xscatter::data", ptr %56, i32 0, i32 1
  %58 = load double, ptr %57, align 8, !tbaa !15
  store double %58, ptr %8, align 8, !tbaa !9
  br label %172

59:                                               ; preds = %3
  %60 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %61 = load i32, ptr %6, align 4, !tbaa !11
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %63) #5
  %65 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %64, i32 0, i32 1
  %66 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %65, i32 0, i32 1
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef 0) #5
  %68 = getelementptr inbounds %"struct.xscatter::data", ptr %67, i32 0, i32 0
  %69 = load double, ptr %68, align 8, !tbaa !13
  %70 = load double, ptr %5, align 8, !tbaa !9
  %71 = fcmp ogt double %69, %70
  br i1 %71, label %72, label %83

72:                                               ; preds = %59
  %73 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %74 = load i32, ptr %6, align 4, !tbaa !11
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %76) #5
  %78 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %78, i32 0, i32 1
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef 0) #5
  %81 = getelementptr inbounds %"struct.xscatter::data", ptr %80, i32 0, i32 1
  %82 = load double, ptr %81, align 8, !tbaa !15
  store double %82, ptr %8, align 8, !tbaa !9
  br label %171

83:                                               ; preds = %59
  store i32 0, ptr %15, align 4, !tbaa !11
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %105, %83
  %85 = load i32, ptr %15, align 4, !tbaa !11
  %86 = load i32, ptr %7, align 4, !tbaa !11
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %88, label %108

88:                                               ; preds = %84
  %89 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %90 = load i32, ptr %6, align 4, !tbaa !11
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %92) #5
  %94 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %94, i32 0, i32 1
  %96 = load i32, ptr %15, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #5
  %99 = getelementptr inbounds %"struct.xscatter::data", ptr %98, i32 0, i32 0
  %100 = load double, ptr %99, align 8, !tbaa !13
  %101 = load double, ptr %5, align 8, !tbaa !9
  %102 = fcmp ogt double %100, %101
  br i1 %102, label %103, label %104

103:                                              ; preds = %88
  br label %108

104:                                              ; preds = %88
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %15, align 4, !tbaa !11
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %15, align 4, !tbaa !11
  br label %84, !llvm.loop !16

108:                                              ; preds = %103, %84
  %109 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %110 = load i32, ptr %6, align 4, !tbaa !11
  %111 = sub nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %112) #5
  %114 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %113, i32 0, i32 1
  %115 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %114, i32 0, i32 1
  %116 = load i32, ptr %15, align 4, !tbaa !11
  %117 = sub nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %118) #5
  %120 = getelementptr inbounds %"struct.xscatter::data", ptr %119, i32 0, i32 0
  %121 = load double, ptr %120, align 8, !tbaa !13
  store double %121, ptr %11, align 8, !tbaa !9
  %122 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %123 = load i32, ptr %6, align 4, !tbaa !11
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %125) #5
  %127 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %126, i32 0, i32 1
  %128 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %127, i32 0, i32 1
  %129 = load i32, ptr %15, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #5
  %132 = getelementptr inbounds %"struct.xscatter::data", ptr %131, i32 0, i32 0
  %133 = load double, ptr %132, align 8, !tbaa !13
  store double %133, ptr %12, align 8, !tbaa !9
  %134 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %135 = load i32, ptr %6, align 4, !tbaa !11
  %136 = sub nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %137) #5
  %139 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %139, i32 0, i32 1
  %141 = load i32, ptr %15, align 4, !tbaa !11
  %142 = sub nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %143) #5
  %145 = getelementptr inbounds %"struct.xscatter::data", ptr %144, i32 0, i32 1
  %146 = load double, ptr %145, align 8, !tbaa !15
  store double %146, ptr %13, align 8, !tbaa !9
  %147 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %148 = load i32, ptr %6, align 4, !tbaa !11
  %149 = sub nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %150) #5
  %152 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %151, i32 0, i32 1
  %153 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %152, i32 0, i32 1
  %154 = load i32, ptr %15, align 4, !tbaa !11
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %155) #5
  %157 = getelementptr inbounds %"struct.xscatter::data", ptr %156, i32 0, i32 1
  %158 = load double, ptr %157, align 8, !tbaa !15
  store double %158, ptr %14, align 8, !tbaa !9
  %159 = load double, ptr %14, align 8, !tbaa !9
  %160 = load double, ptr %13, align 8, !tbaa !9
  %161 = fsub double %159, %160
  %162 = load double, ptr %12, align 8, !tbaa !9
  %163 = load double, ptr %11, align 8, !tbaa !9
  %164 = fsub double %162, %163
  %165 = fdiv double %161, %164
  %166 = load double, ptr %5, align 8, !tbaa !9
  %167 = load double, ptr %11, align 8, !tbaa !9
  %168 = fsub double %166, %167
  %169 = load double, ptr %13, align 8, !tbaa !9
  %170 = call double @llvm.fmuladd.f64(double %165, double %168, double %169)
  store double %170, ptr %8, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %108, %72
  br label %172

172:                                              ; preds = %171, %45
  %173 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %174 = load i32, ptr %6, align 4, !tbaa !11
  %175 = sub nsw i32 %174, 1
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %176) #5
  %178 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %177, i32 0, i32 2
  %179 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %178, i32 0, i32 1
  %180 = call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #5
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store double 0x3EB0C6F7A0B5ED8D, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store double 1.000000e+01, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %183 = load double, ptr %182, align 8, !tbaa !9
  store double %183, ptr %18, align 8, !tbaa !9
  %184 = load double, ptr %18, align 8, !tbaa !9
  %185 = load double, ptr %16, align 8, !tbaa !9
  %186 = fcmp oge double %184, %185
  br i1 %186, label %187, label %331

187:                                              ; preds = %172
  %188 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %189 = load i32, ptr %6, align 4, !tbaa !11
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %188, i64 noundef %191) #5
  %193 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %192, i32 0, i32 2
  %194 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %193, i32 0, i32 1
  %195 = load i32, ptr %7, align 4, !tbaa !11
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef %197) #5
  %199 = getelementptr inbounds %"struct.xscatter::data", ptr %198, i32 0, i32 0
  %200 = load double, ptr %199, align 8, !tbaa !13
  %201 = load double, ptr %18, align 8, !tbaa !9
  %202 = fcmp ole double %200, %201
  br i1 %202, label %203, label %217

203:                                              ; preds = %187
  %204 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %205 = load i32, ptr %6, align 4, !tbaa !11
  %206 = sub nsw i32 %205, 1
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %204, i64 noundef %207) #5
  %209 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %208, i32 0, i32 2
  %210 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %209, i32 0, i32 1
  %211 = load i32, ptr %7, align 4, !tbaa !11
  %212 = sub nsw i32 %211, 1
  %213 = sext i32 %212 to i64
  %214 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %210, i64 noundef %213) #5
  %215 = getelementptr inbounds %"struct.xscatter::data", ptr %214, i32 0, i32 1
  %216 = load double, ptr %215, align 8, !tbaa !15
  store double %216, ptr %9, align 8, !tbaa !9
  br label %330

217:                                              ; preds = %187
  %218 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %219 = load i32, ptr %6, align 4, !tbaa !11
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %218, i64 noundef %221) #5
  %223 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %222, i32 0, i32 2
  %224 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %223, i32 0, i32 1
  %225 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %224, i64 noundef 0) #5
  %226 = getelementptr inbounds %"struct.xscatter::data", ptr %225, i32 0, i32 0
  %227 = load double, ptr %226, align 8, !tbaa !13
  %228 = load double, ptr %18, align 8, !tbaa !9
  %229 = fcmp ogt double %227, %228
  br i1 %229, label %230, label %241

230:                                              ; preds = %217
  %231 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %232 = load i32, ptr %6, align 4, !tbaa !11
  %233 = sub nsw i32 %232, 1
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %231, i64 noundef %234) #5
  %236 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %235, i32 0, i32 2
  %237 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %236, i32 0, i32 1
  %238 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef 0) #5
  %239 = getelementptr inbounds %"struct.xscatter::data", ptr %238, i32 0, i32 1
  %240 = load double, ptr %239, align 8, !tbaa !15
  store double %240, ptr %9, align 8, !tbaa !9
  br label %329

241:                                              ; preds = %217
  store i32 0, ptr %15, align 4, !tbaa !11
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %242

242:                                              ; preds = %263, %241
  %243 = load i32, ptr %15, align 4, !tbaa !11
  %244 = load i32, ptr %7, align 4, !tbaa !11
  %245 = icmp slt i32 %243, %244
  br i1 %245, label %246, label %266

246:                                              ; preds = %242
  %247 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %248 = load i32, ptr %6, align 4, !tbaa !11
  %249 = sub nsw i32 %248, 1
  %250 = sext i32 %249 to i64
  %251 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %250) #5
  %252 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %251, i32 0, i32 2
  %253 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %252, i32 0, i32 1
  %254 = load i32, ptr %15, align 4, !tbaa !11
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %253, i64 noundef %255) #5
  %257 = getelementptr inbounds %"struct.xscatter::data", ptr %256, i32 0, i32 0
  %258 = load double, ptr %257, align 8, !tbaa !13
  %259 = load double, ptr %18, align 8, !tbaa !9
  %260 = fcmp ogt double %258, %259
  br i1 %260, label %261, label %262

261:                                              ; preds = %246
  br label %266

262:                                              ; preds = %246
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %15, align 4, !tbaa !11
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %15, align 4, !tbaa !11
  br label %242, !llvm.loop !18

266:                                              ; preds = %261, %242
  %267 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %268 = load i32, ptr %6, align 4, !tbaa !11
  %269 = sub nsw i32 %268, 1
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %270) #5
  %272 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %271, i32 0, i32 2
  %273 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %272, i32 0, i32 1
  %274 = load i32, ptr %15, align 4, !tbaa !11
  %275 = sub nsw i32 %274, 1
  %276 = sext i32 %275 to i64
  %277 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %273, i64 noundef %276) #5
  %278 = getelementptr inbounds %"struct.xscatter::data", ptr %277, i32 0, i32 0
  %279 = load double, ptr %278, align 8, !tbaa !13
  store double %279, ptr %11, align 8, !tbaa !9
  %280 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %281 = load i32, ptr %6, align 4, !tbaa !11
  %282 = sub nsw i32 %281, 1
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %280, i64 noundef %283) #5
  %285 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %284, i32 0, i32 2
  %286 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %285, i32 0, i32 1
  %287 = load i32, ptr %15, align 4, !tbaa !11
  %288 = sext i32 %287 to i64
  %289 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef %288) #5
  %290 = getelementptr inbounds %"struct.xscatter::data", ptr %289, i32 0, i32 0
  %291 = load double, ptr %290, align 8, !tbaa !13
  store double %291, ptr %12, align 8, !tbaa !9
  %292 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %293 = load i32, ptr %6, align 4, !tbaa !11
  %294 = sub nsw i32 %293, 1
  %295 = sext i32 %294 to i64
  %296 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %292, i64 noundef %295) #5
  %297 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %296, i32 0, i32 2
  %298 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %297, i32 0, i32 1
  %299 = load i32, ptr %15, align 4, !tbaa !11
  %300 = sub nsw i32 %299, 1
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %298, i64 noundef %301) #5
  %303 = getelementptr inbounds %"struct.xscatter::data", ptr %302, i32 0, i32 1
  %304 = load double, ptr %303, align 8, !tbaa !15
  store double %304, ptr %13, align 8, !tbaa !9
  %305 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %306 = load i32, ptr %6, align 4, !tbaa !11
  %307 = sub nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %305, i64 noundef %308) #5
  %310 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %309, i32 0, i32 2
  %311 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %310, i32 0, i32 1
  %312 = load i32, ptr %15, align 4, !tbaa !11
  %313 = sext i32 %312 to i64
  %314 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef %313) #5
  %315 = getelementptr inbounds %"struct.xscatter::data", ptr %314, i32 0, i32 1
  %316 = load double, ptr %315, align 8, !tbaa !15
  store double %316, ptr %14, align 8, !tbaa !9
  %317 = load double, ptr %14, align 8, !tbaa !9
  %318 = load double, ptr %13, align 8, !tbaa !9
  %319 = fsub double %317, %318
  %320 = load double, ptr %12, align 8, !tbaa !9
  %321 = load double, ptr %11, align 8, !tbaa !9
  %322 = fsub double %320, %321
  %323 = fdiv double %319, %322
  %324 = load double, ptr %18, align 8, !tbaa !9
  %325 = load double, ptr %11, align 8, !tbaa !9
  %326 = fsub double %324, %325
  %327 = load double, ptr %13, align 8, !tbaa !9
  %328 = call double @llvm.fmuladd.f64(double %323, double %326, double %327)
  store double %328, ptr %9, align 8, !tbaa !9
  br label %329

329:                                              ; preds = %266, %230
  br label %330

330:                                              ; preds = %329, %203
  br label %331

331:                                              ; preds = %330, %172
  %332 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %333 = load i32, ptr %6, align 4, !tbaa !11
  %334 = sub nsw i32 %333, 1
  %335 = sext i32 %334 to i64
  %336 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %332, i64 noundef %335) #5
  %337 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %336, i32 0, i32 3
  %338 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %337, i32 0, i32 1
  %339 = call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %338) #5
  %340 = trunc i64 %339 to i32
  store i32 %340, ptr %7, align 4, !tbaa !11
  %341 = load double, ptr %18, align 8, !tbaa !9
  %342 = load double, ptr %16, align 8, !tbaa !9
  %343 = fcmp oge double %341, %342
  br i1 %343, label %344, label %488

344:                                              ; preds = %331
  %345 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %346 = load i32, ptr %6, align 4, !tbaa !11
  %347 = sub nsw i32 %346, 1
  %348 = sext i32 %347 to i64
  %349 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %345, i64 noundef %348) #5
  %350 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %349, i32 0, i32 3
  %351 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %350, i32 0, i32 1
  %352 = load i32, ptr %7, align 4, !tbaa !11
  %353 = sub nsw i32 %352, 1
  %354 = sext i32 %353 to i64
  %355 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %351, i64 noundef %354) #5
  %356 = getelementptr inbounds %"struct.xscatter::data", ptr %355, i32 0, i32 0
  %357 = load double, ptr %356, align 8, !tbaa !13
  %358 = load double, ptr %18, align 8, !tbaa !9
  %359 = fcmp ole double %357, %358
  br i1 %359, label %360, label %374

360:                                              ; preds = %344
  %361 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %362 = load i32, ptr %6, align 4, !tbaa !11
  %363 = sub nsw i32 %362, 1
  %364 = sext i32 %363 to i64
  %365 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %361, i64 noundef %364) #5
  %366 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %365, i32 0, i32 3
  %367 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %366, i32 0, i32 1
  %368 = load i32, ptr %7, align 4, !tbaa !11
  %369 = sub nsw i32 %368, 1
  %370 = sext i32 %369 to i64
  %371 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %367, i64 noundef %370) #5
  %372 = getelementptr inbounds %"struct.xscatter::data", ptr %371, i32 0, i32 1
  %373 = load double, ptr %372, align 8, !tbaa !15
  store double %373, ptr %10, align 8, !tbaa !9
  br label %487

374:                                              ; preds = %344
  %375 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %376 = load i32, ptr %6, align 4, !tbaa !11
  %377 = sub nsw i32 %376, 1
  %378 = sext i32 %377 to i64
  %379 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %375, i64 noundef %378) #5
  %380 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %379, i32 0, i32 3
  %381 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %380, i32 0, i32 1
  %382 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %381, i64 noundef 0) #5
  %383 = getelementptr inbounds %"struct.xscatter::data", ptr %382, i32 0, i32 0
  %384 = load double, ptr %383, align 8, !tbaa !13
  %385 = load double, ptr %18, align 8, !tbaa !9
  %386 = fcmp ogt double %384, %385
  br i1 %386, label %387, label %398

387:                                              ; preds = %374
  %388 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %389 = load i32, ptr %6, align 4, !tbaa !11
  %390 = sub nsw i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %388, i64 noundef %391) #5
  %393 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %392, i32 0, i32 3
  %394 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %393, i32 0, i32 1
  %395 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %394, i64 noundef 0) #5
  %396 = getelementptr inbounds %"struct.xscatter::data", ptr %395, i32 0, i32 1
  %397 = load double, ptr %396, align 8, !tbaa !15
  store double %397, ptr %10, align 8, !tbaa !9
  br label %486

398:                                              ; preds = %374
  store i32 0, ptr %15, align 4, !tbaa !11
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %399

399:                                              ; preds = %420, %398
  %400 = load i32, ptr %15, align 4, !tbaa !11
  %401 = load i32, ptr %7, align 4, !tbaa !11
  %402 = icmp slt i32 %400, %401
  br i1 %402, label %403, label %423

403:                                              ; preds = %399
  %404 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %405 = load i32, ptr %6, align 4, !tbaa !11
  %406 = sub nsw i32 %405, 1
  %407 = sext i32 %406 to i64
  %408 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %404, i64 noundef %407) #5
  %409 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %408, i32 0, i32 3
  %410 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %409, i32 0, i32 1
  %411 = load i32, ptr %15, align 4, !tbaa !11
  %412 = sext i32 %411 to i64
  %413 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %410, i64 noundef %412) #5
  %414 = getelementptr inbounds %"struct.xscatter::data", ptr %413, i32 0, i32 0
  %415 = load double, ptr %414, align 8, !tbaa !13
  %416 = load double, ptr %18, align 8, !tbaa !9
  %417 = fcmp ogt double %415, %416
  br i1 %417, label %418, label %419

418:                                              ; preds = %403
  br label %423

419:                                              ; preds = %403
  br label %420

420:                                              ; preds = %419
  %421 = load i32, ptr %15, align 4, !tbaa !11
  %422 = add nsw i32 %421, 1
  store i32 %422, ptr %15, align 4, !tbaa !11
  br label %399, !llvm.loop !19

423:                                              ; preds = %418, %399
  %424 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %425 = load i32, ptr %6, align 4, !tbaa !11
  %426 = sub nsw i32 %425, 1
  %427 = sext i32 %426 to i64
  %428 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %424, i64 noundef %427) #5
  %429 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %428, i32 0, i32 3
  %430 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %429, i32 0, i32 1
  %431 = load i32, ptr %15, align 4, !tbaa !11
  %432 = sub nsw i32 %431, 1
  %433 = sext i32 %432 to i64
  %434 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %430, i64 noundef %433) #5
  %435 = getelementptr inbounds %"struct.xscatter::data", ptr %434, i32 0, i32 0
  %436 = load double, ptr %435, align 8, !tbaa !13
  store double %436, ptr %11, align 8, !tbaa !9
  %437 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %438 = load i32, ptr %6, align 4, !tbaa !11
  %439 = sub nsw i32 %438, 1
  %440 = sext i32 %439 to i64
  %441 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %437, i64 noundef %440) #5
  %442 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %441, i32 0, i32 3
  %443 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %442, i32 0, i32 1
  %444 = load i32, ptr %15, align 4, !tbaa !11
  %445 = sext i32 %444 to i64
  %446 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %443, i64 noundef %445) #5
  %447 = getelementptr inbounds %"struct.xscatter::data", ptr %446, i32 0, i32 0
  %448 = load double, ptr %447, align 8, !tbaa !13
  store double %448, ptr %12, align 8, !tbaa !9
  %449 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %450 = load i32, ptr %6, align 4, !tbaa !11
  %451 = sub nsw i32 %450, 1
  %452 = sext i32 %451 to i64
  %453 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %449, i64 noundef %452) #5
  %454 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %453, i32 0, i32 3
  %455 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %454, i32 0, i32 1
  %456 = load i32, ptr %15, align 4, !tbaa !11
  %457 = sub nsw i32 %456, 1
  %458 = sext i32 %457 to i64
  %459 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %455, i64 noundef %458) #5
  %460 = getelementptr inbounds %"struct.xscatter::data", ptr %459, i32 0, i32 1
  %461 = load double, ptr %460, align 8, !tbaa !15
  store double %461, ptr %13, align 8, !tbaa !9
  %462 = getelementptr inbounds %class.xscatter, ptr %20, i32 0, i32 1
  %463 = load i32, ptr %6, align 4, !tbaa !11
  %464 = sub nsw i32 %463, 1
  %465 = sext i32 %464 to i64
  %466 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %462, i64 noundef %465) #5
  %467 = getelementptr inbounds %"struct.xscatter::IncoherentAndCoherentScatterFunctions_elem_s", ptr %466, i32 0, i32 3
  %468 = getelementptr inbounds %"struct.xscatter::reaction_record_s", ptr %467, i32 0, i32 1
  %469 = load i32, ptr %15, align 4, !tbaa !11
  %470 = sext i32 %469 to i64
  %471 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %468, i64 noundef %470) #5
  %472 = getelementptr inbounds %"struct.xscatter::data", ptr %471, i32 0, i32 1
  %473 = load double, ptr %472, align 8, !tbaa !15
  store double %473, ptr %14, align 8, !tbaa !9
  %474 = load double, ptr %14, align 8, !tbaa !9
  %475 = load double, ptr %13, align 8, !tbaa !9
  %476 = fsub double %474, %475
  %477 = load double, ptr %12, align 8, !tbaa !9
  %478 = load double, ptr %11, align 8, !tbaa !9
  %479 = fsub double %477, %478
  %480 = fdiv double %476, %479
  %481 = load double, ptr %18, align 8, !tbaa !9
  %482 = load double, ptr %11, align 8, !tbaa !9
  %483 = fsub double %481, %482
  %484 = load double, ptr %13, align 8, !tbaa !9
  %485 = call double @llvm.fmuladd.f64(double %480, double %483, double %484)
  store double %485, ptr %10, align 8, !tbaa !9
  br label %486

486:                                              ; preds = %423, %387
  br label %487

487:                                              ; preds = %486, %360
  br label %497

488:                                              ; preds = %331
  %489 = load i32, ptr %6, align 4, !tbaa !11
  %490 = sub nsw i32 %489, 1
  %491 = sext i32 %490 to i64
  %492 = getelementptr inbounds [100 x %"struct.xscatter::element_property_s"], ptr @_ZN8xscatter20elementProperty_ListE, i64 0, i64 %491
  %493 = getelementptr inbounds %"struct.xscatter::element_property_s", ptr %492, i32 0, i32 1
  %494 = load float, ptr %493, align 4, !tbaa !20
  %495 = fneg float %494
  %496 = fpext float %495 to double
  store double %496, ptr %10, align 8, !tbaa !9
  br label %497

497:                                              ; preds = %488, %487
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %498 = load double, ptr %8, align 8, !tbaa !9
  %499 = load double, ptr %10, align 8, !tbaa !9
  %500 = fadd double %498, %499
  %501 = load double, ptr %8, align 8, !tbaa !9
  %502 = load double, ptr %10, align 8, !tbaa !9
  %503 = fadd double %501, %502
  %504 = load double, ptr %9, align 8, !tbaa !9
  %505 = load double, ptr %9, align 8, !tbaa !9
  %506 = fmul double %504, %505
  %507 = call double @llvm.fmuladd.f64(double %500, double %503, double %506)
  store double %507, ptr %19, align 8, !tbaa !9
  %508 = load double, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret double %508
}

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 #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, !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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN8xscatter4dataE", !10, i64 0, !10, i64 8}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !22, i64 4}
!21 = !{!"_ZTSN8xscatter18element_property_sE", !12, i64 0, !22, i64 4, !22, i64 8, !23, i64 16}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}


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

%"struct.xscatter::element_property_s" = type { i32, float, float, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZN8xscatter20elementProperty_ListE = external dso_local local_unnamed_addr global [100 x %"struct.xscatter::element_property_s"], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN8xscatter21getCoherentFormFactorEdi(ptr noundef nonnull align 8 dereferenceable(2456) %0, double noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  store double %1, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 2400
  %7 = add nsw i32 %2, -1
  %8 = sext i32 %7 to i64
  %9 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %10 = getelementptr inbounds i8, ptr %9, i64 184
  %11 = tail call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  %12 = trunc i64 %11 to i32
  %13 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %14 = getelementptr inbounds i8, ptr %13, i64 184
  %15 = shl i64 %11, 32
  %sext = add i64 %15, -4294967296
  %16 = ashr exact i64 %sext, 32
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %16) #4
  %18 = load double, ptr %17, align 8, !tbaa !9
  %19 = fcmp ugt double %18, %1
  %20 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %21 = getelementptr inbounds i8, ptr %20, i64 184
  br i1 %19, label %26, label %22

22:                                               ; preds = %3
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %16) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !11
  br label %71

26:                                               ; preds = %3
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0) #4
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fcmp ogt double %28, %1
  br i1 %29, label %31, label %.preheader105

.preheader105:                                    ; preds = %26
  %30 = icmp sgt i32 %12, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader105
  %wide.trip.count = and i64 %11, 2147483647
  br label %37

31:                                               ; preds = %26
  %32 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %33 = getelementptr inbounds i8, ptr %32, i64 184
  %34 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef 0) #4
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !11
  br label %71

37:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %38 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %39 = getelementptr inbounds i8, ptr %38, i64 184
  %40 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %indvars.iv) #4
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = fcmp ogt double %41, %1
  br i1 %42, label %._crit_edge.loopexit.split.loop.exit, label %43

43:                                               ; preds = %37
  %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 %37, !llvm.loop !12

._crit_edge.loopexit.split.loop.exit:             ; preds = %37
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %43, %._crit_edge.loopexit.split.loop.exit, %.preheader105
  %.099.lcssa = phi i32 [ 0, %.preheader105 ], [ %44, %._crit_edge.loopexit.split.loop.exit ], [ %12, %43 ]
  %45 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %46 = getelementptr inbounds i8, ptr %45, i64 184
  %47 = add nsw i32 %.099.lcssa, -1
  %48 = sext i32 %47 to i64
  %49 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48) #4
  %50 = load double, ptr %49, align 8, !tbaa !9
  %51 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %52 = getelementptr inbounds i8, ptr %51, i64 184
  %53 = zext nneg i32 %.099.lcssa to i64
  %54 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %53) #4
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %57 = getelementptr inbounds i8, ptr %56, i64 184
  %58 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %48) #4
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %62 = getelementptr inbounds i8, ptr %61, i64 184
  %63 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %53) #4
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load double, ptr %64, align 8, !tbaa !11
  %66 = fsub double %65, %60
  %67 = fsub double %55, %50
  %68 = fdiv double %66, %67
  %69 = fsub double %1, %50
  %70 = tail call double @llvm.fmuladd.f64(double %68, double %69, double %60)
  br label %71

71:                                               ; preds = %31, %._crit_edge, %22
  %.0 = phi double [ %25, %22 ], [ %36, %31 ], [ %70, %._crit_edge ]
  %72 = tail call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %73 = getelementptr inbounds i8, ptr %72, i64 288
  %74 = tail call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #4
  %75 = trunc i64 %74 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store double 1.000000e+01, ptr %5, align 8, !tbaa !5
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = fcmp oge double %77, 0x3EB0C6F7A0B5ED8D
  br i1 %78, label %79, label %137

79:                                               ; preds = %71
  %80 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %81 = getelementptr inbounds i8, ptr %80, i64 288
  %82 = shl i64 %74, 32
  %sext102 = add i64 %82, -4294967296
  %83 = ashr exact i64 %sext102, 32
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #4
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = fcmp ugt double %85, %77
  %87 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %88 = getelementptr inbounds i8, ptr %87, i64 288
  br i1 %86, label %93, label %89

89:                                               ; preds = %79
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %83) #4
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = load double, ptr %91, align 8, !tbaa !11
  br label %137

93:                                               ; preds = %79
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef 0) #4
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = fcmp ogt double %95, %77
  br i1 %96, label %98, label %.preheader104

.preheader104:                                    ; preds = %93
  %97 = icmp sgt i32 %75, 0
  br i1 %97, label %.lr.ph110.preheader, label %._crit_edge111

.lr.ph110.preheader:                              ; preds = %.preheader104
  %wide.trip.count125 = and i64 %74, 2147483647
  br label %.lr.ph110

98:                                               ; preds = %93
  %99 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %100 = getelementptr inbounds i8, ptr %99, i64 288
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef 0) #4
  %102 = getelementptr inbounds i8, ptr %101, i64 8
  %103 = load double, ptr %102, align 8, !tbaa !11
  br label %137

.lr.ph110:                                        ; preds = %.lr.ph110.preheader, %109
  %indvars.iv122 = phi i64 [ 0, %.lr.ph110.preheader ], [ %indvars.iv.next123, %109 ]
  %104 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %105 = getelementptr inbounds i8, ptr %104, i64 288
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %indvars.iv122) #4
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = fcmp ogt double %107, %77
  br i1 %108, label %._crit_edge111.loopexit.split.loop.exit, label %109

109:                                              ; preds = %.lr.ph110
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond126.not = icmp eq i64 %indvars.iv.next123, %wide.trip.count125
  br i1 %exitcond126.not, label %._crit_edge111, label %.lr.ph110, !llvm.loop !14

._crit_edge111.loopexit.split.loop.exit:          ; preds = %.lr.ph110
  %110 = trunc nuw nsw i64 %indvars.iv122 to i32
  br label %._crit_edge111

._crit_edge111:                                   ; preds = %109, %._crit_edge111.loopexit.split.loop.exit, %.preheader104
  %.1.lcssa = phi i32 [ 0, %.preheader104 ], [ %110, %._crit_edge111.loopexit.split.loop.exit ], [ %75, %109 ]
  %111 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %112 = getelementptr inbounds i8, ptr %111, i64 288
  %113 = add nsw i32 %.1.lcssa, -1
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %112, i64 noundef %114) #4
  %116 = load double, ptr %115, align 8, !tbaa !9
  %117 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %118 = getelementptr inbounds i8, ptr %117, i64 288
  %119 = zext nneg i32 %.1.lcssa to i64
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %119) #4
  %121 = load double, ptr %120, align 8, !tbaa !9
  %122 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %123 = getelementptr inbounds i8, ptr %122, i64 288
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %114) #4
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %128 = getelementptr inbounds i8, ptr %127, i64 288
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %119) #4
  %130 = getelementptr inbounds i8, ptr %129, i64 8
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = fsub double %131, %126
  %133 = fsub double %121, %116
  %134 = fdiv double %132, %133
  %135 = fsub double %77, %116
  %136 = call double @llvm.fmuladd.f64(double %134, double %135, double %126)
  br label %137

137:                                              ; preds = %89, %._crit_edge111, %98, %71
  %.098 = phi double [ %92, %89 ], [ %103, %98 ], [ %136, %._crit_edge111 ], [ 0.000000e+00, %71 ]
  %138 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %139 = getelementptr inbounds i8, ptr %138, i64 392
  %140 = call noundef i64 @_ZNKSt6vectorIN8xscatter4dataESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %139) #4
  %141 = trunc i64 %140 to i32
  br i1 %78, label %142, label %200

142:                                              ; preds = %137
  %143 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %144 = getelementptr inbounds i8, ptr %143, i64 392
  %145 = shl i64 %140, 32
  %sext103 = add i64 %145, -4294967296
  %146 = ashr exact i64 %sext103, 32
  %147 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %146) #4
  %148 = load double, ptr %147, align 8, !tbaa !9
  %149 = fcmp ugt double %148, %77
  %150 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %151 = getelementptr inbounds i8, ptr %150, i64 392
  br i1 %149, label %156, label %152

152:                                              ; preds = %142
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %146) #4
  %154 = getelementptr inbounds i8, ptr %153, i64 8
  %155 = load double, ptr %154, align 8, !tbaa !11
  br label %205

156:                                              ; preds = %142
  %157 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef 0) #4
  %158 = load double, ptr %157, align 8, !tbaa !9
  %159 = fcmp ogt double %158, %77
  br i1 %159, label %161, label %.preheader

.preheader:                                       ; preds = %156
  %160 = icmp sgt i32 %141, 0
  br i1 %160, label %.lr.ph116.preheader, label %._crit_edge117

.lr.ph116.preheader:                              ; preds = %.preheader
  %wide.trip.count130 = and i64 %140, 2147483647
  br label %.lr.ph116

161:                                              ; preds = %156
  %162 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %163 = getelementptr inbounds i8, ptr %162, i64 392
  %164 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef 0) #4
  %165 = getelementptr inbounds i8, ptr %164, i64 8
  %166 = load double, ptr %165, align 8, !tbaa !11
  br label %205

.lr.ph116:                                        ; preds = %.lr.ph116.preheader, %172
  %indvars.iv127 = phi i64 [ 0, %.lr.ph116.preheader ], [ %indvars.iv.next128, %172 ]
  %167 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %168 = getelementptr inbounds i8, ptr %167, i64 392
  %169 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %indvars.iv127) #4
  %170 = load double, ptr %169, align 8, !tbaa !9
  %171 = fcmp ogt double %170, %77
  br i1 %171, label %._crit_edge117.loopexit.split.loop.exit, label %172

172:                                              ; preds = %.lr.ph116
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next128, %wide.trip.count130
  br i1 %exitcond131.not, label %._crit_edge117, label %.lr.ph116, !llvm.loop !15

._crit_edge117.loopexit.split.loop.exit:          ; preds = %.lr.ph116
  %173 = trunc nuw nsw i64 %indvars.iv127 to i32
  br label %._crit_edge117

._crit_edge117:                                   ; preds = %172, %._crit_edge117.loopexit.split.loop.exit, %.preheader
  %.2.lcssa = phi i32 [ 0, %.preheader ], [ %173, %._crit_edge117.loopexit.split.loop.exit ], [ %141, %172 ]
  %174 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %175 = getelementptr inbounds i8, ptr %174, i64 392
  %176 = add nsw i32 %.2.lcssa, -1
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %175, i64 noundef %177) #4
  %179 = load double, ptr %178, align 8, !tbaa !9
  %180 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %181 = getelementptr inbounds i8, ptr %180, i64 392
  %182 = zext nneg i32 %.2.lcssa to i64
  %183 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %182) #4
  %184 = load double, ptr %183, align 8, !tbaa !9
  %185 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %186 = getelementptr inbounds i8, ptr %185, i64 392
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %177) #4
  %188 = getelementptr inbounds i8, ptr %187, i64 8
  %189 = load double, ptr %188, align 8, !tbaa !11
  %190 = call noundef nonnull align 8 dereferenceable(416) ptr @_ZNSt6vectorIN8xscatter44IncoherentAndCoherentScatterFunctions_elem_sESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #4
  %191 = getelementptr inbounds i8, ptr %190, i64 392
  %192 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN8xscatter4dataESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %182) #4
  %193 = getelementptr inbounds i8, ptr %192, i64 8
  %194 = load double, ptr %193, align 8, !tbaa !11
  %195 = fsub double %194, %189
  %196 = fsub double %184, %179
  %197 = fdiv double %195, %196
  %198 = fsub double %77, %179
  %199 = call double @llvm.fmuladd.f64(double %197, double %198, double %189)
  br label %205

200:                                              ; preds = %137
  %201 = getelementptr inbounds [100 x %"struct.xscatter::element_property_s"], ptr @_ZN8xscatter20elementProperty_ListE, i64 0, i64 %8, i32 1
  %202 = load float, ptr %201, align 4, !tbaa !16
  %203 = fneg float %202
  %204 = fpext float %203 to double
  br label %205

205:                                              ; preds = %152, %._crit_edge117, %161, %200
  %.0100 = phi double [ %155, %152 ], [ %166, %161 ], [ %199, %._crit_edge117 ], [ %204, %200 ]
  %206 = fadd double %.0, %.0100
  %207 = fmul double %.098, %.098
  %208 = call double @llvm.fmuladd.f64(double %206, double %206, double %207)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret double %208
}

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

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN8xscatter4dataE", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !19, i64 4}
!17 = !{!"_ZTSN8xscatter18element_property_sE", !18, i64 0, !19, i64 4, !19, i64 8, !20, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !23, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !22, i64 0}
!22 = !{!"any pointer", !7, i64 0}
!23 = !{!"long", !7, i64 0}


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