; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/CAOS3/A.ll (Z5solvev)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@g = external dso_local global [22 x [22 x i32]], align 16
@mn = external dso_local global [22 x [22 x i32]], align 16
@grund = external dso_local global [22 x [22 x [22 x [22 x i32]]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %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
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::set", align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.memset.p0.i64(ptr align 16 @g, i8 0, i64 1936, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @mn, i8 0, i64 1936, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @grund, i8 0, i64 937024, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %74, %0
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %78

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %40 unwind label %46

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

41:                                               ; preds = %66, %40
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %50, label %45

45:                                               ; preds = %41
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %73

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %6, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %7, align 4
  br label %77

50:                                               ; preds = %41
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %52)
          to label %54 unwind label %69

54:                                               ; preds = %50
  %55 = load i8, ptr %53, align 1, !tbaa !9
  %56 = sext i8 %55 to i32
  %57 = icmp eq i32 %56, 94
  %58 = zext i1 %57 to i32
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %60
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [22 x i32], ptr %61, i64 0, i64 %64
  store i32 %58, ptr %65, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %54
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !5
  br label %41, !llvm.loop !10

69:                                               ; preds = %50
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %77

73:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %3, align 4, !tbaa !5
  br label %33, !llvm.loop !12

77:                                               ; preds = %69, %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %421

78:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %216, %78
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %219

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %212, %84
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = icmp sle i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %215

90:                                               ; preds = %85
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %92
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [22 x i32], ptr %93, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %100, label %99

99:                                               ; preds = %90
  br label %212

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  store i32 %102, ptr %15, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %119, %100
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = icmp sge i32 %104, 1
  br i1 %105, label %106, label %115

106:                                              ; preds = %103
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %108
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [22 x i32], ptr %109, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = icmp ne i32 %113, 0
  br label %115

115:                                              ; preds = %106, %103
  %116 = phi i1 [ false, %103 ], [ %114, %106 ]
  br i1 %116, label %118, label %117

117:                                              ; preds = %115
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %124

118:                                              ; preds = %115
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %15, align 4, !tbaa !5
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %11, align 4, !tbaa !5
  br label %103, !llvm.loop !13

124:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %16, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %144, %124
  %128 = load i32, ptr %16, align 4, !tbaa !5
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = icmp sle i32 %128, %129
  br i1 %130, label %131, label %140

131:                                              ; preds = %127
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %133
  %135 = load i32, ptr %16, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [22 x i32], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = icmp ne i32 %138, 0
  br label %140

140:                                              ; preds = %131, %127
  %141 = phi i1 [ false, %127 ], [ %139, %131 ]
  br i1 %141, label %143, label %142

142:                                              ; preds = %140
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %149

143:                                              ; preds = %140
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %16, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %16, align 4, !tbaa !5
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %12, align 4, !tbaa !5
  br label %127, !llvm.loop !14

149:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  store i32 %151, ptr %17, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %168, %149
  %153 = load i32, ptr %17, align 4, !tbaa !5
  %154 = icmp sge i32 %153, 1
  br i1 %154, label %155, label %164

155:                                              ; preds = %152
  %156 = load i32, ptr %17, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %157
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [22 x i32], ptr %158, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = icmp ne i32 %162, 0
  br label %164

164:                                              ; preds = %155, %152
  %165 = phi i1 [ false, %152 ], [ %163, %155 ]
  br i1 %165, label %167, label %166

166:                                              ; preds = %164
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %173

167:                                              ; preds = %164
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %17, align 4, !tbaa !5
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %17, align 4, !tbaa !5
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %13, align 4, !tbaa !5
  br label %152, !llvm.loop !15

173:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %18, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %193, %173
  %177 = load i32, ptr %18, align 4, !tbaa !5
  %178 = load i32, ptr %1, align 4, !tbaa !5
  %179 = icmp sle i32 %177, %178
  br i1 %179, label %180, label %189

180:                                              ; preds = %176
  %181 = load i32, ptr %18, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %182
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [22 x i32], ptr %183, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = icmp ne i32 %187, 0
  br label %189

189:                                              ; preds = %180, %176
  %190 = phi i1 [ false, %176 ], [ %188, %180 ]
  br i1 %190, label %192, label %191

191:                                              ; preds = %189
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %198

192:                                              ; preds = %189
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %18, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %18, align 4, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %14, align 4, !tbaa !5
  br label %176, !llvm.loop !16

198:                                              ; preds = %191
  %199 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %199, ptr noundef nonnull align 4 dereferenceable(4) %200)
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = icmp sge i32 %202, 2
  br i1 %203, label %204, label %211

204:                                              ; preds = %198
  %205 = load i32, ptr %9, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [22 x [22 x i32]], ptr @mn, i64 0, i64 %206
  %208 = load i32, ptr %10, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [22 x i32], ptr %207, i64 0, i64 %209
  store i32 1, ptr %210, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %204, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %212

212:                                              ; preds = %211, %99
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %10, align 4, !tbaa !5
  br label %85, !llvm.loop !17

215:                                              ; preds = %89
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %9, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %9, align 4, !tbaa !5
  br label %79, !llvm.loop !18

219:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %402, %219
  %221 = load i32, ptr %19, align 4, !tbaa !5
  %222 = load i32, ptr %1, align 4, !tbaa !5
  %223 = icmp slt i32 %221, %222
  br i1 %223, label %225, label %224

224:                                              ; preds = %220
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %405

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

226:                                              ; preds = %398, %225
  %227 = load i32, ptr %20, align 4, !tbaa !5
  %228 = load i32, ptr %2, align 4, !tbaa !5
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %231, label %230

230:                                              ; preds = %226
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %401

231:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %394, %231
  %233 = load i32, ptr %21, align 4, !tbaa !5
  %234 = load i32, ptr %19, align 4, !tbaa !5
  %235 = add nsw i32 %233, %234
  %236 = load i32, ptr %1, align 4, !tbaa !5
  %237 = icmp sle i32 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %232
  store i32 32, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %397

239:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %389, %239
  %241 = load i32, ptr %22, align 4, !tbaa !5
  %242 = load i32, ptr %20, align 4, !tbaa !5
  %243 = add nsw i32 %241, %242
  %244 = load i32, ptr %2, align 4, !tbaa !5
  %245 = icmp sle i32 %243, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %240
  store i32 35, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %393

247:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %248 = load i32, ptr %21, align 4, !tbaa !5
  %249 = load i32, ptr %19, align 4, !tbaa !5
  %250 = add nsw i32 %248, %249
  store i32 %250, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %251 = load i32, ptr %22, align 4, !tbaa !5
  %252 = load i32, ptr %20, align 4, !tbaa !5
  %253 = add nsw i32 %251, %252
  store i32 %253, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %254 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %254, ptr %26, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %360, %247
  %256 = load i32, ptr %26, align 4, !tbaa !5
  %257 = load i32, ptr %23, align 4, !tbaa !5
  %258 = icmp sle i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 38, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %363

260:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %261 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %261, ptr %27, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %356, %260
  %263 = load i32, ptr %27, align 4, !tbaa !5
  %264 = load i32, ptr %24, align 4, !tbaa !5
  %265 = icmp sle i32 %263, %264
  br i1 %265, label %267, label %266

266:                                              ; preds = %262
  store i32 41, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %359

267:                                              ; preds = %262
  %268 = load i32, ptr %26, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [22 x [22 x i32]], ptr @mn, i64 0, i64 %269
  %271 = load i32, ptr %27, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [22 x i32], ptr %270, i64 0, i64 %272
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %355

276:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  %277 = load i32, ptr %21, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %278
  %280 = load i32, ptr %22, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [22 x [22 x [22 x i32]]], ptr %279, i64 0, i64 %281
  %283 = load i32, ptr %26, align 4, !tbaa !5
  %284 = sub nsw i32 %283, 1
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [22 x [22 x i32]], ptr %282, i64 0, i64 %285
  %287 = load i32, ptr %27, align 4, !tbaa !5
  %288 = sub nsw i32 %287, 1
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [22 x i32], ptr %286, i64 0, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !5
  %292 = load i32, ptr %28, align 4, !tbaa !5
  %293 = xor i32 %292, %291
  store i32 %293, ptr %28, align 4, !tbaa !5
  %294 = load i32, ptr %21, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %295
  %297 = load i32, ptr %27, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [22 x [22 x [22 x i32]]], ptr %296, i64 0, i64 %299
  %301 = load i32, ptr %26, align 4, !tbaa !5
  %302 = sub nsw i32 %301, 1
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [22 x [22 x i32]], ptr %300, i64 0, i64 %303
  %305 = load i32, ptr %24, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [22 x i32], ptr %304, i64 0, i64 %306
  %308 = load i32, ptr %307, align 4, !tbaa !5
  %309 = load i32, ptr %28, align 4, !tbaa !5
  %310 = xor i32 %309, %308
  store i32 %310, ptr %28, align 4, !tbaa !5
  %311 = load i32, ptr %26, align 4, !tbaa !5
  %312 = add nsw i32 %311, 1
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %313
  %315 = load i32, ptr %22, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [22 x [22 x [22 x i32]]], ptr %314, i64 0, i64 %316
  %318 = load i32, ptr %23, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [22 x [22 x i32]], ptr %317, i64 0, i64 %319
  %321 = load i32, ptr %27, align 4, !tbaa !5
  %322 = sub nsw i32 %321, 1
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [22 x i32], ptr %320, i64 0, i64 %323
  %325 = load i32, ptr %324, align 4, !tbaa !5
  %326 = load i32, ptr %28, align 4, !tbaa !5
  %327 = xor i32 %326, %325
  store i32 %327, ptr %28, align 4, !tbaa !5
  %328 = load i32, ptr %26, align 4, !tbaa !5
  %329 = add nsw i32 %328, 1
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %330
  %332 = load i32, ptr %27, align 4, !tbaa !5
  %333 = add nsw i32 %332, 1
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [22 x [22 x [22 x i32]]], ptr %331, i64 0, i64 %334
  %336 = load i32, ptr %23, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [22 x [22 x i32]], ptr %335, i64 0, i64 %337
  %339 = load i32, ptr %24, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [22 x i32], ptr %338, i64 0, i64 %340
  %342 = load i32, ptr %341, align 4, !tbaa !5
  %343 = load i32, ptr %28, align 4, !tbaa !5
  %344 = xor i32 %343, %342
  store i32 %344, ptr %28, align 4, !tbaa !5
  %345 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %25, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %346 unwind label %351

346:                                              ; preds = %276
  %347 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 0
  %348 = extractvalue { ptr, i8 } %345, 0
  store ptr %348, ptr %347, align 8
  %349 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 1
  %350 = extractvalue { ptr, i8 } %345, 1
  store i8 %350, ptr %349, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %355

351:                                              ; preds = %276
  %352 = landingpad { ptr, i32 }
          cleanup
  %353 = extractvalue { ptr, i32 } %352, 0
  store ptr %353, ptr %6, align 8
  %354 = extractvalue { ptr, i32 } %352, 1
  store i32 %354, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %392

355:                                              ; preds = %346, %267
  br label %356

356:                                              ; preds = %355
  %357 = load i32, ptr %27, align 4, !tbaa !5
  %358 = add nsw i32 %357, 1
  store i32 %358, ptr %27, align 4, !tbaa !5
  br label %262, !llvm.loop !19

359:                                              ; preds = %266
  br label %360

360:                                              ; preds = %359
  %361 = load i32, ptr %26, align 4, !tbaa !5
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr %26, align 4, !tbaa !5
  br label %255, !llvm.loop !20

363:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %364

364:                                              ; preds = %368, %363
  %365 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %25, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %366 unwind label %371

366:                                              ; preds = %364
  %367 = icmp ne i64 %365, 0
  br i1 %367, label %368, label %375

368:                                              ; preds = %366
  %369 = load i32, ptr %30, align 4, !tbaa !5
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %30, align 4, !tbaa !5
  br label %364, !llvm.loop !21

371:                                              ; preds = %364
  %372 = landingpad { ptr, i32 }
          cleanup
  %373 = extractvalue { ptr, i32 } %372, 0
  store ptr %373, ptr %6, align 8
  %374 = extractvalue { ptr, i32 } %372, 1
  store i32 %374, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %392

375:                                              ; preds = %366
  %376 = load i32, ptr %30, align 4, !tbaa !5
  %377 = load i32, ptr %21, align 4, !tbaa !5
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %378
  %380 = load i32, ptr %22, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [22 x [22 x [22 x i32]]], ptr %379, i64 0, i64 %381
  %383 = load i32, ptr %23, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [22 x [22 x i32]], ptr %382, i64 0, i64 %384
  %386 = load i32, ptr %24, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [22 x i32], ptr %385, i64 0, i64 %387
  store i32 %376, ptr %388, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %389

389:                                              ; preds = %375
  %390 = load i32, ptr %22, align 4, !tbaa !5
  %391 = add nsw i32 %390, 1
  store i32 %391, ptr %22, align 4, !tbaa !5
  br label %240, !llvm.loop !22

392:                                              ; preds = %371, %351
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %421

393:                                              ; preds = %246
  br label %394

394:                                              ; preds = %393
  %395 = load i32, ptr %21, align 4, !tbaa !5
  %396 = add nsw i32 %395, 1
  store i32 %396, ptr %21, align 4, !tbaa !5
  br label %232, !llvm.loop !23

397:                                              ; preds = %238
  br label %398

398:                                              ; preds = %397
  %399 = load i32, ptr %20, align 4, !tbaa !5
  %400 = add nsw i32 %399, 1
  store i32 %400, ptr %20, align 4, !tbaa !5
  br label %226, !llvm.loop !24

401:                                              ; preds = %230
  br label %402

402:                                              ; preds = %401
  %403 = load i32, ptr %19, align 4, !tbaa !5
  %404 = add nsw i32 %403, 1
  store i32 %404, ptr %19, align 4, !tbaa !5
  br label %220, !llvm.loop !25

405:                                              ; preds = %224
  %406 = load i32, ptr %1, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds [22 x [22 x i32]], ptr getelementptr inbounds ([22 x [22 x [22 x i32]]], ptr getelementptr inbounds ([22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 1), i64 0, i64 1), i64 0, i64 %407
  %409 = load i32, ptr %2, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [22 x i32], ptr %408, i64 0, i64 %410
  %412 = load i32, ptr %411, align 4, !tbaa !5
  %413 = icmp ne i32 %412, 0
  br i1 %413, label %414, label %417

414:                                              ; preds = %405
  %415 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %416 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %415, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %420

417:                                              ; preds = %405
  %418 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %419 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %418, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %420

420:                                              ; preds = %417, %414
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void

421:                                              ; preds = %392, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  br label %422

422:                                              ; preds = %421
  %423 = load ptr, ptr %6, align 8
  %424 = load i32, ptr %7, align 4
  %425 = insertvalue { ptr, i32 } poison, ptr %423, 0
  %426 = insertvalue { ptr, i32 } %425, i32 %424, 1
  resume { ptr, i32 } %426
}

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare i32 @__gxx_personality_v0(...)

; 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) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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) #6

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

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

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

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

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


; 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_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@g = external dso_local local_unnamed_addr global [22 x [22 x i32]], align 16
@mn = external dso_local local_unnamed_addr global [22 x [22 x i32]], align 16
@grund = external dso_local local_unnamed_addr global [22 x [22 x [22 x [22 x i32]]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::set", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1936) @g, i8 0, i64 1936, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1936) @mn, i8 0, i64 1936, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(937024) @grund, i8 0, i64 937024, i1 false)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %.not134 = icmp slt i32 %13, 1
  br i1 %.not134, label %.preheader129.thread, label %.lr.ph137

.preheader129.thread:                             ; preds = %0
  %.pre242.pre249 = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge180

.preheader129:                                    ; preds = %._crit_edge
  %.not105164 = icmp slt i32 %18, 1
  %.pre242.pre = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp slt i32 %.pre242.pre, 1
  %or.cond = select i1 %.not105164, i1 true, i1 %14
  br i1 %or.cond, label %._crit_edge180, label %.preheader128

.lr.ph137:                                        ; preds = %0, %._crit_edge
  %indvars.iv188 = phi i64 [ %indvars.iv.next189, %._crit_edge ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %.preheader130 unwind label %20

.preheader130:                                    ; preds = %.lr.ph137
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv188, %19
  br i1 %.not.not, label %.lr.ph137, label %.preheader129, !llvm.loop !9

20:                                               ; preds = %.lr.ph137
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %172

.lr.ph:                                           ; preds = %.preheader130, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader130 ]
  %22 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = icmp eq i8 %23, 94
  %25 = zext i1 %24 to i32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %indvars.iv188, i64 %indvars.iv.next
  store i32 %25, ptr %26, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !12

.preheader128:                                    ; preds = %.preheader129, %._crit_edge163
  %30 = phi i32 [ %36, %._crit_edge163 ], [ %18, %.preheader129 ]
  %31 = phi i32 [ %37, %._crit_edge163 ], [ %.pre242.pre, %.preheader129 ]
  %32 = phi i32 [ %38, %._crit_edge163 ], [ %.pre242.pre, %.preheader129 ]
  %indvars.iv200 = phi i64 [ %indvars.iv.next201, %._crit_edge163 ], [ 1, %.preheader129 ]
  %.not114160 = icmp slt i32 %32, 1
  br i1 %.not114160, label %._crit_edge163, label %.lr.ph162

.lr.ph162:                                        ; preds = %.preheader128
  %33 = icmp ugt i64 %indvars.iv200, 1
  br label %40

.preheader127:                                    ; preds = %._crit_edge163
  %34 = icmp sgt i32 %36, 0
  %35 = icmp sgt i32 %37, 0
  %or.cond268 = select i1 %34, i1 %35, i1 false
  br i1 %or.cond268, label %.preheader126, label %._crit_edge180

._crit_edge163.loopexit:                          ; preds = %82
  %.pre240 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge163

._crit_edge163:                                   ; preds = %._crit_edge163.loopexit, %.preheader128
  %36 = phi i32 [ %.pre240, %._crit_edge163.loopexit ], [ %30, %.preheader128 ]
  %37 = phi i32 [ %83, %._crit_edge163.loopexit ], [ %31, %.preheader128 ]
  %38 = phi i32 [ %83, %._crit_edge163.loopexit ], [ %32, %.preheader128 ]
  %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1
  %39 = sext i32 %36 to i64
  %.not105.not = icmp slt i64 %indvars.iv200, %39
  br i1 %.not105.not, label %.preheader128, label %.preheader127, !llvm.loop !13

40:                                               ; preds = %.lr.ph162, %82
  %41 = phi i32 [ %31, %.lr.ph162 ], [ %83, %82 ]
  %indvars.iv191 = phi i64 [ 1, %.lr.ph162 ], [ %indvars.iv.next192, %82 ]
  %42 = phi i32 [ %32, %.lr.ph162 ], [ %83, %82 ]
  %43 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %indvars.iv200, i64 %indvars.iv191
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %.not115 = icmp eq i32 %44, 0
  br i1 %.not115, label %82, label %45

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  %46 = icmp ugt i64 %indvars.iv191, 1
  br i1 %46, label %.lr.ph141, label %.critedge

.lr.ph141:                                        ; preds = %45, %52
  %indvars.iv193 = phi i64 [ %indvars.iv.next194, %52 ], [ %indvars.iv191, %45 ]
  %47 = phi i32 [ %53, %52 ], [ 0, %45 ]
  %indvars.iv.next194 = add nsw i64 %indvars.iv193, -1
  %48 = and i64 %indvars.iv.next194, 4294967295
  %49 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %indvars.iv200, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %.not116 = icmp eq i32 %50, 0
  br i1 %.not116, label %.critedge, label %52

.critedge:                                        ; preds = %.lr.ph141, %52, %45
  %51 = sext i32 %42 to i64
  %.not117.not145 = icmp slt i64 %indvars.iv191, %51
  br i1 %.not117.not145, label %.lr.ph147.preheader, label %.critedge2

.lr.ph147.preheader:                              ; preds = %.critedge
  %wide.trip.count = zext i32 %42 to i64
  br label %.lr.ph147

52:                                               ; preds = %.lr.ph141
  %53 = add nuw nsw i32 %47, 1
  store i32 %53, ptr %4, align 4, !tbaa !5
  %54 = icmp sgt i64 %indvars.iv193, 2
  br i1 %54, label %.lr.ph141, label %.critedge, !llvm.loop !15

.lr.ph147:                                        ; preds = %.lr.ph147.preheader, %58
  %indvars.iv196 = phi i64 [ %indvars.iv191, %.lr.ph147.preheader ], [ %indvars.iv.next197, %58 ]
  %55 = phi i32 [ 0, %.lr.ph147.preheader ], [ %59, %58 ]
  %indvars.iv.next197 = add nuw nsw i64 %indvars.iv196, 1
  %56 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %indvars.iv200, i64 %indvars.iv.next197
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %.not118 = icmp eq i32 %57, 0
  br i1 %.not118, label %.critedge2, label %58

.critedge2:                                       ; preds = %.lr.ph147, %58, %.critedge
  br i1 %33, label %.lr.ph152, label %.critedge4

58:                                               ; preds = %.lr.ph147
  %59 = add nuw nsw i32 %55, 1
  store i32 %59, ptr %5, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next197, %wide.trip.count
  br i1 %exitcond.not, label %.critedge2, label %.lr.ph147, !llvm.loop !16

.lr.ph152:                                        ; preds = %.critedge2, %66
  %indvars.iv202 = phi i64 [ %indvars.iv.next203, %66 ], [ %indvars.iv200, %.critedge2 ]
  %60 = phi i32 [ %67, %66 ], [ 0, %.critedge2 ]
  %indvars.iv.next203 = add nsw i64 %indvars.iv202, -1
  %61 = and i64 %indvars.iv.next203, 4294967295
  %62 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %61, i64 %indvars.iv191
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %.not119 = icmp eq i32 %63, 0
  br i1 %.not119, label %.critedge4, label %66

.critedge4:                                       ; preds = %.lr.ph152, %66, %.critedge2
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %.not120.not156 = icmp slt i64 %indvars.iv200, %65
  br i1 %.not120.not156, label %.lr.ph158.preheader, label %.critedge6

.lr.ph158.preheader:                              ; preds = %.critedge4
  %wide.trip.count210 = zext i32 %64 to i64
  br label %.lr.ph158

66:                                               ; preds = %.lr.ph152
  %67 = add nuw nsw i32 %60, 1
  store i32 %67, ptr %6, align 4, !tbaa !5
  %68 = icmp sgt i64 %indvars.iv202, 2
  br i1 %68, label %.lr.ph152, label %.critedge4, !llvm.loop !17

.lr.ph158:                                        ; preds = %.lr.ph158.preheader, %77
  %indvars.iv206 = phi i64 [ %indvars.iv200, %.lr.ph158.preheader ], [ %indvars.iv.next207, %77 ]
  %69 = phi i32 [ 0, %.lr.ph158.preheader ], [ %78, %77 ]
  %indvars.iv.next207 = add nuw nsw i64 %indvars.iv206, 1
  %70 = getelementptr inbounds [22 x [22 x i32]], ptr @g, i64 0, i64 %indvars.iv.next207, i64 %indvars.iv191
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %.not121 = icmp eq i32 %71, 0
  br i1 %.not121, label %.critedge6, label %77

.critedge6:                                       ; preds = %.lr.ph158, %77, %.critedge4
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull align 4 dereferenceable(4) %73)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, 1
  br i1 %76, label %79, label %81

77:                                               ; preds = %.lr.ph158
  %78 = add nuw nsw i32 %69, 1
  store i32 %78, ptr %7, align 4, !tbaa !5
  %exitcond211.not = icmp eq i64 %indvars.iv.next207, %wide.trip.count210
  br i1 %exitcond211.not, label %.critedge6, label %.lr.ph158, !llvm.loop !18

79:                                               ; preds = %.critedge6
  %80 = getelementptr inbounds [22 x [22 x i32]], ptr @mn, i64 0, i64 %indvars.iv200, i64 %indvars.iv191
  store i32 1, ptr %80, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %79, %.critedge6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %40, %81
  %83 = phi i32 [ %41, %40 ], [ %.pre, %81 ]
  %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1
  %84 = sext i32 %83 to i64
  %.not114.not = icmp slt i64 %indvars.iv191, %84
  br i1 %.not114.not, label %40, label %._crit_edge163.loopexit, !llvm.loop !19

.preheader126:                                    ; preds = %.preheader127, %._crit_edge177
  %85 = phi i32 [ %106, %._crit_edge177 ], [ %36, %.preheader127 ]
  %86 = phi i32 [ %107, %._crit_edge177 ], [ %37, %.preheader127 ]
  %87 = phi i32 [ %108, %._crit_edge177 ], [ %37, %.preheader127 ]
  %indvars.iv236 = phi i64 [ %89, %._crit_edge177 ], [ 0, %.preheader127 ]
  %88 = icmp sgt i32 %87, 0
  %89 = add nuw nsw i64 %indvars.iv236, 1
  %90 = sext i32 %85 to i64
  %.not = icmp slt i64 %indvars.iv236, %90
  %or.cond269 = and i1 %88, %.not
  br i1 %or.cond269, label %.preheader125, label %._crit_edge177

._crit_edge180:                                   ; preds = %._crit_edge177, %.preheader129.thread, %.preheader129, %.preheader127
  %91 = phi i32 [ %37, %.preheader127 ], [ %.pre242.pre249, %.preheader129.thread ], [ %.pre242.pre, %.preheader129 ], [ %107, %._crit_edge177 ]
  %.lcssa = phi i32 [ %36, %.preheader127 ], [ %13, %.preheader129.thread ], [ %18, %.preheader129 ], [ %106, %._crit_edge177 ]
  %92 = sext i32 %.lcssa to i64
  %93 = sext i32 %91 to i64
  %94 = getelementptr inbounds [22 x [22 x i32]], ptr getelementptr inbounds (i8, ptr @grund, i64 44528), i64 0, i64 %92, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %.not106 = icmp eq i32 %95, 0
  %.str.1..str = select i1 %.not106, ptr @.str.1, ptr @.str
  %96 = call 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..str)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void

.preheader125:                                    ; preds = %.preheader126, %._crit_edge174
  %98 = phi i32 [ %118, %._crit_edge174 ], [ %85, %.preheader126 ]
  %99 = phi i32 [ %119, %._crit_edge174 ], [ %86, %.preheader126 ]
  %100 = phi i32 [ %120, %._crit_edge174 ], [ %85, %.preheader126 ]
  %101 = phi i32 [ %119, %._crit_edge174 ], [ %87, %.preheader126 ]
  %102 = phi i32 [ %121, %._crit_edge174 ], [ %85, %.preheader126 ]
  %indvars.iv232 = phi i64 [ %104, %._crit_edge174 ], [ 0, %.preheader126 ]
  %103 = sext i32 %102 to i64
  %.not107172.not = icmp slt i64 %indvars.iv236, %103
  %104 = add nuw nsw i64 %indvars.iv232, 1
  %105 = sext i32 %101 to i64
  %.not181 = icmp slt i64 %indvars.iv232, %105
  %or.cond270 = and i1 %.not107172.not, %.not181
  br i1 %or.cond270, label %.preheader124, label %._crit_edge174

._crit_edge177:                                   ; preds = %._crit_edge174, %.preheader126
  %106 = phi i32 [ %85, %.preheader126 ], [ %118, %._crit_edge174 ]
  %107 = phi i32 [ %86, %.preheader126 ], [ %119, %._crit_edge174 ]
  %108 = phi i32 [ %87, %.preheader126 ], [ %119, %._crit_edge174 ]
  %109 = sext i32 %106 to i64
  %110 = icmp slt i64 %89, %109
  br i1 %110, label %.preheader126, label %._crit_edge180, !llvm.loop !20

.preheader124:                                    ; preds = %.preheader125, %._crit_edge171
  %111 = phi i32 [ %124, %._crit_edge171 ], [ %98, %.preheader125 ]
  %112 = phi i32 [ %125, %._crit_edge171 ], [ %99, %.preheader125 ]
  %113 = phi i32 [ %126, %._crit_edge171 ], [ %100, %.preheader125 ]
  %114 = phi i32 [ %127, %._crit_edge171 ], [ %101, %.preheader125 ]
  %indvars.iv222 = phi i64 [ %indvars.iv.next223, %._crit_edge171 ], [ 1, %.preheader125 ]
  %115 = phi i64 [ %128, %._crit_edge171 ], [ %89, %.preheader125 ]
  %116 = sext i32 %114 to i64
  %.not108168.not = icmp slt i64 %indvars.iv232, %116
  br i1 %.not108168.not, label %.lr.ph170, label %._crit_edge171

.lr.ph170:                                        ; preds = %.preheader124
  %117 = and i64 %115, 4294967295
  br label %130

._crit_edge174:                                   ; preds = %._crit_edge171, %.preheader125
  %118 = phi i32 [ %98, %.preheader125 ], [ %124, %._crit_edge171 ]
  %119 = phi i32 [ %99, %.preheader125 ], [ %125, %._crit_edge171 ]
  %120 = phi i32 [ %100, %.preheader125 ], [ %126, %._crit_edge171 ]
  %121 = phi i32 [ %102, %.preheader125 ], [ %126, %._crit_edge171 ]
  %122 = sext i32 %119 to i64
  %123 = icmp slt i64 %104, %122
  br i1 %123, label %.preheader125, label %._crit_edge177, !llvm.loop !21

._crit_edge171.loopexit:                          ; preds = %166
  %.pre241 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge171

._crit_edge171:                                   ; preds = %._crit_edge171.loopexit, %.preheader124
  %124 = phi i32 [ %.pre241, %._crit_edge171.loopexit ], [ %111, %.preheader124 ]
  %125 = phi i32 [ %169, %._crit_edge171.loopexit ], [ %112, %.preheader124 ]
  %126 = phi i32 [ %.pre241, %._crit_edge171.loopexit ], [ %113, %.preheader124 ]
  %127 = phi i32 [ %169, %._crit_edge171.loopexit ], [ %114, %.preheader124 ]
  %indvars.iv.next223 = add nuw nsw i64 %indvars.iv222, 1
  %128 = add nuw nsw i64 %indvars.iv.next223, %indvars.iv236
  %129 = trunc nuw i64 %128 to i32
  %.not107 = icmp slt i32 %126, %129
  br i1 %.not107, label %._crit_edge174, label %.preheader124, !llvm.loop !22

130:                                              ; preds = %.lr.ph170, %166
  %indvars.iv216 = phi i64 [ 1, %.lr.ph170 ], [ %indvars.iv.next217, %166 ]
  %131 = phi i64 [ %104, %.lr.ph170 ], [ %168, %166 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  %132 = and i64 %131, 4294967295
  br label %.preheader

.preheader:                                       ; preds = %130, %135
  %indvars.iv224 = phi i64 [ %indvars.iv222, %130 ], [ %indvars.iv.next225, %135 ]
  %133 = add nsw i64 %indvars.iv224, -1
  %indvars.iv.next225 = add nuw nsw i64 %indvars.iv224, 1
  br label %136

134:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  br label %158

135:                                              ; preds = %157
  %.not109.not = icmp ult i64 %indvars.iv224, %117
  br i1 %.not109.not, label %.preheader, label %134, !llvm.loop !23

136:                                              ; preds = %.preheader, %157
  %indvars.iv218 = phi i64 [ %indvars.iv216, %.preheader ], [ %indvars.iv.next219.pre-phi, %157 ]
  %137 = getelementptr inbounds [22 x [22 x i32]], ptr @mn, i64 0, i64 %indvars.iv224, i64 %indvars.iv218
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %.not112 = icmp eq i32 %138, 0
  br i1 %.not112, label %._crit_edge244, label %139

._crit_edge244:                                   ; preds = %136
  %.pre245 = add nuw nsw i64 %indvars.iv218, 1
  br label %157

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %140 = add nsw i64 %indvars.iv218, -1
  %141 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %indvars.iv222, i64 %indvars.iv216, i64 %133, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = add nuw nsw i64 %indvars.iv218, 1
  %144 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %indvars.iv222, i64 %143, i64 %133, i64 %132
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = xor i32 %145, %142
  %147 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %indvars.iv.next225, i64 %indvars.iv216, i64 %117, i64 %140
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = xor i32 %148, %146
  %150 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %indvars.iv.next225, i64 %143, i64 %117, i64 %132
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = xor i32 %151, %149
  store i32 %152, ptr %9, align 4, !tbaa !5
  %153 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %154 unwind label %155

154:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %157

155:                                              ; preds = %139
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %171

157:                                              ; preds = %._crit_edge244, %154
  %indvars.iv.next219.pre-phi = phi i64 [ %.pre245, %._crit_edge244 ], [ %143, %154 ]
  %.not111.not = icmp ult i64 %indvars.iv218, %132
  br i1 %.not111.not, label %136, label %135, !llvm.loop !24

158:                                              ; preds = %162, %134
  %storemerge = phi i32 [ 0, %134 ], [ %163, %162 ]
  store i32 %storemerge, ptr %10, align 4, !tbaa !5
  %159 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %160 unwind label %164

160:                                              ; preds = %158
  %.not110 = icmp eq i64 %159, 0
  %161 = load i32, ptr %10, align 4, !tbaa !5
  br i1 %.not110, label %166, label %162

162:                                              ; preds = %160
  %163 = add nsw i32 %161, 1
  br label %158, !llvm.loop !25

164:                                              ; preds = %158
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %171

166:                                              ; preds = %160
  %167 = getelementptr inbounds [22 x [22 x [22 x [22 x i32]]]], ptr @grund, i64 0, i64 %indvars.iv222, i64 %indvars.iv216, i64 %117, i64 %132
  store i32 %161, ptr %167, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  %indvars.iv.next217 = add nuw nsw i64 %indvars.iv216, 1
  %168 = add nuw nsw i64 %indvars.iv.next217, %indvars.iv232
  %169 = load i32, ptr %2, align 4, !tbaa !5
  %170 = trunc nuw i64 %168 to i32
  %.not108 = icmp slt i32 %169, %170
  br i1 %.not108, label %._crit_edge171.loopexit, label %130, !llvm.loop !26

171:                                              ; preds = %164, %155
  %.pn = phi { ptr, i32 } [ %156, %155 ], [ %165, %164 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  br label %172

172:                                              ; preds = %171, %20
  %.pn122 = phi { ptr, i32 } [ %21, %20 ], [ %.pn, %171 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn122
}

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

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 #2

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; 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 #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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 #6

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind }

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

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


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