; LLVM IR from Karansutradhar/Maze-Solver-Robot-Depth-First-Search :: Final_Project/src/Algorithm/algorithm.ll (ZN2fp9Algorithm12DFSAlgorithmESt5arrayIiLm2EE)

; 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.std::array.1" = type { [2 x i32] }
%"struct.std::array" = type { [16 x %"struct.std::array.0"] }
%"struct.std::array.0" = type { [16 x i8] }
%"struct.std::array.2" = type { [16 x %"struct.std::array.3"] }
%"struct.std::array.3" = type { [16 x %"struct.fp::Node"] }
%"struct.fp::Node" = type { i32, %"struct.std::array.1" }
%"class.fp::Algorithm" = type { i8, i8, i8, %"class.fp::Maze", i8, %"struct.std::array.1", %"struct.std::array.1", %"class.std::stack", %"class.std::shared_ptr", %"class.std::stack", %"struct.std::array.2", %"struct.std::array.2", %"struct.std::array", %"struct.std::array", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1" }
%"class.fp::Maze" = type { %"struct.std::array", %"struct.std::array", %"struct.std::array", %"struct.std::array" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::array<int, 2>, std::allocator<std::array<int, 2>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::array<int, 2>, std::allocator<std::array<int, 2>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::array<int, 2>, std::allocator<std::array<int, 2>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::array<int, 2>, std::allocator<std::array<int, 2>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fp9Algorithm10ClearStackEv(ptr noundef nonnull align 8 dereferenceable(7920)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2fp9Algorithm10IsExploredESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920), i64) #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(192) ptr @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(3072), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5arrayIN2fp4NodeELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(192), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt5arrayIS_IbLm16EELm16EEixEm(ptr noundef nonnull align 1 dereferenceable(256), i64 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2fp9Algorithm12DFSAlgorithmESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %0, i64 %1) #0 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca %"struct.std::array.1", align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::array.1", align 4
  %7 = alloca %"struct.std::array", align 1
  %8 = alloca %"struct.std::array.2", align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::array.1", align 4
  %11 = alloca %"struct.std::array.1", align 4
  %12 = getelementptr inbounds %"struct.std::array.1", ptr %4, i32 0, i32 0
  store i64 %1, ptr %12, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.memset.p0.i64(ptr align 4 %6, i8 0, i64 8, i1 false)
  %14 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 1
  store i8 0, ptr %14, align 1, !tbaa !9
  call void @_ZN2fp9Algorithm10ClearStackEv(ptr noundef nonnull align 8 dereferenceable(7920) %13)
  call void @llvm.lifetime.start.p0(i64 256, ptr %7) #6
  call void @llvm.memset.p0.i64(ptr align 1 %7, i8 0, i64 256, i1 false)
  %15 = getelementptr inbounds %"struct.std::array", ptr %7, i32 0, i32 0
  %16 = getelementptr inbounds %"struct.std::array.0", ptr %15, i64 16
  br label %17

17:                                               ; preds = %17, %2
  %18 = phi ptr [ %15, %2 ], [ %20, %17 ]
  %19 = getelementptr inbounds %"struct.std::array.0", ptr %18, i32 0, i32 0
  %20 = getelementptr inbounds %"struct.std::array.0", ptr %18, i64 1
  %21 = icmp eq ptr %20, %16
  br i1 %21, label %22, label %17

22:                                               ; preds = %17
  %23 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 1 %7, i64 256, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 256, ptr %7) #6
  %24 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 7
  call void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 3072, ptr %8) #6
  call void @llvm.memset.p0.i64(ptr align 4 %8, i8 0, i64 3072, i1 false)
  call void @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEC2Ev(ptr noundef nonnull align 4 dereferenceable(3072) %8)
  %25 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 4 %8, i64 3072, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 3072, ptr %8) #6
  %26 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 10
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %4, i64 noundef 0) #6
  %28 = load i32, ptr %27, align 4, !tbaa !29
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(192) ptr @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(3072) %26, i64 noundef %29) #6
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %4, i64 noundef 1) #6
  %32 = load i32, ptr %31, align 4, !tbaa !29
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5arrayIN2fp4NodeELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(192) %30, i64 noundef %33) #6
  %35 = getelementptr inbounds %"struct.fp::Node", ptr %34, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !31
  br label %36

36:                                               ; preds = %65, %22
  %37 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 7
  %38 = call noundef zeroext i1 @_ZNKSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %37)
  %39 = xor i1 %38, true
  br i1 %39, label %40, label %75

40:                                               ; preds = %36
  %41 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 7
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %41)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %42, i64 8, i1 false), !tbaa.struct !31
  %43 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 7
  call void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %43)
  %44 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 14
  %45 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %44)
  br i1 %45, label %55, label %46

46:                                               ; preds = %40
  %47 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 15
  %48 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %47)
  br i1 %48, label %55, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 16
  %51 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %50)
  br i1 %51, label %55, label %52

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 17
  %54 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %53)
  br i1 %54, label %55, label %57

55:                                               ; preds = %52, %49, %46, %40
  %56 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %56, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !31
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %76

57:                                               ; preds = %52
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !31
  %58 = getelementptr inbounds %"struct.std::array.1", ptr %10, i32 0, i32 0
  %59 = load i64, ptr %58, align 4
  %60 = call noundef zeroext i1 @_ZN2fp9Algorithm10IsExploredESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %13, i64 %59)
  br i1 %60, label %64, label %61

61:                                               ; preds = %57
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !31
  %62 = getelementptr inbounds %"struct.std::array.1", ptr %11, i32 0, i32 0
  %63 = load i64, ptr %62, align 4
  call void @_ZN2fp9Algorithm14FindNeighboursESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %13, i64 %63)
  br label %64

64:                                               ; preds = %61, %57
  br label %65

65:                                               ; preds = %64
  %66 = getelementptr inbounds %"class.fp::Algorithm", ptr %13, i32 0, i32 12
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %6, i64 noundef 0) #6
  %68 = load i32, ptr %67, align 4, !tbaa !29
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt5arrayIS_IbLm16EELm16EEixEm(ptr noundef nonnull align 1 dereferenceable(256) %66, i64 noundef %69) #6
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %6, i64 noundef 1) #6
  %72 = load i32, ptr %71, align 4, !tbaa !29
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIbLm16EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %70, i64 noundef %73) #6
  store i8 1, ptr %74, align 1, !tbaa !32
  br label %36, !llvm.loop !33

75:                                               ; preds = %36
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %76

76:                                               ; preds = %75, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %77 = load i1, ptr %3, align 1
  ret i1 %77
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEC2Ev(ptr noundef nonnull align 4 dereferenceable(3072)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 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 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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !11, i64 1}
!10 = !{!"_ZTSN2fp9AlgorithmE", !11, i64 0, !11, i64 1, !11, i64 2, !12, i64 3, !7, i64 1027, !14, i64 1028, !14, i64 1036, !15, i64 1048, !22, i64 1128, !15, i64 1144, !25, i64 1224, !25, i64 4296, !13, i64 7368, !13, i64 7624, !14, i64 7880, !14, i64 7888, !14, i64 7896, !14, i64 7904, !14, i64 7912}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN2fp4MazeE", !13, i64 0, !13, i64 256, !13, i64 512, !13, i64 768}
!13 = !{!"_ZTSSt5arrayIS_IbLm16EELm16EE", !7, i64 0}
!14 = !{!"_ZTSSt5arrayIiLm2EE", !7, i64 0}
!15 = !{!"_ZTSSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt5dequeISt5arrayIiLm2EESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE11_Deque_implE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !21, i64 16, !21, i64 48}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSSt15_Deque_iteratorISt5arrayIiLm2EERS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt10shared_ptrIN2fp14LandBasedRobotEE", !23, i64 0}
!23 = !{!"_ZTSSt12__shared_ptrIN2fp14LandBasedRobotELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !24, i64 8}
!24 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!25 = !{!"_ZTSSt5arrayIS_IN2fp4NodeELm16EELm16EE", !7, i64 0}
!26 = !{i64 0, i64 256, !27}
!27 = !{!7, !7, i64 0}
!28 = !{i64 0, i64 3072, !27}
!29 = !{!30, !30, i64 0}
!30 = !{!"int", !7, i64 0}
!31 = !{i64 0, i64 8, !27}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; 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.std::array.1" = type { [2 x i32] }
%"struct.std::array.2" = type { [16 x %"struct.std::array.3"] }
%"struct.std::array.3" = type { [16 x %"struct.fp::Node"] }
%"struct.fp::Node" = type { i32, %"struct.std::array.1" }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fp9Algorithm10ClearStackEv(ptr noundef nonnull align 8 dereferenceable(7920)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2fp9Algorithm10IsExploredESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920), i64) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt5arrayIS_IbLm16EELm16EEixEm(ptr noundef nonnull align 1 dereferenceable(256), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2fp9Algorithm12DFSAlgorithmESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %0, i64 %1) local_unnamed_addr #0 align 2 {
  %3 = alloca %"struct.std::array.1", align 8
  %4 = alloca %"struct.std::array.1", align 8
  %5 = alloca %"struct.std::array.2", align 4
  store i64 %1, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 0, ptr %6, align 1, !tbaa !5
  tail call void @_ZN2fp9Algorithm10ClearStackEv(ptr noundef nonnull align 8 dereferenceable(7920) %0)
  %7 = getelementptr inbounds i8, ptr %0, i64 7368
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %7, i8 0, i64 256, i1 false)
  %8 = getelementptr inbounds i8, ptr %0, i64 1048
  call void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 3072, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(3072) %5, i8 0, i64 3072, i1 false)
  call void @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEC2Ev(ptr noundef nonnull align 4 dereferenceable(3072) %5)
  %9 = getelementptr inbounds i8, ptr %0, i64 1224
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(3072) %9, ptr noundef nonnull align 4 dereferenceable(3072) %5, i64 3072, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 3072, ptr nonnull %5) #6
  %10 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %3, i64 noundef 0) #6
  %11 = load i32, ptr %10, align 4, !tbaa !27
  %12 = sext i32 %11 to i64
  %13 = call noundef nonnull align 4 dereferenceable(192) ptr @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(3072) %9, i64 noundef %12) #6
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %3, i64 noundef 1) #6
  %15 = load i32, ptr %14, align 4, !tbaa !27
  %16 = sext i32 %15 to i64
  %17 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5arrayIN2fp4NodeELm16EEixEm(ptr noundef nonnull align 4 dereferenceable(192) %13, i64 noundef %16) #6
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  %19 = load i64, ptr %3, align 8, !tbaa !26
  store i64 %19, ptr %18, align 4, !tbaa !26
  %20 = call noundef zeroext i1 @_ZNKSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %20, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %21 = getelementptr inbounds i8, ptr %0, i64 7880
  %22 = getelementptr inbounds i8, ptr %0, i64 7888
  %23 = getelementptr inbounds i8, ptr %0, i64 7896
  %24 = getelementptr inbounds i8, ptr %0, i64 7904
  br label %25

25:                                               ; preds = %.lr.ph, %41
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %27 = load i64, ptr %26, align 4, !tbaa !26
  store i64 %27, ptr %4, align 8, !tbaa !26
  call void @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %28 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %21)
  br i1 %28, label %35, label %29

29:                                               ; preds = %25
  %30 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %22)
  br i1 %30, label %35, label %31

31:                                               ; preds = %29
  %32 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %23)
  br i1 %32, label %35, label %33

33:                                               ; preds = %31
  %34 = call noundef zeroext i1 @_ZSteqIiLm2EEbRKSt5arrayIT_XT0_EES4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %24)
  br i1 %34, label %35, label %38

35:                                               ; preds = %33, %31, %29, %25
  %36 = getelementptr inbounds i8, ptr %0, i64 7912
  %37 = load i64, ptr %4, align 8, !tbaa !26
  store i64 %37, ptr %36, align 8, !tbaa !26
  br label %.loopexit

38:                                               ; preds = %33
  %.sroa.01.0.copyload = load i64, ptr %4, align 8, !tbaa !26
  %39 = call noundef zeroext i1 @_ZN2fp9Algorithm10IsExploredESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %0, i64 %.sroa.01.0.copyload)
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  %.sroa.0.0.copyload = load i64, ptr %4, align 8, !tbaa !26
  call void @_ZN2fp9Algorithm14FindNeighboursESt5arrayIiLm2EE(ptr noundef nonnull align 8 dereferenceable(7920) %0, i64 %.sroa.0.0.copyload)
  br label %41

41:                                               ; preds = %38, %40
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %4, i64 noundef 0) #6
  %43 = load i32, ptr %42, align 4, !tbaa !27
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt5arrayIS_IbLm16EELm16EEixEm(ptr noundef nonnull align 1 dereferenceable(256) %7, i64 noundef %44) #6
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %4, i64 noundef 1) #6
  %47 = load i32, ptr %46, align 4, !tbaa !27
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIbLm16EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %45, i64 noundef %48) #6
  store i8 1, ptr %49, align 1, !tbaa !29
  %50 = call noundef zeroext i1 @_ZNKSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %50, label %.loopexit, label %25, !llvm.loop !30

.loopexit:                                        ; preds = %41, %2, %35
  %.0 = phi i1 [ true, %35 ], [ false, %2 ], [ false, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret i1 %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayIS_IN2fp4NodeELm16EELm16EEC2Ev(ptr noundef nonnull align 4 dereferenceable(3072)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 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 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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 1}
!6 = !{!"_ZTSN2fp9AlgorithmE", !7, i64 0, !7, i64 1, !7, i64 2, !10, i64 3, !8, i64 1027, !12, i64 1028, !12, i64 1036, !13, i64 1048, !21, i64 1128, !13, i64 1144, !24, i64 1224, !24, i64 4296, !11, i64 7368, !11, i64 7624, !12, i64 7880, !12, i64 7888, !12, i64 7896, !12, i64 7904, !12, i64 7912}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN2fp4MazeE", !11, i64 0, !11, i64 256, !11, i64 512, !11, i64 768}
!11 = !{!"_ZTSSt5arrayIS_IbLm16EELm16EE", !8, i64 0}
!12 = !{!"_ZTSSt5arrayIiLm2EE", !8, i64 0}
!13 = !{!"_ZTSSt5stackISt5arrayIiLm2EESt5dequeIS1_SaIS1_EEE", !14, i64 0}
!14 = !{!"_ZTSSt5dequeISt5arrayIiLm2EESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE11_Deque_implE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseISt5arrayIiLm2EESaIS1_EE16_Deque_impl_dataE", !18, i64 0, !19, i64 8, !20, i64 16, !20, i64 48}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_ZTSSt15_Deque_iteratorISt5arrayIiLm2EERS1_PS1_E", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!21 = !{!"_ZTSSt10shared_ptrIN2fp14LandBasedRobotEE", !22, i64 0}
!22 = !{!"_ZTSSt12__shared_ptrIN2fp14LandBasedRobotELN9__gnu_cxx12_Lock_policyE2EE", !18, i64 0, !23, i64 8}
!23 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !18, i64 0}
!24 = !{!"_ZTSSt5arrayIS_IN2fp4NodeELm16EELm16EE", !8, i64 0}
!25 = !{i64 0, i64 3072, !26}
!26 = !{!8, !8, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !8, i64 0}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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