; LLVM IR from tangjz/acm-icpc :: uvalive/7217.ll (Z6chkPosv)

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

@n = external dso_local global i32, align 4
@low = external dso_local global i32, align 4
@high = external dso_local global i32, align 4
@b = external dso_local global [5 x i32], align 16
@c = external dso_local global [5 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z6chkPosv() #0 {
  %1 = alloca i1, align 1
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca 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 = load i32, ptr @n, align 4, !tbaa !5
  %22 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 2), align 8, !tbaa !5
  %23 = sub nsw i32 %21, %22
  %24 = load i32, ptr @low, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %0
  store i1 false, ptr %1, align 1
  br label %213

27:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @c, i8 0, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %28 = load i32, ptr @high, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sub nsw i32 %28, %29
  store i32 %30, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %31 = load i32, ptr @b, align 16, !tbaa !5
  %32 = load i32, ptr @c, align 16, !tbaa !5
  %33 = sub nsw i32 %31, %32
  store i32 %33, ptr %5, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = ashr i32 %35, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  store i32 %36, ptr %3, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = shl i32 %37, 1
  %39 = load i32, ptr @c, align 16, !tbaa !5
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr @c, align 16, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = shl i32 %41, 1
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %45 = load i32, ptr @high, align 4, !tbaa !5
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sub nsw i32 %45, %46
  store i32 %47, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %48 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 4), align 16, !tbaa !5
  %49 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %50 = sub nsw i32 %48, %49
  store i32 %50, ptr %8, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  store i32 %52, ptr %6, align 4, !tbaa !5
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %55 = add nsw i32 %54, %53
  store i32 %55, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %59 = load i32, ptr @c, align 16, !tbaa !5
  %60 = load i32, ptr @b, align 16, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %78

62:                                               ; preds = %27
  %63 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %78

66:                                               ; preds = %62
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 2
  %69 = load i32, ptr @high, align 4, !tbaa !5
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %71, label %78

71:                                               ; preds = %66
  %72 = load i32, ptr @c, align 16, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr @c, align 16, !tbaa !5
  %74 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = add nsw i32 %76, 2
  store i32 %77, ptr %2, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %71, %66, %62, %27
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = load i32, ptr @low, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %100

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %83 = load i32, ptr @high, align 4, !tbaa !5
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = sub nsw i32 %83, %84
  store i32 %85, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %86 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %87 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %88 = sub nsw i32 %86, %87
  store i32 %88, ptr %11, align 4, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = ashr i32 %90, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  store i32 %91, ptr %9, align 4, !tbaa !5
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = shl i32 %92, 1
  %94 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %95 = add nsw i32 %94, %93
  store i32 %95, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = shl i32 %96, 1
  %98 = load i32, ptr %2, align 4, !tbaa !5
  %99 = add nsw i32 %98, %97
  store i32 %99, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %100

100:                                              ; preds = %82, %78
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = load i32, ptr @low, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %104, label %119

104:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %105 = load i32, ptr @high, align 4, !tbaa !5
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = sub nsw i32 %105, %106
  store i32 %107, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %108 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 3), align 4, !tbaa !5
  %109 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %110 = sub nsw i32 %108, %109
  store i32 %110, ptr %14, align 4, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  store i32 %112, ptr %12, align 4, !tbaa !5
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %115 = add nsw i32 %114, %113
  store i32 %115, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = add nsw i32 %117, %116
  store i32 %118, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %119

119:                                              ; preds = %104, %100
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = load i32, ptr @low, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %123, label %164

123:                                              ; preds = %119
  %124 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %126, label %143

126:                                              ; preds = %123
  %127 = load i32, ptr @c, align 16, !tbaa !5
  %128 = load i32, ptr @b, align 16, !tbaa !5
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %130, label %143

130:                                              ; preds = %126
  %131 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %132 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %134, label %143

134:                                              ; preds = %130
  %135 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %137 = load i32, ptr @c, align 16, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr @c, align 16, !tbaa !5
  %139 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %141 = load i32, ptr %2, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %2, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %134, %130, %126, %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %144 = load i32, ptr @high, align 4, !tbaa !5
  %145 = load i32, ptr %2, align 4, !tbaa !5
  %146 = sub nsw i32 %144, %145
  store i32 %146, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %147 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %148 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %149 = sub nsw i32 %147, %148
  %150 = ashr i32 %149, 1
  store i32 %150, ptr %17, align 4, !tbaa !5
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), ptr noundef nonnull align 4 dereferenceable(4) %17)
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %151)
  %153 = load i32, ptr %152, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  store i32 %153, ptr %15, align 4, !tbaa !5
  %154 = load i32, ptr %15, align 4, !tbaa !5
  %155 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %156 = sub nsw i32 %155, %154
  store i32 %156, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = shl i32 %157, 1
  %159 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %160 = add nsw i32 %159, %158
  store i32 %160, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %161 = load i32, ptr %15, align 4, !tbaa !5
  %162 = load i32, ptr %2, align 4, !tbaa !5
  %163 = add nsw i32 %162, %161
  store i32 %163, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %164

164:                                              ; preds = %143, %119
  %165 = load i32, ptr %2, align 4, !tbaa !5
  %166 = load i32, ptr @low, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %209

168:                                              ; preds = %164
  %169 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %170 = icmp sgt i32 %169, 0
  br i1 %170, label %171, label %188

171:                                              ; preds = %168
  %172 = load i32, ptr @c, align 16, !tbaa !5
  %173 = load i32, ptr @b, align 16, !tbaa !5
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %175, label %188

175:                                              ; preds = %171
  %176 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %177 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %179, label %188

179:                                              ; preds = %175
  %180 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %181 = add nsw i32 %180, -1
  store i32 %181, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %182 = load i32, ptr @c, align 16, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr @c, align 16, !tbaa !5
  %184 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %186 = load i32, ptr %2, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %2, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %179, %175, %171, %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %189 = load i32, ptr @high, align 4, !tbaa !5
  %190 = load i32, ptr %2, align 4, !tbaa !5
  %191 = sub nsw i32 %189, %190
  store i32 %191, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %192 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %193 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %194 = sub nsw i32 %192, %193
  %195 = ashr i32 %194, 1
  store i32 %195, ptr %20, align 4, !tbaa !5
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %20)
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %196)
  %198 = load i32, ptr %197, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  store i32 %198, ptr %18, align 4, !tbaa !5
  %199 = load i32, ptr %18, align 4, !tbaa !5
  %200 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %201 = sub nsw i32 %200, %199
  store i32 %201, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 4), align 16, !tbaa !5
  %202 = load i32, ptr %18, align 4, !tbaa !5
  %203 = shl i32 %202, 1
  %204 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %205 = add nsw i32 %204, %203
  store i32 %205, ptr getelementptr inbounds ([5 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %206 = load i32, ptr %18, align 4, !tbaa !5
  %207 = load i32, ptr %2, align 4, !tbaa !5
  %208 = add nsw i32 %207, %206
  store i32 %208, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %209

209:                                              ; preds = %188, %164
  %210 = load i32, ptr %2, align 4, !tbaa !5
  %211 = load i32, ptr @low, align 4, !tbaa !5
  %212 = icmp sge i32 %210, %211
  store i1 %212, ptr %1, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %213

213:                                              ; preds = %209, %26
  %214 = load i1, ptr %1, align 1
  ret i1 %214
}

; 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

; 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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"}


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

@n = external dso_local local_unnamed_addr global i32, align 4
@low = external dso_local local_unnamed_addr global i32, align 4
@high = external dso_local local_unnamed_addr global i32, align 4
@b = external dso_local local_unnamed_addr global [5 x i32], align 16
@c = external dso_local global [5 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z6chkPosv() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca 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 = load i32, ptr @n, align 4, !tbaa !5
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 8), align 8, !tbaa !5
  %15 = sub nsw i32 %13, %14
  %16 = load i32, ptr @low, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %145, label %18

18:                                               ; preds = %0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) @c, i8 0, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %19 = load i32, ptr @high, align 4, !tbaa !5
  store i32 %19, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %20 = load i32, ptr @b, align 16, !tbaa !5
  store i32 %20, ptr %2, align 4, !tbaa !5
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %22 = load i32, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %23 = and i32 %22, -2
  %24 = load i32, ptr @c, align 16, !tbaa !5
  %25 = add nsw i32 %24, %23
  store i32 %25, ptr @c, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %26 = load i32, ptr @high, align 4, !tbaa !5
  %27 = sub nsw i32 %26, %23
  store i32 %27, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 16), align 16, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %30 = sub nsw i32 %28, %29
  store i32 %30, ptr %4, align 4, !tbaa !5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %32 = load i32, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %34 = add nsw i32 %33, %32
  store i32 %34, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %35 = add nsw i32 %32, %23
  %36 = load i32, ptr @c, align 16, !tbaa !5
  %37 = load i32, ptr @b, align 16, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %39, label %49

39:                                               ; preds = %18
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %49

43:                                               ; preds = %39
  %44 = add nsw i32 %35, 2
  %45 = load i32, ptr @high, align 4, !tbaa !5
  %.not = icmp sgt i32 %44, %45
  br i1 %.not, label %49, label %46

46:                                               ; preds = %43
  %47 = add nsw i32 %36, 1
  store i32 %47, ptr @c, align 16, !tbaa !5
  %48 = add nsw i32 %40, 1
  store i32 %48, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  br label %49

49:                                               ; preds = %46, %43, %39, %18
  %.035 = phi i32 [ %44, %46 ], [ %35, %43 ], [ %35, %39 ], [ %35, %18 ]
  %50 = load i32, ptr @low, align 4, !tbaa !5
  %51 = icmp slt i32 %.035, %50
  br i1 %51, label %52, label %64

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %53 = load i32, ptr @high, align 4, !tbaa !5
  %54 = sub nsw i32 %53, %.035
  store i32 %54, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %57 = sub nsw i32 %55, %56
  store i32 %57, ptr %6, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %59 = load i32, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %60 = and i32 %59, -2
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %62 = add nsw i32 %61, %60
  store i32 %62, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %63 = add nsw i32 %60, %.035
  %.pre = load i32, ptr @low, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %52, %49
  %65 = phi i32 [ %.pre, %52 ], [ %50, %49 ]
  %.1 = phi i32 [ %63, %52 ], [ %.035, %49 ]
  %66 = icmp slt i32 %.1, %65
  br i1 %66, label %67, label %78

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %68 = load i32, ptr @high, align 4, !tbaa !5
  %69 = sub nsw i32 %68, %.1
  store i32 %69, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 12), align 4, !tbaa !5
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  store i32 %72, ptr %8, align 4, !tbaa !5
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %74 = load i32, ptr %73, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %77 = add nsw i32 %74, %.1
  %.pre40 = load i32, ptr @low, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %67, %64
  %79 = phi i32 [ %.pre40, %67 ], [ %65, %64 ]
  %.2 = phi i32 [ %77, %67 ], [ %.1, %64 ]
  %80 = icmp slt i32 %.2, %79
  br i1 %80, label %81, label %110

81:                                               ; preds = %78
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %84, label %._crit_edge

._crit_edge:                                      ; preds = %81
  %.pre41 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %.pre43 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  br label %94

84:                                               ; preds = %81
  %85 = load i32, ptr @c, align 16, !tbaa !5
  %86 = load i32, ptr @b, align 16, !tbaa !5
  %87 = icmp slt i32 %85, %86
  %.pre42 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %.pre44 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %88 = icmp slt i32 %.pre44, %.pre42
  %or.cond = select i1 %87, i1 %88, i1 false
  br i1 %or.cond, label %89, label %94

89:                                               ; preds = %84
  %90 = add nsw i32 %82, -1
  store i32 %90, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %91 = add nsw i32 %85, 1
  store i32 %91, ptr @c, align 16, !tbaa !5
  %92 = add nsw i32 %.pre44, 1
  store i32 %92, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %93 = add nsw i32 %.2, 1
  br label %94

94:                                               ; preds = %._crit_edge, %89, %84
  %95 = phi i32 [ %92, %89 ], [ %.pre44, %84 ], [ %.pre43, %._crit_edge ]
  %96 = phi i32 [ %.pre42, %89 ], [ %.pre42, %84 ], [ %.pre41, %._crit_edge ]
  %.3 = phi i32 [ %93, %89 ], [ %.2, %84 ], [ %.2, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %97 = load i32, ptr @high, align 4, !tbaa !5
  %98 = sub nsw i32 %97, %.3
  store i32 %98, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %99 = sub nsw i32 %96, %95
  %100 = ashr i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !5
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @c, i64 12), ptr noundef nonnull align 4 dereferenceable(4) %10)
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %101)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %105 = sub nsw i32 %104, %103
  store i32 %105, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %106 = shl i32 %103, 1
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %108 = add nsw i32 %107, %106
  store i32 %108, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %109 = add nsw i32 %103, %.3
  %.pre45 = load i32, ptr @low, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %94, %78
  %111 = phi i32 [ %.pre45, %94 ], [ %79, %78 ]
  %.4 = phi i32 [ %109, %94 ], [ %.2, %78 ]
  %112 = icmp slt i32 %.4, %111
  br i1 %112, label %113, label %142

113:                                              ; preds = %110
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %._crit_edge46

._crit_edge46:                                    ; preds = %113
  %.pre47 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %.pre49 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  br label %126

116:                                              ; preds = %113
  %117 = load i32, ptr @c, align 16, !tbaa !5
  %118 = load i32, ptr @b, align 16, !tbaa !5
  %119 = icmp slt i32 %117, %118
  %.pre48 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %.pre50 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %120 = icmp slt i32 %.pre50, %.pre48
  %or.cond52 = select i1 %119, i1 %120, i1 false
  br i1 %or.cond52, label %121, label %126

121:                                              ; preds = %116
  %122 = add nsw i32 %114, -1
  store i32 %122, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %123 = add nsw i32 %117, 1
  store i32 %123, ptr @c, align 16, !tbaa !5
  %124 = add nsw i32 %.pre50, 1
  store i32 %124, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %125 = add nsw i32 %.4, 1
  br label %126

126:                                              ; preds = %._crit_edge46, %121, %116
  %127 = phi i32 [ %124, %121 ], [ %.pre50, %116 ], [ %.pre49, %._crit_edge46 ]
  %128 = phi i32 [ %.pre48, %121 ], [ %.pre48, %116 ], [ %.pre47, %._crit_edge46 ]
  %.5 = phi i32 [ %125, %121 ], [ %.4, %116 ], [ %.4, %._crit_edge46 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %129 = load i32, ptr @high, align 4, !tbaa !5
  %130 = sub nsw i32 %129, %.5
  store i32 %130, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  %131 = sub nsw i32 %128, %127
  %132 = ashr i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !5
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @c, i64 16), ptr noundef nonnull align 4 dereferenceable(4) %12)
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %133)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %137 = sub nsw i32 %136, %135
  store i32 %137, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %138 = shl i32 %135, 1
  %139 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %140 = add nsw i32 %139, %138
  store i32 %140, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %141 = add nsw i32 %135, %.5
  %.pre51 = load i32, ptr @low, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %126, %110
  %143 = phi i32 [ %.pre51, %126 ], [ %111, %110 ]
  %.6 = phi i32 [ %141, %126 ], [ %.4, %110 ]
  %144 = icmp sge i32 %.6, %143
  br label %145

145:                                              ; preds = %0, %142
  %.0 = phi i1 [ %144, %142 ], [ false, %0 ]
  ret i1 %.0
}

; 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

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

; 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass