; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x25-广度优先搜索/174. 推箱子.ll (Z4bfs21Pii)

; 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::__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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl" }
%"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl" = type { %"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl_data" }
%"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.P = type { i32, i32, i32, i32, %"class.std::__cxx11::basic_string" }

@d = external dso_local global [2 x [4 x i32]], align 16
@a = external dso_local global [4 x i8], align 1
@_Z3tmpB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z4bfs21Pii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::queue", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca [25 x [25 x i8]], align 16
  %12 = alloca %struct.P, align 8
  %13 = alloca %struct.P, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  %17 = getelementptr inbounds %struct.P, ptr %0, i32 0, i32 4
  %18 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.2)
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z3tmpB5cxx11, ptr noundef @.str.2)
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #6
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %20 unwind label %44

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 625, ptr %11) #6
  %21 = getelementptr inbounds [25 x [25 x i8]], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %21, i8 0, i64 625, i1 false)
  br label %22

22:                                               ; preds = %148, %20
  %23 = invoke noundef i64 @_ZNKSt5queueI1PSt5dequeIS0_SaIS0_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %24 unwind label %48

24:                                               ; preds = %22
  %25 = icmp ne i64 %23, 0
  br i1 %25, label %26, label %151

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #6
  %27 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %28 unwind label %52

28:                                               ; preds = %26
  invoke void @_ZN1PC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %29 unwind label %52

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #6
  call void @_ZN1PC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %30 unwind label %56

30:                                               ; preds = %29
  %31 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 2
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %35, label %60

35:                                               ; preds = %30
  %36 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 3
  %37 = load i32, ptr %36, align 4, !tbaa !16
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = icmp eq i32 %37, %38
  br i1 %39, label %40, label %60

40:                                               ; preds = %35
  %41 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 4
  %42 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3tmpB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %41)
          to label %43 unwind label %56

43:                                               ; preds = %40
  store i1 true, ptr %4, align 1
  store i32 1, ptr %14, align 4
  br label %146

44:                                               ; preds = %3
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  br label %155

48:                                               ; preds = %22
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %9, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %10, align 4
  br label %154

52:                                               ; preds = %28, %26
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %9, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %10, align 4
  br label %150

56:                                               ; preds = %40, %29
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %149

60:                                               ; preds = %35, %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %137, %60
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = icmp slt i32 %62, 4
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 4, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %145

65:                                               ; preds = %61
  %66 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %67 unwind label %90

67:                                               ; preds = %65
  %68 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = load i32, ptr %15, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [4 x i32], ptr @d, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = add nsw i32 %69, %73
  %75 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 2
  store i32 %74, ptr %75, align 8, !tbaa !11
  %76 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !16
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [4 x i32], ptr getelementptr inbounds ([2 x [4 x i32]], ptr @d, i64 0, i64 1), i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = add nsw i32 %77, %81
  %83 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 3
  store i32 %82, ptr %83, align 4, !tbaa !16
  %84 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 3
  %87 = load i32, ptr %86, align 4, !tbaa !16
  %88 = call noundef zeroext i1 @_Z5validii(i32 noundef %85, i32 noundef %87)
  br i1 %88, label %94, label %89

89:                                               ; preds = %67
  br label %137

90:                                               ; preds = %133, %65
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  br label %144

94:                                               ; preds = %67
  %95 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 2
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = getelementptr inbounds %struct.P, ptr %0, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !17
  %99 = icmp eq i32 %96, %98
  br i1 %99, label %100, label %107

100:                                              ; preds = %94
  %101 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 3
  %102 = load i32, ptr %101, align 4, !tbaa !16
  %103 = getelementptr inbounds %struct.P, ptr %0, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !18
  %105 = icmp eq i32 %102, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %100
  br label %137

107:                                              ; preds = %100, %94
  %108 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 2
  %109 = load i32, ptr %108, align 8, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [25 x [25 x i8]], ptr %11, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 3
  %113 = load i32, ptr %112, align 4, !tbaa !16
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [25 x i8], ptr %111, i64 0, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !19, !range !21, !noundef !22
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %119

118:                                              ; preds = %107
  br label %137

119:                                              ; preds = %107
  %120 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 2
  %121 = load i32, ptr %120, align 8, !tbaa !11
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [25 x [25 x i8]], ptr %11, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 3
  %125 = load i32, ptr %124, align 4, !tbaa !16
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [25 x i8], ptr %123, i64 0, i64 %126
  store i8 1, ptr %127, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %128 = getelementptr inbounds %struct.P, ptr %12, i32 0, i32 4
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [4 x i8], ptr @a, i64 0, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !23
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %128, i8 noundef signext %132)
          to label %133 unwind label %140

133:                                              ; preds = %119
  %134 = getelementptr inbounds %struct.P, ptr %13, i32 0, i32 4
  %135 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %134, ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %136 unwind label %90

136:                                              ; preds = %133
  br label %137

137:                                              ; preds = %136, %118, %106, %89
  %138 = load i32, ptr %15, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %15, align 4, !tbaa !9
  br label %61, !llvm.loop !24

140:                                              ; preds = %119
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %9, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %144

144:                                              ; preds = %140, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %149

145:                                              ; preds = %64
  store i32 0, ptr %14, align 4
  br label %146

146:                                              ; preds = %145, %43
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #6
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #6
  %147 = load i32, ptr %14, align 4
  switch i32 %147, label %152 [
    i32 0, label %148
  ]

148:                                              ; preds = %146
  br label %22, !llvm.loop !26

149:                                              ; preds = %144, %56
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #6
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #6
  br label %150

150:                                              ; preds = %149, %52
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #6
  br label %154

151:                                              ; preds = %24
  store i1 false, ptr %4, align 1
  store i32 1, ptr %14, align 4
  br label %152

152:                                              ; preds = %151, %146
  call void @llvm.lifetime.end.p0(i64 625, ptr %11) #6
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #6
  %153 = load i1, ptr %4, align 1
  ret i1 %153

154:                                              ; preds = %150, %48
  call void @llvm.lifetime.end.p0(i64 625, ptr %11) #6
  br label %155

155:                                              ; preds = %154, %44
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #6
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %9, align 8
  %158 = load i32, ptr %10, align 4
  %159 = insertvalue { ptr, i32 } poison, ptr %157, 0
  %160 = insertvalue { ptr, i32 } %159, i32 %158, 1
  resume { ptr, i32 } %160
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt5queueI1PSt5dequeIS0_SaIS0_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1PC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS1P", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !10, i64 12}
!17 = !{!12, !10, i64 0}
!18 = !{!12, !10, i64 4}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


; 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::__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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl" }
%"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl" = type { %"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl_data" }
%"struct.std::_Deque_base<P, std::allocator<P>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.P = type { i32, i32, i32, i32, %"class.std::__cxx11::basic_string" }

@d = external dso_local local_unnamed_addr global [2 x [4 x i32]], align 16
@a = external dso_local local_unnamed_addr global [4 x i8], align 1
@_Z3tmpB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z4bfs21Pii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::queue", align 8
  %5 = alloca [25 x [25 x i8]], align 16
  %6 = alloca %struct.P, align 8
  %7 = alloca %struct.P, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.2)
  %11 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z3tmpB5cxx11, ptr noundef nonnull @.str.2)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %12 unwind label %31

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 625, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(625) %5, i8 0, i64 625, i1 false)
  %13 = call noundef i64 @_ZNKSt5queueI1PSt5dequeIS0_SaIS0_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %.not32.not = icmp eq i64 %13, 0
  br i1 %.not32.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %12
  %14 = getelementptr inbounds i8, ptr %6, i64 8
  %15 = getelementptr inbounds i8, ptr %6, i64 12
  %16 = getelementptr inbounds i8, ptr %7, i64 8
  %17 = getelementptr inbounds i8, ptr %7, i64 12
  %18 = getelementptr inbounds i8, ptr %0, i64 4
  %19 = getelementptr inbounds i8, ptr %6, i64 16
  %20 = getelementptr inbounds i8, ptr %7, i64 16
  br label %21

21:                                               ; preds = %.lr.ph, %142
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #6
  %22 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  invoke void @_ZN1PC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %22)
          to label %23 unwind label %33

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN1PC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %24 = load i32, ptr %14, align 8, !tbaa !5
  %25 = icmp eq i32 %24, %1
  %26 = load i32, ptr %15, align 4
  %27 = icmp eq i32 %26, %2
  %or.cond = select i1 %25, i1 %27, i1 false
  br i1 %or.cond, label %29, label %.preheader.preheader

.preheader.preheader:                             ; preds = %23
  %28 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %37 unwind label %45

29:                                               ; preds = %23
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3tmpB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %.critedge unwind label %35

31:                                               ; preds = %3
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %148

33:                                               ; preds = %21
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %147

35:                                               ; preds = %29
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %146

37:                                               ; preds = %.preheader.preheader
  %38 = load i32, ptr %14, align 8, !tbaa !5
  %39 = load i32, ptr @d, align 16, !tbaa !14
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %16, align 8, !tbaa !5
  %41 = load i32, ptr %15, align 4, !tbaa !15
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 16), align 16, !tbaa !14
  %43 = add nsw i32 %42, %41
  store i32 %43, ptr %17, align 4, !tbaa !15
  %44 = call noundef zeroext i1 @_Z5validii(i32 noundef %40, i32 noundef %43)
  br i1 %44, label %47, label %.preheader.1

45:                                               ; preds = %140, %.preheader.3, %114, %.preheader.2, %88, %.preheader.1, %62, %.preheader.preheader
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %146

47:                                               ; preds = %37
  %48 = load i32, ptr %16, align 8, !tbaa !5
  %49 = load i32, ptr %0, align 8, !tbaa !16
  %50 = icmp eq i32 %48, %49
  %.pre = load i32, ptr %17, align 4, !tbaa !15
  br i1 %50, label %51, label %54

51:                                               ; preds = %47
  %52 = load i32, ptr %18, align 4, !tbaa !17
  %53 = icmp eq i32 %.pre, %52
  br i1 %53, label %.preheader.1, label %54

54:                                               ; preds = %51, %47
  %55 = sext i32 %48 to i64
  %56 = sext i32 %.pre to i64
  %57 = getelementptr inbounds [25 x [25 x i8]], ptr %5, i64 0, i64 %55, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !18, !range !20, !noundef !21
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %.preheader.1, label %60

60:                                               ; preds = %54
  store i8 1, ptr %57, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %61 = load i8, ptr @a, align 1, !tbaa !22
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %19, i8 noundef signext %61)
          to label %62 unwind label %144

62:                                               ; preds = %60
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %.preheader.1 unwind label %45

.preheader.1:                                     ; preds = %62, %54, %51, %37
  %64 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %65 unwind label %45

65:                                               ; preds = %.preheader.1
  %66 = load i32, ptr %14, align 8, !tbaa !5
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 4), align 4, !tbaa !14
  %68 = add nsw i32 %67, %66
  store i32 %68, ptr %16, align 8, !tbaa !5
  %69 = load i32, ptr %15, align 4, !tbaa !15
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 20), align 4, !tbaa !14
  %71 = add nsw i32 %70, %69
  store i32 %71, ptr %17, align 4, !tbaa !15
  %72 = call noundef zeroext i1 @_Z5validii(i32 noundef %68, i32 noundef %71)
  br i1 %72, label %73, label %.preheader.2

73:                                               ; preds = %65
  %74 = load i32, ptr %16, align 8, !tbaa !5
  %75 = load i32, ptr %0, align 8, !tbaa !16
  %76 = icmp eq i32 %74, %75
  %.pre39 = load i32, ptr %17, align 4, !tbaa !15
  br i1 %76, label %77, label %80

77:                                               ; preds = %73
  %78 = load i32, ptr %18, align 4, !tbaa !17
  %79 = icmp eq i32 %.pre39, %78
  br i1 %79, label %.preheader.2, label %80

80:                                               ; preds = %77, %73
  %81 = sext i32 %74 to i64
  %82 = sext i32 %.pre39 to i64
  %83 = getelementptr inbounds [25 x [25 x i8]], ptr %5, i64 0, i64 %81, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !18, !range !20, !noundef !21
  %85 = trunc nuw i8 %84 to i1
  br i1 %85, label %.preheader.2, label %86

86:                                               ; preds = %80
  store i8 1, ptr %83, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %87 = load i8, ptr getelementptr inbounds (i8, ptr @a, i64 1), align 1, !tbaa !22
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %19, i8 noundef signext %87)
          to label %88 unwind label %144

88:                                               ; preds = %86
  %89 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %.preheader.2 unwind label %45

.preheader.2:                                     ; preds = %88, %80, %77, %65
  %90 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %91 unwind label %45

91:                                               ; preds = %.preheader.2
  %92 = load i32, ptr %14, align 8, !tbaa !5
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 8), align 8, !tbaa !14
  %94 = add nsw i32 %93, %92
  store i32 %94, ptr %16, align 8, !tbaa !5
  %95 = load i32, ptr %15, align 4, !tbaa !15
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 24), align 8, !tbaa !14
  %97 = add nsw i32 %96, %95
  store i32 %97, ptr %17, align 4, !tbaa !15
  %98 = call noundef zeroext i1 @_Z5validii(i32 noundef %94, i32 noundef %97)
  br i1 %98, label %99, label %.preheader.3

99:                                               ; preds = %91
  %100 = load i32, ptr %16, align 8, !tbaa !5
  %101 = load i32, ptr %0, align 8, !tbaa !16
  %102 = icmp eq i32 %100, %101
  %.pre40 = load i32, ptr %17, align 4, !tbaa !15
  br i1 %102, label %103, label %106

103:                                              ; preds = %99
  %104 = load i32, ptr %18, align 4, !tbaa !17
  %105 = icmp eq i32 %.pre40, %104
  br i1 %105, label %.preheader.3, label %106

106:                                              ; preds = %103, %99
  %107 = sext i32 %100 to i64
  %108 = sext i32 %.pre40 to i64
  %109 = getelementptr inbounds [25 x [25 x i8]], ptr %5, i64 0, i64 %107, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !18, !range !20, !noundef !21
  %111 = trunc nuw i8 %110 to i1
  br i1 %111, label %.preheader.3, label %112

112:                                              ; preds = %106
  store i8 1, ptr %109, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %113 = load i8, ptr getelementptr inbounds (i8, ptr @a, i64 2), align 1, !tbaa !22
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %19, i8 noundef signext %113)
          to label %114 unwind label %144

114:                                              ; preds = %112
  %115 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %.preheader.3 unwind label %45

.preheader.3:                                     ; preds = %114, %106, %103, %91
  %116 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %117 unwind label %45

117:                                              ; preds = %.preheader.3
  %118 = load i32, ptr %14, align 8, !tbaa !5
  %119 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 12), align 4, !tbaa !14
  %120 = add nsw i32 %119, %118
  store i32 %120, ptr %16, align 8, !tbaa !5
  %121 = load i32, ptr %15, align 4, !tbaa !15
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 28), align 4, !tbaa !14
  %123 = add nsw i32 %122, %121
  store i32 %123, ptr %17, align 4, !tbaa !15
  %124 = call noundef zeroext i1 @_Z5validii(i32 noundef %120, i32 noundef %123)
  br i1 %124, label %125, label %142

125:                                              ; preds = %117
  %126 = load i32, ptr %16, align 8, !tbaa !5
  %127 = load i32, ptr %0, align 8, !tbaa !16
  %128 = icmp eq i32 %126, %127
  %.pre41 = load i32, ptr %17, align 4, !tbaa !15
  br i1 %128, label %129, label %132

129:                                              ; preds = %125
  %130 = load i32, ptr %18, align 4, !tbaa !17
  %131 = icmp eq i32 %.pre41, %130
  br i1 %131, label %142, label %132

132:                                              ; preds = %129, %125
  %133 = sext i32 %126 to i64
  %134 = sext i32 %.pre41 to i64
  %135 = getelementptr inbounds [25 x [25 x i8]], ptr %5, i64 0, i64 %133, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !18, !range !20, !noundef !21
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %142, label %138

138:                                              ; preds = %132
  store i8 1, ptr %135, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %139 = load i8, ptr getelementptr inbounds (i8, ptr @a, i64 3), align 1, !tbaa !22
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %19, i8 noundef signext %139)
          to label %140 unwind label %144

140:                                              ; preds = %138
  %141 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %142 unwind label %45

142:                                              ; preds = %140, %132, %129, %117
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #6
  %143 = call noundef i64 @_ZNKSt5queueI1PSt5dequeIS0_SaIS0_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %.not.not = icmp eq i64 %143, 0
  br i1 %.not.not, label %.loopexit, label %21, !llvm.loop !23

144:                                              ; preds = %138, %112, %86, %60
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %146

146:                                              ; preds = %45, %144, %35
  %.pn20 = phi { ptr, i32 } [ %36, %35 ], [ %46, %45 ], [ %145, %144 ]
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  br label %147

147:                                              ; preds = %146, %33
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %146 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 625, ptr nonnull %5) #6
  br label %148

.critedge:                                        ; preds = %29
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN1PD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #6
  br label %.loopexit

.loopexit:                                        ; preds = %142, %12, %.critedge
  %.not30 = phi i1 [ true, %.critedge ], [ false, %12 ], [ false, %142 ]
  call void @llvm.lifetime.end.p0(i64 625, ptr nonnull %5) #6
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  ret i1 %.not30

148:                                              ; preds = %147, %31
  %.pn20.pn.pn = phi { ptr, i32 } [ %.pn20.pn, %147 ], [ %32, %31 ]
  call void @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn20.pn.pn
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt5queueI1PSt5dequeIS0_SaIS0_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5queueI1PSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1PC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN1PaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = { 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 8}
!6 = !{!"_ZTS1P", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !13, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !7, i64 12}
!16 = !{!6, !7, i64 0}
!17 = !{!6, !7, i64 4}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!8, !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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