; LLVM IR from tangjz/acm-icpc :: self_training/2016-07-11 (C)

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

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, long long>, std::pair<const std::pair<int, long long>, long long>, std::_Select1st<std::pair<const std::pair<int, long long>, long long>>, std::less<std::pair<int, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, long long>, std::pair<const std::pair<int, long long>, long long>, std::_Select1st<std::pair<const std::pair<int, long long>, long long>>, std::less<std::pair<int, long long>>>::_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 { i32, i64 }
%"struct.std::pair.0" = type <{ i32, i8, [3 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.2" = type { %"struct.std::pair", i64 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@posx = external dso_local global [10 x i32], align 16
@posy = external dso_local global [10 x i32], align 16
@sz = external dso_local global [1024 x i32], align 16
@pre = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@t = external dso_local global i64, align 8
@pw = external dso_local global [11 x i64], align 16
@op = external dso_local global i8, align 1
@f = external dso_local global [2 x %"class.std::map"], align 16
@ban = external dso_local global [1024 x i8], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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 %"struct.std::pair", align 8
  %15 = alloca %"struct.std::pair.0", align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::map", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca i32, align 4
  %29 = alloca i64, align 8
  %30 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @t, ptr noundef @op)
  %32 = load i8, ptr @op, align 1, !tbaa !5
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 45
  br i1 %34, label %35, label %72

35:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %65, %35
  %37 = load i32, ptr %3, align 4, !tbaa !8
  %38 = load i32, ptr @n, align 4, !tbaa !8
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

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

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %42 = load i32, ptr %3, align 4, !tbaa !8
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %5, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %61, %41
  %45 = load i32, ptr %5, align 4, !tbaa !8
  %46 = load i32, ptr @n, align 4, !tbaa !8
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %64

49:                                               ; preds = %44
  %50 = load i32, ptr %5, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = load i32, ptr %3, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = load i64, ptr @t, align 8, !tbaa !10
  %55 = add nsw i64 %53, %54
  %56 = icmp eq i64 %51, %55
  br i1 %56, label %57, label %60

57:                                               ; preds = %49
  %58 = load i32, ptr %2, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %2, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %57, %49
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %5, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !8
  br label %44, !llvm.loop !12

64:                                               ; preds = %48
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %3, align 4, !tbaa !8
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %3, align 4, !tbaa !8
  br label %36, !llvm.loop !14

68:                                               ; preds = %40
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %70 = shl i32 %69, 1
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %70)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %402

72:                                               ; preds = %0
  %73 = load i8, ptr @op, align 1, !tbaa !5
  %74 = sext i8 %73 to i32
  %75 = icmp eq i32 %74, 47
  br i1 %75, label %76, label %113

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %77

77:                                               ; preds = %106, %76
  %78 = load i32, ptr %7, align 4, !tbaa !8
  %79 = load i32, ptr @n, align 4, !tbaa !8
  %80 = icmp sle i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %109

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %83 = load i32, ptr %7, align 4, !tbaa !8
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %8, align 4, !tbaa !8
  br label %85

85:                                               ; preds = %102, %82
  %86 = load i32, ptr %8, align 4, !tbaa !8
  %87 = load i32, ptr @n, align 4, !tbaa !8
  %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 %8) #7
  br label %105

90:                                               ; preds = %85
  %91 = load i32, ptr %8, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = load i32, ptr %7, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = load i64, ptr @t, align 8, !tbaa !10
  %96 = mul nsw i64 %94, %95
  %97 = icmp eq i64 %92, %96
  br i1 %97, label %98, label %101

98:                                               ; preds = %90
  %99 = load i32, ptr %6, align 4, !tbaa !8
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %6, align 4, !tbaa !8
  br label %101

101:                                              ; preds = %98, %90
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %8, align 4, !tbaa !8
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %8, align 4, !tbaa !8
  br label %85, !llvm.loop !15

105:                                              ; preds = %89
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %7, align 4, !tbaa !8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %7, align 4, !tbaa !8
  br label %77, !llvm.loop !16

109:                                              ; preds = %81
  %110 = load i32, ptr %6, align 4, !tbaa !8
  %111 = shl i32 %110, 1
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %111)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %402

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

114:                                              ; preds = %127, %113
  %115 = load i32, ptr %9, align 4, !tbaa !8
  %116 = load i32, ptr @m, align 4, !tbaa !8
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %130

119:                                              ; preds = %114
  %120 = load i32, ptr %9, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr @posx, i64 %121
  %123 = load i32, ptr %9, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr @posy, i64 %124
  %126 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %122, ptr noundef %125)
  br label %127

127:                                              ; preds = %119
  %128 = load i32, ptr %9, align 4, !tbaa !8
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !8
  br label %114, !llvm.loop !17

130:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %131 = load i32, ptr @m, align 4, !tbaa !8
  %132 = shl i32 1, %131
  %133 = sub nsw i32 %132, 1
  store i32 %133, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %206, %130
  %135 = load i32, ptr %11, align 4, !tbaa !8
  %136 = load i32, ptr %10, align 4, !tbaa !8
  %137 = icmp sle i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %209

139:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 -1, ptr %13, align 4, !tbaa !8
  br label %140

140:                                              ; preds = %201, %139
  %141 = load i32, ptr %12, align 4, !tbaa !8
  %142 = load i32, ptr @m, align 4, !tbaa !8
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 20, ptr %4, align 4
  br label %204

145:                                              ; preds = %140
  %146 = load i32, ptr %11, align 4, !tbaa !8
  %147 = load i32, ptr %12, align 4, !tbaa !8
  %148 = shl i32 1, %147
  %149 = and i32 %146, %148
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %152, label %151

151:                                              ; preds = %145
  br label %201

152:                                              ; preds = %145
  %153 = load i32, ptr %11, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [1024 x i32], ptr @sz, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !8
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %155, align 4, !tbaa !8
  %158 = load i32, ptr %13, align 4, !tbaa !8
  %159 = icmp eq i32 %158, -1
  br i1 %159, label %160, label %175

160:                                              ; preds = %152
  %161 = load i32, ptr %11, align 4, !tbaa !8
  %162 = load i32, ptr %12, align 4, !tbaa !8
  %163 = shl i32 1, %162
  %164 = xor i32 %161, %163
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %165
  %167 = load i8, ptr %166, align 1, !tbaa !18, !range !20, !noundef !21
  %168 = trunc i8 %167 to i1
  br i1 %168, label %169, label %173

169:                                              ; preds = %160
  %170 = load i32, ptr %11, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %171
  store i8 1, ptr %172, align 1, !tbaa !18
  store i32 20, ptr %4, align 4
  br label %204

173:                                              ; preds = %160
  %174 = load i32, ptr %12, align 4, !tbaa !8
  store i32 %174, ptr %13, align 4, !tbaa !8
  br label %200

175:                                              ; preds = %152
  %176 = load i32, ptr %13, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [10 x i32], ptr @posx, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !8
  %180 = load i32, ptr %12, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [10 x i32], ptr @posx, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !8
  %184 = icmp eq i32 %179, %183
  br i1 %184, label %195, label %185

185:                                              ; preds = %175
  %186 = load i32, ptr %13, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [10 x i32], ptr @posy, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !8
  %190 = load i32, ptr %12, align 4, !tbaa !8
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [10 x i32], ptr @posy, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !8
  %194 = icmp eq i32 %189, %193
  br i1 %194, label %195, label %199

195:                                              ; preds = %185, %175
  %196 = load i32, ptr %11, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %197
  store i8 1, ptr %198, align 1, !tbaa !18
  store i32 20, ptr %4, align 4
  br label %204

199:                                              ; preds = %185
  br label %200

200:                                              ; preds = %199, %173
  br label %201

201:                                              ; preds = %200, %151
  %202 = load i32, ptr %12, align 4, !tbaa !8
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %12, align 4, !tbaa !8
  br label %140, !llvm.loop !22

204:                                              ; preds = %195, %169, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %11, align 4, !tbaa !8
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %11, align 4, !tbaa !8
  br label %134, !llvm.loop !23

209:                                              ; preds = %138
  %210 = load i32, ptr @cur, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %211
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  %213 = load i8, ptr @op, align 1, !tbaa !5
  %214 = sext i8 %213 to i32
  %215 = icmp eq i32 %214, 42
  %216 = zext i1 %215 to i8
  store i8 %216, ptr %17, align 1, !tbaa !18
  %217 = call i64 @_ZSt9make_pairIibESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
  %218 = trunc i64 %217 to i40
  store i40 %218, ptr %15, align 4
  call void @_ZNSt4pairIixEC2IibTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(5) %15)
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %212, ptr noundef nonnull align 8 dereferenceable(16) %14)
  store i64 1, ptr %219, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !8
  br label %220

220:                                              ; preds = %387, %209
  %221 = load i32, ptr %18, align 4, !tbaa !8
  %222 = load i32, ptr @n, align 4, !tbaa !8
  %223 = icmp sle i32 %221, %222
  br i1 %223, label %225, label %224

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

225:                                              ; preds = %220
  %226 = load i32, ptr @pre, align 4, !tbaa !8
  %227 = xor i32 %226, 1
  store i32 %227, ptr @pre, align 4, !tbaa !8
  %228 = load i32, ptr @cur, align 4, !tbaa !8
  %229 = xor i32 %228, 1
  store i32 %229, ptr @cur, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #7
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #7
  %230 = load i32, ptr @cur, align 4, !tbaa !8
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %231
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(48) %232) #7
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #7
  %233 = load i8, ptr @op, align 1, !tbaa !5
  %234 = sext i8 %233 to i32
  %235 = icmp eq i32 %234, 42
  %236 = zext i1 %235 to i64
  store i64 %236, ptr @pw, align 16, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !8
  br label %237

237:                                              ; preds = %269, %225
  %238 = load i32, ptr %20, align 4, !tbaa !8
  %239 = load i32, ptr @m, align 4, !tbaa !8
  %240 = icmp sle i32 %238, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %237
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %272

242:                                              ; preds = %237
  %243 = load i8, ptr @op, align 1, !tbaa !5
  %244 = sext i8 %243 to i32
  %245 = icmp eq i32 %244, 42
  br i1 %245, label %246, label %255

246:                                              ; preds = %242
  %247 = load i32, ptr %20, align 4, !tbaa !8
  %248 = sub nsw i32 %247, 1
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !10
  %252 = load i32, ptr %18, align 4, !tbaa !8
  %253 = sext i32 %252 to i64
  %254 = mul nsw i64 %251, %253
  br label %264

255:                                              ; preds = %242
  %256 = load i32, ptr %20, align 4, !tbaa !8
  %257 = sub nsw i32 %256, 1
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %258
  %260 = load i64, ptr %259, align 8, !tbaa !10
  %261 = load i32, ptr %18, align 4, !tbaa !8
  %262 = sext i32 %261 to i64
  %263 = add nsw i64 %260, %262
  br label %264

264:                                              ; preds = %255, %246
  %265 = phi i64 [ %254, %246 ], [ %263, %255 ]
  %266 = load i32, ptr %20, align 4, !tbaa !8
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %267
  store i64 %265, ptr %268, align 8, !tbaa !10
  br label %269

269:                                              ; preds = %264
  %270 = load i32, ptr %20, align 4, !tbaa !8
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %20, align 4, !tbaa !8
  br label %237, !llvm.loop !24

272:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %273 = load i32, ptr @pre, align 4, !tbaa !8
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %274
  %276 = call ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %275) #7
  %277 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %276, ptr %277, align 8
  br label %278

278:                                              ; preds = %384, %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %279 = load i32, ptr @pre, align 4, !tbaa !8
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %280
  %282 = call ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %281) #7
  %283 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %22, i32 0, i32 0
  store ptr %282, ptr %283, align 8
  %284 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br i1 %284, label %286, label %285

285:                                              ; preds = %278
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %386

286:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  %287 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %288 = getelementptr inbounds %"struct.std::pair.2", ptr %287, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %288, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %289 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %290 = getelementptr inbounds %"struct.std::pair.2", ptr %289, i32 0, i32 1
  %291 = load i64, ptr %290, align 8, !tbaa !25
  store i64 %291, ptr %24, align 8, !tbaa !10
  %292 = load i64, ptr %24, align 8, !tbaa !10
  %293 = load i32, ptr @cur, align 4, !tbaa !8
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %294
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %295, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %297 = load i64, ptr %296, align 8, !tbaa !10
  %298 = add nsw i64 %297, %292
  store i64 %298, ptr %296, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %299 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 0
  %300 = load i32, ptr %299, align 8, !tbaa !28
  %301 = load i32, ptr %10, align 4, !tbaa !8
  %302 = xor i32 %300, %301
  store i32 %302, ptr %25, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %303 = load i32, ptr %25, align 4, !tbaa !8
  store i32 %303, ptr %26, align 4, !tbaa !8
  br label %304

304:                                              ; preds = %378, %286
  %305 = load i32, ptr %26, align 4, !tbaa !8
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %308, label %307

307:                                              ; preds = %304
  store i32 32, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %383

308:                                              ; preds = %304
  %309 = load i32, ptr %26, align 4, !tbaa !8
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %310
  %312 = load i8, ptr %311, align 1, !tbaa !18, !range !20, !noundef !21
  %313 = trunc i8 %312 to i1
  br i1 %313, label %314, label %315

314:                                              ; preds = %308
  br label %378

315:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %316 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 0
  %317 = load i32, ptr %316, align 8, !tbaa !28
  %318 = load i32, ptr %26, align 4, !tbaa !8
  %319 = or i32 %317, %318
  store i32 %319, ptr %28, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %320 = load i8, ptr @op, align 1, !tbaa !5
  %321 = sext i8 %320 to i32
  %322 = icmp eq i32 %321, 42
  br i1 %322, label %323, label %334

323:                                              ; preds = %315
  %324 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 1
  %325 = load i64, ptr %324, align 8, !tbaa !29
  %326 = load i32, ptr %26, align 4, !tbaa !8
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [1024 x i32], ptr @sz, i64 0, i64 %327
  %329 = load i32, ptr %328, align 4, !tbaa !8
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %330
  %332 = load i64, ptr %331, align 8, !tbaa !10
  %333 = mul nsw i64 %325, %332
  br label %345

334:                                              ; preds = %315
  %335 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 1
  %336 = load i64, ptr %335, align 8, !tbaa !29
  %337 = load i32, ptr %26, align 4, !tbaa !8
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [1024 x i32], ptr @sz, i64 0, i64 %338
  %340 = load i32, ptr %339, align 4, !tbaa !8
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %341
  %343 = load i64, ptr %342, align 8, !tbaa !10
  %344 = add nsw i64 %336, %343
  br label %345

345:                                              ; preds = %334, %323
  %346 = phi i64 [ %333, %323 ], [ %344, %334 ]
  store i64 %346, ptr %29, align 8, !tbaa !10
  %347 = call { i32, i64 } @_ZSt9make_pairIixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %348 = getelementptr inbounds { i32, i64 }, ptr %27, i32 0, i32 0
  %349 = extractvalue { i32, i64 } %347, 0
  store i32 %349, ptr %348, align 8
  %350 = getelementptr inbounds { i32, i64 }, ptr %27, i32 0, i32 1
  %351 = extractvalue { i32, i64 } %347, 1
  store i64 %351, ptr %350, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %352 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 1
  %353 = load i64, ptr %352, align 8, !tbaa !29
  %354 = load i64, ptr @t, align 8, !tbaa !10
  %355 = icmp sgt i64 %353, %354
  br i1 %355, label %366, label %356

356:                                              ; preds = %345
  %357 = load i8, ptr @op, align 1, !tbaa !5
  %358 = sext i8 %357 to i32
  %359 = icmp eq i32 %358, 42
  br i1 %359, label %360, label %367

360:                                              ; preds = %356
  %361 = load i64, ptr @t, align 8, !tbaa !10
  %362 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 1
  %363 = load i64, ptr %362, align 8, !tbaa !29
  %364 = srem i64 %361, %363
  %365 = icmp ne i64 %364, 0
  br i1 %365, label %366, label %367

366:                                              ; preds = %360, %345
  store i32 34, ptr %4, align 4
  br label %375

367:                                              ; preds = %360, %356
  %368 = load i64, ptr %24, align 8, !tbaa !10
  %369 = load i32, ptr @cur, align 4, !tbaa !8
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %370
  %372 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %371, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %373 = load i64, ptr %372, align 8, !tbaa !10
  %374 = add nsw i64 %373, %368
  store i64 %374, ptr %372, align 8, !tbaa !10
  store i32 0, ptr %4, align 4
  br label %375

375:                                              ; preds = %367, %366
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  %376 = load i32, ptr %4, align 4
  switch i32 %376, label %404 [
    i32 0, label %377
    i32 34, label %378
  ]

377:                                              ; preds = %375
  br label %378

378:                                              ; preds = %377, %375, %314
  %379 = load i32, ptr %26, align 4, !tbaa !8
  %380 = sub nsw i32 %379, 1
  %381 = load i32, ptr %25, align 4, !tbaa !8
  %382 = and i32 %380, %381
  store i32 %382, ptr %26, align 4, !tbaa !8
  br label %304, !llvm.loop !30

383:                                              ; preds = %307
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %384

384:                                              ; preds = %383
  %385 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %278, !llvm.loop !31

386:                                              ; preds = %285
  br label %387

387:                                              ; preds = %386
  %388 = load i32, ptr %18, align 4, !tbaa !8
  %389 = add nsw i32 %388, 1
  store i32 %389, ptr %18, align 4, !tbaa !8
  br label %220, !llvm.loop !32

390:                                              ; preds = %224
  %391 = load i32, ptr @cur, align 4, !tbaa !8
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %392
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  %394 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 8 dereferenceable(8) @t)
  %395 = getelementptr inbounds { i32, i64 }, ptr %30, i32 0, i32 0
  %396 = extractvalue { i32, i64 } %394, 0
  store i32 %396, ptr %395, align 8
  %397 = getelementptr inbounds { i32, i64 }, ptr %30, i32 0, i32 1
  %398 = extractvalue { i32, i64 } %394, 1
  store i64 %398, ptr %397, align 8
  %399 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %393, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %400 = load i64, ptr %399, align 8, !tbaa !10
  %401 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %400)
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %402

402:                                              ; preds = %390, %109, %68
  %403 = load i32, ptr %1, align 4
  ret i32 %403

404:                                              ; preds = %375
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

declare i32 @printf(ptr noundef, ...) #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !6, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = !{!26, !11, i64 16}
!26 = !{!"_ZTSSt4pairIKS_IixExE", !27, i64 0, !11, i64 16}
!27 = !{!"_ZTSSt4pairIixE", !9, i64 0, !11, i64 8}
!28 = !{!27, !9, i64 0}
!29 = !{!27, !11, i64 8}
!30 = distinct !{!30, !13}
!31 = distinct !{!31, !13}
!32 = distinct !{!32, !13}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, long long>, std::pair<const std::pair<int, long long>, long long>, std::_Select1st<std::pair<const std::pair<int, long long>, long long>>, std::less<std::pair<int, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, long long>, std::pair<const std::pair<int, long long>, long long>, std::_Select1st<std::pair<const std::pair<int, long long>, long long>>, std::less<std::pair<int, long long>>>::_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 { i32, i64 }
%"struct.std::pair.0" = type <{ i32, i8, [3 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@posx = external dso_local global [10 x i32], align 16
@posy = external dso_local global [10 x i32], align 16
@sz = external dso_local local_unnamed_addr global [1024 x i32], align 16
@pre = external dso_local local_unnamed_addr global i32, align 4
@cur = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local global i64, align 8
@pw = external dso_local local_unnamed_addr global [11 x i64], align 16
@op = external dso_local global i8, align 1
@f = external dso_local global [2 x %"class.std::map"], align 16
@ban = external dso_local local_unnamed_addr global [1024 x i8], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::map", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @t, ptr noundef nonnull @op)
  %15 = load i8, ptr @op, align 1, !tbaa !5
  switch i8 %15, label %.preheader88 [
    i8 45, label %.preheader90
    i8 47, label %.preheader92
  ]

.preheader92:                                     ; preds = %0
  %16 = load i32, ptr @n, align 4, !tbaa !8
  %.not8398 = icmp slt i32 %16, 1
  br i1 %.not8398, label %._crit_edge, label %.lr.ph101

.lr.ph101:                                        ; preds = %.preheader92
  %17 = load i64, ptr @t, align 8
  %18 = add nuw i32 %16, 1
  %19 = zext nneg i32 %16 to i64
  %wide.trip.count = zext i32 %18 to i64
  %20 = add nsw i32 %16, -2
  br label %48

.preheader90:                                     ; preds = %0
  %21 = load i32, ptr @n, align 4, !tbaa !8
  %.not85109 = icmp slt i32 %21, 1
  br i1 %.not85109, label %._crit_edge113, label %.lr.ph112

.lr.ph112:                                        ; preds = %.preheader90
  %22 = load i64, ptr @t, align 8
  %23 = add nuw i32 %21, 1
  %24 = zext nneg i32 %21 to i64
  %wide.trip.count163 = zext i32 %23 to i64
  %25 = add nsw i32 %21, -2
  br label %30

.preheader88:                                     ; preds = %0
  %26 = load i32, ptr @m, align 4, !tbaa !8
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph116, label %._crit_edge117

.loopexit89:                                      ; preds = %scalar.ph198, %middle.block197, %30
  %.1.lcssa = phi i32 [ %.060111, %30 ], [ %43, %middle.block197 ], [ %spec.select, %scalar.ph198 ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond164.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count163
  %indvar.next196 = add i32 %indvar195, 1
  br i1 %exitcond164.not, label %._crit_edge113.loopexit, label %30, !llvm.loop !10

._crit_edge113.loopexit:                          ; preds = %.loopexit89
  %28 = shl i32 %.1.lcssa, 1
  br label %._crit_edge113

._crit_edge113:                                   ; preds = %._crit_edge113.loopexit, %.preheader90
  %.060.lcssa = phi i32 [ 0, %.preheader90 ], [ %28, %._crit_edge113.loopexit ]
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.060.lcssa)
  br label %233

30:                                               ; preds = %.lr.ph112, %.loopexit89
  %indvar195 = phi i32 [ 0, %.lr.ph112 ], [ %indvar.next196, %.loopexit89 ]
  %indvars.iv160 = phi i64 [ 1, %.lr.ph112 ], [ %indvars.iv.next161, %.loopexit89 ]
  %indvars.iv153 = phi i64 [ 2, %.lr.ph112 ], [ %indvars.iv.next154, %.loopexit89 ]
  %.060111 = phi i32 [ 0, %.lr.ph112 ], [ %.1.lcssa, %.loopexit89 ]
  %31 = sub i32 %25, %indvar195
  %32 = zext i32 %31 to i64
  %33 = add nuw nsw i64 %32, 1
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %.not86103.not = icmp ult i64 %indvars.iv160, %24
  br i1 %.not86103.not, label %.lr.ph107, label %.loopexit89

.lr.ph107:                                        ; preds = %30
  %34 = add nsw i64 %22, %indvars.iv160
  %min.iters.check199 = icmp ult i32 %31, 7
  br i1 %min.iters.check199, label %scalar.ph198.preheader, label %vector.ph200

vector.ph200:                                     ; preds = %.lr.ph107
  %n.vec202 = and i64 %33, 8589934584
  %ind.end203 = add nuw i64 %indvars.iv153, %n.vec202
  %.splatinsert207 = insertelement <4 x i64> poison, i64 %indvars.iv153, i64 0
  %.splat208 = shufflevector <4 x i64> %.splatinsert207, <4 x i64> poison, <4 x i32> zeroinitializer
  %induction209 = add nuw <4 x i64> %.splat208, <i64 0, i64 1, i64 2, i64 3>
  %35 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.060111, i64 0
  %broadcast.splatinsert216 = insertelement <4 x i64> poison, i64 %34, i64 0
  %broadcast.splat217 = shufflevector <4 x i64> %broadcast.splatinsert216, <4 x i64> poison, <4 x i32> zeroinitializer
  br label %vector.body205

vector.body205:                                   ; preds = %vector.body205, %vector.ph200
  %index206 = phi i64 [ 0, %vector.ph200 ], [ %index.next218, %vector.body205 ]
  %vec.ind210 = phi <4 x i64> [ %induction209, %vector.ph200 ], [ %vec.ind.next213, %vector.body205 ]
  %vec.phi214 = phi <4 x i32> [ %35, %vector.ph200 ], [ %40, %vector.body205 ]
  %vec.phi215 = phi <4 x i32> [ zeroinitializer, %vector.ph200 ], [ %41, %vector.body205 ]
  %step.add211 = add <4 x i64> %vec.ind210, <i64 4, i64 4, i64 4, i64 4>
  %36 = icmp eq <4 x i64> %broadcast.splat217, %vec.ind210
  %37 = icmp eq <4 x i64> %broadcast.splat217, %step.add211
  %38 = zext <4 x i1> %36 to <4 x i32>
  %39 = zext <4 x i1> %37 to <4 x i32>
  %40 = add <4 x i32> %vec.phi214, %38
  %41 = add <4 x i32> %vec.phi215, %39
  %index.next218 = add nuw i64 %index206, 8
  %vec.ind.next213 = add <4 x i64> %vec.ind210, <i64 8, i64 8, i64 8, i64 8>
  %42 = icmp eq i64 %index.next218, %n.vec202
  br i1 %42, label %middle.block197, label %vector.body205, !llvm.loop !12

middle.block197:                                  ; preds = %vector.body205
  %bin.rdx219 = add <4 x i32> %41, %40
  %43 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx219)
  %cmp.n220 = icmp eq i64 %33, %n.vec202
  br i1 %cmp.n220, label %.loopexit89, label %scalar.ph198.preheader

scalar.ph198.preheader:                           ; preds = %middle.block197, %.lr.ph107
  %indvars.iv155.ph = phi i64 [ %indvars.iv153, %.lr.ph107 ], [ %ind.end203, %middle.block197 ]
  %.1105.ph = phi i32 [ %.060111, %.lr.ph107 ], [ %43, %middle.block197 ]
  br label %scalar.ph198

scalar.ph198:                                     ; preds = %scalar.ph198.preheader, %scalar.ph198
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %scalar.ph198 ], [ %indvars.iv155.ph, %scalar.ph198.preheader ]
  %.1105 = phi i32 [ %spec.select, %scalar.ph198 ], [ %.1105.ph, %scalar.ph198.preheader ]
  %44 = icmp eq i64 %34, %indvars.iv155
  %45 = zext i1 %44 to i32
  %spec.select = add nsw i32 %.1105, %45
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %lftr.wideiv158 = trunc i64 %indvars.iv.next156 to i32
  %exitcond159.not = icmp eq i32 %23, %lftr.wideiv158
  br i1 %exitcond159.not, label %.loopexit89, label %scalar.ph198, !llvm.loop !15

.loopexit91:                                      ; preds = %scalar.ph, %middle.block, %48
  %.171.lcssa = phi i32 [ %.07099, %48 ], [ %61, %middle.block ], [ %spec.select87, %scalar.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next150, %wide.trip.count
  %indvar.next = add i32 %indvar, 1
  br i1 %exitcond152.not, label %._crit_edge.loopexit, label %48, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %.loopexit91
  %46 = shl i32 %.171.lcssa, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader92
  %.070.lcssa = phi i32 [ 0, %.preheader92 ], [ %46, %._crit_edge.loopexit ]
  %47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.070.lcssa)
  br label %233

48:                                               ; preds = %.lr.ph101, %.loopexit91
  %indvar = phi i32 [ 0, %.lr.ph101 ], [ %indvar.next, %.loopexit91 ]
  %indvars.iv149 = phi i64 [ 1, %.lr.ph101 ], [ %indvars.iv.next150, %.loopexit91 ]
  %indvars.iv = phi i64 [ 2, %.lr.ph101 ], [ %indvars.iv.next, %.loopexit91 ]
  %.07099 = phi i32 [ 0, %.lr.ph101 ], [ %.171.lcssa, %.loopexit91 ]
  %49 = sub i32 %20, %indvar
  %50 = zext i32 %49 to i64
  %51 = add nuw nsw i64 %50, 1
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %.not8495.not = icmp ult i64 %indvars.iv149, %19
  br i1 %.not8495.not, label %.lr.ph, label %.loopexit91

.lr.ph:                                           ; preds = %48
  %52 = mul nsw i64 %17, %indvars.iv149
  %min.iters.check = icmp ult i32 %49, 7
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %51, 8589934584
  %ind.end = add nuw i64 %indvars.iv, %n.vec
  %.splatinsert = insertelement <4 x i64> poison, i64 %indvars.iv, i64 0
  %.splat = shufflevector <4 x i64> %.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  %induction = add nuw <4 x i64> %.splat, <i64 0, i64 1, i64 2, i64 3>
  %53 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.07099, i64 0
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %52, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %53, %vector.ph ], [ %58, %vector.body ]
  %vec.phi194 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %59, %vector.body ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %54 = icmp eq <4 x i64> %broadcast.splat, %vec.ind
  %55 = icmp eq <4 x i64> %broadcast.splat, %step.add
  %56 = zext <4 x i1> %54 to <4 x i32>
  %57 = zext <4 x i1> %55 to <4 x i32>
  %58 = add <4 x i32> %vec.phi, %56
  %59 = add <4 x i32> %vec.phi194, %57
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %60 = icmp eq i64 %index.next, %n.vec
  br i1 %60, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %59, %58
  %61 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %51, %n.vec
  br i1 %cmp.n, label %.loopexit91, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv146.ph = phi i64 [ %indvars.iv, %.lr.ph ], [ %ind.end, %middle.block ]
  %.17196.ph = phi i32 [ %.07099, %.lr.ph ], [ %61, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %scalar.ph ], [ %indvars.iv146.ph, %scalar.ph.preheader ]
  %.17196 = phi i32 [ %spec.select87, %scalar.ph ], [ %.17196.ph, %scalar.ph.preheader ]
  %62 = icmp eq i64 %52, %indvars.iv146
  %63 = zext i1 %62 to i32
  %spec.select87 = add nsw i32 %.17196, %63
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next147 to i32
  %exitcond.not = icmp eq i32 %18, %lftr.wideiv
  br i1 %exitcond.not, label %.loopexit91, label %scalar.ph, !llvm.loop !18

._crit_edge117:                                   ; preds = %.lr.ph116, %.preheader88
  %.lcssa94 = phi i32 [ %26, %.preheader88 ], [ %101, %.lr.ph116 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %notmask = shl nsw i32 -1, %.lcssa94
  %64 = xor i32 %notmask, -1
  store i32 %64, ptr %1, align 4, !tbaa !8
  %65 = icmp sgt i32 %.lcssa94, 0
  br i1 %65, label %.preheader.us.preheader, label %._crit_edge125

.preheader.us.preheader:                          ; preds = %._crit_edge117
  %umax = tail call i32 @llvm.umax.i32(i32 %64, i32 1)
  %66 = add nuw i32 %umax, 1
  %wide.trip.count176 = zext i32 %66 to i64
  %wide.trip.count171 = zext nneg i32 %.lcssa94 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %..loopexit_crit_edge.us
  %indvars.iv173 = phi i64 [ 1, %.preheader.us.preheader ], [ %indvars.iv.next174, %..loopexit_crit_edge.us ]
  %67 = getelementptr inbounds [1024 x i32], ptr @sz, i64 0, i64 %indvars.iv173
  %68 = trunc nuw nsw i64 %indvars.iv173 to i32
  br label %69

69:                                               ; preds = %.preheader.us, %97
  %indvars.iv168 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next169, %97 ]
  %.063120.us = phi i32 [ -1, %.preheader.us ], [ %.164.us, %97 ]
  %70 = trunc nuw nsw i64 %indvars.iv168 to i32
  %71 = shl nuw i32 1, %70
  %72 = and i32 %71, %68
  %.not82.us = icmp eq i32 %72, 0
  br i1 %.not82.us, label %97, label %73

73:                                               ; preds = %69
  %74 = load i32, ptr %67, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %67, align 4, !tbaa !8
  %76 = icmp eq i32 %.063120.us, -1
  br i1 %76, label %90, label %77

77:                                               ; preds = %73
  %78 = sext i32 %.063120.us to i64
  %79 = getelementptr inbounds [10 x i32], ptr @posx, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !8
  %81 = getelementptr inbounds [10 x i32], ptr @posx, i64 0, i64 %indvars.iv168
  %82 = load i32, ptr %81, align 4, !tbaa !8
  %83 = icmp eq i32 %80, %82
  br i1 %83, label %..loopexit_crit_edge.us.sink.split, label %84

84:                                               ; preds = %77
  %85 = getelementptr inbounds [10 x i32], ptr @posy, i64 0, i64 %78
  %86 = load i32, ptr %85, align 4, !tbaa !8
  %87 = getelementptr inbounds [10 x i32], ptr @posy, i64 0, i64 %indvars.iv168
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = icmp eq i32 %86, %88
  br i1 %89, label %..loopexit_crit_edge.us.sink.split, label %97

90:                                               ; preds = %73
  %91 = xor i32 %71, %68
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !19, !range !21, !noundef !22
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %..loopexit_crit_edge.us.sink.split, label %97

..loopexit_crit_edge.us.sink.split:               ; preds = %90, %77, %84
  %96 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %indvars.iv173
  store i8 1, ptr %96, align 1, !tbaa !19
  br label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %97, %..loopexit_crit_edge.us.sink.split
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %exitcond177.not = icmp eq i64 %indvars.iv.next174, %wide.trip.count176
  br i1 %exitcond177.not, label %._crit_edge125, label %.preheader.us, !llvm.loop !23

97:                                               ; preds = %90, %84, %69
  %.164.us = phi i32 [ %.063120.us, %84 ], [ %.063120.us, %69 ], [ %70, %90 ]
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond172.not = icmp eq i64 %indvars.iv.next169, %wide.trip.count171
  br i1 %exitcond172.not, label %..loopexit_crit_edge.us, label %69, !llvm.loop !24

.lr.ph116:                                        ; preds = %.preheader88, %.lr.ph116
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %.lr.ph116 ], [ 0, %.preheader88 ]
  %98 = getelementptr inbounds i32, ptr @posx, i64 %indvars.iv165
  %99 = getelementptr inbounds i32, ptr @posy, i64 %indvars.iv165
  %100 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %98, ptr noundef nonnull %99)
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %101 = load i32, ptr @m, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv.next166, %102
  br i1 %103, label %.lr.ph116, label %._crit_edge117, !llvm.loop !25

._crit_edge125:                                   ; preds = %..loopexit_crit_edge.us, %._crit_edge117
  %104 = load i32, ptr @cur, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %105
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  %107 = load i8, ptr @op, align 1, !tbaa !5
  %108 = icmp eq i8 %107, 42
  %109 = zext i1 %108 to i8
  store i8 %109, ptr %5, align 1, !tbaa !19
  %110 = call i64 @_ZSt9make_pairIibESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %111 = trunc i64 %110 to i40
  store i40 %111, ptr %3, align 8
  call void @_ZNSt4pairIixEC2IibTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(5) %3)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr noundef nonnull align 8 dereferenceable(16) %2)
  store i64 1, ptr %112, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  %113 = load i32, ptr @n, align 4, !tbaa !8
  %.not78139 = icmp slt i32 %113, 1
  br i1 %.not78139, label %._crit_edge143, label %.lr.ph142

.lr.ph142:                                        ; preds = %._crit_edge125
  %114 = getelementptr inbounds i8, ptr %9, i64 8
  %115 = getelementptr inbounds i8, ptr %10, i64 8
  br label %126

._crit_edge143:                                   ; preds = %._crit_edge138, %._crit_edge125
  %116 = load i32, ptr @cur, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %117
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %119 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 8 dereferenceable(8) @t)
  %120 = extractvalue { i32, i64 } %119, 0
  store i32 %120, ptr %13, align 8
  %121 = getelementptr inbounds i8, ptr %13, i64 8
  %122 = extractvalue { i32, i64 } %119, 1
  store i64 %122, ptr %121, align 8
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %118, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %124 = load i64, ptr %123, align 8, !tbaa !26
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %124)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %233

126:                                              ; preds = %.lr.ph142, %._crit_edge138
  %indvars.iv188 = phi i64 [ 1, %.lr.ph142 ], [ %indvars.iv.next189, %._crit_edge138 ]
  %127 = load i32, ptr @pre, align 4, !tbaa !8
  %128 = xor i32 %127, 1
  store i32 %128, ptr @pre, align 4, !tbaa !8
  %129 = load i32, ptr @cur, align 4, !tbaa !8
  %130 = xor i32 %129, 1
  store i32 %130, ptr @cur, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  %131 = load i32, ptr @cur, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %132
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %133) #8
  call void @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  %134 = load i8, ptr @op, align 1, !tbaa !5
  %135 = icmp eq i8 %134, 42
  %136 = zext i1 %135 to i64
  store i64 %136, ptr @pw, align 16, !tbaa !26
  %137 = load i32, ptr @m, align 4, !tbaa !8
  %.not79126 = icmp slt i32 %137, 1
  br i1 %.not79126, label %._crit_edge130, label %.lr.ph129

.lr.ph129:                                        ; preds = %126
  %138 = add nuw i32 %137, 1
  %wide.trip.count186 = zext i32 %138 to i64
  br i1 %135, label %.lr.ph129.split.us.preheader, label %.lr.ph129.split.preheader

.lr.ph129.split.us.preheader:                     ; preds = %.lr.ph129
  %139 = zext nneg i32 %137 to i64
  %140 = add nsw i64 %wide.trip.count186, -2
  %xtraiter = and i64 %139, 3
  %141 = icmp ult i64 %140, 3
  br i1 %141, label %._crit_edge130.loopexit.unr-lcssa, label %.lr.ph129.split.us.preheader.new

.lr.ph129.split.us.preheader.new:                 ; preds = %.lr.ph129.split.us.preheader
  %unroll_iter = and i64 %139, 2147483644
  br label %.lr.ph129.split.us

.lr.ph129.split.preheader:                        ; preds = %.lr.ph129
  %142 = zext nneg i32 %137 to i64
  %min.iters.check224 = icmp ult i32 %137, 4
  br i1 %min.iters.check224, label %.lr.ph129.split.preheader247, label %vector.ph225

.lr.ph129.split.preheader247:                     ; preds = %middle.block222, %.lr.ph129.split.preheader
  %.ph = phi i64 [ 0, %.lr.ph129.split.preheader ], [ %ind.end228, %middle.block222 ]
  %indvars.iv178.ph = phi i64 [ 1, %.lr.ph129.split.preheader ], [ %ind.end230, %middle.block222 ]
  br label %.lr.ph129.split

vector.ph225:                                     ; preds = %.lr.ph129.split.preheader
  %n.vec227 = and i64 %142, 2147483644
  %ind.end228 = mul i64 %n.vec227, %indvars.iv188
  %ind.end230 = or disjoint i64 %n.vec227, 1
  %.splatinsert234 = insertelement <2 x i64> poison, i64 %indvars.iv188, i64 0
  %.splat235 = shufflevector <2 x i64> %.splatinsert234, <2 x i64> poison, <2 x i32> zeroinitializer
  %143 = mul nuw <2 x i64> %.splat235, <i64 0, i64 1>
  %144 = shl nuw i64 %indvars.iv188, 1
  %.splatinsert237 = insertelement <2 x i64> poison, i64 %144, i64 0
  %.splat238 = shufflevector <2 x i64> %.splatinsert237, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert243 = insertelement <2 x i64> poison, i64 %indvars.iv188, i64 0
  %broadcast.splat244 = shufflevector <2 x i64> %broadcast.splatinsert243, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body232

vector.body232:                                   ; preds = %vector.body232, %vector.ph225
  %index233 = phi i64 [ 0, %vector.ph225 ], [ %index.next245, %vector.body232 ]
  %vec.ind239 = phi <2 x i64> [ %143, %vector.ph225 ], [ %vec.ind.next242, %vector.body232 ]
  %step.add240 = add <2 x i64> %vec.ind239, %.splat238
  %offset.idx = or disjoint i64 %index233, 1
  %145 = add nuw nsw <2 x i64> %vec.ind239, %broadcast.splat244
  %146 = add nuw nsw <2 x i64> %step.add240, %broadcast.splat244
  %147 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %offset.idx
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  store <2 x i64> %145, ptr %147, align 8, !tbaa !26
  store <2 x i64> %146, ptr %148, align 8, !tbaa !26
  %index.next245 = add nuw i64 %index233, 4
  %vec.ind.next242 = add <2 x i64> %step.add240, %.splat238
  %149 = icmp eq i64 %index.next245, %n.vec227
  br i1 %149, label %middle.block222, label %vector.body232, !llvm.loop !28

middle.block222:                                  ; preds = %vector.body232
  %cmp.n246 = icmp eq i64 %n.vec227, %142
  br i1 %cmp.n246, label %._crit_edge130, label %.lr.ph129.split.preheader247

.lr.ph129.split.us:                               ; preds = %.lr.ph129.split.us, %.lr.ph129.split.us.preheader.new
  %150 = phi i64 [ 1, %.lr.ph129.split.us.preheader.new ], [ %157, %.lr.ph129.split.us ]
  %indvars.iv183 = phi i64 [ 1, %.lr.ph129.split.us.preheader.new ], [ %indvars.iv.next184.3, %.lr.ph129.split.us ]
  %niter = phi i64 [ 0, %.lr.ph129.split.us.preheader.new ], [ %niter.next.3, %.lr.ph129.split.us ]
  %151 = mul nuw nsw i64 %150, %indvars.iv188
  %152 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv183
  store i64 %151, ptr %152, align 8, !tbaa !26
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %153 = mul nuw nsw i64 %151, %indvars.iv188
  %154 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv.next184
  store i64 %153, ptr %154, align 8, !tbaa !26
  %indvars.iv.next184.1 = add nuw nsw i64 %indvars.iv183, 2
  %155 = mul nuw nsw i64 %153, %indvars.iv188
  %156 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv.next184.1
  store i64 %155, ptr %156, align 8, !tbaa !26
  %indvars.iv.next184.2 = add nuw nsw i64 %indvars.iv183, 3
  %157 = mul nuw nsw i64 %155, %indvars.iv188
  %158 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv.next184.2
  store i64 %157, ptr %158, align 8, !tbaa !26
  %indvars.iv.next184.3 = add nuw nsw i64 %indvars.iv183, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge130.loopexit.unr-lcssa, label %.lr.ph129.split.us, !llvm.loop !29

._crit_edge130.loopexit.unr-lcssa:                ; preds = %.lr.ph129.split.us, %.lr.ph129.split.us.preheader
  %.unr = phi i64 [ 1, %.lr.ph129.split.us.preheader ], [ %157, %.lr.ph129.split.us ]
  %indvars.iv183.unr = phi i64 [ 1, %.lr.ph129.split.us.preheader ], [ %indvars.iv.next184.3, %.lr.ph129.split.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge130, label %.lr.ph129.split.us.epil

.lr.ph129.split.us.epil:                          ; preds = %._crit_edge130.loopexit.unr-lcssa, %.lr.ph129.split.us.epil
  %159 = phi i64 [ %160, %.lr.ph129.split.us.epil ], [ %.unr, %._crit_edge130.loopexit.unr-lcssa ]
  %indvars.iv183.epil = phi i64 [ %indvars.iv.next184.epil, %.lr.ph129.split.us.epil ], [ %indvars.iv183.unr, %._crit_edge130.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph129.split.us.epil ], [ 0, %._crit_edge130.loopexit.unr-lcssa ]
  %160 = mul nuw nsw i64 %159, %indvars.iv188
  %161 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv183.epil
  store i64 %160, ptr %161, align 8, !tbaa !26
  %indvars.iv.next184.epil = add nuw nsw i64 %indvars.iv183.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge130, label %.lr.ph129.split.us.epil, !llvm.loop !30

._crit_edge130:                                   ; preds = %.lr.ph129.split, %._crit_edge130.loopexit.unr-lcssa, %.lr.ph129.split.us.epil, %middle.block222, %126
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %162 = load i32, ptr @pre, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %163
  %165 = call ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %164) #8
  store ptr %165, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %166 = load i32, ptr @pre, align 4, !tbaa !8
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %167
  %169 = call ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %168) #8
  store ptr %169, ptr %8, align 8
  %170 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %170, label %.lr.ph137, label %._crit_edge138

.lr.ph129.split:                                  ; preds = %.lr.ph129.split.preheader247, %.lr.ph129.split
  %171 = phi i64 [ %172, %.lr.ph129.split ], [ %.ph, %.lr.ph129.split.preheader247 ]
  %indvars.iv178 = phi i64 [ %indvars.iv.next179, %.lr.ph129.split ], [ %indvars.iv178.ph, %.lr.ph129.split.preheader247 ]
  %172 = add nuw nsw i64 %171, %indvars.iv188
  %173 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %indvars.iv178
  store i64 %172, ptr %173, align 8, !tbaa !26
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond182.not = icmp eq i64 %indvars.iv.next179, %wide.trip.count186
  br i1 %exitcond182.not, label %._crit_edge130, label %.lr.ph129.split, !llvm.loop !32

._crit_edge138:                                   ; preds = %._crit_edge135, %._crit_edge130
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %174 = load i32, ptr @n, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %.not78.not = icmp slt i64 %indvars.iv188, %175
  br i1 %.not78.not, label %126, label %._crit_edge143, !llvm.loop !33

.lr.ph137:                                        ; preds = %._crit_edge130, %._crit_edge135
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %176 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %176, i64 16, i1 false)
  %177 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %178 = getelementptr inbounds i8, ptr %177, i64 16
  %179 = load i64, ptr %178, align 8, !tbaa !34
  %180 = load i32, ptr @cur, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %181
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %182, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %184 = load i64, ptr %183, align 8, !tbaa !26
  %185 = add nsw i64 %184, %179
  store i64 %185, ptr %183, align 8, !tbaa !26
  %186 = load i32, ptr %9, align 8, !tbaa !37
  %187 = xor i32 %186, %64
  %.not80131 = icmp eq i32 %186, %64
  br i1 %.not80131, label %._crit_edge135, label %.lr.ph134

._crit_edge135:                                   ; preds = %230, %.lr.ph137
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IixExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %189 = load i32, ptr @pre, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %190
  %192 = call ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %191) #8
  store ptr %192, ptr %8, align 8
  %193 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IixExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %193, label %.lr.ph137, label %._crit_edge138, !llvm.loop !38

.lr.ph134:                                        ; preds = %.lr.ph137, %230
  %.0132 = phi i32 [ %232, %230 ], [ %187, %.lr.ph137 ]
  %194 = sext i32 %.0132 to i64
  %195 = getelementptr inbounds [1024 x i8], ptr @ban, i64 0, i64 %194
  %196 = load i8, ptr %195, align 1, !tbaa !19, !range !21, !noundef !22
  %197 = trunc nuw i8 %196 to i1
  br i1 %197, label %230, label %198

198:                                              ; preds = %.lr.ph134
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %199 = load i32, ptr %9, align 8, !tbaa !37
  %200 = or i32 %199, %.0132
  store i32 %200, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %201 = load i8, ptr @op, align 1, !tbaa !5
  %202 = icmp eq i8 %201, 42
  %203 = load i64, ptr %114, align 8, !tbaa !39
  %204 = getelementptr inbounds [1024 x i32], ptr @sz, i64 0, i64 %194
  %205 = load i32, ptr %204, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [11 x i64], ptr @pw, i64 0, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !26
  %209 = mul nsw i64 %208, %203
  %210 = add nsw i64 %208, %203
  %211 = select i1 %202, i64 %209, i64 %210
  store i64 %211, ptr %12, align 8, !tbaa !26
  %212 = call { i32, i64 } @_ZSt9make_pairIixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %213 = extractvalue { i32, i64 } %212, 0
  store i32 %213, ptr %10, align 8
  %214 = extractvalue { i32, i64 } %212, 1
  store i64 %214, ptr %115, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %215 = load i64, ptr @t, align 8, !tbaa !26
  %216 = icmp sgt i64 %214, %215
  br i1 %216, label %229, label %217

217:                                              ; preds = %198
  %218 = load i8, ptr @op, align 1, !tbaa !5
  %219 = icmp eq i8 %218, 42
  br i1 %219, label %220, label %222

220:                                              ; preds = %217
  %221 = srem i64 %215, %214
  %.not81 = icmp eq i64 %221, 0
  br i1 %.not81, label %222, label %229

222:                                              ; preds = %220, %217
  %223 = load i32, ptr @cur, align 4, !tbaa !8
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [2 x %"class.std::map"], ptr @f, i64 0, i64 %224
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIixExSt4lessIS1_ESaIS0_IKS1_xEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %225, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %227 = load i64, ptr %226, align 8, !tbaa !26
  %228 = add nsw i64 %227, %179
  store i64 %228, ptr %226, align 8, !tbaa !26
  br label %229

229:                                              ; preds = %198, %220, %222
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %230

230:                                              ; preds = %229, %.lr.ph134
  %231 = add nsw i32 %.0132, -1
  %232 = and i32 %231, %187
  %.not80 = icmp eq i32 %232, 0
  br i1 %.not80, label %._crit_edge135, label %.lr.ph134, !llvm.loop !40

233:                                              ; preds = %._crit_edge143, %._crit_edge, %._crit_edge113
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { nofree 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !11, !14, !13}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11, !13, !14}
!18 = distinct !{!18, !11, !14, !13}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !6, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = !{!27, !27, i64 0}
!27 = !{!"long long", !6, i64 0}
!28 = distinct !{!28, !11, !13, !14}
!29 = distinct !{!29, !11}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = distinct !{!32, !11, !14, !13}
!33 = distinct !{!33, !11}
!34 = !{!35, !27, i64 16}
!35 = !{!"_ZTSSt4pairIKS_IixExE", !36, i64 0, !27, i64 16}
!36 = !{!"_ZTSSt4pairIixE", !9, i64 0, !27, i64 8}
!37 = !{!36, !9, i64 0}
!38 = distinct !{!38, !11}
!39 = !{!36, !27, i64 8}
!40 = distinct !{!40, !11}


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