; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/动态规划/插头DP.ll (Z3reciiRK5State)

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

%struct.State = type { [9 x i32], i32 }

@nrows = external dso_local global i32, align 4
@ncols = external dso_local global i32, align 4
@G = external dso_local global [10 x [10 x i32]], align 16
@memo = external dso_local global [9 x [9 x [59049 x i32]]], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3reciiRK5State(i32 noundef %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(40) %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.State, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr @ncols, align 4, !tbaa !5
  %27 = icmp eq i32 %25, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %3
  store i32 0, ptr %6, align 4, !tbaa !5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %5, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %28, %3
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr @nrows, align 4, !tbaa !5
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  store i32 0, ptr %4, align 4
  br label %277

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = call noundef i32 @_ZNK5State6encodeEv(ptr noundef nonnull align 4 dereferenceable(40) %37)
  store i32 %38, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [9 x [9 x [59049 x i32]]], ptr @memo, i64 0, i64 %40
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [9 x [59049 x i32]], ptr %41, i64 0, i64 %43
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [59049 x i32], ptr %44, i64 0, i64 %46
  store ptr %47, ptr %9, align 8, !tbaa !9
  %48 = load ptr, ptr %9, align 8, !tbaa !9
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp sge i32 %49, 0
  br i1 %50, label %51, label %54

51:                                               ; preds = %36
  %52 = load ptr, ptr %9, align 8, !tbaa !9
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %276

54:                                               ; preds = %36
  %55 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 100000000, ptr %55, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [10 x [10 x i32]], ptr @G, i64 0, i64 %57
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10 x i32], ptr %58, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sle i32 %62, 1
  br i1 %63, label %64, label %200

64:                                               ; preds = %54
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %65, i32 noundef %66, i32 noundef %67, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %68, label %69, label %78

69:                                               ; preds = %64
  %70 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  %74 = call noundef i32 @_Z3reciiRK5State(i32 noundef %71, i32 noundef %73, ptr noundef nonnull align 4 dereferenceable(40) %11)
  store i32 %74, ptr %12, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %76, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %78

78:                                               ; preds = %69, %64
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [10 x [10 x i32]], ptr @G, i64 0, i64 %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [10 x i32], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %199

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

88:                                               ; preds = %195, %87
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = icmp sle i32 %89, 2
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %198

92:                                               ; preds = %88
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %93, i32 noundef %94, i32 noundef %95, i32 noundef %96, i32 noundef %97, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %98, label %99, label %109

99:                                               ; preds = %92
  %100 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  %104 = call noundef i32 @_Z3reciiRK5State(i32 noundef %101, i32 noundef %103, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %105 = add nsw i32 %104, 2
  store i32 %105, ptr %14, align 4, !tbaa !5
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %100, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %107, ptr %108, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %109

109:                                              ; preds = %99, %92
  %110 = load ptr, ptr %7, align 8, !tbaa !9
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %110, i32 noundef %111, i32 noundef %112, i32 noundef %113, i32 noundef 0, i32 noundef %114, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %115, label %116, label %126

116:                                              ; preds = %109
  %117 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = call noundef i32 @_Z3reciiRK5State(i32 noundef %118, i32 noundef %120, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %122 = add nsw i32 %121, 2
  store i32 %122, ptr %15, align 4, !tbaa !5
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %117, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %124, ptr %125, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %126

126:                                              ; preds = %116, %109
  %127 = load ptr, ptr %7, align 8, !tbaa !9
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = load i32, ptr %13, align 4, !tbaa !5
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %127, i32 noundef %128, i32 noundef %129, i32 noundef %130, i32 noundef 0, i32 noundef 0, i32 noundef %131, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %132, label %133, label %143

133:                                              ; preds = %126
  %134 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  %138 = call noundef i32 @_Z3reciiRK5State(i32 noundef %135, i32 noundef %137, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %139 = add nsw i32 %138, 2
  store i32 %139, ptr %16, align 4, !tbaa !5
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %134, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %141, ptr %142, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %143

143:                                              ; preds = %133, %126
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %144, i32 noundef %145, i32 noundef %146, i32 noundef 0, i32 noundef %147, i32 noundef %148, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %149, label %150, label %160

150:                                              ; preds = %143
  %151 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = load i32, ptr %6, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  %155 = call noundef i32 @_Z3reciiRK5State(i32 noundef %152, i32 noundef %154, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %156 = add nsw i32 %155, 2
  store i32 %156, ptr %17, align 4, !tbaa !5
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %151, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %158, ptr %159, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %160

160:                                              ; preds = %150, %143
  %161 = load ptr, ptr %7, align 8, !tbaa !9
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %161, i32 noundef %162, i32 noundef %163, i32 noundef 0, i32 noundef %164, i32 noundef 0, i32 noundef %165, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %166, label %167, label %177

167:                                              ; preds = %160
  %168 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %169 = load i32, ptr %5, align 4, !tbaa !5
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  %172 = call noundef i32 @_Z3reciiRK5State(i32 noundef %169, i32 noundef %171, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %173 = add nsw i32 %172, 2
  store i32 %173, ptr %18, align 4, !tbaa !5
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %175, ptr %176, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %177

177:                                              ; preds = %167, %160
  %178 = load ptr, ptr %7, align 8, !tbaa !9
  %179 = load i32, ptr %5, align 4, !tbaa !5
  %180 = load i32, ptr %6, align 4, !tbaa !5
  %181 = load i32, ptr %13, align 4, !tbaa !5
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %178, i32 noundef %179, i32 noundef %180, i32 noundef 0, i32 noundef 0, i32 noundef %181, i32 noundef %182, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %183, label %184, label %194

184:                                              ; preds = %177
  %185 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %186 = load i32, ptr %5, align 4, !tbaa !5
  %187 = load i32, ptr %6, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  %189 = call noundef i32 @_Z3reciiRK5State(i32 noundef %186, i32 noundef %188, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %190 = add nsw i32 %189, 2
  store i32 %190, ptr %19, align 4, !tbaa !5
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %185, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %192, ptr %193, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %194

194:                                              ; preds = %184, %177
  br label %195

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

198:                                              ; preds = %91
  br label %199

199:                                              ; preds = %198, %78
  br label %273

200:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %201 = load i32, ptr %5, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [10 x [10 x i32]], ptr @G, i64 0, i64 %202
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [10 x i32], ptr %203, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = sub nsw i32 %207, 1
  store i32 %208, ptr %20, align 4, !tbaa !5
  %209 = load ptr, ptr %7, align 8, !tbaa !9
  %210 = load i32, ptr %5, align 4, !tbaa !5
  %211 = load i32, ptr %6, align 4, !tbaa !5
  %212 = load i32, ptr %20, align 4, !tbaa !5
  %213 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %209, i32 noundef %210, i32 noundef %211, i32 noundef %212, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %213, label %214, label %224

214:                                              ; preds = %200
  %215 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %216 = load i32, ptr %5, align 4, !tbaa !5
  %217 = load i32, ptr %6, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  %219 = call noundef i32 @_Z3reciiRK5State(i32 noundef %216, i32 noundef %218, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %21, align 4, !tbaa !5
  %221 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %215, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %222, ptr %223, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %224

224:                                              ; preds = %214, %200
  %225 = load ptr, ptr %7, align 8, !tbaa !9
  %226 = load i32, ptr %5, align 4, !tbaa !5
  %227 = load i32, ptr %6, align 4, !tbaa !5
  %228 = load i32, ptr %20, align 4, !tbaa !5
  %229 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %225, i32 noundef %226, i32 noundef %227, i32 noundef 0, i32 noundef %228, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %229, label %230, label %240

230:                                              ; preds = %224
  %231 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %232 = load i32, ptr %5, align 4, !tbaa !5
  %233 = load i32, ptr %6, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  %235 = call noundef i32 @_Z3reciiRK5State(i32 noundef %232, i32 noundef %234, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %22, align 4, !tbaa !5
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %231, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %238, ptr %239, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %240

240:                                              ; preds = %230, %224
  %241 = load ptr, ptr %7, align 8, !tbaa !9
  %242 = load i32, ptr %5, align 4, !tbaa !5
  %243 = load i32, ptr %6, align 4, !tbaa !5
  %244 = load i32, ptr %20, align 4, !tbaa !5
  %245 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %241, i32 noundef %242, i32 noundef %243, i32 noundef 0, i32 noundef 0, i32 noundef %244, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %245, label %246, label %256

246:                                              ; preds = %240
  %247 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %248 = load i32, ptr %5, align 4, !tbaa !5
  %249 = load i32, ptr %6, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  %251 = call noundef i32 @_Z3reciiRK5State(i32 noundef %248, i32 noundef %250, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %23, align 4, !tbaa !5
  %253 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %247, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %254, ptr %255, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %256

256:                                              ; preds = %246, %240
  %257 = load ptr, ptr %7, align 8, !tbaa !9
  %258 = load i32, ptr %5, align 4, !tbaa !5
  %259 = load i32, ptr %6, align 4, !tbaa !5
  %260 = load i32, ptr %20, align 4, !tbaa !5
  %261 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %257, i32 noundef %258, i32 noundef %259, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef %260, ptr noundef nonnull align 4 dereferenceable(40) %11)
  br i1 %261, label %262, label %272

262:                                              ; preds = %256
  %263 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %264 = load i32, ptr %5, align 4, !tbaa !5
  %265 = load i32, ptr %6, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  %267 = call noundef i32 @_Z3reciiRK5State(i32 noundef %264, i32 noundef %266, ptr noundef nonnull align 4 dereferenceable(40) %11)
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %24, align 4, !tbaa !5
  %269 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %263, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %270, ptr %271, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %272

272:                                              ; preds = %262, %256
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %273

273:                                              ; preds = %272, %199
  %274 = load ptr, ptr %9, align 8, !tbaa !9
  %275 = load i32, ptr %274, align 4, !tbaa !5
  store i32 %275, ptr %4, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %276

276:                                              ; preds = %273, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %277

277:                                              ; preds = %276, %35
  %278 = load i32, ptr %4, align 4
  ret i32 %278
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(40)) #2 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

%struct.State = type { [9 x i32], i32 }

@nrows = external dso_local local_unnamed_addr global i32, align 4
@ncols = external dso_local local_unnamed_addr global i32, align 4
@G = external dso_local local_unnamed_addr global [10 x [10 x i32]], align 16
@memo = external dso_local global [9 x [9 x [59049 x i32]]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z3reciiRK5State(i32 noundef %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(40) %2) local_unnamed_addr #0 {
  %4 = alloca %struct.State, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = load i32, ptr @ncols, align 4, !tbaa !5
  %17 = icmp eq i32 %16, %1
  %spec.select = select i1 %17, i32 0, i32 %1
  %18 = zext i1 %17 to i32
  %spec.select118 = add nsw i32 %18, %0
  %19 = load i32, ptr @nrows, align 4, !tbaa !5
  %20 = icmp eq i32 %spec.select118, %19
  br i1 %20, label %161, label %21

21:                                               ; preds = %3
  %22 = tail call noundef i32 @_ZNK5State6encodeEv(ptr noundef nonnull align 4 dereferenceable(40) %2)
  %23 = sext i32 %spec.select118 to i64
  %24 = sext i32 %spec.select to i64
  %25 = sext i32 %22 to i64
  %26 = getelementptr inbounds [9 x [9 x [59049 x i32]]], ptr @memo, i64 0, i64 %23, i64 %24, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, -1
  br i1 %28, label %161, label %29

29:                                               ; preds = %21
  store i32 100000000, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  %30 = getelementptr inbounds [10 x [10 x i32]], ptr @G, i64 0, i64 %23, i64 %24
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 2
  br i1 %32, label %33, label %127

33:                                               ; preds = %29
  %34 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %34, label %35, label %40

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %36 = add nsw i32 %spec.select, 1
  %37 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %36, ptr noundef nonnull align 4 dereferenceable(40) %4)
  store i32 %37, ptr %5, align 4, !tbaa !5
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %40

40:                                               ; preds = %35, %33
  %41 = load i32, ptr %30, align 4, !tbaa !5
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %40
  %43 = add nsw i32 %spec.select, 1
  %44 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %44, label %45, label %50

45:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %46 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %47 = add nsw i32 %46, 2
  store i32 %47, ptr %6, align 4, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  br label %50

50:                                               ; preds = %45, %.preheader
  %51 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 1, i32 noundef 0, i32 noundef 1, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %51, label %52, label %57

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %53 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %54 = add nsw i32 %53, 2
  store i32 %54, ptr %7, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %57

57:                                               ; preds = %52, %50
  %58 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %58, label %59, label %64

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %60 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %61 = add nsw i32 %60, 2
  store i32 %61, ptr %8, align 4, !tbaa !5
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  br label %64

64:                                               ; preds = %59, %57
  %65 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %65, label %66, label %71

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %67 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %68 = add nsw i32 %67, 2
  store i32 %68, ptr %9, align 4, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  br label %71

71:                                               ; preds = %66, %64
  %72 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 1, i32 noundef 0, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %72, label %73, label %78

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  %74 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %75 = add nsw i32 %74, 2
  store i32 %75, ptr %10, align 4, !tbaa !5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  br label %78

78:                                               ; preds = %73, %71
  %79 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %79, label %80, label %85

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %81 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %82 = add nsw i32 %81, 2
  store i32 %82, ptr %11, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  br label %85

85:                                               ; preds = %78, %80
  %86 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %86, label %87, label %92

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %88 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %89 = add nsw i32 %88, 2
  store i32 %89, ptr %6, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  br label %92

92:                                               ; preds = %87, %85
  %93 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 2, i32 noundef 0, i32 noundef 2, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %93, label %94, label %99

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %95 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %96 = add nsw i32 %95, 2
  store i32 %96, ptr %7, align 4, !tbaa !5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %98 = load i32, ptr %97, align 4, !tbaa !5
  store i32 %98, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %99

99:                                               ; preds = %94, %92
  %100 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %100, label %101, label %106

101:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %102 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %103 = add nsw i32 %102, 2
  store i32 %103, ptr %8, align 4, !tbaa !5
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  br label %106

106:                                              ; preds = %101, %99
  %107 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 2, i32 noundef 2, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %107, label %108, label %113

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %109 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %110 = add nsw i32 %109, 2
  store i32 %110, ptr %9, align 4, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  br label %113

113:                                              ; preds = %108, %106
  %114 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 2, i32 noundef 0, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %114, label %115, label %120

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  %116 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %117 = add nsw i32 %116, 2
  store i32 %117, ptr %10, align 4, !tbaa !5
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  br label %120

120:                                              ; preds = %115, %113
  %121 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 0, i32 noundef 2, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %121, label %122, label %.loopexit

122:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %123 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %43, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %124 = add nsw i32 %123, 2
  store i32 %124, ptr %11, align 4, !tbaa !5
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %126 = load i32, ptr %125, align 4, !tbaa !5
  store i32 %126, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  br label %.loopexit

127:                                              ; preds = %29
  %128 = add nsw i32 %31, -1
  %129 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef %128, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %129, label %130, label %136

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  %131 = add nsw i32 %spec.select, 1
  %132 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %131, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %12, align 4, !tbaa !5
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  br label %136

136:                                              ; preds = %130, %127
  %137 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef %128, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %137, label %138, label %144

138:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  %139 = add nsw i32 %spec.select, 1
  %140 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %139, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %13, align 4, !tbaa !5
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %143 = load i32, ptr %142, align 4, !tbaa !5
  store i32 %143, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  br label %144

144:                                              ; preds = %138, %136
  %145 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 0, i32 noundef %128, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %145, label %146, label %152

146:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #3
  %147 = add nsw i32 %spec.select, 1
  %148 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %147, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %14, align 4, !tbaa !5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %151 = load i32, ptr %150, align 4, !tbaa !5
  store i32 %151, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #3
  br label %152

152:                                              ; preds = %146, %144
  %153 = call noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40) %2, i32 noundef %spec.select118, i32 noundef %spec.select, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef %128, ptr noundef nonnull align 4 dereferenceable(40) %4)
  br i1 %153, label %154, label %.loopexit

154:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #3
  %155 = add nsw i32 %spec.select, 1
  %156 = call noundef i32 @_Z3reciiRK5State(i32 noundef %spec.select118, i32 noundef %155, ptr noundef nonnull align 4 dereferenceable(40) %4)
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %15, align 4, !tbaa !5
  %158 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %159 = load i32, ptr %158, align 4, !tbaa !5
  store i32 %159, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #3
  br label %.loopexit

.loopexit:                                        ; preds = %120, %122, %152, %154, %40
  %160 = load i32, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  br label %161

161:                                              ; preds = %.loopexit, %21, %3
  %.1 = phi i32 [ 0, %3 ], [ %160, %.loopexit ], [ %27, %21 ]
  ret i32 %.1
}

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK5State6encodeEv(ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5State4nextEiiiiiiRS_(ptr noundef nonnull align 4 dereferenceable(40), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #0 align 2

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass