; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow (inputData)

; 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.InputData = type { %class.InputFile.base, %"class.std::basic_ifstream", %"class.std::basic_ifstream", %"class.std::basic_ifstream", %"class.std::basic_ifstream", i32, i32, i32, i32, i8, i8, i8, i8, %"class.std::vector.4", %"class.std::vector.9", %"class.std::vector.4", %"class.std::vector.4", %"class.std::multimap", %"class.std::multimap", %"class.std::set", %"class.std::set", %"class.std::vector.22", %"class.std::vector.27", %"class.std::vector.27", double, double, double, double, double, double }
%class.InputFile.base = type <{ %"class.std::vector", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i8 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.3 }
%union.anon.3 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<ThroatStruct *, std::allocator<ThroatStruct *>>::_Vector_impl" }
%"struct.std::_Vector_base<ThroatStruct *, std::allocator<ThroatStruct *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ThroatStruct *, std::allocator<ThroatStruct *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ThroatStruct *, std::allocator<ThroatStruct *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<tuple3<PoreStruct *, int *, int *>, std::allocator<tuple3<PoreStruct *, int *, int *>>>::_Vector_impl" }
%"struct.std::_Vector_base<tuple3<PoreStruct *, int *, int *>, std::allocator<tuple3<PoreStruct *, int *, int *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<tuple3<PoreStruct *, int *, int *>, std::allocator<tuple3<PoreStruct *, int *, int *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tuple3<PoreStruct *, int *, int *>, std::allocator<tuple3<PoreStruct *, int *, int *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, tuple3<int, int, double>>, std::_Select1st<std::pair<const int, tuple3<int, int, double>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, tuple3<int, int, double>>, std::_Select1st<std::pair<const int, tuple3<int, int, double>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.17" }
%"class.std::_Rb_tree.17" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<tuple3<int, int, double>, std::allocator<tuple3<int, int, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<tuple3<int, int, double>, std::allocator<tuple3<int, int, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<tuple3<int, int, double>, std::allocator<tuple3<int, int, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tuple3<int, int, double>, std::allocator<tuple3<int, int, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.var3 = type { double, double, double }
%struct.PoreStruct = type { i32, double, double, double, i32, double, double, double, double }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9InputData21findClosestPoreForPBCERKSt6vectorI4var3IdESaIS2_EERS0_IiSaIiEERS0_IdSaIdEE(ptr noundef nonnull align 8 dereferenceable(2640) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %17)
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store double 1.000000e+21, ptr %9, align 8, !tbaa !9
  call void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %20, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %21

21:                                               ; preds = %102, %4
  %22 = load i64, ptr %10, align 8, !tbaa !11
  %23 = getelementptr inbounds %class.InputData, ptr %14, i32 0, i32 13
  %24 = call noundef i64 @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  %25 = icmp ult i64 %22, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %105

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %98, %27
  %29 = load i64, ptr %12, align 8, !tbaa !11
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = icmp ult i64 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %101

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load i64, ptr %12, align 8, !tbaa !11
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %36) #4
  %38 = getelementptr inbounds %class.var3, ptr %37, i32 0, i32 0
  %39 = load double, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds %class.InputData, ptr %14, i32 0, i32 13
  %41 = load i64, ptr %10, align 8, !tbaa !11
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #4
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %42)
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.PoreStruct, ptr %44, i32 0, i32 1
  %46 = load double, ptr %45, align 8, !tbaa !15
  %47 = fsub double %39, %46
  %48 = call double @pow(double noundef %47, double noundef 2.000000e+00) #4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i64, ptr %12, align 8, !tbaa !11
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %50) #4
  %52 = getelementptr inbounds %class.var3, ptr %51, i32 0, i32 1
  %53 = load double, ptr %52, align 8, !tbaa !18
  %54 = getelementptr inbounds %class.InputData, ptr %14, i32 0, i32 13
  %55 = load i64, ptr %10, align 8, !tbaa !11
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %55) #4
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.PoreStruct, ptr %58, i32 0, i32 2
  %60 = load double, ptr %59, align 8, !tbaa !19
  %61 = fsub double %53, %60
  %62 = call double @pow(double noundef %61, double noundef 2.000000e+00) #4
  %63 = fadd double %48, %62
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load i64, ptr %12, align 8, !tbaa !11
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %65) #4
  %67 = getelementptr inbounds %class.var3, ptr %66, i32 0, i32 2
  %68 = load double, ptr %67, align 8, !tbaa !20
  %69 = getelementptr inbounds %class.InputData, ptr %14, i32 0, i32 13
  %70 = load i64, ptr %10, align 8, !tbaa !11
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70) #4
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %71)
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.PoreStruct, ptr %73, i32 0, i32 3
  %75 = load double, ptr %74, align 8, !tbaa !21
  %76 = fsub double %68, %75
  %77 = call double @pow(double noundef %76, double noundef 2.000000e+00) #4
  %78 = fadd double %63, %77
  %79 = call double @sqrt(double noundef %78) #4
  store double %79, ptr %13, align 8, !tbaa !9
  %80 = load double, ptr %13, align 8, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i64, ptr %12, align 8, !tbaa !11
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82) #4
  %84 = load double, ptr %83, align 8, !tbaa !9
  %85 = fcmp olt double %80, %84
  br i1 %85, label %86, label %97

86:                                               ; preds = %34
  %87 = load double, ptr %13, align 8, !tbaa !9
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i64, ptr %12, align 8, !tbaa !11
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %89) #4
  store double %87, ptr %90, align 8, !tbaa !9
  %91 = load i64, ptr %10, align 8, !tbaa !11
  %92 = trunc i64 %91 to i32
  %93 = add nsw i32 %92, 1
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load i64, ptr %12, align 8, !tbaa !11
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #4
  store i32 %93, ptr %96, align 4, !tbaa !22
  br label %97

97:                                               ; preds = %86, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %12, align 8, !tbaa !11
  %100 = add i64 %99, 1
  store i64 %100, ptr %12, align 8, !tbaa !11
  br label %28, !llvm.loop !23

101:                                              ; preds = %33
  br label %102

102:                                              ; preds = %101
  %103 = load i64, ptr %10, align 8, !tbaa !11
  %104 = add i64 %103, 1
  store i64 %104, ptr %10, align 8, !tbaa !11
  br label %21, !llvm.loop !25

105:                                              ; preds = %26
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS4var3IdE", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTS10PoreStruct", !17, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !17, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!17 = !{!"int", !7, i64 0}
!18 = !{!14, !10, i64 8}
!19 = !{!16, !10, i64 16}
!20 = !{!14, !10, i64 16}
!21 = !{!16, !10, i64 24}
!22 = !{!17, !17, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9InputData21findClosestPoreForPBCERKSt6vectorI4var3IdESaIS2_EERS0_IiSaIiEERS0_IdSaIdEE(ptr noundef nonnull align 8 dereferenceable(2640) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #2 align 2 {
  %5 = alloca double, align 8
  %6 = tail call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %6)
  %7 = tail call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store double 1.000000e+21, ptr %5, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 2232
  %9 = call noundef i64 @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %._crit_edge33, label %.preheader

.preheader:                                       ; preds = %4, %._crit_edge
  %.032 = phi i64 [ %13, %._crit_edge ], [ 0, %4 ]
  %10 = call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.not34 = icmp eq i64 %10, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %11 = trunc i64 %.032 to i32
  %12 = add nsw i32 %11, 1
  br label %16

._crit_edge33:                                    ; preds = %._crit_edge, %4
  ret void

._crit_edge:                                      ; preds = %56, %.preheader
  %13 = add nuw i64 %.032, 1
  %14 = call noundef i64 @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %15 = icmp ult i64 %13, %14
  br i1 %15, label %.preheader, label %._crit_edge33, !llvm.loop !9

16:                                               ; preds = %.lr.ph, %56
  %.02731 = phi i64 [ 0, %.lr.ph ], [ %57, %56 ]
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02731) #4
  %18 = load <2 x double>, ptr %17, align 8
  %19 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.032) #4
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load double, ptr %22, align 8, !tbaa !13
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02731) #4
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load double, ptr %25, align 8, !tbaa !16
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.032) #4
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load double, ptr %30, align 8, !tbaa !18
  %32 = fsub double %26, %31
  %square29 = fmul double %32, %32
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02731) #4
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load double, ptr %34, align 8, !tbaa !19
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.032) #4
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load double, ptr %39, align 8, !tbaa !20
  %41 = insertelement <2 x double> %18, double %35, i64 1
  %42 = insertelement <2 x double> poison, double %23, i64 0
  %43 = insertelement <2 x double> %42, double %40, i64 1
  %44 = fsub <2 x double> %41, %43
  %45 = fmul <2 x double> %44, %44
  %46 = extractelement <2 x double> %45, i64 0
  %47 = fadd double %46, %square29
  %48 = extractelement <2 x double> %45, i64 1
  %49 = fadd double %47, %48
  %sqrt = call double @llvm.sqrt.f64(double %49)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02731) #4
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = fcmp olt double %sqrt, %51
  br i1 %52, label %53, label %56

53:                                               ; preds = %16
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02731) #4
  store double %sqrt, ptr %54, align 8, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02731) #4
  store i32 %12, ptr %55, align 4, !tbaa !21
  br label %56

56:                                               ; preds = %53, %16
  %57 = add nuw i64 %.02731, 1
  %58 = call noundef i64 @_ZNKSt6vectorI4var3IdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %16, label %._crit_edge, !llvm.loop !22
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI4var3IdESaIS1_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 nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorI6tuple3IP10PoreStructPiS3_ESaIS4_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 nonnull align 8 dereferenceable(8) ptr @_ZNK6tuple3IP10PoreStructPiS2_E5firstEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS10PoreStruct", !15, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTS4var3IdE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!14, !6, i64 16}
!19 = !{!17, !6, i64 16}
!20 = !{!14, !6, i64 24}
!21 = !{!15, !15, i64 0}
!22 = distinct !{!22, !10}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass