; LLVM IR from keyan/route_planner :: test/dijkstras_test.ll (Z20default_road_networkv)

; 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.RoadNetwork = type { i32, %"class.std::vector", %"class.std::unordered_map" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20default_road_networkv(ptr dead_on_unwind noalias writable sret(%class.RoadNetwork) align 8 %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8
  store i1 false, ptr %3, align 1
  call void @_ZN11RoadNetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(88) %0)
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 0, i32 noundef 0, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %6 unwind label %23

6:                                                ; preds = %1
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 1, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %7 unwind label %23

7:                                                ; preds = %6
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 2, i32 noundef 2, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %8 unwind label %23

8:                                                ; preds = %7
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 3, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %9 unwind label %23

9:                                                ; preds = %8
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 4, i32 noundef 4, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %10 unwind label %23

10:                                               ; preds = %9
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 5, i32 noundef 5, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %11 unwind label %23

11:                                               ; preds = %10
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 6, i32 noundef 6, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %12 unwind label %23

12:                                               ; preds = %11
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 7, i32 noundef 7, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %13 unwind label %23

13:                                               ; preds = %12
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 8, i32 noundef 8, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %14 unwind label %23

14:                                               ; preds = %13
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %15 unwind label %23

15:                                               ; preds = %14
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %16 unwind label %23

16:                                               ; preds = %15
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 5, i32 noundef 3)
          to label %17 unwind label %23

17:                                               ; preds = %16
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 4, i32 noundef 1)
          to label %18 unwind label %23

18:                                               ; preds = %17
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 5, i32 noundef 1)
          to label %19 unwind label %23

19:                                               ; preds = %18
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 6, i32 noundef 1)
          to label %20 unwind label %23

20:                                               ; preds = %19
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 7, i32 noundef 8, i32 noundef 1)
          to label %21 unwind label %23

21:                                               ; preds = %20
  store i1 true, ptr %3, align 1
  %22 = load i1, ptr %3, align 1
  br i1 %22, label %28, label %27

23:                                               ; preds = %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %1
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %4, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %5, align 4
  call void @_ZN11RoadNetworkD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #3
  br label %29

27:                                               ; preds = %21
  call void @_ZN11RoadNetworkD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #3
  br label %28

28:                                               ; preds = %27, %21
  ret void

29:                                               ; preds = %23
  %30 = load ptr, ptr %4, align 8
  %31 = load i32, ptr %5, align 4
  %32 = insertvalue { ptr, i32 } poison, ptr %30, 0
  %33 = insertvalue { ptr, i32 } %32, i32 %31, 1
  resume { ptr, i32 } %33
}

declare void @_ZN11RoadNetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1

declare void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, double noundef, double noundef) #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11RoadNetworkD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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)"}


; 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.RoadNetwork = type { i32, %"class.std::vector", %"class.std::unordered_map" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20default_road_networkv(ptr dead_on_unwind noalias nonnull writable sret(%class.RoadNetwork) align 8 %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN11RoadNetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(88) %0)
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 0, i32 noundef 0, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %2 unwind label %17

2:                                                ; preds = %1
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 1, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %3 unwind label %17

3:                                                ; preds = %2
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 2, i32 noundef 2, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %4 unwind label %17

4:                                                ; preds = %3
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 3, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %5 unwind label %17

5:                                                ; preds = %4
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 4, i32 noundef 4, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %6 unwind label %17

6:                                                ; preds = %5
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 5, i32 noundef 5, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %7 unwind label %17

7:                                                ; preds = %6
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 6, i32 noundef 6, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %8 unwind label %17

8:                                                ; preds = %7
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 7, i32 noundef 7, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %9 unwind label %17

9:                                                ; preds = %8
  invoke void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 8, i32 noundef 8, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %10 unwind label %17

10:                                               ; preds = %9
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %11 unwind label %17

11:                                               ; preds = %10
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %12 unwind label %17

12:                                               ; preds = %11
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1, i32 noundef 5, i32 noundef 3)
          to label %13 unwind label %17

13:                                               ; preds = %12
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 4, i32 noundef 1)
          to label %14 unwind label %17

14:                                               ; preds = %13
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 5, i32 noundef 1)
          to label %15 unwind label %17

15:                                               ; preds = %14
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 3, i32 noundef 6, i32 noundef 1)
          to label %16 unwind label %17

16:                                               ; preds = %15
  invoke void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 7, i32 noundef 8, i32 noundef 1)
          to label %19 unwind label %17

17:                                               ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2, %1
  %18 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN11RoadNetworkD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #3
  resume { ptr, i32 } %18

19:                                               ; preds = %16
  ret void
}

declare void @_ZN11RoadNetworkC1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1

declare void @_ZN11RoadNetwork8add_nodeEiidd(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, double noundef, double noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN11RoadNetwork8add_edgeEiii(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11RoadNetworkD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass