; LLVM IR from upupming/algorithm :: acwing/寒假每日一题（提高组）/week3/312. 乌龟棋 (main)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@score = external dso_local global [360 x i32], align 16
@f = external dso_local global [41 x [41 x [41 x [41 x i32]]]], align 16
@t = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [5 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr %2) #7
  call void @llvm.memset.p0.i64(ptr align 16 %2, i8 0, i64 20, i1 false)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %28, %0
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %31

23:                                               ; preds = %18
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %26)
  br label %28

28:                                               ; preds = %23
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %3, align 4, !tbaa !5
  br label %18, !llvm.loop !9

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

32:                                               ; preds = %44, %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr @m, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %47

37:                                               ; preds = %32
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %39 = load i32, ptr @t, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %41, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %37
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %4, align 4, !tbaa !5
  br label %32, !llvm.loop !11

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

48:                                               ; preds = %211, %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 1
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp sle i32 %49, %51
  br i1 %52, label %54, label %53

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

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

55:                                               ; preds = %207, %54
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 2
  %58 = load i32, ptr %57, align 8, !tbaa !5
  %59 = icmp sle i32 %56, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %210

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

62:                                               ; preds = %203, %61
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 3
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp sle i32 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %206

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %199, %68
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 4
  %72 = load i32, ptr %71, align 16, !tbaa !5
  %73 = icmp sle i32 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %202

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = mul nsw i32 %77, 2
  %79 = add nsw i32 %76, %78
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = mul nsw i32 %80, 3
  %82 = add nsw i32 %79, %81
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = mul nsw i32 %83, 4
  %85 = add nsw i32 %82, %84
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %90
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [41 x [41 x i32]], ptr %94, i64 0, i64 %96
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [41 x i32], ptr %97, i64 0, i64 %99
  store ptr %100, ptr %11, align 8, !tbaa !12
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = load ptr, ptr %11, align 8, !tbaa !12
  store i32 %101, ptr %102, align 4, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %126

105:                                              ; preds = %75
  %106 = load ptr, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sub nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %109
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %110, i64 0, i64 %112
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [41 x [41 x i32]], ptr %113, i64 0, i64 %115
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [41 x i32], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = add nsw i32 %120, %121
  store i32 %122, ptr %12, align 4, !tbaa !5
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %106, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load ptr, ptr %11, align 8, !tbaa !12
  store i32 %124, ptr %125, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %126

126:                                              ; preds = %105, %75
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %150

129:                                              ; preds = %126
  %130 = load ptr, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %132
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %133, i64 0, i64 %136
  %138 = load i32, ptr %8, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [41 x [41 x i32]], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [41 x i32], ptr %140, i64 0, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = add nsw i32 %144, %145
  store i32 %146, ptr %13, align 4, !tbaa !5
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %130, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load ptr, ptr %11, align 8, !tbaa !12
  store i32 %148, ptr %149, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %150

150:                                              ; preds = %129, %126
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %174

153:                                              ; preds = %150
  %154 = load ptr, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %155 = load i32, ptr %5, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %156
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %157, i64 0, i64 %159
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = sub nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [41 x [41 x i32]], ptr %160, i64 0, i64 %163
  %165 = load i32, ptr %9, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [41 x i32], ptr %164, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = add nsw i32 %168, %169
  store i32 %170, ptr %14, align 4, !tbaa !5
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %154, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = load ptr, ptr %11, align 8, !tbaa !12
  store i32 %172, ptr %173, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %174

174:                                              ; preds = %153, %150
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %198

177:                                              ; preds = %174
  %178 = load ptr, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %179 = load i32, ptr %5, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %180
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %181, i64 0, i64 %183
  %185 = load i32, ptr %8, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [41 x [41 x i32]], ptr %184, i64 0, i64 %186
  %188 = load i32, ptr %9, align 4, !tbaa !5
  %189 = sub nsw i32 %188, 1
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [41 x i32], ptr %187, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = add nsw i32 %192, %193
  store i32 %194, ptr %15, align 4, !tbaa !5
  %195 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %178, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = load ptr, ptr %11, align 8, !tbaa !12
  store i32 %196, ptr %197, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %198

198:                                              ; preds = %177, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %9, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %9, align 4, !tbaa !5
  br label %69, !llvm.loop !14

202:                                              ; preds = %74
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %8, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %8, align 4, !tbaa !5
  br label %62, !llvm.loop !15

206:                                              ; preds = %67
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %7, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %7, align 4, !tbaa !5
  br label %55, !llvm.loop !16

210:                                              ; preds = %60
  br label %211

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

214:                                              ; preds = %53
  %215 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 1
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %217
  %219 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 2
  %220 = load i32, ptr %219, align 8, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [41 x [41 x [41 x i32]]], ptr %218, i64 0, i64 %221
  %223 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 3
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [41 x [41 x i32]], ptr %222, i64 0, i64 %225
  %227 = getelementptr inbounds [5 x i32], ptr %2, i64 0, i64 4
  %228 = load i32, ptr %227, align 16, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [41 x i32], ptr %226, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %231)
  %233 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %232, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 20, ptr %2) #7
  %234 = load i32, ptr %1, align 4
  ret i32 %234
}

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

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

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

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

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

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

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

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

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

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

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@score = external dso_local global [360 x i32], align 16
@f = external dso_local global [41 x [41 x [41 x [41 x i32]]]], align 16
@t = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [5 x i32], align 16
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %1) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %1, i8 0, i64 20, i1 false)
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %.preheader71

.preheader71:                                     ; preds = %.lr.ph, %0
  %10 = load i32, ptr @m, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph74, label %.preheader69.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %indvars.iv
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %.preheader71, !llvm.loop !9

.preheader70:                                     ; preds = %.lr.ph74
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  %.not106 = icmp slt i32 %.pre, 0
  br i1 %.not106, label %.preheader70.._crit_edge111_crit_edge, label %.preheader69.lr.ph

.preheader70.._crit_edge111_crit_edge:            ; preds = %.preheader70
  %.phi.trans.insert184 = getelementptr inbounds i8, ptr %1, i64 8
  %.pre185 = load i32, ptr %.phi.trans.insert184, align 8, !tbaa !5
  %.phi.trans.insert186 = getelementptr inbounds i8, ptr %1, i64 12
  %.pre187 = load i32, ptr %.phi.trans.insert186, align 4, !tbaa !5
  %.phi.trans.insert188 = getelementptr inbounds i8, ptr %1, i64 16
  %.pre189 = load i32, ptr %.phi.trans.insert188, align 16, !tbaa !5
  br label %._crit_edge111

.preheader69.lr.ph:                               ; preds = %.preheader71, %.preheader70
  %17 = phi i32 [ %.pre, %.preheader70 ], [ 0, %.preheader71 ]
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %.not6184 = icmp slt i32 %19, 0
  %20 = getelementptr inbounds i8, ptr %1, i64 12
  %21 = load i32, ptr %20, align 4
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %23 = load i32, ptr %22, align 16
  %.not6278 = icmp slt i32 %21, 0
  %or.cond = select i1 %.not6184, i1 true, i1 %.not6278
  %.not6375 = icmp slt i32 %23, 0
  %or.cond199 = select i1 %or.cond, i1 true, i1 %.not6375
  br i1 %or.cond199, label %._crit_edge111, label %.preheader69.preheader

.preheader69.preheader:                           ; preds = %.preheader69.lr.ph
  %24 = add nuw i32 %23, 1
  %25 = add nuw i32 %21, 1
  %26 = add nuw i32 %19, 1
  %27 = add nuw i32 %17, 1
  %wide.trip.count182 = zext i32 %27 to i64
  %wide.trip.count143 = zext i32 %26 to i64
  %wide.trip.count138 = zext i32 %25 to i64
  %wide.trip.count = zext i32 %24 to i64
  %exitcond.peel.not = icmp eq i32 %23, 0
  %wide.trip.count177 = zext i32 %26 to i64
  %wide.trip.count148 = zext i32 %24 to i64
  %exitcond149.peel.not = icmp eq i32 %23, 0
  %wide.trip.count154 = zext i32 %24 to i64
  %exitcond155.peel.not = icmp eq i32 %23, 0
  %wide.trip.count172 = zext i32 %25 to i64
  %wide.trip.count160 = zext i32 %24 to i64
  %exitcond161.peel.not = icmp eq i32 %23, 0
  %wide.trip.count166 = zext i32 %24 to i64
  %exitcond167.peel.not = icmp eq i32 %23, 0
  br label %.preheader69

.lr.ph74:                                         ; preds = %.preheader71, %.lr.ph74
  %.05973 = phi i32 [ %34, %.lr.ph74 ], [ 0, %.preheader71 ]
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %29 = load i32, ptr @t, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [5 x i32], ptr %1, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !5
  %34 = add nuw nsw i32 %.05973, 1
  %35 = load i32, ptr @m, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph74, label %.preheader70, !llvm.loop !11

.preheader69:                                     ; preds = %.preheader69.preheader, %._crit_edge.split87.split
  %indvars.iv179 = phi i64 [ 0, %.preheader69.preheader ], [ %indvars.iv.next180, %._crit_edge.split87.split ]
  %.not64 = icmp eq i64 %indvars.iv179, 0
  %37 = add nsw i64 %indvars.iv179, -1
  br i1 %.not64, label %.preheader68.us91, label %.preheader68

.preheader68.us91:                                ; preds = %.preheader69, %._crit_edge80.split.split.us.us
  %indvars.iv174 = phi i64 [ %indvars.iv.next175, %._crit_edge80.split.split.us.us ], [ 0, %.preheader69 ]
  %38 = shl nuw nsw i64 %indvars.iv174, 1
  %.not65.us93 = icmp eq i64 %indvars.iv174, 0
  %39 = add nsw i64 %indvars.iv174, -1
  br i1 %.not65.us93, label %.preheader.us81.us.us, label %.preheader.us81.us95

.preheader.us81.us95:                             ; preds = %.preheader68.us91, %._crit_edge.split.us.us.split.us
  %.05679.us82.us96 = phi i32 [ %98, %._crit_edge.split.us.us.split.us ], [ 0, %.preheader68.us91 ]
  %40 = mul nuw nsw i32 %.05679.us82.us96, 3
  %41 = sext i32 %40 to i64
  %42 = add nuw nsw i64 %38, %41
  %43 = zext nneg i32 %.05679.us82.us96 to i64
  %.not66.us.us97 = icmp eq i32 %.05679.us82.us96, 0
  %44 = add nsw i32 %.05679.us82.us96, -1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %42
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %43, i64 0
  store i32 %47, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %49 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %39, i64 %43, i64 0
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %47
  store i32 %51, ptr %3, align 4, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br i1 %.not66.us.us97, label %60, label %54

54:                                               ; preds = %.preheader.us81.us95
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %55 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %45, i64 0
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, %47
  store i32 %57, ptr %4, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %59 = load i32, ptr %58, align 4, !tbaa !5
  store i32 %59, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br i1 %exitcond149.peel.not, label %._crit_edge.split.us.us.split.us, label %.preheader.us81.us95.split.peel.next

60:                                               ; preds = %.preheader.us81.us95
  br i1 %exitcond155.peel.not, label %._crit_edge.split.us.us.split.us, label %.preheader.us81.us95.split.us.peel.next

.preheader.us81.us95.split.us.peel.next:          ; preds = %60, %.preheader.us81.us95.split.us.peel.next
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %.preheader.us81.us95.split.us.peel.next ], [ 1, %60 ]
  %61 = shl nsw i64 %indvars.iv151, 2
  %62 = add nuw nsw i64 %42, %61
  %63 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %43, i64 %indvars.iv151
  store i32 %64, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %66 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %39, i64 %43, i64 %indvars.iv151
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, %64
  store i32 %68, ptr %3, align 4, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %65, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %71 = add nsw i64 %indvars.iv151, -1
  %72 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %43, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %73, %64
  store i32 %74, ptr %5, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %65, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %._crit_edge.split.us.us.split.us, label %.preheader.us81.us95.split.us.peel.next, !llvm.loop !12

.preheader.us81.us95.split.peel.next:             ; preds = %54, %.preheader.us81.us95.split.peel.next
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %.preheader.us81.us95.split.peel.next ], [ 1, %54 ]
  %77 = shl nsw i64 %indvars.iv145, 2
  %78 = add nuw nsw i64 %42, %77
  %79 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %43, i64 %indvars.iv145
  store i32 %80, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %82 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %39, i64 %43, i64 %indvars.iv145
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %83, %80
  store i32 %84, ptr %3, align 4, !tbaa !5
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %87 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %45, i64 %indvars.iv145
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, %80
  store i32 %89, ptr %4, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %92 = add nsw i64 %indvars.iv145, -1
  %93 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 %indvars.iv174, i64 %43, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, %80
  store i32 %95, ptr %5, align 4, !tbaa !5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count148
  br i1 %exitcond149.not, label %._crit_edge.split.us.us.split.us, label %.preheader.us81.us95.split.peel.next, !llvm.loop !14

._crit_edge.split.us.us.split.us:                 ; preds = %.preheader.us81.us95.split.peel.next, %.preheader.us81.us95.split.us.peel.next, %54, %60
  %98 = add i32 %.05679.us82.us96, 1
  %.not62.us83.us98 = icmp sgt i32 %98, %21
  br i1 %.not62.us83.us98, label %._crit_edge80.split.split.us.us, label %.preheader.us81.us95, !llvm.loop !15

._crit_edge80.split.split.us.us:                  ; preds = %._crit_edge.split.us.us.split.us, %._crit_edge.split.us.us.split.us.us.us
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %exitcond178.not = icmp eq i64 %indvars.iv.next175, %wide.trip.count177
  br i1 %exitcond178.not, label %._crit_edge.split87.split, label %.preheader68.us91, !llvm.loop !16

.preheader.us81.us.us:                            ; preds = %.preheader68.us91, %._crit_edge.split.us.us.split.us.us.us
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %._crit_edge.split.us.us.split.us.us.us ], [ 0, %.preheader68.us91 ]
  %99 = mul nuw nsw i64 %indvars.iv169, 3
  %.not66.us.us.us = icmp eq i64 %indvars.iv169, 0
  %100 = add nsw i64 %indvars.iv169, -1
  br i1 %.not66.us.us.us, label %110, label %101

101:                                              ; preds = %.preheader.us81.us.us
  %102 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %99
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 %indvars.iv169, i64 0
  store i32 %103, ptr %104, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %105 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 %100, i64 0
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = add nsw i32 %106, %103
  store i32 %107, ptr %4, align 4, !tbaa !5
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %109 = load i32, ptr %108, align 4, !tbaa !5
  store i32 %109, ptr %104, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br i1 %exitcond161.peel.not, label %._crit_edge.split.us.us.split.us.us.us, label %.lr.ph77.split.us.us.split.us.us.split.us105.peel.next

110:                                              ; preds = %.preheader.us81.us.us
  %111 = load i32, ptr @score, align 16, !tbaa !5
  store i32 %111, ptr @f, align 16, !tbaa !5
  br i1 %exitcond167.peel.not, label %._crit_edge.split.us.us.split.us.us.us, label %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next

.lr.ph77.split.us.us.split.us.us.split.us105.peel.next: ; preds = %101, %.lr.ph77.split.us.us.split.us.us.split.us105.peel.next
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %.lr.ph77.split.us.us.split.us.us.split.us105.peel.next ], [ 1, %101 ]
  %112 = shl nsw i64 %indvars.iv157, 2
  %113 = add nuw nsw i64 %99, %112
  %114 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 %indvars.iv169, i64 %indvars.iv157
  store i32 %115, ptr %116, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %117 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 %100, i64 %indvars.iv157
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = add nsw i32 %118, %115
  store i32 %119, ptr %4, align 4, !tbaa !5
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %116, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %121 = load i32, ptr %120, align 4, !tbaa !5
  store i32 %121, ptr %116, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %122 = add nsw i64 %indvars.iv157, -1
  %123 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 %indvars.iv169, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add nsw i32 %124, %115
  store i32 %125, ptr %5, align 4, !tbaa !5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %116, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %127 = load i32, ptr %126, align 4, !tbaa !5
  store i32 %127, ptr %116, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge.split.us.us.split.us.us.us, label %.lr.ph77.split.us.us.split.us.us.split.us105.peel.next, !llvm.loop !17

._crit_edge.split.us.us.split.us.us.us:           ; preds = %.lr.ph77.split.us.us.split.us.us.split.us105.peel.next, %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next, %101, %110
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %exitcond173.not = icmp eq i64 %indvars.iv.next170, %wide.trip.count172
  br i1 %exitcond173.not, label %._crit_edge80.split.split.us.us, label %.preheader.us81.us.us, !llvm.loop !15

.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next: ; preds = %110, %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next
  %128 = phi i32 [ %135, %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next ], [ %111, %110 ]
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next ], [ 1, %110 ]
  %129 = shl nsw i64 %indvars.iv163, 2
  %130 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %129
  %131 = load i32, ptr %130, align 16, !tbaa !5
  %132 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 0, i64 0, i64 0, i64 %indvars.iv163
  store i32 %131, ptr %132, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %133 = add nsw i32 %128, %131
  store i32 %133, ptr %5, align 4, !tbaa !5
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %132, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond167.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count166
  br i1 %exitcond167.not, label %._crit_edge.split.us.us.split.us.us.us, label %.lr.ph77.split.us.us.split.us.us.split.us.us.peel.next, !llvm.loop !18

._crit_edge111:                                   ; preds = %._crit_edge.split87.split, %.preheader69.lr.ph, %.preheader70.._crit_edge111_crit_edge
  %136 = phi i32 [ %.pre, %.preheader70.._crit_edge111_crit_edge ], [ %17, %.preheader69.lr.ph ], [ %17, %._crit_edge.split87.split ]
  %137 = phi i32 [ %.pre189, %.preheader70.._crit_edge111_crit_edge ], [ %23, %.preheader69.lr.ph ], [ %23, %._crit_edge.split87.split ]
  %138 = phi i32 [ %.pre187, %.preheader70.._crit_edge111_crit_edge ], [ %21, %.preheader69.lr.ph ], [ %21, %._crit_edge.split87.split ]
  %139 = phi i32 [ %.pre185, %.preheader70.._crit_edge111_crit_edge ], [ %19, %.preheader69.lr.ph ], [ %19, %._crit_edge.split87.split ]
  %140 = sext i32 %136 to i64
  %141 = sext i32 %139 to i64
  %142 = sext i32 %138 to i64
  %143 = sext i32 %137 to i64
  %144 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %140, i64 %141, i64 %142, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %145)
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %1) #7
  ret i32 0

.preheader68:                                     ; preds = %.preheader69, %._crit_edge80.split.split
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %._crit_edge80.split.split ], [ 0, %.preheader69 ]
  %148 = shl nuw nsw i64 %indvars.iv140, 1
  %149 = add nuw nsw i64 %148, %indvars.iv179
  %.not65 = icmp eq i64 %indvars.iv140, 0
  %150 = add nsw i64 %indvars.iv140, -1
  br label %.preheader

._crit_edge.split87.split:                        ; preds = %._crit_edge80.split.split, %._crit_edge80.split.split.us.us
  %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
  %exitcond183.not = icmp eq i64 %indvars.iv.next180, %wide.trip.count182
  br i1 %exitcond183.not, label %._crit_edge111, label %.preheader69, !llvm.loop !19

.preheader:                                       ; preds = %.preheader68, %._crit_edge.split
  %indvars.iv135 = phi i64 [ 0, %.preheader68 ], [ %indvars.iv.next136, %._crit_edge.split ]
  %151 = mul nuw nsw i64 %indvars.iv135, 3
  %152 = add nuw nsw i64 %149, %151
  %.not66 = icmp eq i64 %indvars.iv135, 0
  %153 = add nsw i64 %indvars.iv135, -1
  %154 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %152
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %indvars.iv140, i64 %indvars.iv135, i64 0
  store i32 %155, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %157 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %37, i64 %indvars.iv140, i64 %indvars.iv135, i64 0
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = add nsw i32 %158, %155
  store i32 %159, ptr %2, align 4, !tbaa !5
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %156, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br i1 %.not65, label %168, label %162

162:                                              ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %163 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %150, i64 %indvars.iv135, i64 0
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = add nsw i32 %164, %155
  store i32 %165, ptr %3, align 4, !tbaa !5
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %156, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %168

168:                                              ; preds = %162, %.preheader
  br i1 %.not66, label %175, label %169

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %170 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %indvars.iv140, i64 %153, i64 0
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add nsw i32 %171, %155
  store i32 %172, ptr %4, align 4, !tbaa !5
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %156, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %174 = load i32, ptr %173, align 4, !tbaa !5
  store i32 %174, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %175

175:                                              ; preds = %168, %169
  br i1 %exitcond.peel.not, label %._crit_edge.split, label %.peel.next

._crit_edge80.split.split:                        ; preds = %._crit_edge.split
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond144.not = icmp eq i64 %indvars.iv.next141, %wide.trip.count143
  br i1 %exitcond144.not, label %._crit_edge.split87.split, label %.preheader68, !llvm.loop !16

._crit_edge.split:                                ; preds = %199, %175
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138
  br i1 %exitcond139.not, label %._crit_edge80.split.split, label %.preheader, !llvm.loop !15

.peel.next:                                       ; preds = %175, %199
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %199 ], [ 1, %175 ]
  %176 = shl nsw i64 %indvars.iv131, 2
  %177 = add nuw nsw i64 %152, %176
  %178 = getelementptr inbounds [360 x i32], ptr @score, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %indvars.iv140, i64 %indvars.iv135, i64 %indvars.iv131
  store i32 %179, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %181 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %37, i64 %indvars.iv140, i64 %indvars.iv135, i64 %indvars.iv131
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = add nsw i32 %182, %179
  store i32 %183, ptr %2, align 4, !tbaa !5
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %180, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %185 = load i32, ptr %184, align 4, !tbaa !5
  store i32 %185, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br i1 %.not65, label %192, label %186

186:                                              ; preds = %.peel.next
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %187 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %150, i64 %indvars.iv135, i64 %indvars.iv131
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = add nsw i32 %188, %179
  store i32 %189, ptr %3, align 4, !tbaa !5
  %190 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %180, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %191 = load i32, ptr %190, align 4, !tbaa !5
  store i32 %191, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %192

192:                                              ; preds = %186, %.peel.next
  br i1 %.not66, label %199, label %193

193:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %194 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %indvars.iv140, i64 %153, i64 %indvars.iv131
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = add nsw i32 %195, %179
  store i32 %196, ptr %4, align 4, !tbaa !5
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %180, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %198 = load i32, ptr %197, align 4, !tbaa !5
  store i32 %198, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %199

199:                                              ; preds = %193, %192
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %200 = add nsw i64 %indvars.iv131, -1
  %201 = getelementptr inbounds [41 x [41 x [41 x [41 x i32]]]], ptr @f, i64 0, i64 %indvars.iv179, i64 %indvars.iv140, i64 %indvars.iv135, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = add nsw i32 %202, %179
  store i32 %203, ptr %5, align 4, !tbaa !5
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %180, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %205 = load i32, ptr %204, align 4, !tbaa !5
  store i32 %205, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.split, label %.peel.next, !llvm.loop !20
}

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

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

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

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

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

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

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

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

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

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

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


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