; LLVM IR from MinhasKamal/AlgorithmImplementations :: graph/topologicalSort (TopologicalSort)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { 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<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 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::basic_ifstream", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::stack", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::stack", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #11
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2)
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
          to label %26 unwind label %32

26:                                               ; preds = %0
  %27 = invoke noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256) %2)
          to label %28 unwind label %32

28:                                               ; preds = %26
  br i1 %27, label %36, label %29

29:                                               ; preds = %28
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %31 unwind label %32

31:                                               ; preds = %29
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %356

32:                                               ; preds = %29, %26, %0
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %3, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %4, align 4
  br label %358

36:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %38 unwind label %52

38:                                               ; preds = %36
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %40, i64 8)
  %42 = extractvalue { i64, i1 } %41, 1
  %43 = extractvalue { i64, i1 } %41, 0
  %44 = select i1 %42, i64 -1, i64 %43
  %45 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %44) #12
          to label %46 unwind label %52

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

47:                                               ; preds = %69, %46
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %56, label %51

51:                                               ; preds = %47
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  br label %76

52:                                               ; preds = %38, %36
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %3, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %4, align 4
  br label %355

56:                                               ; preds = %47
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %58, i64 4)
  %60 = extractvalue { i64, i1 } %59, 1
  %61 = extractvalue { i64, i1 } %59, 0
  %62 = select i1 %60, i64 -1, i64 %61
  %63 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %62) #12
          to label %64 unwind label %72

64:                                               ; preds = %56
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  store ptr %63, ptr %68, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %64
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %8, align 4, !tbaa !5
  br label %47, !llvm.loop !11

72:                                               ; preds = %56
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %3, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  br label %355

76:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #11
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %107, %76
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  br label %110

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %99, %82
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  br label %106

88:                                               ; preds = %83
  %89 = load ptr, ptr %7, align 8, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  %97 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %96)
          to label %98 unwind label %102

98:                                               ; preds = %88
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %10, align 4, !tbaa !5
  br label %83, !llvm.loop !13

102:                                              ; preds = %88
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %3, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  br label %355

106:                                              ; preds = %87
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %9, align 4, !tbaa !5
  br label %77, !llvm.loop !14

110:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #11
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %112, i64 4)
  %114 = extractvalue { i64, i1 } %113, 1
  %115 = extractvalue { i64, i1 } %113, 0
  %116 = select i1 %114, i64 -1, i64 %115
  %117 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %116) #12
          to label %118 unwind label %124

118:                                              ; preds = %110
  store ptr %117, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #11
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %133, %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %128, label %123

123:                                              ; preds = %119
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #11
  br label %136

124:                                              ; preds = %110
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %3, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %4, align 4
  br label %354

128:                                              ; preds = %119
  %129 = load ptr, ptr %11, align 8, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %129, i64 %131
  store i32 1, ptr %132, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %128
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %12, align 4, !tbaa !5
  br label %119, !llvm.loop !15

136:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #11
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %137 unwind label %143

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #11
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %221, %137
  %139 = load i32, ptr %14, align 4, !tbaa !5
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %147, label %142

142:                                              ; preds = %138
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #11
  br label %224

143:                                              ; preds = %136
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %3, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %4, align 4
  br label %353

147:                                              ; preds = %138
  %148 = load ptr, ptr %11, align 8, !tbaa !9
  %149 = load i32, ptr %14, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i32, ptr %148, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = icmp eq i32 %152, 1
  br i1 %153, label %154, label %220

154:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #11
  %155 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %155, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %16) #11
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %156 unwind label %177

156:                                              ; preds = %154
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %157 unwind label %181

157:                                              ; preds = %156
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %158 unwind label %181

158:                                              ; preds = %157
  %159 = load ptr, ptr %11, align 8, !tbaa !9
  %160 = load i32, ptr %15, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %159, i64 %161
  store i32 2, ptr %162, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %215, %158
  %164 = invoke noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %165 unwind label %181

165:                                              ; preds = %163
  %166 = xor i1 %164, true
  br i1 %166, label %167, label %217

167:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  %168 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %169 unwind label %185

169:                                              ; preds = %167
  %170 = load i32, ptr %168, align 4, !tbaa !5
  store i32 %170, ptr %17, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %171 unwind label %185

171:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %212, %171
  %173 = load i32, ptr %18, align 4, !tbaa !5
  %174 = load i32, ptr %6, align 4, !tbaa !5
  %175 = icmp slt i32 %173, %174
  br i1 %175, label %189, label %176

176:                                              ; preds = %172
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  br label %215

177:                                              ; preds = %154
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %3, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %4, align 4
  br label %219

181:                                              ; preds = %163, %157, %156
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %3, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %4, align 4
  br label %218

185:                                              ; preds = %169, %167
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %3, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %4, align 4
  br label %216

189:                                              ; preds = %172
  %190 = load ptr, ptr %7, align 8, !tbaa !9
  %191 = load i32, ptr %17, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %190, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !9
  %195 = load i32, ptr %18, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i32, ptr %194, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = icmp eq i32 %198, 1
  br i1 %199, label %200, label %211

200:                                              ; preds = %189
  %201 = load ptr, ptr %11, align 8, !tbaa !9
  %202 = load i32, ptr %18, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds i32, ptr %201, i64 %203
  store i32 2, ptr %204, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %205 unwind label %207

205:                                              ; preds = %200
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %206 unwind label %207

206:                                              ; preds = %205
  br label %211

207:                                              ; preds = %205, %200
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %3, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  br label %216

211:                                              ; preds = %206, %189
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %18, align 4, !tbaa !5
  br label %172, !llvm.loop !16

215:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %163, !llvm.loop !17

216:                                              ; preds = %207, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %218

217:                                              ; preds = %165
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #11
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #11
  br label %220

218:                                              ; preds = %216, %181
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #11
  br label %219

219:                                              ; preds = %218, %177
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #11
  br label %352

220:                                              ; preds = %217, %147
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %14, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %14, align 4, !tbaa !5
  br label %138, !llvm.loop !18

224:                                              ; preds = %142
  %225 = load i32, ptr %6, align 4, !tbaa !5
  %226 = zext i32 %225 to i64
  %227 = call ptr @llvm.stacksave.p0()
  store ptr %227, ptr %19, align 8
  %228 = alloca i32, i64 %226, align 16
  store i64 %226, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %285, %224
  %230 = load i32, ptr %21, align 4, !tbaa !5
  %231 = load i32, ptr %6, align 4, !tbaa !5
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %289

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %283, %234
  %236 = load i32, ptr %22, align 4, !tbaa !5
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %238, label %284

238:                                              ; preds = %235
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %265, %238
  %240 = load i32, ptr %23, align 4, !tbaa !5
  %241 = load i32, ptr %21, align 4, !tbaa !5
  %242 = icmp slt i32 %240, %241
  br i1 %242, label %243, label %246

243:                                              ; preds = %239
  %244 = load i32, ptr %22, align 4, !tbaa !5
  %245 = icmp eq i32 %244, 0
  br label %246

246:                                              ; preds = %243, %239
  %247 = phi i1 [ false, %239 ], [ %245, %243 ]
  br i1 %247, label %249, label %248

248:                                              ; preds = %246
  store i32 27, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %268

249:                                              ; preds = %246
  %250 = load i32, ptr %23, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds i32, ptr %228, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %255 unwind label %260

255:                                              ; preds = %249
  %256 = load i32, ptr %254, align 4, !tbaa !5
  %257 = icmp eq i32 %253, %256
  br i1 %257, label %258, label %264

258:                                              ; preds = %255
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %259 unwind label %260

259:                                              ; preds = %258
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %264

260:                                              ; preds = %258, %249
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %3, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %288

264:                                              ; preds = %259, %255
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %23, align 4, !tbaa !5
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %23, align 4, !tbaa !5
  br label %239, !llvm.loop !19

268:                                              ; preds = %248
  %269 = load i32, ptr %22, align 4, !tbaa !5
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %283

271:                                              ; preds = %268
  %272 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %273 unwind label %279

273:                                              ; preds = %271
  %274 = load i32, ptr %272, align 4, !tbaa !5
  %275 = load i32, ptr %21, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds i32, ptr %228, i64 %276
  store i32 %274, ptr %277, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %278 unwind label %279

278:                                              ; preds = %273
  br label %283

279:                                              ; preds = %273, %271
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %3, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %4, align 4
  br label %288

283:                                              ; preds = %278, %268
  br label %235, !llvm.loop !20

284:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %21, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %21, align 4, !tbaa !5
  br label %229, !llvm.loop !21

288:                                              ; preds = %279, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %352

289:                                              ; preds = %233
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %291 unwind label %300

291:                                              ; preds = %289
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %290, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %293 unwind label %300

293:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  %294 = load i32, ptr %6, align 4, !tbaa !5
  %295 = sub nsw i32 %294, 1
  store i32 %295, ptr %24, align 4, !tbaa !5
  br label %296

296:                                              ; preds = %316, %293
  %297 = load i32, ptr %24, align 4, !tbaa !5
  %298 = icmp sge i32 %297, 0
  br i1 %298, label %304, label %299

299:                                              ; preds = %296
  store i32 30, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %323

300:                                              ; preds = %349, %291, %289
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %3, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %4, align 4
  br label %352

304:                                              ; preds = %296
  %305 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %306 unwind label %319

306:                                              ; preds = %304
  %307 = load i32, ptr %24, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds i32, ptr %228, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = add nsw i32 %310, 1
  %312 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %305, i32 noundef %311)
          to label %313 unwind label %319

313:                                              ; preds = %306
  %314 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %312, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %315 unwind label %319

315:                                              ; preds = %313
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %24, align 4, !tbaa !5
  %318 = add nsw i32 %317, -1
  store i32 %318, ptr %24, align 4, !tbaa !5
  br label %296, !llvm.loop !22

319:                                              ; preds = %313, %306, %304
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %3, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %352

323:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #11
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %338, %323
  %325 = load i32, ptr %25, align 4, !tbaa !5
  %326 = load i32, ptr %6, align 4, !tbaa !5
  %327 = icmp slt i32 %325, %326
  br i1 %327, label %329, label %328

328:                                              ; preds = %324
  store i32 33, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  br label %341

329:                                              ; preds = %324
  %330 = load ptr, ptr %7, align 8, !tbaa !9
  %331 = load i32, ptr %25, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds ptr, ptr %330, i64 %332
  %334 = load ptr, ptr %333, align 8, !tbaa !9
  %335 = icmp eq ptr %334, null
  br i1 %335, label %337, label %336

336:                                              ; preds = %329
  call void @_ZdaPv(ptr noundef %334) #13
  br label %337

337:                                              ; preds = %336, %329
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %25, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %25, align 4, !tbaa !5
  br label %324, !llvm.loop !23

341:                                              ; preds = %328
  %342 = load ptr, ptr %7, align 8, !tbaa !9
  %343 = icmp eq ptr %342, null
  br i1 %343, label %345, label %344

344:                                              ; preds = %341
  call void @_ZdaPv(ptr noundef %342) #13
  br label %345

345:                                              ; preds = %344, %341
  %346 = load ptr, ptr %11, align 8, !tbaa !9
  %347 = icmp eq ptr %346, null
  br i1 %347, label %349, label %348

348:                                              ; preds = %345
  call void @_ZdaPv(ptr noundef %346) #13
  br label %349

349:                                              ; preds = %348, %345
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %2)
          to label %350 unwind label %300

350:                                              ; preds = %349
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  %351 = load ptr, ptr %19, align 8
  call void @llvm.stackrestore.p0(ptr %351)
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #11
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  br label %356

352:                                              ; preds = %319, %300, %288, %219
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #11
  br label %353

353:                                              ; preds = %352, %143
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #11
  br label %354

354:                                              ; preds = %353, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  br label %355

355:                                              ; preds = %354, %102, %72, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  br label %358

356:                                              ; preds = %350, %31
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #11
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #11
  %357 = load i32, ptr %1, align 4
  ret i32 %357

358:                                              ; preds = %355, %32
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #11
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #11
  br label %359

359:                                              ; preds = %358
  %360 = load ptr, ptr %3, align 8
  %361 = load i32, ptr %4, align 4
  %362 = insertvalue { ptr, i32 } poison, ptr %360, 0
  %363 = insertvalue { ptr, i32 } %362, i32 %361, 1
  resume { ptr, i32 } %363
}

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 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)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 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)) #3 align 2

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

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

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #10

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nobuiltin allocsize(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 #8 = { 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 #9 = { nocallback nofree nosync nounwind willreturn }
attributes #10 = { nobuiltin nounwind "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 #11 = { nounwind }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }

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

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


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { 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<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 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::basic_ifstream", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::stack", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::stack", align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #10
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1)
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
          to label %7 unwind label %11

7:                                                ; preds = %0
  %8 = call noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256) %1)
  br i1 %8, label %13, label %9

9:                                                ; preds = %7
  %10 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %166 unwind label %11

11:                                               ; preds = %9, %0
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %167

13:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  %14 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %15 unwind label %24

15:                                               ; preds = %13
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp slt i32 %16, 0
  %19 = shl nsw i64 %17, 3
  %20 = select i1 %18, i64 -1, i64 %19
  %21 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %20) #11
          to label %.preheader85 unwind label %24

.preheader85:                                     ; preds = %15
  %22 = icmp sgt i32 %16, 0
  br i1 %22, label %.lr.ph, label %._crit_edge96

.lr.ph:                                           ; preds = %.preheader85
  %23 = shl nuw nsw i64 %17, 2
  %wide.trip.count = zext nneg i32 %16 to i64
  br label %26

.preheader84:                                     ; preds = %28
  br i1 %22, label %.preheader83, label %._crit_edge96

24:                                               ; preds = %15, %13
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %165

26:                                               ; preds = %.lr.ph, %28
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %28 ]
  %27 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %23) #11
          to label %28 unwind label %30

28:                                               ; preds = %26
  %29 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  store ptr %27, ptr %29, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader84, label %26, !llvm.loop !11

30:                                               ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %165

.preheader83:                                     ; preds = %.preheader84, %._crit_edge
  %32 = phi i32 [ %44, %._crit_edge ], [ %16, %.preheader84 ]
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %._crit_edge ], [ 0, %.preheader84 ]
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph94, label %.preheader83.._crit_edge_crit_edge

.preheader83.._crit_edge_crit_edge:               ; preds = %.preheader83
  %.pre158 = sext i32 %32 to i64
  br label %._crit_edge

.lr.ph94:                                         ; preds = %.preheader83
  %34 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv128
  %.pre = load ptr, ptr %34, align 8, !tbaa !9
  br label %46

._crit_edge96:                                    ; preds = %._crit_edge, %.preheader85, %.preheader84
  %.lcssa90 = phi i32 [ %16, %.preheader84 ], [ %16, %.preheader85 ], [ %44, %._crit_edge ]
  %35 = sext i32 %.lcssa90 to i64
  %36 = icmp slt i32 %.lcssa90, 0
  %37 = shl nsw i64 %35, 2
  %38 = select i1 %36, i64 -1, i64 %37
  %39 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %38) #11
          to label %.preheader82 unwind label %57

.preheader82:                                     ; preds = %._crit_edge96
  %40 = icmp sgt i32 %.lcssa90, 0
  br i1 %40, label %.lr.ph98.preheader, label %._crit_edge99

.lr.ph98.preheader:                               ; preds = %.preheader82
  %wide.trip.count134 = zext nneg i32 %.lcssa90 to i64
  %min.iters.check = icmp ult i32 %.lcssa90, 8
  br i1 %min.iters.check, label %.lr.ph98.preheader168, label %vector.ph

.lr.ph98.preheader168:                            ; preds = %middle.block, %.lr.ph98.preheader
  %indvars.iv131.ph = phi i64 [ 0, %.lr.ph98.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph98

vector.ph:                                        ; preds = %.lr.ph98.preheader
  %n.vec = and i64 %wide.trip.count134, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %41 = getelementptr inbounds i32, ptr %39, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %41, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %42, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count134
  br i1 %cmp.n, label %._crit_edge99, label %.lr.ph98.preheader168

._crit_edge:                                      ; preds = %49, %.preheader83.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre158, %.preheader83.._crit_edge_crit_edge ], [ %51, %49 ]
  %44 = phi i32 [ %32, %.preheader83.._crit_edge_crit_edge ], [ %50, %49 ]
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %45 = icmp slt i64 %indvars.iv.next129, %.pre-phi
  br i1 %45, label %.preheader83, label %._crit_edge96, !llvm.loop !16

46:                                               ; preds = %.lr.ph94, %49
  %indvars.iv125 = phi i64 [ 0, %.lr.ph94 ], [ %indvars.iv.next126, %49 ]
  %47 = getelementptr inbounds i32, ptr %.pre, i64 %indvars.iv125
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %47)
          to label %49 unwind label %53

49:                                               ; preds = %46
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next126, %51
  br i1 %52, label %46, label %._crit_edge, !llvm.loop !18

53:                                               ; preds = %46
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %165

._crit_edge99:                                    ; preds = %.lr.ph98, %middle.block, %.preheader82
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #10
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %.preheader81 unwind label %65

.preheader81:                                     ; preds = %._crit_edge99
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph108, label %._crit_edge109

57:                                               ; preds = %._crit_edge96
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %165

.lr.ph98:                                         ; preds = %.lr.ph98.preheader168, %.lr.ph98
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %.lr.ph98 ], [ %indvars.iv131.ph, %.lr.ph98.preheader168 ]
  %59 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv131
  store i32 1, ptr %59, align 4, !tbaa !5
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134
  br i1 %exitcond135.not, label %._crit_edge99, label %.lr.ph98, !llvm.loop !19

._crit_edge109:                                   ; preds = %109, %.preheader81
  %.lcssa86 = phi i32 [ %55, %.preheader81 ], [ %110, %109 ]
  %60 = zext i32 %.lcssa86 to i64
  %61 = call ptr @llvm.stacksave.p0()
  %62 = alloca i32, i64 %60, align 16
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.preheader80, label %._crit_edge117

65:                                               ; preds = %._crit_edge99
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %164

.lr.ph108:                                        ; preds = %.preheader81, %109
  %67 = phi i32 [ %110, %109 ], [ %55, %.preheader81 ]
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %109 ], [ 0, %.preheader81 ]
  %68 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv136
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %71, label %109

71:                                               ; preds = %.lr.ph108
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  %72 = trunc nuw nsw i64 %indvars.iv136 to i32
  store i32 %72, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #10
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %73 unwind label %87

73:                                               ; preds = %71
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %74 unwind label %89

74:                                               ; preds = %73
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %75 unwind label %89

75:                                               ; preds = %74
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %39, i64 %77
  store i32 2, ptr %78, align 4, !tbaa !5
  %79 = call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %79, label %._crit_edge106, label %.lr.ph105

.lr.ph105:                                        ; preds = %75, %._crit_edge103
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  store i32 0, ptr %6, align 4, !tbaa !5
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %.lr.ph105
  %84 = sext i32 %81 to i64
  %85 = getelementptr inbounds ptr, ptr %21, i64 %84
  %.pre152 = load ptr, ptr %85, align 8, !tbaa !9
  br label %91

._crit_edge103:                                   ; preds = %102, %.lr.ph105
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  %86 = call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %86, label %._crit_edge106, label %.lr.ph105, !llvm.loop !20

87:                                               ; preds = %71
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %108

89:                                               ; preds = %74, %73
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %107

91:                                               ; preds = %.lr.ph102, %102
  %92 = phi i32 [ %82, %.lr.ph102 ], [ %103, %102 ]
  %storemerge100 = phi i32 [ 0, %.lr.ph102 ], [ %105, %102 ]
  %93 = sext i32 %storemerge100 to i64
  %94 = getelementptr inbounds i32, ptr %.pre152, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %97, label %102

97:                                               ; preds = %91
  %98 = getelementptr inbounds i32, ptr %39, i64 %93
  store i32 2, ptr %98, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %99 unwind label %100

99:                                               ; preds = %97
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %._crit_edge153 unwind label %100

._crit_edge153:                                   ; preds = %99
  %.pre154 = load i32, ptr %6, align 4, !tbaa !5
  %.pre155 = load i32, ptr %2, align 4, !tbaa !5
  br label %102

100:                                              ; preds = %99, %97
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  br label %107

102:                                              ; preds = %._crit_edge153, %91
  %103 = phi i32 [ %.pre155, %._crit_edge153 ], [ %92, %91 ]
  %104 = phi i32 [ %.pre154, %._crit_edge153 ], [ %storemerge100, %91 ]
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %6, align 4, !tbaa !5
  %106 = icmp slt i32 %105, %103
  br i1 %106, label %91, label %._crit_edge103, !llvm.loop !21

._crit_edge106:                                   ; preds = %._crit_edge103, %75
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  %.pre156 = load i32, ptr %2, align 4, !tbaa !5
  br label %109

107:                                              ; preds = %100, %89
  %.pn = phi { ptr, i32 } [ %101, %100 ], [ %90, %89 ]
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #10
  br label %108

108:                                              ; preds = %107, %87
  %.pn.pn = phi { ptr, i32 } [ %.pn, %107 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  br label %163

109:                                              ; preds = %.lr.ph108, %._crit_edge106
  %110 = phi i32 [ %67, %.lr.ph108 ], [ %.pre156, %._crit_edge106 ]
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %111 = sext i32 %110 to i64
  %112 = icmp slt i64 %indvars.iv.next137, %111
  br i1 %112, label %.lr.ph108, label %._crit_edge109, !llvm.loop !22

.preheader80:                                     ; preds = %._crit_edge109, %.split.us
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.split.us ], [ 0, %._crit_edge109 ]
  %.not = icmp eq i64 %indvars.iv142, 0
  %113 = getelementptr inbounds i32, ptr %62, i64 %indvars.iv142
  br i1 %.not, label %.split.us, label %.preheader79.us

114:                                              ; preds = %.preheader79.us
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br label %.preheader79.us.backedge

.preheader79.us:                                  ; preds = %.preheader80, %.preheader79.us.backedge
  %indvars.iv139 = phi i64 [ %indvars.iv139.be, %.preheader79.us.backedge ], [ 0, %.preheader80 ]
  %115 = getelementptr inbounds i32, ptr %62, i64 %indvars.iv139
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = icmp ne i32 %116, %118
  br i1 %119, label %120, label %114

120:                                              ; preds = %.preheader79.us
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %121 = icmp ult i64 %indvars.iv.next140, %indvars.iv142
  %122 = and i1 %119, %121
  br i1 %122, label %.preheader79.us.backedge, label %.split.us

.preheader79.us.backedge:                         ; preds = %120, %114
  %indvars.iv139.be = phi i64 [ %indvars.iv.next140, %120 ], [ 0, %114 ]
  br label %.preheader79.us, !llvm.loop !23

._crit_edge117:                                   ; preds = %.split.us, %._crit_edge109
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %129 unwind label %140

.split.us:                                        ; preds = %120, %.preheader80
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr %113, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = icmp slt i64 %indvars.iv.next143, %127
  br i1 %128, label %.preheader80, label %._crit_edge117, !llvm.loop !24

129:                                              ; preds = %._crit_edge117
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %131 unwind label %140

131:                                              ; preds = %129
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = zext i32 %132 to i64
  br label %134

134:                                              ; preds = %149, %131
  %indvars.iv145 = phi i64 [ %135, %149 ], [ %133, %131 ]
  %135 = add nsw i64 %indvars.iv145, -1
  %136 = trunc nuw i64 %indvars.iv145 to i32
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %142, label %.preheader

.preheader:                                       ; preds = %134
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %.lr.ph119, label %._crit_edge120

140:                                              ; preds = %._crit_edge120, %129, %._crit_edge117
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %163

142:                                              ; preds = %134
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %144 unwind label %151

144:                                              ; preds = %142
  %145 = getelementptr inbounds i32, ptr %62, i64 %135
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef %147)
          to label %149 unwind label %151

149:                                              ; preds = %144
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %134 unwind label %151, !llvm.loop !25

151:                                              ; preds = %149, %144, %142
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %163

.lr.ph119:                                        ; preds = %.preheader, %158
  %153 = phi i32 [ %159, %158 ], [ %138, %.preheader ]
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %158 ], [ 0, %.preheader ]
  %154 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv149
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  %156 = icmp eq ptr %155, null
  br i1 %156, label %158, label %157

157:                                              ; preds = %.lr.ph119
  call void @_ZdaPv(ptr noundef nonnull %155) #12
  %.pre157 = load i32, ptr %2, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %.lr.ph119, %157
  %159 = phi i32 [ %153, %.lr.ph119 ], [ %.pre157, %157 ]
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %160 = sext i32 %159 to i64
  %161 = icmp slt i64 %indvars.iv.next150, %160
  br i1 %161, label %.lr.ph119, label %._crit_edge120, !llvm.loop !26

._crit_edge120:                                   ; preds = %158, %.preheader
  call void @_ZdaPv(ptr noundef nonnull %21) #12
  call void @_ZdaPv(ptr noundef nonnull %39) #12
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %1)
          to label %162 unwind label %140

162:                                              ; preds = %._crit_edge120
  call void @llvm.stackrestore.p0(ptr %61)
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  br label %166

163:                                              ; preds = %151, %140, %108
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %108 ], [ %152, %151 ], [ %141, %140 ]
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #10
  br label %164

164:                                              ; preds = %163, %65
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %163 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #10
  br label %165

165:                                              ; preds = %57, %164, %53, %30, %24
  %.pn76 = phi { ptr, i32 } [ %31, %30 ], [ %54, %53 ], [ %25, %24 ], [ %.pn.pn.pn.pn, %164 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  br label %167

166:                                              ; preds = %9, %162
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #10
  ret i32 0

167:                                              ; preds = %165, %11
  %.pn76.pn = phi { ptr, i32 } [ %.pn76, %165 ], [ %12, %11 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #10
  resume { ptr, i32 } %.pn76.pn
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 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 #3 align 2

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

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

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #9 = { nobuiltin nounwind "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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass