; LLVM IR from tangjz/acm-icpc :: self_training/2017-01-14 (D)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@perm = external dso_local global [9 x i32], align 16
@sz = external dso_local global [9 x i32], align 16
@str = external dso_local global [11 x i8], align 1
@seq = external dso_local global [9 x [362881 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE2px = external hidden global i32, align 4
@_ZZ4mainE2py = external hidden global i32, align 4
@_ZZ4mainE2cx = external hidden global i32, align 4
@_ZZ4mainE2cy = external hidden global i32, align 4
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL5score = external hidden constant [9 x i32], align 16

; 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 i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %244, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @t, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %247

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

21:                                               ; preds = %31, %20
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = icmp slt i32 %22, 3
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %34

25:                                               ; preds = %21
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = mul nsw i32 %26, 3
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr @str, i64 %28
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29)
  br label %31

31:                                               ; preds = %25
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !9

34:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %47, %34
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 9
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %35
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [9 x i32], ptr @perm, i64 0, i64 %42
  store i32 %40, ptr %43, align 4, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %45
  store i32 0, ptr %46, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %39
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %5, align 4, !tbaa !5
  br label %35, !llvm.loop !11

50:                                               ; preds = %38
  br label %51

51:                                               ; preds = %116, %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %111, %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 9
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i32 13, ptr %3, align 4
  br label %114

56:                                               ; preds = %52
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [9 x i32], ptr @perm, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sdiv i32 %60, 3
  store i32 %61, ptr @_ZZ4mainE2cx, align 4, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [9 x i32], ptr @perm, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = srem i32 %65, 3
  store i32 %66, ptr @_ZZ4mainE2cy, align 4, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = icmp ne i32 %67, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  br i1 %68, label %69, label %81

69:                                               ; preds = %56
  %70 = load i32, ptr @_ZZ4mainE2px, align 4, !tbaa !5
  %71 = load i32, ptr @_ZZ4mainE2cx, align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  %73 = call i32 @llvm.abs.i32(i32 %72, i1 true)
  store i32 %73, ptr %8, align 4, !tbaa !5
  %74 = load i32, ptr @_ZZ4mainE2py, align 4, !tbaa !5
  %75 = load i32, ptr @_ZZ4mainE2cy, align 4, !tbaa !5
  %76 = sub nsw i32 %74, %75
  %77 = call i32 @llvm.abs.i32(i32 %76, i1 true)
  store i32 %77, ptr %9, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 1
  br label %81

81:                                               ; preds = %69, %56
  %82 = phi i1 [ false, %56 ], [ %80, %69 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  store i32 13, ptr %3, align 4
  br label %114

84:                                               ; preds = %81
  %85 = load i64, ptr %6, align 8, !tbaa !12
  %86 = mul nsw i64 %85, 26
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [9 x i32], ptr @perm, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !14
  %94 = sext i8 %93 to i32
  %95 = sub nsw i32 %94, 65
  %96 = sext i32 %95 to i64
  %97 = add nsw i64 %86, %96
  store i64 %97, ptr %6, align 8, !tbaa !12
  %98 = load i64, ptr %6, align 8, !tbaa !12
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %100
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %104, align 4, !tbaa !5
  %107 = sext i32 %105 to i64
  %108 = getelementptr inbounds [362881 x i64], ptr %101, i64 0, i64 %107
  store i64 %98, ptr %108, align 8, !tbaa !12
  %109 = load i32, ptr @_ZZ4mainE2cx, align 4, !tbaa !5
  store i32 %109, ptr @_ZZ4mainE2px, align 4, !tbaa !5
  %110 = load i32, ptr @_ZZ4mainE2cy, align 4, !tbaa !5
  store i32 %110, ptr @_ZZ4mainE2py, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %84
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !5
  br label %52, !llvm.loop !15

114:                                              ; preds = %83, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %116

116:                                              ; preds = %115
  %117 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef @perm, ptr noundef getelementptr inbounds (i32, ptr @perm, i64 9))
  br i1 %117, label %51, label %118, !llvm.loop !16

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %165, %118
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = icmp slt i32 %120, 9
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %168

123:                                              ; preds = %119
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %125
  %127 = getelementptr inbounds [362881 x i64], ptr %126, i64 0, i64 0
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %129
  %131 = getelementptr inbounds [362881 x i64], ptr %130, i64 0, i64 0
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i64, ptr %131, i64 %136
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef %127, ptr noundef %137)
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %139
  %141 = getelementptr inbounds [362881 x i64], ptr %140, i64 0, i64 0
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %143
  %145 = getelementptr inbounds [362881 x i64], ptr %144, i64 0, i64 0
  %146 = load i32, ptr %10, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i64, ptr %145, i64 %150
  %152 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef %141, ptr noundef %151)
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %154
  %156 = getelementptr inbounds [362881 x i64], ptr %155, i64 0, i64 0
  %157 = ptrtoint ptr %152 to i64
  %158 = ptrtoint ptr %156 to i64
  %159 = sub i64 %157, %158
  %160 = sdiv exact i64 %159, 8
  %161 = trunc i64 %160 to i32
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %163
  store i32 %161, ptr %164, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %123
  %166 = load i32, ptr %10, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %10, align 4, !tbaa !5
  br label %119, !llvm.loop !17

168:                                              ; preds = %122
  %169 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %170 = load i32, ptr %2, align 4, !tbaa !5
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %170)
  br label %172

172:                                              ; preds = %240, %168
  %173 = load i32, ptr @n, align 4, !tbaa !5
  %174 = add nsw i32 %173, -1
  store i32 %174, ptr @n, align 4, !tbaa !5
  %175 = icmp ne i32 %173, 0
  br i1 %175, label %176, label %243

176:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !12
  %177 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @str)
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %195, %176
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %180
  %182 = load i8, ptr %181, align 1, !tbaa !14
  %183 = icmp ne i8 %182, 0
  br i1 %183, label %184, label %198

184:                                              ; preds = %178
  %185 = load i64, ptr %12, align 8, !tbaa !12
  %186 = mul nsw i64 %185, 26
  %187 = load i32, ptr %11, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !14
  %191 = sext i8 %190 to i32
  %192 = sub nsw i32 %191, 65
  %193 = sext i32 %192 to i64
  %194 = add nsw i64 %186, %193
  store i64 %194, ptr %12, align 8, !tbaa !12
  br label %195

195:                                              ; preds = %184
  %196 = load i32, ptr %11, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %11, align 4, !tbaa !5
  br label %178, !llvm.loop !18

198:                                              ; preds = %178
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = add nsw i32 %199, -1
  store i32 %200, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %201 = load i32, ptr %11, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %202
  %204 = getelementptr inbounds [362881 x i64], ptr %203, i64 0, i64 0
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %206
  %208 = getelementptr inbounds [362881 x i64], ptr %207, i64 0, i64 0
  %209 = load i32, ptr %11, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i64, ptr %208, i64 %213
  %215 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef %204, ptr noundef %214, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %216 = load i32, ptr %11, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %217
  %219 = getelementptr inbounds [362881 x i64], ptr %218, i64 0, i64 0
  %220 = ptrtoint ptr %215 to i64
  %221 = ptrtoint ptr %219 to i64
  %222 = sub i64 %220, %221
  %223 = sdiv exact i64 %222, 8
  %224 = trunc i64 %223 to i32
  store i32 %224, ptr %13, align 4, !tbaa !5
  %225 = load i32, ptr %11, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %226
  %228 = load i32, ptr %13, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [362881 x i64], ptr %227, i64 0, i64 %229
  %231 = load i64, ptr %230, align 8, !tbaa !12
  %232 = load i64, ptr %12, align 8, !tbaa !12
  %233 = icmp eq i64 %231, %232
  br i1 %233, label %234, label %239

234:                                              ; preds = %198
  %235 = load i32, ptr %11, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [9 x i32], ptr @_ZL5score, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !5
  br label %240

239:                                              ; preds = %198
  br label %240

240:                                              ; preds = %239, %234
  %241 = phi i32 [ %238, %234 ], [ 0, %239 ]
  %242 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %241)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %172, !llvm.loop !19

243:                                              ; preds = %172
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %2, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !20

247:                                              ; preds = %19
  ret i32 0
}

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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef, ptr noundef) #5

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

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@perm = external dso_local global [9 x i32], align 16
@sz = external dso_local local_unnamed_addr global [9 x i32], align 16
@str = external dso_local global [11 x i8], align 1
@seq = external dso_local global [9 x [362881 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE2px = external hidden local_unnamed_addr global i32, align 4
@_ZZ4mainE2py = external hidden local_unnamed_addr global i32, align 4
@_ZZ4mainE2cx = external hidden local_unnamed_addr global i32, align 4
@_ZZ4mainE2cy = external hidden local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL5score = external hidden local_unnamed_addr constant [9 x i32], align 16

; 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 i64, align 8
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %5 = load i32, ptr @t, align 4, !tbaa !5
  %.not66 = icmp slt i32 %5, 1
  br i1 %.not66, label %._crit_edge68, label %.preheader54

.preheader54:                                     ; preds = %0, %._crit_edge65
  %.067 = phi i32 [ %178, %._crit_edge65 ], [ 1, %0 ]
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 3))
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 6))
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) @sz, i8 0, i64 36, i1 false), !tbaa !5
  store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr @perm, align 16, !tbaa !5
  store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, ptr getelementptr inbounds (i8, ptr @perm, i64 16), align 16, !tbaa !5
  store i32 8, ptr getelementptr inbounds (i8, ptr @perm, i64 32), align 16, !tbaa !5
  br label %.peel.next

._crit_edge68:                                    ; preds = %._crit_edge65, %0
  ret i32 0

.peel.next:                                       ; preds = %.loopexit, %.preheader54
  %9 = load i32, ptr @perm, align 16, !tbaa !5
  %10 = sdiv i32 %9, 3
  %11 = srem i32 %9, 3
  %.pre82 = load i32, ptr @sz, align 16, !tbaa !5
  %.phi.trans.insert = sext i32 %9 to i64
  %.phi.trans.insert81 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %.phi.trans.insert
  %.pre = load i8, ptr %.phi.trans.insert81, align 1, !tbaa !9
  %12 = sext i8 %.pre to i64
  %13 = add nsw i64 %12, -65
  %14 = add nsw i32 %.pre82, 1
  store i32 %14, ptr @sz, align 16, !tbaa !5
  %15 = sext i32 %.pre82 to i64
  %16 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 0, i64 %15
  store i64 %13, ptr %16, align 8, !tbaa !10
  store i32 %10, ptr @_ZZ4mainE2px, align 4, !tbaa !5
  store i32 %11, ptr @_ZZ4mainE2py, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %._crit_edge84, %.peel.next
  %18 = phi i32 [ %11, %.peel.next ], [ %.pre90, %._crit_edge84 ]
  %19 = phi i32 [ %10, %.peel.next ], [ %.pre89, %._crit_edge84 ]
  %indvars.iv = phi i64 [ 1, %.peel.next ], [ %indvars.iv.next, %._crit_edge84 ]
  %.04557 = phi i64 [ %13, %.peel.next ], [ %34, %._crit_edge84 ]
  %20 = getelementptr inbounds [9 x i32], ptr @perm, i64 0, i64 %indvars.iv
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sdiv i32 %21, 3
  store i32 %22, ptr @_ZZ4mainE2cx, align 4, !tbaa !5
  %23 = srem i32 %21, 3
  store i32 %23, ptr @_ZZ4mainE2cy, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %24 = sub nsw i32 %19, %22
  %25 = call i32 @llvm.abs.i32(i32 %24, i1 true)
  store i32 %25, ptr %1, align 4, !tbaa !5
  %26 = sub nsw i32 %18, %23
  %27 = call i32 @llvm.abs.i32(i32 %26, i1 true)
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  br i1 %30, label %.loopexit, label %._crit_edge84

._crit_edge84:                                    ; preds = %17
  %.pre90 = load i32, ptr @_ZZ4mainE2cy, align 4, !tbaa !5
  %.pre89 = load i32, ptr @_ZZ4mainE2cx, align 4, !tbaa !5
  %.pre85 = load i32, ptr %20, align 4, !tbaa !5
  %.phi.trans.insert86 = sext i32 %.pre85 to i64
  %.phi.trans.insert87 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %.phi.trans.insert86
  %.pre88 = load i8, ptr %.phi.trans.insert87, align 1, !tbaa !9
  %31 = mul nsw i64 %.04557, 26
  %32 = sext i8 %.pre88 to i64
  %33 = add i64 %31, -65
  %34 = add i64 %33, %32
  %35 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !5
  %38 = sext i32 %36 to i64
  %39 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %indvars.iv, i64 %38
  store i64 %34, ptr %39, align 8, !tbaa !10
  store i32 %.pre89, ptr @_ZZ4mainE2px, align 4, !tbaa !5
  store i32 %.pre90, ptr @_ZZ4mainE2py, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 9
  br i1 %exitcond.not, label %.loopexit, label %17, !llvm.loop !12

.loopexit:                                        ; preds = %17, %._crit_edge84
  %40 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef nonnull @perm, ptr noundef nonnull getelementptr inbounds (i8, ptr @perm, i64 36))
  br i1 %40, label %.peel.next, label %.preheader.preheader, !llvm.loop !15

.preheader.preheader:                             ; preds = %.loopexit
  %41 = load i32, ptr @sz, align 16, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i64, ptr @seq, i64 %42
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @seq, ptr noundef nonnull %43)
  %44 = load i32, ptr @sz, align 16, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i64, ptr @seq, i64 %45
  %47 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull @seq, ptr noundef nonnull %46)
  %48 = ptrtoint ptr %47 to i64
  %49 = sub i64 %48, ptrtoint (ptr @seq to i64)
  %50 = lshr exact i64 %49, 3
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr @sz, align 16, !tbaa !5
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 2903048), i64 %53
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 2903048), ptr noundef nonnull %54)
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 2903048), i64 %56
  %58 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 2903048), ptr noundef nonnull %57)
  %59 = ptrtoint ptr %58 to i64
  %60 = sub i64 %59, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 2903048) to i64)
  %61 = lshr exact i64 %60, 3
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 8), align 8, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 5806096), i64 %64
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 5806096), ptr noundef nonnull %65)
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 8), align 8, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 5806096), i64 %67
  %69 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 5806096), ptr noundef nonnull %68)
  %70 = ptrtoint ptr %69 to i64
  %71 = sub i64 %70, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 5806096) to i64)
  %72 = lshr exact i64 %71, 3
  %73 = trunc i64 %72 to i32
  store i32 %73, ptr getelementptr inbounds (i8, ptr @sz, i64 8), align 8, !tbaa !5
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 12), align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 8709144), i64 %75
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 8709144), ptr noundef nonnull %76)
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 12), align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 8709144), i64 %78
  %80 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 8709144), ptr noundef nonnull %79)
  %81 = ptrtoint ptr %80 to i64
  %82 = sub i64 %81, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 8709144) to i64)
  %83 = lshr exact i64 %82, 3
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr getelementptr inbounds (i8, ptr @sz, i64 12), align 4, !tbaa !5
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 16), align 16, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 11612192), i64 %86
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 11612192), ptr noundef nonnull %87)
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 16), align 16, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 11612192), i64 %89
  %91 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 11612192), ptr noundef nonnull %90)
  %92 = ptrtoint ptr %91 to i64
  %93 = sub i64 %92, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 11612192) to i64)
  %94 = lshr exact i64 %93, 3
  %95 = trunc i64 %94 to i32
  store i32 %95, ptr getelementptr inbounds (i8, ptr @sz, i64 16), align 16, !tbaa !5
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 20), align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 14515240), i64 %97
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 14515240), ptr noundef nonnull %98)
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 20), align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 14515240), i64 %100
  %102 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 14515240), ptr noundef nonnull %101)
  %103 = ptrtoint ptr %102 to i64
  %104 = sub i64 %103, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 14515240) to i64)
  %105 = lshr exact i64 %104, 3
  %106 = trunc i64 %105 to i32
  store i32 %106, ptr getelementptr inbounds (i8, ptr @sz, i64 20), align 4, !tbaa !5
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 24), align 8, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 17418288), i64 %108
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 17418288), ptr noundef nonnull %109)
  %110 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 24), align 8, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 17418288), i64 %111
  %113 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 17418288), ptr noundef nonnull %112)
  %114 = ptrtoint ptr %113 to i64
  %115 = sub i64 %114, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 17418288) to i64)
  %116 = lshr exact i64 %115, 3
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr getelementptr inbounds (i8, ptr @sz, i64 24), align 8, !tbaa !5
  %118 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 28), align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 20321336), i64 %119
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 20321336), ptr noundef nonnull %120)
  %121 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 28), align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 20321336), i64 %122
  %124 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 20321336), ptr noundef nonnull %123)
  %125 = ptrtoint ptr %124 to i64
  %126 = sub i64 %125, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 20321336) to i64)
  %127 = lshr exact i64 %126, 3
  %128 = trunc i64 %127 to i32
  store i32 %128, ptr getelementptr inbounds (i8, ptr @sz, i64 28), align 4, !tbaa !5
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 32), align 16, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 23224384), i64 %130
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 23224384), ptr noundef nonnull %131)
  %132 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 32), align 16, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @seq, i64 23224384), i64 %133
  %135 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 23224384), ptr noundef nonnull %134)
  %136 = ptrtoint ptr %135 to i64
  %137 = sub i64 %136, ptrtoint (ptr getelementptr inbounds (i8, ptr @seq, i64 23224384) to i64)
  %138 = lshr exact i64 %137, 3
  %139 = trunc i64 %138 to i32
  store i32 %139, ptr getelementptr inbounds (i8, ptr @sz, i64 32), align 16, !tbaa !5
  %140 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.067)
  %142 = load i32, ptr @n, align 4, !tbaa !5
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr @n, align 4, !tbaa !5
  %.not5062 = icmp eq i32 %142, 0
  br i1 %.not5062, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %.preheader.preheader, %173
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !10
  %144 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %145 = load i8, ptr @str, align 1, !tbaa !9
  %.not5160 = icmp eq i8 %145, 0
  br i1 %.not5160, label %154, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph64
  %.promoted = load i64, ptr %3, align 8, !tbaa !10
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv77 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next78, %.lr.ph ]
  %146 = phi i8 [ %145, %.lr.ph.preheader ], [ %153, %.lr.ph ]
  %147 = phi i64 [ %.promoted, %.lr.ph.preheader ], [ %151, %.lr.ph ]
  %148 = mul nsw i64 %147, 26
  %149 = sext i8 %146 to i64
  %150 = add nsw i64 %149, -65
  %151 = add nsw i64 %150, %148
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %152 = getelementptr inbounds [11 x i8], ptr @str, i64 0, i64 %indvars.iv.next78
  %153 = load i8, ptr %152, align 1, !tbaa !9
  %.not51 = icmp eq i8 %153, 0
  br i1 %.not51, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph
  store i64 %151, ptr %3, align 8, !tbaa !10
  br label %154

154:                                              ; preds = %._crit_edge, %.lr.ph64
  %.042.lcssa = phi i64 [ %indvars.iv77, %._crit_edge ], [ -1, %.lr.ph64 ]
  %sext94 = shl i64 %.042.lcssa, 32
  %155 = ashr exact i64 %sext94, 32
  %156 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %155
  %157 = getelementptr inbounds [9 x i32], ptr @sz, i64 0, i64 %155
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i64, ptr %156, i64 %159
  %161 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull %156, ptr noundef nonnull %160, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %162 = ptrtoint ptr %161 to i64
  %163 = ptrtoint ptr %156 to i64
  %164 = sub i64 %162, %163
  %sext = shl i64 %164, 29
  %165 = ashr i64 %sext, 32
  %166 = getelementptr inbounds [9 x [362881 x i64]], ptr @seq, i64 0, i64 %155, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !10
  %168 = load i64, ptr %3, align 8, !tbaa !10
  %169 = icmp eq i64 %167, %168
  br i1 %169, label %170, label %173

170:                                              ; preds = %154
  %171 = getelementptr inbounds [9 x i32], ptr @_ZL5score, i64 0, i64 %155
  %172 = load i32, ptr %171, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %154, %170
  %174 = phi i32 [ %172, %170 ], [ 0, %154 ]
  %175 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %174)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %176 = load i32, ptr @n, align 4, !tbaa !5
  %177 = add nsw i32 %176, -1
  store i32 %177, ptr @n, align 4, !tbaa !5
  %.not50 = icmp eq i32 %176, 0
  br i1 %.not50, label %._crit_edge65, label %.lr.ph64, !llvm.loop !17

._crit_edge65:                                    ; preds = %173, %.preheader.preheader
  %178 = add nuw nsw i32 %.067, 1
  %179 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.067, %179
  br i1 %.not.not, label %.preheader54, label %._crit_edge68, !llvm.loop !18
}

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass