; LLVM IR from upupming/algorithm :: kick-start/2020/2020B-C.ll (Z5solvev)

; 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] }
%"struct.std::pair" = type { i32, i32 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack.0" = type { %"class.std::deque.1" }
%"class.std::deque.1" = type { %"class.std::_Deque_base.2" }
%"class.std::_Deque_base.2" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.6", %"struct.std::_Deque_iterator.6" }
%"struct.std::_Deque_iterator.6" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair.7" = type { i64, i64 }

@bound = external dso_local global i64, align 8
@_Z3cmdB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3modxx(i64 noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z5solvev() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.std::pair", align 4
  %2 = alloca %"class.std::stack", align 8
  %3 = alloca %"class.std::stack.0", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::stack.0", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i8, align 1
  %17 = alloca %"struct.std::pair.7", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr %2) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #4
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %20 unwind label %28

20:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #4
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %21 unwind label %32

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %165, %21
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11) #4
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %36, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %169

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %4, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %5, align 4
  br label %206

32:                                               ; preds = %20
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  br label %205

36:                                               ; preds = %22
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %38)
          to label %40 unwind label %64

40:                                               ; preds = %36
  %41 = load i8, ptr %39, align 1, !tbaa !11
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 41
  br i1 %43, label %44, label %139

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %46 unwind label %68

46:                                               ; preds = %44
  %47 = load i64, ptr %45, align 8, !tbaa !5
  store i64 %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %49 unwind label %72

49:                                               ; preds = %46
  %50 = load i64, ptr %48, align 8, !tbaa !5
  store i64 %50, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %51 unwind label %72

51:                                               ; preds = %49
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %52 unwind label %72

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %63, %52
  %54 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %55 unwind label %72

55:                                               ; preds = %53
  %56 = load i8, ptr %54, align 1, !tbaa !11
  %57 = sext i8 %56 to i32
  %58 = icmp ne i32 %57, 40
  br i1 %58, label %59, label %80

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  %60 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %61 unwind label %76

61:                                               ; preds = %59
  %62 = load i8, ptr %60, align 1, !tbaa !11
  store i8 %62, ptr %12, align 1, !tbaa !11
  call void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %63 unwind label %76

63:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  br label %53, !llvm.loop !12

64:                                               ; preds = %162, %158, %139, %36
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %4, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %5, align 4
  br label %168

68:                                               ; preds = %44
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  br label %138

72:                                               ; preds = %80, %53, %51, %49, %46
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %4, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %5, align 4
  br label %137

76:                                               ; preds = %61, %59
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %4, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  br label %137

80:                                               ; preds = %55
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %81 unwind label %72

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %82 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %83 unwind label %115

83:                                               ; preds = %81
  %84 = load i8, ptr %82, align 1, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = sub nsw i32 %85, 48
  store i32 %86, ptr %13, align 4, !tbaa !9
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %87 unwind label %115

87:                                               ; preds = %83
  %88 = invoke noundef zeroext i1 @_ZNKSt5stackIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %89 unwind label %115

89:                                               ; preds = %87
  br i1 %88, label %119, label %90

90:                                               ; preds = %89
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %92 unwind label %115

92:                                               ; preds = %90
  %93 = load i64, ptr %91, align 8, !tbaa !5
  %94 = load i64, ptr %10, align 8, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = mul nsw i64 %94, %96
  %98 = add nsw i64 %93, %97
  %99 = load i64, ptr @bound, align 8, !tbaa !5
  %100 = call noundef i64 @_Z3modxx(i64 noundef %98, i64 noundef %99)
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %102 unwind label %115

102:                                              ; preds = %92
  store i64 %100, ptr %101, align 8, !tbaa !5
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %104 unwind label %115

104:                                              ; preds = %102
  %105 = load i64, ptr %103, align 8, !tbaa !5
  %106 = load i64, ptr %11, align 8, !tbaa !5
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %106, %108
  %110 = add nsw i64 %105, %109
  %111 = load i64, ptr @bound, align 8, !tbaa !5
  %112 = call noundef i64 @_Z3modxx(i64 noundef %110, i64 noundef %111)
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %114 unwind label %115

114:                                              ; preds = %104
  store i64 %112, ptr %113, align 8, !tbaa !5
  br label %136

115:                                              ; preds = %104, %102, %92, %90, %87, %83, %81
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %4, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %137

119:                                              ; preds = %89
  %120 = load i64, ptr %7, align 8, !tbaa !5
  %121 = load i64, ptr %10, align 8, !tbaa !5
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = mul nsw i64 %121, %123
  %125 = add nsw i64 %120, %124
  %126 = load i64, ptr @bound, align 8, !tbaa !5
  %127 = call noundef i64 @_Z3modxx(i64 noundef %125, i64 noundef %126)
  store i64 %127, ptr %7, align 8, !tbaa !5
  %128 = load i64, ptr %8, align 8, !tbaa !5
  %129 = load i64, ptr %11, align 8, !tbaa !5
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = mul nsw i64 %129, %131
  %133 = add nsw i64 %128, %132
  %134 = load i64, ptr @bound, align 8, !tbaa !5
  %135 = call noundef i64 @_Z3modxx(i64 noundef %133, i64 noundef %134)
  store i64 %135, ptr %8, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %119, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %164

137:                                              ; preds = %115, %76, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %138

138:                                              ; preds = %137, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %168

139:                                              ; preds = %40
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %141)
          to label %143 unwind label %64

143:                                              ; preds = %139
  %144 = load i8, ptr %142, align 1, !tbaa !11
  %145 = sext i8 %144 to i32
  %146 = icmp eq i32 %145, 40
  br i1 %146, label %147, label %158

147:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %148 unwind label %150

148:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %149 unwind label %154

149:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %158

150:                                              ; preds = %147
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %4, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %168

154:                                              ; preds = %148
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %4, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %168

158:                                              ; preds = %149, %143
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %160)
          to label %162 unwind label %64

162:                                              ; preds = %158
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE4pushERKc(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 1 dereferenceable(1) %161)
          to label %163 unwind label %64

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163, %136
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %9, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %9, align 4, !tbaa !9
  br label %22, !llvm.loop !14

168:                                              ; preds = %154, %150, %138, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %204

169:                                              ; preds = %27
  br label %170

170:                                              ; preds = %178, %169
  %171 = invoke noundef zeroext i1 @_ZNKSt5stackIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %172 unwind label %179

172:                                              ; preds = %170
  %173 = xor i1 %171, true
  br i1 %173, label %174, label %187

174:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  %175 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %176 unwind label %183

176:                                              ; preds = %174
  %177 = load i8, ptr %175, align 1, !tbaa !11
  store i8 %177, ptr %16, align 1, !tbaa !11
  call void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %178 unwind label %183

178:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  br label %170, !llvm.loop !15

179:                                              ; preds = %170
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %4, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %5, align 4
  br label %204

183:                                              ; preds = %176, %174
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %4, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  br label %204

187:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %188 = load i64, ptr %7, align 8, !tbaa !5
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %190 = load i64, ptr %8, align 8, !tbaa !5
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %19, align 8, !tbaa !5
  %192 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %193 unwind label %200

193:                                              ; preds = %187
  %194 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %195 = extractvalue { i64, i64 } %192, 0
  store i64 %195, ptr %194, align 8
  %196 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %197 = extractvalue { i64, i64 } %192, 1
  store i64 %197, ptr %196, align 8
  invoke void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %198 unwind label %200

198:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #4
  %199 = load i64, ptr %1, align 4
  ret i64 %199

200:                                              ; preds = %193, %187
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %4, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  br label %204

204:                                              ; preds = %200, %183, %179, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #4
  br label %205

205:                                              ; preds = %204, %32
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  br label %206

206:                                              ; preds = %205, %28
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #4
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %4, align 8
  %209 = load i32, ptr %5, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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] }
%"struct.std::pair" = type { i32, i32 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack.0" = type { %"class.std::deque.1" }
%"class.std::deque.1" = type { %"class.std::_Deque_base.2" }
%"class.std::_Deque_base.2" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.6", %"struct.std::_Deque_iterator.6" }
%"struct.std::_Deque_iterator.6" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair.7" = type { i64, i64 }

@bound = external dso_local local_unnamed_addr global i64, align 8
@_Z3cmdB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3modxx(i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z5solvev() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca %"class.std::stack", align 8
  %3 = alloca %"class.std::stack.0", align 8
  %4 = alloca %"class.std::stack.0", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"struct.std::pair.7", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %16 unwind label %22

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #4
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %17 unwind label %24

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 0, ptr %6, align 8, !tbaa !5
  %18 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11) #4
  %.not26 = icmp eq i64 %18, 0
  br i1 %.not26, label %.preheader, label %.lr.ph23

.preheader:                                       ; preds = %95, %17
  %19 = phi i64 [ 0, %17 ], [ %96, %95 ]
  %20 = phi i64 [ 0, %17 ], [ %97, %95 ]
  %21 = call noundef zeroext i1 @_ZNKSt5stackIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %21, label %._crit_edge25, label %.lr.ph24

22:                                               ; preds = %0
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %117

24:                                               ; preds = %16
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %116

.lr.ph23:                                         ; preds = %17, %95
  %26 = phi i64 [ %96, %95 ], [ 0, %17 ]
  %27 = phi i64 [ %97, %95 ], [ 0, %17 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %95 ], [ 0, %17 ]
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv)
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = icmp eq i8 %29, 41
  br i1 %30, label %31, label %82

31:                                               ; preds = %.lr.ph23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %33 = load i64, ptr %32, align 8, !tbaa !5
  store i64 %33, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %35 = load i64, ptr %34, align 8, !tbaa !5
  store i64 %35, ptr %8, align 8, !tbaa !5
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %37 = load i8, ptr %36, align 1, !tbaa !9
  %.not20 = icmp eq i8 %37, 40
  br i1 %.not20, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %39 = load i8, ptr %38, align 1, !tbaa !9
  store i8 %39, ptr %9, align 1, !tbaa !9
  call void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %.not = icmp eq i8 %41, 40
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !10

42:                                               ; preds = %93
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %115

._crit_edge:                                      ; preds = %.lr.ph, %31
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i32
  %47 = add nsw i32 %46, -48
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %48 = call noundef zeroext i1 @_ZNKSt5stackIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %48, label %67, label %49

49:                                               ; preds = %._crit_edge
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = load i64, ptr %7, align 8, !tbaa !5
  %53 = sext i32 %47 to i64
  %54 = mul nsw i64 %52, %53
  %55 = add nsw i64 %54, %51
  %56 = load i64, ptr @bound, align 8, !tbaa !5
  %57 = call noundef i64 @_Z3modxx(i64 noundef %55, i64 noundef %56)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  store i64 %57, ptr %58, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !5
  %62 = mul nsw i64 %61, %53
  %63 = add nsw i64 %62, %60
  %64 = load i64, ptr @bound, align 8, !tbaa !5
  %65 = call noundef i64 @_Z3modxx(i64 noundef %63, i64 noundef %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  store i64 %65, ptr %66, align 8, !tbaa !5
  br label %79

67:                                               ; preds = %._crit_edge
  %68 = load i64, ptr %7, align 8, !tbaa !5
  %69 = sext i32 %47 to i64
  %70 = mul nsw i64 %68, %69
  %71 = add nsw i64 %70, %27
  %72 = load i64, ptr @bound, align 8, !tbaa !5
  %73 = call noundef i64 @_Z3modxx(i64 noundef %71, i64 noundef %72)
  store i64 %73, ptr %5, align 8, !tbaa !5
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = mul nsw i64 %74, %69
  %76 = add nsw i64 %75, %26
  %77 = load i64, ptr @bound, align 8, !tbaa !5
  %78 = call noundef i64 @_Z3modxx(i64 noundef %76, i64 noundef %77)
  store i64 %78, ptr %6, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %67, %49
  %80 = phi i64 [ %78, %67 ], [ %26, %49 ]
  %81 = phi i64 [ %73, %67 ], [ %27, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %95

82:                                               ; preds = %.lr.ph23
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv)
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = icmp eq i8 %84, 40
  br i1 %85, label %86, label %93

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  store i64 0, ptr %10, align 8, !tbaa !5
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %87 unwind label %89

87:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %88 unwind label %91

88:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %93

89:                                               ; preds = %86
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %115

91:                                               ; preds = %87
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %115

93:                                               ; preds = %88, %82
  %94 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv)
  invoke void @_ZNSt5stackIcSt5dequeIcSaIcEEE4pushERKc(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 1 dereferenceable(1) %94)
          to label %95 unwind label %42

95:                                               ; preds = %79, %93
  %96 = phi i64 [ %80, %79 ], [ %26, %93 ]
  %97 = phi i64 [ %81, %79 ], [ %27, %93 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %98 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11) #4
  %99 = icmp ugt i64 %98, %indvars.iv.next
  br i1 %99, label %.lr.ph23, label %.preheader, !llvm.loop !12

.lr.ph24:                                         ; preds = %.preheader, %.lr.ph24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5stackIcSt5dequeIcSaIcEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %101 = load i8, ptr %100, align 1, !tbaa !9
  store i8 %101, ptr %12, align 1, !tbaa !9
  call void @_Z3runRKcRxS1_(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  %102 = call noundef zeroext i1 @_ZNKSt5stackIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %102, label %._crit_edge25.loopexit, label %.lr.ph24, !llvm.loop !13

._crit_edge25.loopexit:                           ; preds = %.lr.ph24
  %.pre = load i64, ptr %5, align 8, !tbaa !5
  %.pre28 = load i64, ptr %6, align 8, !tbaa !5
  br label %._crit_edge25

._crit_edge25:                                    ; preds = %._crit_edge25.loopexit, %.preheader
  %103 = phi i64 [ %.pre28, %._crit_edge25.loopexit ], [ %19, %.preheader ]
  %104 = phi i64 [ %.pre, %._crit_edge25.loopexit ], [ %20, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %106 = add nsw i64 %103, 1
  store i64 %106, ptr %15, align 8, !tbaa !5
  %107 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %108 unwind label %113

108:                                              ; preds = %._crit_edge25
  %109 = extractvalue { i64, i64 } %107, 0
  store i64 %109, ptr %13, align 8
  %110 = getelementptr inbounds i8, ptr %13, i64 8
  %111 = extractvalue { i64, i64 } %107, 1
  store i64 %111, ptr %110, align 8
  call void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #4
  %112 = load i64, ptr %1, align 8
  ret i64 %112

113:                                              ; preds = %._crit_edge25
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  br label %115

115:                                              ; preds = %42, %89, %91, %113
  %.pn.pn = phi { ptr, i32 } [ %114, %113 ], [ %43, %42 ], [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  br label %116

116:                                              ; preds = %115, %24
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %115 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #4
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  br label %117

117:                                              ; preds = %116, %22
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %116 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  call void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


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