; LLVM IR from artvns/SimpleFvm :: simplefvm/src/ResultsSaver/VtkSaver/MeshStructGenerator (CellsInfo)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.resultssaver::CellsInfo" = type { ptr, %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12resultssaver9CellsInfo15createTemplatesEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %21 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = call noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionYEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  store i64 %23, ptr %3, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %24 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = call noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionXEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
  store i64 %26, ptr %4, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %27 = load i64, ptr %3, align 8, !tbaa !15
  %28 = add i64 %27, 2
  store i64 %28, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %29 = load i64, ptr %4, align 8, !tbaa !15
  %30 = add i64 %29, 2
  store i64 %30, ptr %6, align 8, !tbaa !15
  %31 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 1
  %32 = load i64, ptr %5, align 8, !tbaa !15
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %33

33:                                               ; preds = %46, %1
  %34 = load i64, ptr %7, align 8, !tbaa !15
  %35 = load i64, ptr %5, align 8, !tbaa !15
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %58

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %39 = load i64, ptr %6, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorImSaImEEC2EmRKmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %39, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %40 unwind label %49

40:                                               ; preds = %38
  %41 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 1
  %42 = load i64, ptr %7, align 8, !tbaa !15
  %43 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42)
          to label %44 unwind label %53

44:                                               ; preds = %40
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorImSaImEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %46

46:                                               ; preds = %44
  %47 = load i64, ptr %7, align 8, !tbaa !15
  %48 = add i64 %47, 1
  store i64 %48, ptr %7, align 8, !tbaa !15
  br label %33, !llvm.loop !17

49:                                               ; preds = %38
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  br label %57

53:                                               ; preds = %40
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %11, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %12, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %57

57:                                               ; preds = %53, %49
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %124

58:                                               ; preds = %37
  %59 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 2
  %60 = load i64, ptr %3, align 8, !tbaa !15
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !15
  br label %61

61:                                               ; preds = %74, %58
  %62 = load i64, ptr %13, align 8, !tbaa !15
  %63 = load i64, ptr %3, align 8, !tbaa !15
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %67 = load i64, ptr %4, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  invoke void @_ZNSt6vectorImSaImEEC2EmRKmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %67, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %68 unwind label %77

68:                                               ; preds = %66
  %69 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 2
  %70 = load i64, ptr %13, align 8, !tbaa !15
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70)
          to label %72 unwind label %81

72:                                               ; preds = %68
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorImSaImEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  br label %74

74:                                               ; preds = %72
  %75 = load i64, ptr %13, align 8, !tbaa !15
  %76 = add i64 %75, 1
  store i64 %76, ptr %13, align 8, !tbaa !15
  br label %61, !llvm.loop !19

77:                                               ; preds = %66
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %11, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %12, align 4
  br label %85

81:                                               ; preds = %68
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %11, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %12, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %85

85:                                               ; preds = %81, %77
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %124

86:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !15
  br label %87

87:                                               ; preds = %120, %86
  %88 = load i64, ptr %17, align 8, !tbaa !15
  %89 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call noundef i64 @_ZNK12resultssaver15MeshInformation14getCellsAmountEv(ptr noundef nonnull align 8 dereferenceable(16) %90)
  %92 = icmp ult i64 %88, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %123

94:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %95 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = load i64, ptr %17, align 8, !tbaa !15
  %98 = call noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_iPosEm(ptr noundef nonnull align 8 dereferenceable(16) %96, i64 noundef %97)
  store i64 %98, ptr %18, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %99 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load i64, ptr %17, align 8, !tbaa !15
  %102 = call noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_jPosEm(ptr noundef nonnull align 8 dereferenceable(16) %100, i64 noundef %101)
  store i64 %102, ptr %19, align 8, !tbaa !15
  %103 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 1
  %104 = load i64, ptr %18, align 8, !tbaa !15
  %105 = add i64 %104, 1
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %105) #4
  %107 = load i64, ptr %19, align 8, !tbaa !15
  %108 = add i64 %107, 1
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #4
  store i64 1, ptr %109, align 8, !tbaa !15
  %110 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = load i64, ptr %17, align 8, !tbaa !15
  %113 = call noundef i64 @_ZNK12resultssaver15MeshInformation10getCellNumEm(ptr noundef nonnull align 8 dereferenceable(16) %111, i64 noundef %112)
  %114 = sub i64 %113, 1
  %115 = getelementptr inbounds %"class.resultssaver::CellsInfo", ptr %20, i32 0, i32 2
  %116 = load i64, ptr %18, align 8, !tbaa !15
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %116) #4
  %118 = load i64, ptr %19, align 8, !tbaa !15
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %118) #4
  store i64 %114, ptr %119, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %120

120:                                              ; preds = %94
  %121 = load i64, ptr %17, align 8, !tbaa !15
  %122 = add i64 %121, 1
  store i64 %122, ptr %17, align 8, !tbaa !15
  br label %87, !llvm.loop !20

123:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void

124:                                              ; preds = %85, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %11, align 8
  %127 = load i32, ptr %12, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionYEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionXEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation14getCellsAmountEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_iPosEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_jPosEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2

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

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation10getCellNumEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN12resultssaver9CellsInfoE", !6, i64 0, !11, i64 8, !11, i64 32}
!11 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12resultssaver9CellsInfo15createTemplatesEv(ptr noundef nonnull align 8 dereferenceable(56) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = tail call noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionYEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = tail call noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionXEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %12 = add i64 %9, 2
  %13 = add i64 %11, 2
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %12)
  %.not = icmp eq i64 %12, 0
  br i1 %.not, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %1
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %9)
  br label %.lr.ph38.preheader

._crit_edge:                                      ; preds = %20
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %9)
  %.not42 = icmp eq i64 %9, 0
  br i1 %.not42, label %.preheader, label %.lr.ph38.preheader

.lr.ph38.preheader:                               ; preds = %._crit_edge.thread, %._crit_edge
  %17 = phi ptr [ %15, %._crit_edge.thread ], [ %16, %._crit_edge ]
  br label %.lr.ph38

.lr.ph:                                           ; preds = %1, %20
  %.035 = phi i64 [ %22, %20 ], [ 0, %1 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store i64 0, ptr %3, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorImSaImEEC2EmRKmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %13, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %18 unwind label %23

18:                                               ; preds = %.lr.ph
  %19 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %.035)
          to label %20 unwind label %25

20:                                               ; preds = %18
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorImSaImEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  %22 = add nuw i64 %.035, 1
  %exitcond.not = icmp eq i64 %22, %12
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %27

25:                                               ; preds = %18
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %27

27:                                               ; preds = %25, %23
  %.pn32 = phi { ptr, i32 } [ %26, %25 ], [ %24, %23 ]
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  br label %58

.preheader:                                       ; preds = %33, %._crit_edge
  %28 = phi ptr [ %16, %._crit_edge ], [ %17, %33 ]
  %29 = load ptr, ptr %0, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNK12resultssaver15MeshInformation14getCellsAmountEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  %.not43 = icmp eq i64 %30, 0
  br i1 %.not43, label %._crit_edge41, label %.lr.ph40

.lr.ph38:                                         ; preds = %.lr.ph38.preheader, %33
  %.02736 = phi i64 [ %35, %33 ], [ 0, %.lr.ph38.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 0, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorImSaImEEC2EmRKmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %31 unwind label %36

31:                                               ; preds = %.lr.ph38
  %32 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.02736)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorImSaImEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  %35 = add nuw i64 %.02736, 1
  %exitcond44.not = icmp eq i64 %35, %9
  br i1 %exitcond44.not, label %.preheader, label %.lr.ph38, !llvm.loop !18

36:                                               ; preds = %.lr.ph38
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %31
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %58

._crit_edge41:                                    ; preds = %.lr.ph40, %.preheader
  ret void

.lr.ph40:                                         ; preds = %.preheader, %.lr.ph40
  %.02639 = phi i64 [ %54, %.lr.ph40 ], [ 0, %.preheader ]
  %41 = load ptr, ptr %0, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_iPosEm(ptr noundef nonnull align 8 dereferenceable(16) %41, i64 noundef %.02639)
  %43 = load ptr, ptr %0, align 8, !tbaa !5
  %44 = call noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_jPosEm(ptr noundef nonnull align 8 dereferenceable(16) %43, i64 noundef %.02639)
  %45 = add i64 %42, 1
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %45) #4
  %47 = add i64 %44, 1
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %47) #4
  store i64 1, ptr %48, align 8, !tbaa !14
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = call noundef i64 @_ZNK12resultssaver15MeshInformation10getCellNumEm(ptr noundef nonnull align 8 dereferenceable(16) %49, i64 noundef %.02639)
  %51 = add i64 %50, -1
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %42) #4
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %44) #4
  store i64 %51, ptr %53, align 8, !tbaa !14
  %54 = add nuw i64 %.02639, 1
  %55 = load ptr, ptr %0, align 8, !tbaa !5
  %56 = call noundef i64 @_ZNK12resultssaver15MeshInformation14getCellsAmountEv(ptr noundef nonnull align 8 dereferenceable(16) %55)
  %57 = icmp ult i64 %54, %56
  br i1 %57, label %.lr.ph40, label %._crit_edge41, !llvm.loop !19

58:                                               ; preds = %40, %27
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %27 ], [ %.pn, %40 ]
  resume { ptr, i32 } %.pn32.pn
}

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionYEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation13getDimentionXEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation14getCellsAmountEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_iPosEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

declare noundef i64 @_ZNK12resultssaver15MeshInformation12getCell_jPosEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

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

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

declare noundef i64 @_ZNK12resultssaver15MeshInformation10getCellNumEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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, !7, i64 0}
!6 = !{!"_ZTSN12resultssaver9CellsInfoE", !7, i64 0, !10, i64 8, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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