; LLVM IR from brpapa/algorithms :: solutions/code-jam/2020-1A-pascal-walk-TLE.ll (Z4walkiii)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, bool>, std::_Select1st<std::pair<const std::pair<int, int>, bool>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, bool>, std::_Select1st<std::pair<const std::pair<int, int>, bool>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, std::pair<int, int>>, std::_Select1st<std::pair<const std::pair<int, int>, std::pair<int, int>>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, std::pair<int, int>>, std::_Select1st<std::pair<const std::pair<int, int>, std::pair<int, int>>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@C = external dso_local global [505 x [505 x i32]], align 16
@foundSolution = external dso_local global i8, align 1
@visited = external dso_local global %"class.std::map", align 8
@parent = external dso_local global %"class.std::map.0", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@__const._Z4walkiii.dr = external hidden unnamed_addr constant [6 x i32], align 16
@__const._Z4walkiii.dk = external hidden unnamed_addr constant [6 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4walkiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca [6 x i32], align 16
  %23 = alloca [6 x i32], align 16
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca %"struct.std::pair", align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  %30 = load i8, ptr @foundSolution, align 1, !tbaa !9, !range !11, !noundef !12
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %33

32:                                               ; preds = %3
  br label %165

33:                                               ; preds = %3
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %105

36:                                               ; preds = %33
  store i8 1, ptr @foundSolution, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %37 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %38 unwind label %52

38:                                               ; preds = %36
  store i64 %37, ptr %9, align 4
  %39 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %40 unwind label %52

40:                                               ; preds = %38
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %39, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %41

41:                                               ; preds = %51, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 -1, ptr %14, align 4, !tbaa !5
  %42 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %43 unwind label %56

43:                                               ; preds = %41
  store i64 %42, ptr %12, align 4
  %44 = invoke noundef zeroext i1 @_ZStneIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %45 unwind label %56

45:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br i1 %44, label %46, label %64

46:                                               ; preds = %45
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %47 unwind label %60

47:                                               ; preds = %46
  %48 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %49 unwind label %60

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %48)
          to label %51 unwind label %60

51:                                               ; preds = %49
  br label %41, !llvm.loop !13

52:                                               ; preds = %38, %36
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %10, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %104

56:                                               ; preds = %43, %41
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %10, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %104

60:                                               ; preds = %64, %49, %47, %46
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %10, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %11, align 4
  br label %104

64:                                               ; preds = %45
  %65 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %66 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %65, ptr %66, align 8
  %67 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %70, ptr %72)
          to label %73 unwind label %60

73:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr %7, ptr %17, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %74 = load ptr, ptr %17, align 8, !tbaa !15
  %75 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #7
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %77 = load ptr, ptr %17, align 8, !tbaa !15
  %78 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #7
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  br label %80

80:                                               ; preds = %97, %73
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %81, label %83, label %82

82:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %103

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %84 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %84, i64 8, i1 false)
  %85 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 0
  %86 = load i32, ptr %85, align 4, !tbaa !17
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %86)
          to label %88 unwind label %99

88:                                               ; preds = %83
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @.str)
          to label %90 unwind label %99

90:                                               ; preds = %88
  %91 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !19
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef %92)
          to label %94 unwind label %99

94:                                               ; preds = %90
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %96 unwind label %99

96:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %97

97:                                               ; preds = %96
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %80

99:                                               ; preds = %94, %90, %88, %83
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %10, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %104

103:                                              ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %105

104:                                              ; preds = %99, %60, %56, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %166

105:                                              ; preds = %103, %33
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = icmp slt i32 %106, 1
  br i1 %107, label %118, label %108

108:                                              ; preds = %105
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = icmp slt i32 %109, 1
  br i1 %110, label %118, label %111

111:                                              ; preds = %108
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = icmp sgt i32 %112, %113
  br i1 %114, label %118, label %115

115:                                              ; preds = %111
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = icmp slt i32 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %115, %111, %108, %105
  br label %165

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %120 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %120, ptr %21, align 4
  %121 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %21)
  store i8 1, ptr %121, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 @__const._Z4walkiii.dr, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 @__const._Z4walkiii.dk, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %161, %119
  %123 = load i32, ptr %24, align 4, !tbaa !5
  %124 = icmp slt i32 %123, 6
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %164

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = load i32, ptr %24, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [6 x i32], ptr %22, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = add nsw i32 %127, %131
  store i32 %132, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %133 = load i32, ptr %5, align 4, !tbaa !5
  %134 = load i32, ptr %24, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [6 x i32], ptr %23, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = add nsw i32 %133, %137
  store i32 %138, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %139 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  store i64 %139, ptr %27, align 4
  %140 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %27)
  %141 = load i8, ptr %140, align 1, !tbaa !9, !range !11, !noundef !12
  %142 = trunc i8 %141 to i1
  %143 = xor i1 %142, true
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br i1 %143, label %144, label %160

144:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %145 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %145, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %146 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  store i64 %146, ptr %29, align 4
  %147 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %29)
  %148 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %147, ptr noundef nonnull align 4 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  %149 = load i32, ptr %25, align 4, !tbaa !5
  %150 = load i32, ptr %26, align 4, !tbaa !5
  %151 = load i32, ptr %6, align 4, !tbaa !5
  %152 = load i32, ptr %4, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %153
  %155 = load i32, ptr %5, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [505 x i32], ptr %154, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sub nsw i32 %151, %158
  call void @_Z4walkiii(i32 noundef %149, i32 noundef %150, i32 noundef %159)
  br label %160

160:                                              ; preds = %144, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %24, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %24, align 4, !tbaa !5
  br label %122, !llvm.loop !20

164:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  br label %165

165:                                              ; preds = %164, %118, %32
  ret void

166:                                              ; preds = %104
  %167 = load ptr, ptr %10, align 8
  %168 = load i32, ptr %11, align 4
  %169 = insertvalue { ptr, i32 } poison, ptr %167, 0
  %170 = insertvalue { ptr, i32 } %169, i32 %168, 1
  resume { ptr, i32 } %170
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!18, !6, i64 4}
!20 = distinct !{!20, !14}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, bool>, std::_Select1st<std::pair<const std::pair<int, int>, bool>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, bool>, std::_Select1st<std::pair<const std::pair<int, int>, bool>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, std::pair<int, int>>, std::_Select1st<std::pair<const std::pair<int, int>, std::pair<int, int>>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, std::pair<int, int>>, std::_Select1st<std::pair<const std::pair<int, int>, std::pair<int, int>>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@C = external dso_local local_unnamed_addr global [505 x [505 x i32]], align 16
@foundSolution = external dso_local local_unnamed_addr global i8, align 1
@visited = external dso_local global %"class.std::map", align 8
@parent = external dso_local global %"class.std::map.0", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@__const._Z4walkiii.dr = external hidden unnamed_addr constant [6 x i32], align 16
@__const._Z4walkiii.dk = external hidden unnamed_addr constant [6 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4walkiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %"struct.std::pair", align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %20 = load i8, ptr @foundSolution, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %.loopexit, label %22

22:                                               ; preds = %3
  %23 = icmp eq i32 %2, 0
  br i1 %23, label %24, label %65

24:                                               ; preds = %22
  store i8 1, ptr @foundSolution, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %25 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %26 unwind label %40

26:                                               ; preds = %24
  store i64 %25, ptr %8, align 8
  %27 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %28 unwind label %40

28:                                               ; preds = %26
  %29 = load i64, ptr %27, align 4
  store i64 %29, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %30

30:                                               ; preds = %38, %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 -1, ptr %11, align 4, !tbaa !5
  %31 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %32 unwind label %42

32:                                               ; preds = %30
  store i64 %31, ptr %9, align 8
  %33 = invoke noundef zeroext i1 @_ZStneIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %34 unwind label %42

34:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br i1 %33, label %35, label %44

35:                                               ; preds = %34
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %36 unwind label %.loopexit21

36:                                               ; preds = %35
  %37 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %38 unwind label %.loopexit21

38:                                               ; preds = %36
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %37)
  br label %30, !llvm.loop !13

40:                                               ; preds = %26, %24
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %64

42:                                               ; preds = %32, %30
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %64

.loopexit21:                                      ; preds = %35, %36
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit.split-lp:                               ; preds = %44
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %64

44:                                               ; preds = %34
  %45 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %46 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %45, ptr %46)
          to label %47 unwind label %.loopexit.split-lp

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %48 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %48, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %49 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %49, ptr %13, align 8
  %50 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %50, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %59, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  %.pre24 = load i32, ptr %5, align 4
  br label %65

.lr.ph:                                           ; preds = %47, %59
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %.sroa.0.0.copyload = load i32, ptr %51, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %51, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.0.0.copyload)
          to label %53 unwind label %62

53:                                               ; preds = %.lr.ph
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @.str)
          to label %55 unwind label %62

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %54, i32 noundef %.sroa.5.0.copyload)
          to label %57 unwind label %62

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %59 unwind label %62

59:                                               ; preds = %57
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %61, label %.lr.ph, label %._crit_edge

62:                                               ; preds = %57, %55, %53, %.lr.ph
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %64

64:                                               ; preds = %.loopexit21, %.loopexit.split-lp, %62, %42, %40
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %43, %42 ], [ %41, %40 ], [ %lpad.loopexit, %.loopexit21 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn

65:                                               ; preds = %._crit_edge, %22
  %66 = phi i32 [ %.pre24, %._crit_edge ], [ %1, %22 ]
  %67 = phi i32 [ %.pre, %._crit_edge ], [ %0, %22 ]
  %68 = icmp slt i32 %67, 1
  %69 = icmp slt i32 %66, 1
  %or.cond = select i1 %68, i1 true, i1 %69
  br i1 %or.cond, label %.loopexit, label %70

70:                                               ; preds = %65
  %71 = icmp ugt i32 %66, %67
  %72 = icmp slt i32 %2, 0
  %or.cond3 = or i1 %72, %71
  br i1 %or.cond3, label %.loopexit, label %73

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %74 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %74, ptr %14, align 8
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store i8 1, ptr %75, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = load i32, ptr @__const._Z4walkiii.dr, align 16, !tbaa !5
  %78 = add nsw i32 %77, %76
  store i32 %78, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = load i32, ptr @__const._Z4walkiii.dk, align 16, !tbaa !5
  %81 = add nsw i32 %80, %79
  store i32 %81, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %82 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %82, ptr %17, align 8
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %84 = load i8, ptr %83, align 1, !tbaa !9, !range !11, !noundef !12
  %85 = trunc nuw i8 %84 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %85, label %100, label %86

86:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %87 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %87, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %88 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %88, ptr %19, align 8
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %91 = load i32, ptr %15, align 4, !tbaa !5
  %92 = load i32, ptr %16, align 4, !tbaa !5
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %94, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sub nsw i32 %2, %98
  call void @_Z4walkiii(i32 noundef %91, i32 noundef %92, i32 noundef %99)
  br label %100

100:                                              ; preds = %86, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dr, i64 4), align 4, !tbaa !5
  %103 = add nsw i32 %102, %101
  store i32 %103, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dk, i64 4), align 4, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %107 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %107, ptr %17, align 8
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %109 = load i8, ptr %108, align 1, !tbaa !9, !range !11, !noundef !12
  %110 = trunc nuw i8 %109 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %110, label %125, label %111

111:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %112 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %112, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %113 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %113, ptr %19, align 8
  %114 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %115 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %114, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = load i32, ptr %16, align 4, !tbaa !5
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = load i32, ptr %5, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %119, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sub nsw i32 %2, %123
  call void @_Z4walkiii(i32 noundef %116, i32 noundef %117, i32 noundef %124)
  br label %125

125:                                              ; preds = %111, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dr, i64 8), align 8, !tbaa !5
  %128 = add nsw i32 %127, %126
  store i32 %128, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dk, i64 8), align 8, !tbaa !5
  %131 = add nsw i32 %130, %129
  store i32 %131, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %132 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %132, ptr %17, align 8
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %134 = load i8, ptr %133, align 1, !tbaa !9, !range !11, !noundef !12
  %135 = trunc nuw i8 %134 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %135, label %150, label %136

136:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %137 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %137, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %138 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %138, ptr %19, align 8
  %139 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %139, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %141 = load i32, ptr %15, align 4, !tbaa !5
  %142 = load i32, ptr %16, align 4, !tbaa !5
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %144, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = sub nsw i32 %2, %148
  call void @_Z4walkiii(i32 noundef %141, i32 noundef %142, i32 noundef %149)
  br label %150

150:                                              ; preds = %136, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %151 = load i32, ptr %4, align 4, !tbaa !5
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dr, i64 12), align 4, !tbaa !5
  %153 = add nsw i32 %152, %151
  store i32 %153, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dk, i64 12), align 4, !tbaa !5
  %156 = add nsw i32 %155, %154
  store i32 %156, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %157 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %157, ptr %17, align 8
  %158 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %159 = load i8, ptr %158, align 1, !tbaa !9, !range !11, !noundef !12
  %160 = trunc nuw i8 %159 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %160, label %175, label %161

161:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %162 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %162, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %163 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %163, ptr %19, align 8
  %164 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %165 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %164, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %166 = load i32, ptr %15, align 4, !tbaa !5
  %167 = load i32, ptr %16, align 4, !tbaa !5
  %168 = load i32, ptr %4, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = load i32, ptr %5, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %169, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = sub nsw i32 %2, %173
  call void @_Z4walkiii(i32 noundef %166, i32 noundef %167, i32 noundef %174)
  br label %175

175:                                              ; preds = %161, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %176 = load i32, ptr %4, align 4, !tbaa !5
  %177 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dr, i64 16), align 16, !tbaa !5
  %178 = add nsw i32 %177, %176
  store i32 %178, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %179 = load i32, ptr %5, align 4, !tbaa !5
  %180 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dk, i64 16), align 16, !tbaa !5
  %181 = add nsw i32 %180, %179
  store i32 %181, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %182 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %182, ptr %17, align 8
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %184 = load i8, ptr %183, align 1, !tbaa !9, !range !11, !noundef !12
  %185 = trunc nuw i8 %184 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %185, label %200, label %186

186:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %187 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %187, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %188 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %188, ptr %19, align 8
  %189 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %190 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %189, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %191 = load i32, ptr %15, align 4, !tbaa !5
  %192 = load i32, ptr %16, align 4, !tbaa !5
  %193 = load i32, ptr %4, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = load i32, ptr %5, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %194, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = sub nsw i32 %2, %198
  call void @_Z4walkiii(i32 noundef %191, i32 noundef %192, i32 noundef %199)
  br label %200

200:                                              ; preds = %186, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %201 = load i32, ptr %4, align 4, !tbaa !5
  %202 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dr, i64 20), align 4, !tbaa !5
  %203 = add nsw i32 %202, %201
  store i32 %203, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %204 = load i32, ptr %5, align 4, !tbaa !5
  %205 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z4walkiii.dk, i64 20), align 4, !tbaa !5
  %206 = add nsw i32 %205, %204
  store i32 %206, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %207 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %207, ptr %17, align 8
  %208 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapISt4pairIiiEbSt4lessIS1_ESaIS0_IKS1_bEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @visited, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %209 = load i8, ptr %208, align 1, !tbaa !9, !range !11, !noundef !12
  %210 = trunc nuw i8 %209 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %210, label %.loopexit.loopexit, label %211

211:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %212 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %212, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %213 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %213, ptr %19, align 8
  %214 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiES1_St4lessIS1_ESaIS0_IKS1_S1_EEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @parent, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %215 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %214, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %216 = load i32, ptr %15, align 4, !tbaa !5
  %217 = load i32, ptr %16, align 4, !tbaa !5
  %218 = load i32, ptr %4, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = load i32, ptr %5, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [505 x [505 x i32]], ptr @C, i64 0, i64 %219, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sub nsw i32 %2, %223
  call void @_Z4walkiii(i32 noundef %216, i32 noundef %217, i32 noundef %224)
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %211, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %65, %70, %3
  ret void
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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