; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101206K)

; 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"

%"struct.std::pair" = type { i32, i32 }
%struct.Trans = type { i32, i32, i32, i32 }
%struct.Recv = type { i32, i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@cX = external dso_local global i32, align 4
@cY = external dso_local global i32, align 4
@st = external dso_local global i32, align 4
@tim = external dso_local global [385 x i32], align 16
@val = external dso_local global [97 x i32], align 16
@pos = external dso_local global [25 x %"struct.std::pair"], align 16
@str = external dso_local global [7 x [7 x i8]], align 16
@buf = external dso_local global [25 x i8], align 16
@sta = external dso_local global [2 x %struct.Trans], align 16
@que = external dso_local global [385 x %struct.Trans], align 16
@stp = external dso_local global [5 x %struct.Recv], align 16
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden constant [4 x i32], align 16
@_ZL2dy = external hidden constant [4 x i32], align 16
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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 %"struct.std::pair", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.Trans, align 4
  %18 = alloca %struct.Recv, align 4
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  %21 = alloca %struct.Recv, align 4
  %22 = alloca %struct.Trans, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.Trans, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.Recv, align 4
  %27 = alloca %struct.Trans, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %546, %0
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr @t, align 4, !tbaa !5
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %549

36:                                               ; preds = %31
  store i32 0, ptr @tot, align 4, !tbaa !5
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %106, %36
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %109

43:                                               ; preds = %38
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %45
  %47 = getelementptr inbounds [7 x i8], ptr %46, i64 0, i64 0
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %102, %43
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %105

54:                                               ; preds = %49
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [7 x i8], ptr %57, i64 0, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = sext i8 %61 to i32
  %63 = icmp eq i32 %62, 46
  br i1 %63, label %84, label %64

64:                                               ; preds = %54
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %66
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [7 x i8], ptr %67, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !9
  %72 = sext i8 %71 to i32
  %73 = icmp sge i32 %72, 97
  br i1 %73, label %74, label %101

74:                                               ; preds = %64
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [7 x i8], ptr %77, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = sext i8 %81 to i32
  %83 = icmp sle i32 %82, 122
  br i1 %83, label %84, label %101

84:                                               ; preds = %74, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %85 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %85, ptr %6, align 4
  %86 = load i32, ptr @tot, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %87
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %91
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [7 x i8], ptr %92, i64 0, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !9
  %97 = load i32, ptr @tot, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr @tot, align 4, !tbaa !5
  %99 = sext i32 %97 to i64
  %100 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %99
  store i8 %96, ptr %100, align 1, !tbaa !9
  br label %101

101:                                              ; preds = %84, %74, %64
  br label %102

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

105:                                              ; preds = %53
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %4, align 4, !tbaa !5
  br label %38, !llvm.loop !12

109:                                              ; preds = %42
  %110 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @cX)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %120, %109
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = load i32, ptr @cX, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %123

116:                                              ; preds = %111
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [2 x %struct.Trans], ptr @sta, i64 0, i64 %118
  call void @_ZN5Trans4initEv(ptr noundef nonnull align 4 dereferenceable(16) %119)
  br label %120

120:                                              ; preds = %116
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !5
  br label %111, !llvm.loop !13

123:                                              ; preds = %115
  %124 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @cY)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %134, %123
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = load i32, ptr @cY, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %137

130:                                              ; preds = %125
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [5 x %struct.Recv], ptr @stp, i64 0, i64 %132
  call void @_ZN4Recv4initEv(ptr noundef nonnull align 4 dereferenceable(12) %133)
  br label %134

134:                                              ; preds = %130
  %135 = load i32, ptr %8, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %8, align 4, !tbaa !5
  br label %125, !llvm.loop !14

137:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  store i8 0, ptr %9, align 1, !tbaa !15
  call void @llvm.memset.p0.i64(ptr align 16 @tim, i8 0, i64 1540, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @val, i8 0, i64 388, i1 false)
  %138 = load i32, ptr @tot, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr @buf, i64 %139
  call void @_ZSt4sortIPcEvT_S1_(ptr noundef @buf, ptr noundef %140)
  br label %141

141:                                              ; preds = %517, %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %166, %141
  %143 = load i32, ptr %10, align 4, !tbaa !5
  %144 = load i32, ptr @tot, align 4, !tbaa !5
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %169

147:                                              ; preds = %142
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !9
  %152 = load i32, ptr %10, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %153
  %155 = getelementptr inbounds %"struct.std::pair", ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 8, !tbaa !17
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %157
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %160
  %162 = getelementptr inbounds %"struct.std::pair", ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !19
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [7 x i8], ptr %158, i64 0, i64 %164
  store i8 %151, ptr %165, align 1, !tbaa !9
  br label %166

166:                                              ; preds = %147
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %10, align 4, !tbaa !5
  br label %142, !llvm.loop !20

169:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  %170 = load i32, ptr @st, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr @st, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %204, %169
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = load i32, ptr @cX, align 4, !tbaa !5
  %175 = icmp slt i32 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %207

177:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %178 = load i32, ptr %14, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [2 x %struct.Trans], ptr @sta, i64 0, i64 %179
  %181 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %180)
  store i32 %181, ptr %15, align 4, !tbaa !5
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = icmp sge i32 %182, 0
  br i1 %183, label %184, label %203

184:                                              ; preds = %177
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = load i32, ptr @st, align 4, !tbaa !5
  %190 = icmp ne i32 %188, %189
  br i1 %190, label %191, label %203

191:                                              ; preds = %184
  %192 = load i32, ptr @st, align 4, !tbaa !5
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %194
  store i32 %192, ptr %195, align 4, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2 x %struct.Trans], ptr @sta, i64 0, i64 %197
  %199 = load i32, ptr %12, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %12, align 4, !tbaa !5
  %201 = sext i32 %199 to i64
  %202 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %201
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %202, ptr align 16 %198, i64 16, i1 false), !tbaa.struct !21
  br label %203

203:                                              ; preds = %191, %184, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %14, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %14, align 4, !tbaa !5
  br label %172, !llvm.loop !22

207:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %221, %207
  %209 = load i32, ptr %16, align 4, !tbaa !5
  %210 = load i32, ptr @cY, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %224

213:                                              ; preds = %208
  %214 = load i32, ptr @st, align 4, !tbaa !5
  %215 = load i32, ptr %16, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [5 x %struct.Recv], ptr @stp, i64 0, i64 %216
  %218 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %217)
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %219
  store i32 %214, ptr %220, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %213
  %222 = load i32, ptr %16, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %16, align 4, !tbaa !5
  br label %208, !llvm.loop !23

224:                                              ; preds = %212
  br label %225

225:                                              ; preds = %507, %224
  %226 = load i32, ptr %11, align 4, !tbaa !5
  %227 = load i32, ptr %12, align 4, !tbaa !5
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %229, label %508

229:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %230 = load i32, ptr %11, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %11, align 4, !tbaa !5
  %232 = sext i32 %230 to i64
  %233 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %232
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 16 %233, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #8
  %234 = getelementptr inbounds %struct.Recv, ptr %18, i32 0, i32 0
  %235 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %236 = load i32, ptr %235, align 4, !tbaa !24
  store i32 %236, ptr %234, align 4, !tbaa !26
  %237 = getelementptr inbounds %struct.Recv, ptr %18, i32 0, i32 1
  %238 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !28
  store i32 %239, ptr %237, align 4, !tbaa !29
  %240 = getelementptr inbounds %struct.Recv, ptr %18, i32 0, i32 2
  %241 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %242 = load i32, ptr %241, align 4, !tbaa !30
  store i32 %242, ptr %240, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %243 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  store i32 %243, ptr %19, align 4, !tbaa !5
  %244 = load i32, ptr %19, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = load i32, ptr @st, align 4, !tbaa !5
  %249 = icmp eq i32 %247, %248
  br i1 %249, label %250, label %256

250:                                              ; preds = %229
  %251 = load i32, ptr %13, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %13, align 4, !tbaa !5
  %253 = load i32, ptr %19, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %254
  store i32 0, ptr %255, align 4, !tbaa !5
  br label %256

256:                                              ; preds = %250, %229
  %257 = load i32, ptr %13, align 4, !tbaa !5
  %258 = load i32, ptr @cY, align 4, !tbaa !5
  %259 = icmp eq i32 %257, %258
  br i1 %259, label %260, label %261

260:                                              ; preds = %256
  store i32 29, ptr %3, align 4
  br label %505

261:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  %262 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %263 = load i32, ptr %262, align 4, !tbaa !24
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %264
  %266 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %267 = load i32, ptr %266, align 4, !tbaa !28
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [7 x i8], ptr %265, i64 0, i64 %268
  %270 = load i8, ptr %269, align 1, !tbaa !9
  store i8 %270, ptr %20, align 1, !tbaa !9
  %271 = load i8, ptr %20, align 1, !tbaa !9
  %272 = sext i8 %271 to i32
  %273 = icmp sge i32 %272, 97
  br i1 %273, label %274, label %284

274:                                              ; preds = %261
  %275 = load i8, ptr %20, align 1, !tbaa !9
  %276 = sext i8 %275 to i32
  %277 = icmp sle i32 %276, 122
  br i1 %277, label %278, label %284

278:                                              ; preds = %274
  %279 = load i8, ptr %20, align 1, !tbaa !9
  %280 = sext i8 %279 to i32
  %281 = sub nsw i32 %280, 97
  %282 = add nsw i32 %281, 65
  %283 = trunc i32 %282 to i8
  store i8 %283, ptr %20, align 1, !tbaa !9
  br label %284

284:                                              ; preds = %278, %274, %261
  %285 = load i8, ptr %20, align 1, !tbaa !9
  %286 = sext i8 %285 to i32
  %287 = icmp eq i32 %286, 46
  br i1 %287, label %296, label %288

288:                                              ; preds = %284
  %289 = load i8, ptr %20, align 1, !tbaa !9
  %290 = sext i8 %289 to i32
  %291 = icmp eq i32 %290, 35
  br i1 %291, label %296, label %292

292:                                              ; preds = %288
  %293 = load i8, ptr %20, align 1, !tbaa !9
  %294 = sext i8 %293 to i32
  %295 = icmp eq i32 %294, 88
  br i1 %295, label %296, label %371

296:                                              ; preds = %292, %288, %284
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #8
  %297 = getelementptr inbounds %struct.Recv, ptr %21, i32 0, i32 0
  %298 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %299 = load i32, ptr %298, align 4, !tbaa !24
  store i32 %299, ptr %297, align 4, !tbaa !26
  %300 = getelementptr inbounds %struct.Recv, ptr %21, i32 0, i32 1
  %301 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %302 = load i32, ptr %301, align 4, !tbaa !28
  store i32 %302, ptr %300, align 4, !tbaa !29
  %303 = getelementptr inbounds %struct.Recv, ptr %21, i32 0, i32 2
  %304 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %305 = load i32, ptr %304, align 4, !tbaa !32
  store i32 %305, ptr %303, align 4, !tbaa !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #8
  %306 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  store i32 %306, ptr %19, align 4, !tbaa !5
  %307 = load i32, ptr %19, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = load i32, ptr @st, align 4, !tbaa !5
  %312 = icmp eq i32 %310, %311
  br i1 %312, label %313, label %319

313:                                              ; preds = %296
  %314 = load i32, ptr %13, align 4, !tbaa !5
  %315 = add nsw i32 %314, 1
  store i32 %315, ptr %13, align 4, !tbaa !5
  %316 = load i32, ptr %19, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %317
  store i32 0, ptr %318, align 4, !tbaa !5
  br label %319

319:                                              ; preds = %313, %296
  %320 = load i32, ptr %13, align 4, !tbaa !5
  %321 = load i32, ptr @cY, align 4, !tbaa !5
  %322 = icmp eq i32 %320, %321
  br i1 %322, label %323, label %324

323:                                              ; preds = %319
  store i32 29, ptr %3, align 4
  br label %504

324:                                              ; preds = %319
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %325 = getelementptr inbounds %struct.Trans, ptr %22, i32 0, i32 0
  %326 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %327 = load i32, ptr %326, align 4, !tbaa !24
  %328 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %329 = load i32, ptr %328, align 4, !tbaa !32
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = add nsw i32 %327, %332
  store i32 %333, ptr %325, align 4, !tbaa !24
  %334 = getelementptr inbounds %struct.Trans, ptr %22, i32 0, i32 1
  %335 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %336 = load i32, ptr %335, align 4, !tbaa !28
  %337 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %338 = load i32, ptr %337, align 4, !tbaa !32
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %339
  %341 = load i32, ptr %340, align 4, !tbaa !5
  %342 = add nsw i32 %336, %341
  store i32 %342, ptr %334, align 4, !tbaa !28
  %343 = getelementptr inbounds %struct.Trans, ptr %22, i32 0, i32 2
  %344 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %345 = load i32, ptr %344, align 4, !tbaa !32
  %346 = sub nsw i32 3, %345
  store i32 %346, ptr %343, align 4, !tbaa !30
  %347 = getelementptr inbounds %struct.Trans, ptr %22, i32 0, i32 3
  %348 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %349 = load i32, ptr %348, align 4, !tbaa !30
  %350 = sub nsw i32 3, %349
  store i32 %350, ptr %347, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %351 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %22)
  store i32 %351, ptr %23, align 4, !tbaa !5
  %352 = load i32, ptr %23, align 4, !tbaa !5
  %353 = icmp sge i32 %352, 0
  br i1 %353, label %354, label %370

354:                                              ; preds = %324
  %355 = load i32, ptr %23, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %356
  %358 = load i32, ptr %357, align 4, !tbaa !5
  %359 = load i32, ptr @st, align 4, !tbaa !5
  %360 = icmp ne i32 %358, %359
  br i1 %360, label %361, label %370

361:                                              ; preds = %354
  %362 = load i32, ptr @st, align 4, !tbaa !5
  %363 = load i32, ptr %23, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %364
  store i32 %362, ptr %365, align 4, !tbaa !5
  %366 = load i32, ptr %12, align 4, !tbaa !5
  %367 = add nsw i32 %366, 1
  store i32 %367, ptr %12, align 4, !tbaa !5
  %368 = sext i32 %366 to i64
  %369 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %368
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %369, ptr align 4 %22, i64 16, i1 false), !tbaa.struct !21
  br label %370

370:                                              ; preds = %361, %354, %324
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %371

371:                                              ; preds = %370, %292
  %372 = load i8, ptr %20, align 1, !tbaa !9
  %373 = sext i8 %372 to i32
  %374 = icmp eq i32 %373, 79
  br i1 %374, label %379, label %375

375:                                              ; preds = %371
  %376 = load i8, ptr %20, align 1, !tbaa !9
  %377 = sext i8 %376 to i32
  %378 = icmp eq i32 %377, 88
  br i1 %378, label %379, label %425

379:                                              ; preds = %375, %371
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %380 = getelementptr inbounds %struct.Trans, ptr %24, i32 0, i32 0
  %381 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %382 = load i32, ptr %381, align 4, !tbaa !24
  %383 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %384 = load i32, ptr %383, align 4, !tbaa !30
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %385
  %387 = load i32, ptr %386, align 4, !tbaa !5
  %388 = add nsw i32 %382, %387
  store i32 %388, ptr %380, align 4, !tbaa !24
  %389 = getelementptr inbounds %struct.Trans, ptr %24, i32 0, i32 1
  %390 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %391 = load i32, ptr %390, align 4, !tbaa !28
  %392 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %393 = load i32, ptr %392, align 4, !tbaa !30
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %394
  %396 = load i32, ptr %395, align 4, !tbaa !5
  %397 = add nsw i32 %391, %396
  store i32 %397, ptr %389, align 4, !tbaa !28
  %398 = getelementptr inbounds %struct.Trans, ptr %24, i32 0, i32 2
  %399 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %400 = load i32, ptr %399, align 4, !tbaa !30
  %401 = sub nsw i32 3, %400
  store i32 %401, ptr %398, align 4, !tbaa !30
  %402 = getelementptr inbounds %struct.Trans, ptr %24, i32 0, i32 3
  %403 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %404 = load i32, ptr %403, align 4, !tbaa !32
  store i32 %404, ptr %402, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %405 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %24)
  store i32 %405, ptr %25, align 4, !tbaa !5
  %406 = load i32, ptr %25, align 4, !tbaa !5
  %407 = icmp sge i32 %406, 0
  br i1 %407, label %408, label %424

408:                                              ; preds = %379
  %409 = load i32, ptr %25, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %410
  %412 = load i32, ptr %411, align 4, !tbaa !5
  %413 = load i32, ptr @st, align 4, !tbaa !5
  %414 = icmp ne i32 %412, %413
  br i1 %414, label %415, label %424

415:                                              ; preds = %408
  %416 = load i32, ptr @st, align 4, !tbaa !5
  %417 = load i32, ptr %25, align 4, !tbaa !5
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %418
  store i32 %416, ptr %419, align 4, !tbaa !5
  %420 = load i32, ptr %12, align 4, !tbaa !5
  %421 = add nsw i32 %420, 1
  store i32 %421, ptr %12, align 4, !tbaa !5
  %422 = sext i32 %420 to i64
  %423 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %422
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %423, ptr align 4 %24, i64 16, i1 false), !tbaa.struct !21
  br label %424

424:                                              ; preds = %415, %408, %379
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %425

425:                                              ; preds = %424, %375
  %426 = load i8, ptr %20, align 1, !tbaa !9
  %427 = sext i8 %426 to i32
  %428 = icmp eq i32 %427, 77
  br i1 %428, label %429, label %503

429:                                              ; preds = %425
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #8
  %430 = getelementptr inbounds %struct.Recv, ptr %26, i32 0, i32 0
  %431 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %432 = load i32, ptr %431, align 4, !tbaa !24
  store i32 %432, ptr %430, align 4, !tbaa !26
  %433 = getelementptr inbounds %struct.Recv, ptr %26, i32 0, i32 1
  %434 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %435 = load i32, ptr %434, align 4, !tbaa !28
  store i32 %435, ptr %433, align 4, !tbaa !29
  %436 = getelementptr inbounds %struct.Recv, ptr %26, i32 0, i32 2
  %437 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %438 = load i32, ptr %437, align 4, !tbaa !30
  %439 = sub nsw i32 3, %438
  store i32 %439, ptr %436, align 4, !tbaa !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %26, i64 12, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  %440 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  store i32 %440, ptr %19, align 4, !tbaa !5
  %441 = load i32, ptr %19, align 4, !tbaa !5
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %442
  %444 = load i32, ptr %443, align 4, !tbaa !5
  %445 = load i32, ptr @st, align 4, !tbaa !5
  %446 = icmp eq i32 %444, %445
  br i1 %446, label %447, label %453

447:                                              ; preds = %429
  %448 = load i32, ptr %13, align 4, !tbaa !5
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %13, align 4, !tbaa !5
  %450 = load i32, ptr %19, align 4, !tbaa !5
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %451
  store i32 0, ptr %452, align 4, !tbaa !5
  br label %453

453:                                              ; preds = %447, %429
  %454 = load i32, ptr %13, align 4, !tbaa !5
  %455 = load i32, ptr @cY, align 4, !tbaa !5
  %456 = icmp eq i32 %454, %455
  br i1 %456, label %457, label %458

457:                                              ; preds = %453
  store i32 29, ptr %3, align 4
  br label %504

458:                                              ; preds = %453
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %459 = getelementptr inbounds %struct.Trans, ptr %27, i32 0, i32 0
  %460 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 0
  %461 = load i32, ptr %460, align 4, !tbaa !24
  %462 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %463 = load i32, ptr %462, align 4, !tbaa !30
  %464 = sext i32 %463 to i64
  %465 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %464
  %466 = load i32, ptr %465, align 4, !tbaa !5
  %467 = sub nsw i32 %461, %466
  store i32 %467, ptr %459, align 4, !tbaa !24
  %468 = getelementptr inbounds %struct.Trans, ptr %27, i32 0, i32 1
  %469 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 1
  %470 = load i32, ptr %469, align 4, !tbaa !28
  %471 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %472 = load i32, ptr %471, align 4, !tbaa !30
  %473 = sext i32 %472 to i64
  %474 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %473
  %475 = load i32, ptr %474, align 4, !tbaa !5
  %476 = sub nsw i32 %470, %475
  store i32 %476, ptr %468, align 4, !tbaa !28
  %477 = getelementptr inbounds %struct.Trans, ptr %27, i32 0, i32 2
  %478 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 2
  %479 = load i32, ptr %478, align 4, !tbaa !30
  store i32 %479, ptr %477, align 4, !tbaa !30
  %480 = getelementptr inbounds %struct.Trans, ptr %27, i32 0, i32 3
  %481 = getelementptr inbounds %struct.Trans, ptr %17, i32 0, i32 3
  %482 = load i32, ptr %481, align 4, !tbaa !32
  store i32 %482, ptr %480, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %483 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %27)
  store i32 %483, ptr %28, align 4, !tbaa !5
  %484 = load i32, ptr %28, align 4, !tbaa !5
  %485 = icmp sge i32 %484, 0
  br i1 %485, label %486, label %502

486:                                              ; preds = %458
  %487 = load i32, ptr %28, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %488
  %490 = load i32, ptr %489, align 4, !tbaa !5
  %491 = load i32, ptr @st, align 4, !tbaa !5
  %492 = icmp ne i32 %490, %491
  br i1 %492, label %493, label %502

493:                                              ; preds = %486
  %494 = load i32, ptr @st, align 4, !tbaa !5
  %495 = load i32, ptr %28, align 4, !tbaa !5
  %496 = sext i32 %495 to i64
  %497 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %496
  store i32 %494, ptr %497, align 4, !tbaa !5
  %498 = load i32, ptr %12, align 4, !tbaa !5
  %499 = add nsw i32 %498, 1
  store i32 %499, ptr %12, align 4, !tbaa !5
  %500 = sext i32 %498 to i64
  %501 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %500
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %501, ptr align 4 %27, i64 16, i1 false), !tbaa.struct !21
  br label %502

502:                                              ; preds = %493, %486, %458
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %503

503:                                              ; preds = %502, %425
  store i32 0, ptr %3, align 4
  br label %504

504:                                              ; preds = %503, %457, %323
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  br label %505

505:                                              ; preds = %504, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  %506 = load i32, ptr %3, align 4
  switch i32 %506, label %550 [
    i32 0, label %507
    i32 29, label %508
  ]

507:                                              ; preds = %505
  br label %225, !llvm.loop !34

508:                                              ; preds = %505, %225
  %509 = load i32, ptr %13, align 4, !tbaa !5
  %510 = load i32, ptr @cY, align 4, !tbaa !5
  %511 = icmp eq i32 %509, %510
  br i1 %511, label %512, label %513

512:                                              ; preds = %508
  store i8 1, ptr %9, align 1, !tbaa !15
  store i32 17, ptr %3, align 4
  br label %514

513:                                              ; preds = %508
  store i32 0, ptr %3, align 4
  br label %514

514:                                              ; preds = %513, %512
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  %515 = load i32, ptr %3, align 4
  switch i32 %515, label %550 [
    i32 0, label %516
    i32 17, label %522
  ]

516:                                              ; preds = %514
  br label %517

517:                                              ; preds = %516
  %518 = load i32, ptr @tot, align 4, !tbaa !5
  %519 = sext i32 %518 to i64
  %520 = getelementptr inbounds i8, ptr @buf, i64 %519
  %521 = call noundef zeroext i1 @_ZSt16next_permutationIPcEbT_S1_(ptr noundef @buf, ptr noundef %520)
  br i1 %521, label %141, label %522, !llvm.loop !35

522:                                              ; preds = %517, %514
  %523 = load i32, ptr %2, align 4, !tbaa !5
  %524 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %523)
  %525 = load i8, ptr %9, align 1, !tbaa !15, !range !36, !noundef !37
  %526 = trunc i8 %525 to i1
  br i1 %526, label %529, label %527

527:                                              ; preds = %522
  %528 = call i32 @puts(ptr noundef @.str.5)
  br label %545

529:                                              ; preds = %522
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %530

530:                                              ; preds = %541, %529
  %531 = load i32, ptr %29, align 4, !tbaa !5
  %532 = load i32, ptr @n, align 4, !tbaa !5
  %533 = icmp slt i32 %531, %532
  br i1 %533, label %535, label %534

534:                                              ; preds = %530
  store i32 30, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %544

535:                                              ; preds = %530
  %536 = load i32, ptr %29, align 4, !tbaa !5
  %537 = sext i32 %536 to i64
  %538 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %537
  %539 = getelementptr inbounds [7 x i8], ptr %538, i64 0, i64 0
  %540 = call i32 @puts(ptr noundef %539)
  br label %541

541:                                              ; preds = %535
  %542 = load i32, ptr %29, align 4, !tbaa !5
  %543 = add nsw i32 %542, 1
  store i32 %543, ptr %29, align 4, !tbaa !5
  br label %530, !llvm.loop !38

544:                                              ; preds = %534
  br label %545

545:                                              ; preds = %544, %527
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  br label %546

546:                                              ; preds = %545
  %547 = load i32, ptr %2, align 4, !tbaa !5
  %548 = add nsw i32 %547, 1
  store i32 %548, ptr %2, align 4, !tbaa !5
  br label %31, !llvm.loop !39

549:                                              ; preds = %35
  ret i32 0

550:                                              ; preds = %514, %505
  unreachable
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Trans4initEv(ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Recv4initEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPcEvT_S1_(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16)) #4 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) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPcEbT_S1_(ptr noundef, ptr noundef) #6

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

declare i32 @puts(ptr noundef) #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!18, !6, i64 4}
!20 = distinct !{!20, !11}
!21 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTS5Trans", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTS4Recv", !6, i64 0, !6, i64 4, !6, i64 8}
!28 = !{!25, !6, i64 4}
!29 = !{!27, !6, i64 4}
!30 = !{!25, !6, i64 8}
!31 = !{!27, !6, i64 8}
!32 = !{!25, !6, i64 12}
!33 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!34 = distinct !{!34, !11}
!35 = distinct !{!35, !11}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = distinct !{!38, !11}
!39 = distinct !{!39, !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"

%"struct.std::pair" = type { i32, i32 }
%struct.Trans = type { i32, i32, i32, i32 }
%struct.Recv = type { i32, i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@cX = external dso_local global i32, align 4
@cY = external dso_local global i32, align 4
@st = external dso_local local_unnamed_addr global i32, align 4
@tim = external dso_local local_unnamed_addr global [385 x i32], align 16
@val = external dso_local local_unnamed_addr global [97 x i32], align 16
@pos = external dso_local global [25 x %"struct.std::pair"], align 16
@str = external dso_local global [7 x [7 x i8]], align 16
@buf = external dso_local global [25 x i8], align 16
@sta = external dso_local global [2 x %struct.Trans], align 16
@que = external dso_local local_unnamed_addr global [385 x %struct.Trans], align 16
@stp = external dso_local global [5 x %struct.Recv], align 16
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZL2dy = external hidden local_unnamed_addr constant [4 x i32], align 16
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %struct.Recv, align 4
  %5 = alloca %struct.Trans, align 4
  %6 = alloca %struct.Trans, align 4
  %7 = alloca %struct.Trans, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @t)
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %.not191 = icmp slt i32 %9, 1
  br i1 %.not191, label %._crit_edge196, label %.lr.ph195

.lr.ph195:                                        ; preds = %0
  %10 = getelementptr inbounds i8, ptr %4, i64 4
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = getelementptr inbounds i8, ptr %5, i64 4
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  %14 = getelementptr inbounds i8, ptr %5, i64 12
  %15 = getelementptr inbounds i8, ptr %7, i64 4
  %16 = getelementptr inbounds i8, ptr %7, i64 8
  %17 = getelementptr inbounds i8, ptr %7, i64 12
  %18 = getelementptr inbounds i8, ptr %6, i64 4
  %19 = getelementptr inbounds i8, ptr %6, i64 8
  %20 = getelementptr inbounds i8, ptr %6, i64 12
  br label %21

._crit_edge196:                                   ; preds = %.loopexit158, %0
  ret i32 0

21:                                               ; preds = %.lr.ph195, %.loopexit158
  %.0108192 = phi i32 [ 1, %.lr.ph195 ], [ %272, %.loopexit158 ]
  store i32 0, ptr @tot, align 4, !tbaa !5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph164, label %._crit_edge165

._crit_edge165:                                   ; preds = %._crit_edge, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @cX)
  %26 = load i32, ptr @cX, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph168, label %._crit_edge169

.lr.ph164:                                        ; preds = %21, %._crit_edge
  %storemerge162 = phi i32 [ %34, %._crit_edge ], [ 0, %21 ]
  %28 = sext i32 %storemerge162 to i64
  %29 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %28
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr @m, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  %.pre218 = load i32, ptr %1, align 4, !tbaa !5
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %61, %.lr.ph164
  %33 = phi i32 [ %.pre218, %.lr.ph164 ], [ %64, %61 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %1, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph164, label %._crit_edge165, !llvm.loop !9

.lr.ph:                                           ; preds = %.lr.ph164, %61
  %37 = phi i32 [ %62, %61 ], [ %31, %.lr.ph164 ]
  %38 = phi i32 [ %64, %61 ], [ %.pre218, %.lr.ph164 ]
  %storemerge147161 = phi i32 [ %65, %61 ], [ 0, %.lr.ph164 ]
  %39 = sext i32 %38 to i64
  %40 = sext i32 %storemerge147161 to i64
  %41 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %39, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = icmp eq i8 %42, 46
  %44 = add i8 %42, -97
  %or.cond148 = icmp ult i8 %44, 26
  %or.cond155 = or i1 %43, %or.cond148
  br i1 %or.cond155, label %45, label %61

45:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %46 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %46, ptr %3, align 8
  %47 = load i32, ptr @tot, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %48
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %49, ptr noundef nonnull align 4 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %52, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = load i32, ptr @tot, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr @tot, align 4, !tbaa !5
  %59 = sext i32 %57 to i64
  %60 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !11
  %.pre217 = load i32, ptr @m, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %.lr.ph, %45
  %62 = phi i32 [ %37, %.lr.ph ], [ %.pre217, %45 ]
  %63 = phi i32 [ %storemerge147161, %.lr.ph ], [ %53, %45 ]
  %64 = phi i32 [ %38, %.lr.ph ], [ %51, %45 ]
  %65 = add nsw i32 %63, 1
  store i32 %65, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %65, %62
  br i1 %66, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge169:                                   ; preds = %.lr.ph168, %._crit_edge165
  %67 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @cY)
  %68 = load i32, ptr @cY, align 4, !tbaa !5
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph172, label %._crit_edge173

.lr.ph168:                                        ; preds = %._crit_edge165, %.lr.ph168
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph168 ], [ 0, %._crit_edge165 ]
  %70 = getelementptr inbounds [2 x %struct.Trans], ptr @sta, i64 0, i64 %indvars.iv
  call void @_ZN5Trans4initEv(ptr noundef nonnull align 4 dereferenceable(16) %70)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %71 = load i32, ptr @cX, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next, %72
  br i1 %73, label %.lr.ph168, label %._crit_edge169, !llvm.loop !13

._crit_edge173:                                   ; preds = %.lr.ph172, %._crit_edge169
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1540) @tim, i8 0, i64 1540, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(388) @val, i8 0, i64 388, i1 false)
  %74 = load i32, ptr @tot, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr @buf, i64 %75
  call void @_ZSt4sortIPcEvT_S1_(ptr noundef nonnull @buf, ptr noundef nonnull %76)
  br label %81

.lr.ph172:                                        ; preds = %._crit_edge169, %.lr.ph172
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %.lr.ph172 ], [ 0, %._crit_edge169 ]
  %77 = getelementptr inbounds [5 x %struct.Recv], ptr @stp, i64 0, i64 %indvars.iv199
  call void @_ZN4Recv4initEv(ptr noundef nonnull align 4 dereferenceable(12) %77)
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %78 = load i32, ptr @cY, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = icmp slt i64 %indvars.iv.next200, %79
  br i1 %80, label %.lr.ph172, label %._crit_edge173, !llvm.loop !14

81:                                               ; preds = %256, %._crit_edge173
  %82 = load i32, ptr @tot, align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph176.preheader, label %._crit_edge177

.lr.ph176.preheader:                              ; preds = %81
  %wide.trip.count = zext nneg i32 %82 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %84 = icmp eq i32 %82, 1
  br i1 %84, label %._crit_edge177.loopexit.unr-lcssa, label %.lr.ph176.preheader.new

.lr.ph176.preheader.new:                          ; preds = %.lr.ph176.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph176

._crit_edge177.loopexit.unr-lcssa:                ; preds = %.lr.ph176, %.lr.ph176.preheader
  %indvars.iv202.unr = phi i64 [ 0, %.lr.ph176.preheader ], [ %indvars.iv.next203.1, %.lr.ph176 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge177, label %.lr.ph176.epil

.lr.ph176.epil:                                   ; preds = %._crit_edge177.loopexit.unr-lcssa
  %85 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %indvars.iv202.unr
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %indvars.iv202.unr
  %88 = load i32, ptr %87, align 8, !tbaa !15
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %87, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !17
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %89, i64 %92
  store i8 %86, ptr %93, align 1, !tbaa !11
  br label %._crit_edge177

._crit_edge177:                                   ; preds = %.lr.ph176.epil, %._crit_edge177.loopexit.unr-lcssa, %81
  %94 = load i32, ptr @st, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr @st, align 4, !tbaa !5
  %96 = load i32, ptr @cX, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph181, label %.preheader156

.lr.ph176:                                        ; preds = %.lr.ph176, %.lr.ph176.preheader.new
  %indvars.iv202 = phi i64 [ 0, %.lr.ph176.preheader.new ], [ %indvars.iv.next203.1, %.lr.ph176 ]
  %niter = phi i64 [ 0, %.lr.ph176.preheader.new ], [ %niter.next.1, %.lr.ph176 ]
  %98 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %indvars.iv202
  %99 = load i8, ptr %98, align 2, !tbaa !11
  %100 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %indvars.iv202
  %101 = load i32, ptr %100, align 16, !tbaa !15
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %100, i64 4
  %104 = load i32, ptr %103, align 4, !tbaa !17
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %102, i64 %105
  store i8 %99, ptr %106, align 1, !tbaa !11
  %indvars.iv.next203 = or disjoint i64 %indvars.iv202, 1
  %107 = getelementptr inbounds [25 x i8], ptr @buf, i64 0, i64 %indvars.iv.next203
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = getelementptr inbounds [25 x %"struct.std::pair"], ptr @pos, i64 0, i64 %indvars.iv.next203
  %110 = load i32, ptr %109, align 8, !tbaa !15
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %109, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !17
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %111, i64 %114
  store i8 %108, ptr %115, align 1, !tbaa !11
  %indvars.iv.next203.1 = add nuw nsw i64 %indvars.iv202, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge177.loopexit.unr-lcssa, label %.lr.ph176, !llvm.loop !18

.preheader156:                                    ; preds = %130, %._crit_edge177
  %.0116.lcssa = phi i32 [ 0, %._crit_edge177 ], [ %.1117, %130 ]
  %116 = load i32, ptr @cY, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %.lr.ph183, label %.preheader

.lr.ph181:                                        ; preds = %._crit_edge177, %130
  %indvars.iv205 = phi i64 [ %indvars.iv.next206, %130 ], [ 0, %._crit_edge177 ]
  %.0116179 = phi i32 [ %.1117, %130 ], [ 0, %._crit_edge177 ]
  %118 = getelementptr inbounds [2 x %struct.Trans], ptr @sta, i64 0, i64 %indvars.iv205
  %119 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %118)
  %120 = icmp sgt i32 %119, -1
  br i1 %120, label %121, label %130

121:                                              ; preds = %.lr.ph181
  %122 = zext nneg i32 %119 to i64
  %123 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr @st, align 4, !tbaa !5
  %.not146 = icmp eq i32 %124, %125
  br i1 %.not146, label %130, label %126

126:                                              ; preds = %121
  store i32 %125, ptr %123, align 4, !tbaa !5
  %127 = add nsw i32 %.0116179, 1
  %128 = sext i32 %.0116179 to i64
  %129 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %128
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %129, ptr noundef nonnull align 16 dereferenceable(16) %118, i64 16, i1 false), !tbaa.struct !19
  br label %130

130:                                              ; preds = %126, %121, %.lr.ph181
  %.1117 = phi i32 [ %127, %126 ], [ %.0116179, %121 ], [ %.0116179, %.lr.ph181 ]
  %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1
  %131 = load i32, ptr @cX, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = icmp slt i64 %indvars.iv.next206, %132
  br i1 %133, label %.lr.ph181, label %.preheader156, !llvm.loop !20

.preheader:                                       ; preds = %.lr.ph183, %.preheader156
  %134 = phi i32 [ %116, %.preheader156 ], [ %141, %.lr.ph183 ]
  %135 = icmp sgt i32 %.0116.lcssa, 0
  br i1 %135, label %.lr.ph187, label %.loopexit

.lr.ph183:                                        ; preds = %.preheader156, %.lr.ph183
  %indvars.iv208 = phi i64 [ %indvars.iv.next209, %.lr.ph183 ], [ 0, %.preheader156 ]
  %136 = load i32, ptr @st, align 4, !tbaa !5
  %137 = getelementptr inbounds [5 x %struct.Recv], ptr @stp, i64 0, i64 %indvars.iv208
  %138 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %137)
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %139
  store i32 %136, ptr %140, align 4, !tbaa !5
  %indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
  %141 = load i32, ptr @cY, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = icmp slt i64 %indvars.iv.next209, %142
  br i1 %143, label %.lr.ph183, label %.preheader, !llvm.loop !21

.lr.ph187:                                        ; preds = %.preheader, %251
  %indvars.iv211 = phi i64 [ %indvars.iv.next212, %251 ], [ 0, %.preheader ]
  %.2118185 = phi i32 [ %.10, %251 ], [ %.0116.lcssa, %.preheader ]
  %.0119184 = phi i32 [ %.7126, %251 ], [ 0, %.preheader ]
  %indvars.iv.next212 = add nuw nsw i64 %indvars.iv211, 1
  %144 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %indvars.iv211
  %.sroa.041.0.copyload = load i32, ptr %144, align 16, !tbaa !5
  %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %144, i64 4
  %.sroa.10.0.copyload = load i32, ptr %.sroa.10.0..sroa_idx, align 4, !tbaa !5
  %.sroa.17.0..sroa_idx = getelementptr inbounds i8, ptr %144, i64 8
  %.sroa.17.0.copyload = load i32, ptr %.sroa.17.0..sroa_idx, align 8, !tbaa !5
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %144, i64 12
  %.sroa.26.0.copyload = load i32, ptr %.sroa.26.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  store i32 %.sroa.041.0.copyload, ptr %4, align 4, !tbaa !22
  store i32 %.sroa.10.0.copyload, ptr %10, align 4, !tbaa !24
  store i32 %.sroa.17.0.copyload, ptr %11, align 4, !tbaa !25
  %145 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load i32, ptr @st, align 4, !tbaa !5
  %150 = icmp eq i32 %148, %149
  br i1 %150, label %151, label %153

151:                                              ; preds = %.lr.ph187
  %152 = add nsw i32 %.0119184, 1
  store i32 0, ptr %147, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %151, %.lr.ph187
  %.1120 = phi i32 [ %152, %151 ], [ %.0119184, %.lr.ph187 ]
  %154 = load i32, ptr @cY, align 4, !tbaa !5
  %155 = icmp eq i32 %.1120, %154
  br i1 %155, label %.loopexit.thread, label %156

156:                                              ; preds = %153
  %157 = sext i32 %.sroa.041.0.copyload to i64
  %158 = sext i32 %.sroa.10.0.copyload to i64
  %159 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %157, i64 %158
  %160 = load i8, ptr %159, align 1, !tbaa !11
  %161 = add i8 %160, -97
  %or.cond = icmp ult i8 %161, 26
  %162 = add nsw i8 %160, -32
  %spec.select = select i1 %or.cond, i8 %162, i8 %160
  switch i8 %spec.select, label %197 [
    i8 88, label %163
    i8 46, label %163
    i8 35, label %163
  ]

163:                                              ; preds = %156, %156, %156
  store i32 %.sroa.041.0.copyload, ptr %4, align 4, !tbaa !5
  store i32 %.sroa.10.0.copyload, ptr %10, align 4, !tbaa !5
  store i32 %.sroa.26.0.copyload, ptr %11, align 4, !tbaa !5
  %164 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = load i32, ptr @st, align 4, !tbaa !5
  %169 = icmp eq i32 %167, %168
  br i1 %169, label %170, label %172

170:                                              ; preds = %163
  %171 = add nsw i32 %.1120, 1
  store i32 0, ptr %166, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %170, %163
  %.2121 = phi i32 [ %171, %170 ], [ %.1120, %163 ]
  %173 = load i32, ptr @cY, align 4, !tbaa !5
  %174 = icmp eq i32 %.2121, %173
  br i1 %174, label %.loopexit.thread, label %175

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %176 = sext i32 %.sroa.26.0.copyload to i64
  %177 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %178, %.sroa.041.0.copyload
  store i32 %179, ptr %5, align 4, !tbaa !26
  %180 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %176
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = add nsw i32 %181, %.sroa.10.0.copyload
  store i32 %182, ptr %12, align 4, !tbaa !28
  %183 = sub nsw i32 3, %.sroa.26.0.copyload
  store i32 %183, ptr %13, align 4, !tbaa !29
  %184 = sub nsw i32 3, %.sroa.17.0.copyload
  store i32 %184, ptr %14, align 4, !tbaa !30
  %185 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %5)
  %186 = icmp sgt i32 %185, -1
  br i1 %186, label %187, label %196

187:                                              ; preds = %175
  %188 = zext nneg i32 %185 to i64
  %189 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = load i32, ptr @st, align 4, !tbaa !5
  %.not143 = icmp eq i32 %190, %191
  br i1 %.not143, label %196, label %192

192:                                              ; preds = %187
  store i32 %191, ptr %189, align 4, !tbaa !5
  %193 = add nsw i32 %.2118185, 1
  %194 = sext i32 %.2118185 to i64
  %195 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %194
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %195, ptr noundef nonnull align 4 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !19
  br label %196

196:                                              ; preds = %192, %187, %175
  %.3 = phi i32 [ %193, %192 ], [ %.2118185, %187 ], [ %.2118185, %175 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %197

197:                                              ; preds = %156, %196
  %.3122 = phi i32 [ %.2121, %196 ], [ %.1120, %156 ]
  %.4 = phi i32 [ %.3, %196 ], [ %.2118185, %156 ]
  switch i8 %spec.select, label %251 [
    i8 88, label %198
    i8 79, label %198
    i8 77, label %218
  ]

198:                                              ; preds = %197, %197
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %199 = sext i32 %.sroa.17.0.copyload to i64
  %200 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = add nsw i32 %201, %.sroa.041.0.copyload
  store i32 %202, ptr %6, align 4, !tbaa !26
  %203 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %199
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = add nsw i32 %204, %.sroa.10.0.copyload
  store i32 %205, ptr %18, align 4, !tbaa !28
  %206 = sub nsw i32 3, %.sroa.17.0.copyload
  store i32 %206, ptr %19, align 4, !tbaa !29
  store i32 %.sroa.26.0.copyload, ptr %20, align 4, !tbaa !30
  %207 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %6)
  %208 = icmp sgt i32 %207, -1
  br i1 %208, label %209, label %.thread

209:                                              ; preds = %198
  %210 = zext nneg i32 %207 to i64
  %211 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = load i32, ptr @st, align 4, !tbaa !5
  %.not144 = icmp eq i32 %212, %213
  br i1 %.not144, label %.thread, label %214

214:                                              ; preds = %209
  store i32 %213, ptr %211, align 4, !tbaa !5
  %215 = add nsw i32 %.4, 1
  %216 = sext i32 %.4 to i64
  %217 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %216
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %217, ptr noundef nonnull align 4 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !19
  br label %.thread

.thread:                                          ; preds = %198, %209, %214
  %.5 = phi i32 [ %215, %214 ], [ %.4, %209 ], [ %.4, %198 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %251

218:                                              ; preds = %197
  %219 = sub nsw i32 3, %.sroa.17.0.copyload
  store i32 %.sroa.041.0.copyload, ptr %4, align 4, !tbaa !5
  store i32 %.sroa.10.0.copyload, ptr %10, align 4, !tbaa !5
  store i32 %219, ptr %11, align 4, !tbaa !5
  %220 = call noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [97 x i32], ptr @val, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = load i32, ptr @st, align 4, !tbaa !5
  %225 = icmp eq i32 %223, %224
  br i1 %225, label %226, label %228

226:                                              ; preds = %218
  %227 = add nsw i32 %.3122, 1
  store i32 0, ptr %222, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %226, %218
  %.4123 = phi i32 [ %227, %226 ], [ %.3122, %218 ]
  %229 = load i32, ptr @cY, align 4, !tbaa !5
  %230 = icmp eq i32 %.4123, %229
  br i1 %230, label %.loopexit.thread, label %231

231:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %232 = sext i32 %.sroa.17.0.copyload to i64
  %233 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !5
  %235 = sub nsw i32 %.sroa.041.0.copyload, %234
  store i32 %235, ptr %7, align 4, !tbaa !26
  %236 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %232
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = sub nsw i32 %.sroa.10.0.copyload, %237
  store i32 %238, ptr %15, align 4, !tbaa !28
  store i32 %.sroa.17.0.copyload, ptr %16, align 4, !tbaa !29
  store i32 %.sroa.26.0.copyload, ptr %17, align 4, !tbaa !30
  %239 = call noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16) %7)
  %240 = icmp sgt i32 %239, -1
  br i1 %240, label %241, label %250

241:                                              ; preds = %231
  %242 = zext nneg i32 %239 to i64
  %243 = getelementptr inbounds [385 x i32], ptr @tim, i64 0, i64 %242
  %244 = load i32, ptr %243, align 4, !tbaa !5
  %245 = load i32, ptr @st, align 4, !tbaa !5
  %.not145 = icmp eq i32 %244, %245
  br i1 %.not145, label %250, label %246

246:                                              ; preds = %241
  store i32 %245, ptr %243, align 4, !tbaa !5
  %247 = add nsw i32 %.4, 1
  %248 = sext i32 %.4 to i64
  %249 = getelementptr inbounds [385 x %struct.Trans], ptr @que, i64 0, i64 %248
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %249, ptr noundef nonnull align 4 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !19
  br label %250

250:                                              ; preds = %246, %241, %231
  %.7 = phi i32 [ %247, %246 ], [ %.4, %241 ], [ %.4, %231 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  br label %251

.loopexit.thread:                                 ; preds = %228, %172, %153
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  br label %.preheader157

251:                                              ; preds = %197, %.thread, %250
  %.7126 = phi i32 [ %.4123, %250 ], [ %.3122, %.thread ], [ %.3122, %197 ]
  %.10 = phi i32 [ %.7, %250 ], [ %.5, %.thread ], [ %.4, %197 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  %252 = sext i32 %.10 to i64
  %253 = icmp slt i64 %indvars.iv.next212, %252
  br i1 %253, label %.lr.ph187, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %251
  %.pre = load i32, ptr @cY, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.preheader
  %254 = phi i32 [ %134, %.preheader ], [ %.pre, %.loopexit.loopexit ]
  %.8127 = phi i32 [ 0, %.preheader ], [ %.7126, %.loopexit.loopexit ]
  %255 = icmp eq i32 %.8127, %254
  br i1 %255, label %.preheader157, label %256

256:                                              ; preds = %.loopexit
  %257 = load i32, ptr @tot, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds i8, ptr @buf, i64 %258
  %260 = call noundef zeroext i1 @_ZSt16next_permutationIPcEbT_S1_(ptr noundef nonnull @buf, ptr noundef nonnull %259)
  br i1 %260, label %81, label %261, !llvm.loop !31

261:                                              ; preds = %256
  %262 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.0108192)
  %263 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.loopexit158

.preheader157:                                    ; preds = %.loopexit, %.loopexit.thread
  %264 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.0108192)
  %265 = load i32, ptr @n, align 4, !tbaa !5
  %266 = icmp sgt i32 %265, 0
  br i1 %266, label %.lr.ph190, label %.loopexit158

.lr.ph190:                                        ; preds = %.preheader157, %.lr.ph190
  %indvars.iv214 = phi i64 [ %indvars.iv.next215, %.lr.ph190 ], [ 0, %.preheader157 ]
  %267 = getelementptr inbounds [7 x [7 x i8]], ptr @str, i64 0, i64 %indvars.iv214
  %268 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %267)
  %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1
  %269 = load i32, ptr @n, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = icmp slt i64 %indvars.iv.next215, %270
  br i1 %271, label %.lr.ph190, label %.loopexit158, !llvm.loop !32

.loopexit158:                                     ; preds = %.lr.ph190, %.preheader157, %261
  %272 = add nuw nsw i32 %.0108192, 1
  %273 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.0108192, %273
  br i1 %.not.not, label %21, label %._crit_edge196, !llvm.loop !33
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) 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) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Trans4initEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Recv4initEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPcEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Trans3idxEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 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) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Recv3idxEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPcEbT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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 = distinct !{!14, !10}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!17 = !{!16, !6, i64 4}
!18 = distinct !{!18, !10}
!19 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTS4Recv", !6, i64 0, !6, i64 4, !6, i64 8}
!24 = !{!23, !6, i64 4}
!25 = !{!23, !6, i64 8}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTS5Trans", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!28 = !{!27, !6, i64 4}
!29 = !{!27, !6, i64 8}
!30 = !{!27, !6, i64 12}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}


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