; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 11. Stack (Basic_Calculator)

; 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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4calciic(i32 noundef, i32 noundef, i8 noundef signext) #0

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

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %208, %18
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %30, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %212

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %5, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %6, align 4
  br label %227

30:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %32)
          to label %34 unwind label %80

34:                                               ; preds = %30
  %35 = load i8, ptr %33, align 1, !tbaa !11
  store i8 %35, ptr %9, align 1, !tbaa !11
  %36 = load i8, ptr %9, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = icmp sge i32 %37, 48
  br i1 %38, label %39, label %147

39:                                               ; preds = %34
  %40 = load i8, ptr %9, align 1, !tbaa !11
  %41 = sext i8 %40 to i32
  %42 = icmp sle i32 %41, 57
  br i1 %42, label %43, label %147

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %72, %43
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %64

48:                                               ; preds = %44
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %50)
          to label %52 unwind label %84

52:                                               ; preds = %48
  %53 = load i8, ptr %51, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = icmp sge i32 %54, 48
  br i1 %55, label %56, label %64

56:                                               ; preds = %52
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %58)
          to label %60 unwind label %84

60:                                               ; preds = %56
  %61 = load i8, ptr %59, align 1, !tbaa !11
  %62 = sext i8 %61 to i32
  %63 = icmp sle i32 %62, 57
  br label %64

64:                                               ; preds = %60, %52, %44
  %65 = phi i1 [ false, %52 ], [ false, %44 ], [ %63, %60 ]
  br i1 %65, label %66, label %88

66:                                               ; preds = %64
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = mul nsw i32 %67, 10
  store i32 %68, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %70)
          to label %72 unwind label %84

72:                                               ; preds = %66
  %73 = load i8, ptr %71, align 1, !tbaa !11
  %74 = sext i8 %73 to i32
  %75 = sub nsw i32 %74, 48
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = add nsw i32 %76, %75
  store i32 %77, ptr %10, align 4, !tbaa !9
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %8, align 4, !tbaa !9
  br label %44, !llvm.loop !12

80:                                               ; preds = %168, %167, %30
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %5, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %6, align 4
  br label %211

84:                                               ; preds = %143, %139, %134, %129, %125, %99, %94, %88, %66, %56, %48
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  br label %146

88:                                               ; preds = %64
  %89 = load i32, ptr %8, align 4, !tbaa !9
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %8, align 4, !tbaa !9
  %91 = invoke noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %92 unwind label %84

92:                                               ; preds = %88
  %93 = icmp ugt i64 %91, 0
  br i1 %93, label %94, label %125

94:                                               ; preds = %92
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %96 unwind label %84

96:                                               ; preds = %94
  %97 = load i32, ptr %95, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 40
  br i1 %98, label %99, label %101

99:                                               ; preds = %96
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %100 unwind label %84

100:                                              ; preds = %99
  br label %124

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %102 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %103 unwind label %115

103:                                              ; preds = %101
  %104 = load i32, ptr %102, align 4, !tbaa !9
  store i32 %104, ptr %11, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %105 unwind label %115

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %109 unwind label %119

109:                                              ; preds = %105
  %110 = load i32, ptr %108, align 4, !tbaa !9
  %111 = trunc i32 %110 to i8
  %112 = call noundef i32 @_Z4calciic(i32 noundef %106, i32 noundef %107, i8 noundef signext %111)
  store i32 %112, ptr %12, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %113 unwind label %119

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %114 unwind label %115

114:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %124

115:                                              ; preds = %113, %103, %101
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %5, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %6, align 4
  br label %123

119:                                              ; preds = %109, %105
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %5, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %123

123:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %146

124:                                              ; preds = %114, %100
  br label %145

125:                                              ; preds = %92
  %126 = invoke noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %127 unwind label %84

127:                                              ; preds = %125
  %128 = icmp ugt i64 %126, 0
  br i1 %128, label %129, label %143

129:                                              ; preds = %127
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %131 unwind label %84

131:                                              ; preds = %129
  %132 = load i32, ptr %130, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 40
  br i1 %133, label %134, label %143

134:                                              ; preds = %131
  %135 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %136 unwind label %84

136:                                              ; preds = %134
  %137 = load i32, ptr %135, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 41
  br i1 %138, label %139, label %143

139:                                              ; preds = %136
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %140 unwind label %84

140:                                              ; preds = %139
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = mul nsw i32 %141, -1
  store i32 %142, ptr %10, align 4, !tbaa !9
  br label %143

143:                                              ; preds = %140, %136, %131, %127
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %144 unwind label %84

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %207

146:                                              ; preds = %123, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %211

147:                                              ; preds = %39, %34
  %148 = load i8, ptr %9, align 1, !tbaa !11
  %149 = sext i8 %148 to i32
  %150 = icmp ne i32 %149, 32
  br i1 %150, label %151, label %163

151:                                              ; preds = %147
  %152 = load i8, ptr %9, align 1, !tbaa !11
  %153 = sext i8 %152 to i32
  %154 = icmp ne i32 %153, 41
  br i1 %154, label %155, label %163

155:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %156 = load i8, ptr %9, align 1, !tbaa !11
  %157 = sext i8 %156 to i32
  store i32 %157, ptr %13, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %158 unwind label %159

158:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %206

159:                                              ; preds = %155
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %5, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %211

163:                                              ; preds = %151, %147
  %164 = load i8, ptr %9, align 1, !tbaa !11
  %165 = sext i8 %164 to i32
  %166 = icmp eq i32 %165, 41
  br i1 %166, label %167, label %205

167:                                              ; preds = %163
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %168 unwind label %80

168:                                              ; preds = %167
  %169 = invoke noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %170 unwind label %80

170:                                              ; preds = %168
  %171 = icmp ugt i64 %169, 1
  br i1 %171, label %172, label %204

172:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %173 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %174 unwind label %190

174:                                              ; preds = %172
  %175 = load i32, ptr %173, align 4, !tbaa !9
  store i32 %175, ptr %14, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %176 unwind label %190

176:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %177 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %178 unwind label %194

178:                                              ; preds = %176
  %179 = load i32, ptr %177, align 4, !tbaa !9
  store i32 %179, ptr %15, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %180 unwind label %194

180:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %181 = load i32, ptr %15, align 4, !tbaa !9
  %182 = load i32, ptr %14, align 4, !tbaa !9
  %183 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %184 unwind label %198

184:                                              ; preds = %180
  %185 = load i32, ptr %183, align 4, !tbaa !9
  %186 = trunc i32 %185 to i8
  %187 = call noundef i32 @_Z4calciic(i32 noundef %181, i32 noundef %182, i8 noundef signext %186)
  store i32 %187, ptr %16, align 4, !tbaa !9
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %188 unwind label %198

188:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %189 unwind label %194

189:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %204

190:                                              ; preds = %174, %172
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %5, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %6, align 4
  br label %203

194:                                              ; preds = %188, %178, %176
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %5, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %6, align 4
  br label %202

198:                                              ; preds = %184, %180
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %5, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %202

202:                                              ; preds = %198, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %203

203:                                              ; preds = %202, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %211

204:                                              ; preds = %189, %170
  br label %205

205:                                              ; preds = %204, %163
  br label %206

206:                                              ; preds = %205, %158
  br label %207

207:                                              ; preds = %206, %145
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %8, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %8, align 4, !tbaa !9
  br label %21, !llvm.loop !14

211:                                              ; preds = %203, %159, %146, %80
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %226

212:                                              ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !9
  %213 = invoke noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %214 unwind label %216

214:                                              ; preds = %212
  br i1 %213, label %220, label %215

215:                                              ; preds = %214
  store i32 -1, ptr %17, align 4, !tbaa !9
  br label %220

216:                                              ; preds = %220, %212
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %5, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %226

220:                                              ; preds = %215, %214
  %221 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %222 unwind label %216

222:                                              ; preds = %220
  %223 = load i32, ptr %221, align 4, !tbaa !9
  %224 = load i32, ptr %17, align 4, !tbaa !9
  %225 = mul nsw i32 %223, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  ret i32 %225

226:                                              ; preds = %216, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  br label %227

227:                                              ; preds = %226, %26
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %5, align 8
  %230 = load i32, ptr %6, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(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 i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4calciic(i32 noundef, i32 noundef, i8 noundef signext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9calculateNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::stack", align 8
  %3 = alloca %"class.std::stack", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %8 unwind label %18

8:                                                ; preds = %1
  %9 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph48.preheader, label %._crit_edge

.lr.ph48.preheader:                               ; preds = %8
  %12 = and i64 %9, 2147483647
  br label %.lr.ph48

._crit_edge:                                      ; preds = %97, %8
  %13 = call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sub nsw i32 0, %15
  %17 = select i1 %13, i32 %15, i32 %16
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #4
  ret i32 %17

18:                                               ; preds = %1
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %101

.lr.ph48:                                         ; preds = %.lr.ph48.preheader, %97
  %.03147 = phi i32 [ %98, %97 ], [ 0, %.lr.ph48.preheader ]
  %20 = sext i32 %.03147 to i64
  %21 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %20)
  %22 = load i8, ptr %21, align 1, !tbaa !9
  %23 = sext i8 %22 to i32
  %24 = add i8 %22, -48
  %or.cond = icmp ult i8 %24, 10
  br i1 %or.cond, label %25, label %77

25:                                               ; preds = %.lr.ph48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  %26 = icmp slt i32 %.03147, %10
  br i1 %26, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %25, %34
  %indvars.iv = phi i64 [ %indvars.iv.next, %34 ], [ %20, %25 ]
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = icmp sgt i8 %28, 47
  br i1 %29, label %30, label %.critedge.loopexit.split.loop.exit

30:                                               ; preds = %.lr.ph
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = icmp slt i8 %32, 58
  br i1 %33, label %34, label %.critedge.loopexit.split.loop.exit52

34:                                               ; preds = %30
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = mul nsw i32 %35, 10
  store i32 %36, ptr %4, align 4, !tbaa !5
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = sext i8 %38 to i32
  %40 = add nsw i32 %39, -48
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = add nsw i32 %40, %41
  store i32 %42, ptr %4, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %12
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !10

43:                                               ; preds = %.invoke
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %76

.critedge.loopexit.split.loop.exit:               ; preds = %.lr.ph
  %45 = trunc nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge.loopexit.split.loop.exit52:             ; preds = %30
  %46 = trunc nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %34, %.critedge.loopexit.split.loop.exit, %.critedge.loopexit.split.loop.exit52, %25
  %.132.lcssa = phi i32 [ %.03147, %25 ], [ %45, %.critedge.loopexit.split.loop.exit ], [ %46, %.critedge.loopexit.split.loop.exit52 ], [ %10, %34 ]
  %47 = add nsw i32 %.132.lcssa, -1
  %48 = call noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %.not = icmp eq i64 %48, 0
  br i1 %.not, label %64, label %49

49:                                               ; preds = %.critedge
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp eq i32 %51, 40
  br i1 %52, label %.invoke, label %53

53:                                               ; preds = %49
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %55 = load i32, ptr %54, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = trunc i32 %58 to i8
  %60 = call noundef i32 @_Z4calciic(i32 noundef %55, i32 noundef %56, i8 noundef signext %59)
  store i32 %60, ptr %5, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %61 unwind label %62

61:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br label %75

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %76

64:                                               ; preds = %.critedge
  %65 = call noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %.not36 = icmp eq i64 %65, 0
  br i1 %.not36, label %.invoke, label %66

66:                                               ; preds = %64
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not37 = icmp eq i32 %68, 40
  br i1 %.not37, label %.invoke, label %69

69:                                               ; preds = %66
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %.not38 = icmp eq i32 %71, 41
  br i1 %.not38, label %.invoke, label %72

72:                                               ; preds = %69
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = sub nsw i32 0, %73
  store i32 %74, ptr %4, align 4, !tbaa !5
  br label %.invoke

.invoke:                                          ; preds = %64, %66, %69, %72, %49
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %75 unwind label %43

75:                                               ; preds = %.invoke, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %97

76:                                               ; preds = %62, %43
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %100

77:                                               ; preds = %.lr.ph48
  switch i8 %22, label %78 [
    i8 41, label %82
    i8 32, label %97
  ]

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 %23, ptr %6, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %79 unwind label %80

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %97

80:                                               ; preds = %78
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %100

82:                                               ; preds = %77
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %83 = call noundef i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %84 = icmp ugt i64 %83, 1
  br i1 %84, label %85, label %97

85:                                               ; preds = %82
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %87 = load i32, ptr %86, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = trunc i32 %91 to i8
  %93 = call noundef i32 @_Z4calciic(i32 noundef %89, i32 noundef %87, i8 noundef signext %92)
  store i32 %93, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %94 unwind label %95

94:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br label %97

95:                                               ; preds = %85
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %100

97:                                               ; preds = %77, %79, %82, %94, %75
  %.233 = phi i32 [ %47, %75 ], [ %.03147, %79 ], [ %.03147, %94 ], [ %.03147, %82 ], [ %.03147, %77 ]
  %98 = add nsw i32 %.233, 1
  %99 = icmp slt i32 %98, %10
  br i1 %99, label %.lr.ph48, label %._crit_edge, !llvm.loop !12

100:                                              ; preds = %95, %80, %76
  %.pn.pn = phi { ptr, i32 } [ %.pn, %76 ], [ %81, %80 ], [ %96, %95 ]
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  br label %101

101:                                              ; preds = %100, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %100 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(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
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(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 i64 @_ZNKSt5stackIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"int", !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}


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