; LLVM IR from Thre4dripper/DSA-Programs :: 12. Priority Queue/Priority Queue (Array) (Enqueue)

; 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.Node = type <{ %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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::allocator" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7displayP4Nodeii(ptr noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7enqueue4NodePS_PiS1_i(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.Node, align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %struct.Node, align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %struct.Node, align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %struct.Node, align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %struct.Node, align 8
  %18 = alloca %"class.std::allocator", align 1
  store i32 0, ptr %1, align 4
  %19 = call i32 @system(ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 5, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = zext i32 %20 to i64
  %22 = call ptr @llvm.stacksave.p0()
  store ptr %22, ptr %3, align 8
  %23 = alloca %struct.Node, i64 %21, align 16
  store i64 %21, ptr %4, align 8
  %24 = icmp eq i64 %21, 0
  br i1 %24, label %31, label %25

25:                                               ; preds = %0
  %26 = getelementptr inbounds %struct.Node, ptr %23, i64 %21
  br label %27

27:                                               ; preds = %27, %25
  %28 = phi ptr [ %23, %25 ], [ %29, %27 ]
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %28) #7
  %29 = getelementptr inbounds %struct.Node, ptr %28, i64 1
  %30 = icmp eq ptr %29, %26
  br i1 %30, label %31, label %27

31:                                               ; preds = %27, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 -1, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_Z7displayP4Nodeii(ptr noundef %23, i32 noundef %32, i32 noundef %33)
          to label %34 unwind label %72

34:                                               ; preds = %31
  %35 = getelementptr inbounds %struct.Node, ptr %9, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %36 unwind label %76

36:                                               ; preds = %34
  %37 = getelementptr inbounds %struct.Node, ptr %9, i32 0, i32 1
  store i32 1, ptr %37, align 8, !tbaa !9
  %38 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef %9, ptr noundef %23, ptr noundef %5, ptr noundef %6, i32 noundef %38)
          to label %39 unwind label %80

39:                                               ; preds = %36
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  %40 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %41 unwind label %85

41:                                               ; preds = %39
  %42 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 1
  store i32 5, ptr %42, align 8, !tbaa !9
  %43 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef %11, ptr noundef %23, ptr noundef %5, ptr noundef %6, i32 noundef %43)
          to label %44 unwind label %89

44:                                               ; preds = %41
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  %45 = getelementptr inbounds %struct.Node, ptr %13, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %46 unwind label %94

46:                                               ; preds = %44
  %47 = getelementptr inbounds %struct.Node, ptr %13, i32 0, i32 1
  store i32 2, ptr %47, align 8, !tbaa !9
  %48 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef %13, ptr noundef %23, ptr noundef %5, ptr noundef %6, i32 noundef %48)
          to label %49 unwind label %98

49:                                               ; preds = %46
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  %50 = getelementptr inbounds %struct.Node, ptr %15, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %51 unwind label %103

51:                                               ; preds = %49
  %52 = getelementptr inbounds %struct.Node, ptr %15, i32 0, i32 1
  store i32 1, ptr %52, align 8, !tbaa !9
  %53 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef %15, ptr noundef %23, ptr noundef %5, ptr noundef %6, i32 noundef %53)
          to label %54 unwind label %107

54:                                               ; preds = %51
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  %55 = getelementptr inbounds %struct.Node, ptr %17, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %56 unwind label %112

56:                                               ; preds = %54
  %57 = getelementptr inbounds %struct.Node, ptr %17, i32 0, i32 1
  store i32 3, ptr %57, align 8, !tbaa !9
  %58 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef %17, ptr noundef %23, ptr noundef %5, ptr noundef %6, i32 noundef %58)
          to label %59 unwind label %116

59:                                               ; preds = %56
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_Z7displayP4Nodeii(ptr noundef %23, i32 noundef %60, i32 noundef %61)
          to label %62 unwind label %72

62:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %63 = getelementptr inbounds %struct.Node, ptr %23, i64 %21
  %64 = icmp eq ptr %23, %63
  br i1 %64, label %69, label %65

65:                                               ; preds = %65, %62
  %66 = phi ptr [ %63, %62 ], [ %67, %65 ]
  %67 = getelementptr inbounds %struct.Node, ptr %66, i64 -1
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %67) #7
  %68 = icmp eq ptr %67, %23
  br i1 %68, label %69, label %65

69:                                               ; preds = %65, %62
  %70 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %70)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %71 = load i32, ptr %1, align 4
  ret i32 %71

72:                                               ; preds = %59, %31
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %7, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %8, align 4
  br label %121

76:                                               ; preds = %34
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %7, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %8, align 4
  br label %84

80:                                               ; preds = %36
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %7, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %8, align 4
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  br label %84

84:                                               ; preds = %80, %76
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  br label %121

85:                                               ; preds = %39
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %93

89:                                               ; preds = %41
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #7
  br label %93

93:                                               ; preds = %89, %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %121

94:                                               ; preds = %44
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %102

98:                                               ; preds = %46
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #7
  br label %102

102:                                              ; preds = %98, %94
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %121

103:                                              ; preds = %49
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  br label %111

107:                                              ; preds = %51
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %7, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %8, align 4
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #7
  br label %111

111:                                              ; preds = %107, %103
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %121

112:                                              ; preds = %54
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %7, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %8, align 4
  br label %120

116:                                              ; preds = %56
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %7, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %8, align 4
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #7
  br label %120

120:                                              ; preds = %116, %112
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  br label %121

121:                                              ; preds = %120, %111, %102, %93, %84, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %122 = getelementptr inbounds %struct.Node, ptr %23, i64 %21
  %123 = icmp eq ptr %23, %122
  br i1 %123, label %128, label %124

124:                                              ; preds = %124, %121
  %125 = phi ptr [ %122, %121 ], [ %126, %124 ]
  %126 = getelementptr inbounds %struct.Node, ptr %125, i64 -1
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %126) #7
  %127 = icmp eq ptr %126, %23
  br i1 %127, label %128, label %124

128:                                              ; preds = %124, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %7, align 8
  %131 = load i32, ptr %8, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

declare i32 @system(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #5 align 2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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 = { mustprogress norecurse 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 = { "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 }
attributes #5 = { 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 #6 = { 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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTS4Node", !11, i64 0, !6, i64 32}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}


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

%struct.Node = type <{ %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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::allocator" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7displayP4Nodeii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7enqueue4NodePS_PiS1_i(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.Node, align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %struct.Node, align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %struct.Node, align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %struct.Node, align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %struct.Node, align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = tail call i32 @system(ptr noundef nonnull @.str.6)
  %14 = alloca [5 x %struct.Node], align 16
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  %.ptr.1 = getelementptr inbounds i8, ptr %14, i64 40
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.1) #6
  %.ptr.2 = getelementptr inbounds i8, ptr %14, i64 80
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.2) #6
  %.ptr.3 = getelementptr inbounds i8, ptr %14, i64 120
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.3) #6
  %.ptr.4 = getelementptr inbounds i8, ptr %14, i64 160
  call void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 -1, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 -1, ptr %2, align 4, !tbaa !5
  invoke void @_Z7displayP4Nodeii(ptr noundef nonnull %14, i32 noundef -1, i32 noundef -1)
          to label %15 unwind label %38

15:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %16 unwind label %40

16:                                               ; preds = %15
  %17 = getelementptr inbounds i8, ptr %3, i64 32
  store i32 1, ptr %17, align 8, !tbaa !9
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef nonnull %3, ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 5)
          to label %18 unwind label %42

18:                                               ; preds = %16
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %45

19:                                               ; preds = %18
  %20 = getelementptr inbounds i8, ptr %5, i64 32
  store i32 5, ptr %20, align 8, !tbaa !9
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef nonnull %5, ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 5)
          to label %21 unwind label %47

21:                                               ; preds = %19
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %22 unwind label %50

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %7, i64 32
  store i32 2, ptr %23, align 8, !tbaa !9
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef nonnull %7, ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 5)
          to label %24 unwind label %52

24:                                               ; preds = %22
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %25 unwind label %55

25:                                               ; preds = %24
  %26 = getelementptr inbounds i8, ptr %9, i64 32
  store i32 1, ptr %26, align 8, !tbaa !9
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef nonnull %9, ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 5)
          to label %27 unwind label %57

27:                                               ; preds = %25
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %28 unwind label %60

28:                                               ; preds = %27
  %29 = getelementptr inbounds i8, ptr %11, i64 32
  store i32 3, ptr %29, align 8, !tbaa !9
  invoke void @_Z7enqueue4NodePS_PiS1_i(ptr noundef nonnull %11, ptr noundef nonnull %14, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 5)
          to label %30 unwind label %62

30:                                               ; preds = %28
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_Z7displayP4Nodeii(ptr noundef nonnull %14, i32 noundef %31, i32 noundef %32)
          to label %33 unwind label %38

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %34 = getelementptr inbounds i8, ptr %14, i64 160
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %34) #6
  %35 = getelementptr inbounds i8, ptr %14, i64 120
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %35) #6
  %36 = getelementptr inbounds i8, ptr %14, i64 80
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %36) #6
  %37 = getelementptr inbounds i8, ptr %14, i64 40
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %37) #6
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  ret i32 0

38:                                               ; preds = %30, %0
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %65

40:                                               ; preds = %15
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %16
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #6
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %65

45:                                               ; preds = %18
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %19
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #6
  br label %49

49:                                               ; preds = %47, %45
  %.pn17 = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %65

50:                                               ; preds = %21
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %22
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #6
  br label %54

54:                                               ; preds = %52, %50
  %.pn19 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %65

55:                                               ; preds = %24
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %25
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #6
  br label %59

59:                                               ; preds = %57, %55
  %.pn21 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %65

60:                                               ; preds = %27
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %28
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #6
  br label %64

64:                                               ; preds = %62, %60
  %.pn23 = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %65

65:                                               ; preds = %64, %59, %54, %49, %44, %38
  %.pn25 = phi { ptr, i32 } [ %39, %38 ], [ %.pn23, %64 ], [ %.pn21, %59 ], [ %.pn19, %54 ], [ %.pn17, %49 ], [ %.pn, %44 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %66 = getelementptr inbounds i8, ptr %14, i64 160
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %66) #6
  %67 = getelementptr inbounds i8, ptr %14, i64 120
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %67) #6
  %68 = getelementptr inbounds i8, ptr %14, i64 80
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %68) #6
  %69 = getelementptr inbounds i8, ptr %14, i64 40
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %69) #6
  call void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #6
  resume { ptr, i32 } %.pn25
}

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeC2Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 = { mustprogress norecurse 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 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTS4Node", !11, i64 0, !6, i64 32}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}


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