; LLVM IR from tangjz/acm-icpc :: leetcode/extra/Pony.ai_006-最大正整数.ll (Z5solvev)

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

@_ZZ5solvevE3out = external hidden global [5001 x i32], align 16
@_ZZ5solvevE3pos = external hidden global [11 x [5001 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE4bits = external hidden global [5001 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %25, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 10
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %28

20:                                               ; preds = %16
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %22
  %24 = getelementptr inbounds [5001 x i32], ptr %23, i64 0, i64 0
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %20
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %3, align 4, !tbaa !5
  br label %16, !llvm.loop !9

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

29:                                               ; preds = %48, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %51

34:                                               ; preds = %29
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %41
  %43 = getelementptr inbounds [5001 x i32], ptr %42, i64 0, i64 0
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %43, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [5001 x i32], ptr %39, i64 0, i64 %46
  store i32 %36, ptr %47, align 4, !tbaa !5
  br label %48

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

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

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

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

56:                                               ; preds = %52
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %58
  %60 = getelementptr inbounds [5001 x i32], ptr %59, i64 0, i64 0
  %61 = getelementptr inbounds i32, ptr %60, i64 1
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %63
  %65 = getelementptr inbounds [5001 x i32], ptr %64, i64 0, i64 0
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %67
  %69 = getelementptr inbounds [5001 x i32], ptr %68, i64 0, i64 0
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %65, i64 %71
  %73 = getelementptr inbounds i32, ptr %72, i64 1
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef %61, ptr noundef %73)
  br label %74

74:                                               ; preds = %56
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !5
  br label %52, !llvm.loop !12

77:                                               ; preds = %55
  %78 = load i32, ptr %1, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = mul i64 %79, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE4bits, i8 0, i64 %80, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %180, %77
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %1, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 9, ptr %9, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %175, %86
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = icmp sge i32 %88, 0
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 14, ptr %8, align 4
  br label %178

91:                                               ; preds = %87
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %93
  %95 = getelementptr inbounds [5001 x i32], ptr %94, i64 0, i64 0
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %99, label %98

98:                                               ; preds = %91
  br label %175

99:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %101
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %104
  %106 = getelementptr inbounds [5001 x i32], ptr %105, i64 0, i64 0
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [5001 x i32], ptr %102, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %111 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %111, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %112 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %112, ptr %12, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %125, %99
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %132

117:                                              ; preds = %113
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = sub nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = sub nsw i32 %123, %122
  store i32 %124, ptr %11, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %117
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = sub nsw i32 0, %127
  %129 = and i32 %126, %128
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = sub nsw i32 %130, %129
  store i32 %131, ptr %12, align 4, !tbaa !5
  br label %113, !llvm.loop !13

132:                                              ; preds = %116
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = load i32, ptr %2, align 4, !tbaa !5
  %135 = icmp sgt i32 %133, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %132
  store i32 16, ptr %8, align 4
  br label %173

137:                                              ; preds = %132
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = load i32, ptr %7, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %140
  store i32 %138, ptr %141, align 4, !tbaa !5
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %143
  %145 = getelementptr inbounds [5001 x i32], ptr %144, i64 0, i64 0
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = add nsw i32 %146, -1
  store i32 %147, ptr %145, align 4, !tbaa !5
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = load i32, ptr %2, align 4, !tbaa !5
  %150 = sub nsw i32 %149, %148
  store i32 %150, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %151 = load i32, ptr %10, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %13, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %165, %137
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = load i32, ptr %1, align 4, !tbaa !5
  %156 = icmp sle i32 %154, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %153
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %172

158:                                              ; preds = %153
  %159 = load i32, ptr %13, align 4, !tbaa !5
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %162, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %158
  %166 = load i32, ptr %13, align 4, !tbaa !5
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = sub nsw i32 0, %167
  %169 = and i32 %166, %168
  %170 = load i32, ptr %13, align 4, !tbaa !5
  %171 = add nsw i32 %170, %169
  store i32 %171, ptr %13, align 4, !tbaa !5
  br label %153, !llvm.loop !14

172:                                              ; preds = %157
  store i32 14, ptr %8, align 4
  br label %173

173:                                              ; preds = %172, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %174 = load i32, ptr %8, align 4
  switch i32 %174, label %178 [
    i32 16, label %175
  ]

175:                                              ; preds = %173, %98
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = add nsw i32 %176, -1
  store i32 %177, ptr %9, align 4, !tbaa !5
  br label %87, !llvm.loop !15

178:                                              ; preds = %173, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %7, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %7, align 4, !tbaa !5
  br label %81, !llvm.loop !16

183:                                              ; preds = %85
  %184 = load i32, ptr %1, align 4, !tbaa !5
  %185 = icmp sgt i32 %184, 1
  br i1 %185, label %186, label %199

186:                                              ; preds = %183
  %187 = load i32, ptr %2, align 4, !tbaa !5
  %188 = and i32 %187, 1
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %199

190:                                              ; preds = %186
  %191 = load i32, ptr %1, align 4, !tbaa !5
  %192 = sub nsw i32 %191, 2
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %193
  %195 = load i32, ptr %1, align 4, !tbaa !5
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %197
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %194, ptr noundef nonnull align 4 dereferenceable(4) %198) #6
  br label %199

199:                                              ; preds = %190, %186, %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %219, %199
  %201 = load i32, ptr %14, align 4, !tbaa !5
  %202 = load i32, ptr %1, align 4, !tbaa !5
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %205, label %204

204:                                              ; preds = %200
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %222

205:                                              ; preds = %200
  %206 = load i32, ptr %14, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = load i32, ptr %14, align 4, !tbaa !5
  %211 = load i32, ptr %1, align 4, !tbaa !5
  %212 = sub nsw i32 %211, 1
  %213 = icmp eq i32 %210, %212
  %214 = zext i1 %213 to i64
  %215 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %214
  %216 = load i8, ptr %215, align 1, !tbaa !17
  %217 = sext i8 %216 to i32
  %218 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %209, i32 noundef %217)
  br label %219

219:                                              ; preds = %205
  %220 = load i32, ptr %14, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %14, align 4, !tbaa !5
  br label %200, !llvm.loop !18

222:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

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

; 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 uwtable
declare dso_local void @_ZSt7reverseIPiEvT_S1_(ptr noundef, ptr noundef) #3

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

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

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

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

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

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

@_ZZ5solvevE3out = external hidden global [5001 x i32], align 16
@_ZZ5solvevE3pos = external hidden global [11 x [5001 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE4bits = external hidden local_unnamed_addr global [5001 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %1)
  store i32 0, ptr @_ZZ5solvevE3pos, align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20004), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40008), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60012), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80016), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100020), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120024), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140028), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160032), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr @_ZZ5solvevE3pos, align 16, !tbaa !5
  %7 = sext i32 %.pre to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %8 = phi i64 [ %7, %._crit_edge.loopexit ], [ 0, %0 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %9 = getelementptr inbounds i32, ptr @_ZZ5solvevE3pos, i64 %8
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 4), ptr noundef nonnull %10)
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20004), align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20004), i64 %12
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20008), ptr noundef nonnull %14)
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40008), align 8, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40008), i64 %16
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40012), ptr noundef nonnull %18)
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60012), align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60012), i64 %20
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60016), ptr noundef nonnull %22)
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80016), align 16, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80016), i64 %24
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80020), ptr noundef nonnull %26)
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100020), align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100020), i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100024), ptr noundef nonnull %30)
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120024), align 8, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120024), i64 %32
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120028), ptr noundef nonnull %34)
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140028), align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140028), i64 %36
  %38 = getelementptr inbounds i8, ptr %37, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140032), ptr noundef nonnull %38)
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160032), align 16, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160032), i64 %40
  %42 = getelementptr inbounds i8, ptr %41, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160036), ptr noundef nonnull %42)
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), i64 %44
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  call void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180040), ptr noundef nonnull %46)
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = shl nsw i64 %48, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ5solvevE4bits, i8 0, i64 %49, i1 false)
  %50 = icmp sgt i32 %47, 0
  br i1 %50, label %.preheader.preheader, label %._crit_edge80

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.05063 = phi i32 [ %59, %.lr.ph ], [ 0, %0 ]
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 %53, i64 %57
  store i32 %.05063, ptr %58, align 4, !tbaa !5
  %59 = add nuw nsw i32 %.05063, 1
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

.preheader.preheader:                             ; preds = %._crit_edge
  %.promoted = load i32, ptr %2, align 4
  %wide.trip.count = zext nneg i32 %47 to i64
  %.pre96 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %62 = phi i32 [ %.pre96, %.preheader.preheader ], [ %206, %.loopexit ]
  %indvars.iv = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next, %.loopexit ]
  %63 = phi i32 [ %.promoted, %.preheader.preheader ], [ %207, %.loopexit ]
  %.not54 = icmp eq i32 %62, 0
  br i1 %.not54, label %.critedge, label %64

._crit_edge76:                                    ; preds = %.loopexit
  %.not119 = icmp eq i32 %47, 1
  br i1 %.not119, label %217, label %208

64:                                               ; preds = %.preheader
  %65 = sext i32 %62 to i64
  %66 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 9, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph68, label %._crit_edge69

._crit_edge69:                                    ; preds = %.lr.ph68, %64
  %.044.lcssa = phi i32 [ %67, %64 ], [ %74, %.lr.ph68 ]
  %69 = icmp sgt i32 %.044.lcssa, %63
  br i1 %69, label %.critedge, label %76

.lr.ph68:                                         ; preds = %64, %.lr.ph68
  %.04366 = phi i32 [ %75, %.lr.ph68 ], [ %67, %64 ]
  %.04465 = phi i32 [ %74, %.lr.ph68 ], [ %67, %64 ]
  %70 = add nsw i32 %.04366, -1
  %71 = zext nneg i32 %70 to i64
  %72 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sub nsw i32 %.04465, %73
  %75 = and i32 %70, %.04366
  %.not109 = icmp eq i32 %75, 0
  br i1 %.not109, label %._crit_edge69, label %.lr.ph68, !llvm.loop !11

76:                                               ; preds = %._crit_edge69.9, %._crit_edge69.8, %._crit_edge69.7, %._crit_edge69.6, %._crit_edge69.5, %._crit_edge69.4, %._crit_edge69.3, %._crit_edge69.2, %._crit_edge69.1, %._crit_edge69
  %.04670.lcssa.wide = phi i32 [ 9, %._crit_edge69 ], [ 8, %._crit_edge69.1 ], [ 7, %._crit_edge69.2 ], [ 6, %._crit_edge69.3 ], [ 5, %._crit_edge69.4 ], [ 4, %._crit_edge69.5 ], [ 3, %._crit_edge69.6 ], [ 2, %._crit_edge69.7 ], [ 1, %._crit_edge69.8 ], [ 0, %._crit_edge69.9 ]
  %.lcssa85 = phi ptr [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), %._crit_edge69 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160032), %._crit_edge69.1 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140028), %._crit_edge69.2 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120024), %._crit_edge69.3 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100020), %._crit_edge69.4 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80016), %._crit_edge69.5 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60012), %._crit_edge69.6 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40008), %._crit_edge69.7 ], [ getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20004), %._crit_edge69.8 ], [ @_ZZ5solvevE3pos, %._crit_edge69.9 ]
  %.lcssa83 = phi i32 [ %62, %._crit_edge69 ], [ %89, %._crit_edge69.1 ], [ %102, %._crit_edge69.2 ], [ %115, %._crit_edge69.3 ], [ %128, %._crit_edge69.4 ], [ %141, %._crit_edge69.5 ], [ %154, %._crit_edge69.6 ], [ %167, %._crit_edge69.7 ], [ %180, %._crit_edge69.8 ], [ %193, %._crit_edge69.9 ]
  %.044.lcssa.lcssa = phi i32 [ %.044.lcssa, %._crit_edge69 ], [ %.044.lcssa.1, %._crit_edge69.1 ], [ %.044.lcssa.2, %._crit_edge69.2 ], [ %.044.lcssa.3, %._crit_edge69.3 ], [ %.044.lcssa.4, %._crit_edge69.4 ], [ %.044.lcssa.5, %._crit_edge69.5 ], [ %.044.lcssa.6, %._crit_edge69.6 ], [ %.044.lcssa.7, %._crit_edge69.7 ], [ %.044.lcssa.8, %._crit_edge69.8 ], [ %.044.lcssa.9, %._crit_edge69.9 ]
  %.lcssa82 = phi i32 [ %67, %._crit_edge69 ], [ %93, %._crit_edge69.1 ], [ %106, %._crit_edge69.2 ], [ %119, %._crit_edge69.3 ], [ %132, %._crit_edge69.4 ], [ %145, %._crit_edge69.5 ], [ %158, %._crit_edge69.6 ], [ %171, %._crit_edge69.7 ], [ %184, %._crit_edge69.8 ], [ %197, %._crit_edge69.9 ]
  %77 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %indvars.iv
  store i32 %.04670.lcssa.wide, ptr %77, align 4, !tbaa !5
  %78 = add nsw i32 %.lcssa83, -1
  store i32 %78, ptr %.lcssa85, align 4, !tbaa !5
  %79 = sub nsw i32 %63, %.044.lcssa.lcssa
  store i32 %79, ptr %2, align 4, !tbaa !5
  %.not5571.not = icmp slt i32 %.lcssa82, %47
  %.pre95 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 180036), align 4, !tbaa !5
  br i1 %.not5571.not, label %.lr.ph74.preheader, label %.loopexit

.lr.ph74.preheader:                               ; preds = %76
  %80 = add nsw i32 %.lcssa82, 1
  br label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %.lr.ph74
  %.04272 = phi i32 [ %88, %.lr.ph74 ], [ %80, %.lr.ph74.preheader ]
  %81 = add nsw i32 %.04272, -1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 4, !tbaa !5
  %86 = sub nsw i32 0, %.04272
  %87 = and i32 %.04272, %86
  %88 = add nsw i32 %87, %.04272
  %.not55 = icmp sgt i32 %88, %47
  br i1 %.not55, label %.loopexit, label %.lr.ph74, !llvm.loop !12

.critedge:                                        ; preds = %._crit_edge69, %.preheader
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 160032), align 16, !tbaa !5
  %.not54.1 = icmp eq i32 %89, 0
  br i1 %.not54.1, label %.critedge.1, label %90

90:                                               ; preds = %.critedge
  %91 = sext i32 %89 to i64
  %92 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 8, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %.lr.ph68.1, label %._crit_edge69.1

.lr.ph68.1:                                       ; preds = %90, %.lr.ph68.1
  %.04366.1 = phi i32 [ %100, %.lr.ph68.1 ], [ %93, %90 ]
  %.04465.1 = phi i32 [ %99, %.lr.ph68.1 ], [ %93, %90 ]
  %95 = add nsw i32 %.04366.1, -1
  %96 = zext nneg i32 %95 to i64
  %97 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sub nsw i32 %.04465.1, %98
  %100 = and i32 %95, %.04366.1
  %.not110 = icmp eq i32 %100, 0
  br i1 %.not110, label %._crit_edge69.1, label %.lr.ph68.1, !llvm.loop !11

._crit_edge69.1:                                  ; preds = %.lr.ph68.1, %90
  %.044.lcssa.1 = phi i32 [ %93, %90 ], [ %99, %.lr.ph68.1 ]
  %101 = icmp sgt i32 %.044.lcssa.1, %63
  br i1 %101, label %.critedge.1, label %76

.critedge.1:                                      ; preds = %._crit_edge69.1, %.critedge
  %102 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 140028), align 4, !tbaa !5
  %.not54.2 = icmp eq i32 %102, 0
  br i1 %.not54.2, label %.critedge.2, label %103

103:                                              ; preds = %.critedge.1
  %104 = sext i32 %102 to i64
  %105 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 7, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph68.2, label %._crit_edge69.2

.lr.ph68.2:                                       ; preds = %103, %.lr.ph68.2
  %.04366.2 = phi i32 [ %113, %.lr.ph68.2 ], [ %106, %103 ]
  %.04465.2 = phi i32 [ %112, %.lr.ph68.2 ], [ %106, %103 ]
  %108 = add nsw i32 %.04366.2, -1
  %109 = zext nneg i32 %108 to i64
  %110 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sub nsw i32 %.04465.2, %111
  %113 = and i32 %108, %.04366.2
  %.not111 = icmp eq i32 %113, 0
  br i1 %.not111, label %._crit_edge69.2, label %.lr.ph68.2, !llvm.loop !11

._crit_edge69.2:                                  ; preds = %.lr.ph68.2, %103
  %.044.lcssa.2 = phi i32 [ %106, %103 ], [ %112, %.lr.ph68.2 ]
  %114 = icmp sgt i32 %.044.lcssa.2, %63
  br i1 %114, label %.critedge.2, label %76

.critedge.2:                                      ; preds = %._crit_edge69.2, %.critedge.1
  %115 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 120024), align 8, !tbaa !5
  %.not54.3 = icmp eq i32 %115, 0
  br i1 %.not54.3, label %.critedge.3, label %116

116:                                              ; preds = %.critedge.2
  %117 = sext i32 %115 to i64
  %118 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 6, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = icmp sgt i32 %119, 0
  br i1 %120, label %.lr.ph68.3, label %._crit_edge69.3

.lr.ph68.3:                                       ; preds = %116, %.lr.ph68.3
  %.04366.3 = phi i32 [ %126, %.lr.ph68.3 ], [ %119, %116 ]
  %.04465.3 = phi i32 [ %125, %.lr.ph68.3 ], [ %119, %116 ]
  %121 = add nsw i32 %.04366.3, -1
  %122 = zext nneg i32 %121 to i64
  %123 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = sub nsw i32 %.04465.3, %124
  %126 = and i32 %121, %.04366.3
  %.not112 = icmp eq i32 %126, 0
  br i1 %.not112, label %._crit_edge69.3, label %.lr.ph68.3, !llvm.loop !11

._crit_edge69.3:                                  ; preds = %.lr.ph68.3, %116
  %.044.lcssa.3 = phi i32 [ %119, %116 ], [ %125, %.lr.ph68.3 ]
  %127 = icmp sgt i32 %.044.lcssa.3, %63
  br i1 %127, label %.critedge.3, label %76

.critedge.3:                                      ; preds = %._crit_edge69.3, %.critedge.2
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 100020), align 4, !tbaa !5
  %.not54.4 = icmp eq i32 %128, 0
  br i1 %.not54.4, label %.critedge.4, label %129

129:                                              ; preds = %.critedge.3
  %130 = sext i32 %128 to i64
  %131 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 5, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = icmp sgt i32 %132, 0
  br i1 %133, label %.lr.ph68.4, label %._crit_edge69.4

.lr.ph68.4:                                       ; preds = %129, %.lr.ph68.4
  %.04366.4 = phi i32 [ %139, %.lr.ph68.4 ], [ %132, %129 ]
  %.04465.4 = phi i32 [ %138, %.lr.ph68.4 ], [ %132, %129 ]
  %134 = add nsw i32 %.04366.4, -1
  %135 = zext nneg i32 %134 to i64
  %136 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sub nsw i32 %.04465.4, %137
  %139 = and i32 %134, %.04366.4
  %.not113 = icmp eq i32 %139, 0
  br i1 %.not113, label %._crit_edge69.4, label %.lr.ph68.4, !llvm.loop !11

._crit_edge69.4:                                  ; preds = %.lr.ph68.4, %129
  %.044.lcssa.4 = phi i32 [ %132, %129 ], [ %138, %.lr.ph68.4 ]
  %140 = icmp sgt i32 %.044.lcssa.4, %63
  br i1 %140, label %.critedge.4, label %76

.critedge.4:                                      ; preds = %._crit_edge69.4, %.critedge.3
  %141 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 80016), align 16, !tbaa !5
  %.not54.5 = icmp eq i32 %141, 0
  br i1 %.not54.5, label %.critedge.5, label %142

142:                                              ; preds = %.critedge.4
  %143 = sext i32 %141 to i64
  %144 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 4, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = icmp sgt i32 %145, 0
  br i1 %146, label %.lr.ph68.5, label %._crit_edge69.5

.lr.ph68.5:                                       ; preds = %142, %.lr.ph68.5
  %.04366.5 = phi i32 [ %152, %.lr.ph68.5 ], [ %145, %142 ]
  %.04465.5 = phi i32 [ %151, %.lr.ph68.5 ], [ %145, %142 ]
  %147 = add nsw i32 %.04366.5, -1
  %148 = zext nneg i32 %147 to i64
  %149 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = sub nsw i32 %.04465.5, %150
  %152 = and i32 %147, %.04366.5
  %.not114 = icmp eq i32 %152, 0
  br i1 %.not114, label %._crit_edge69.5, label %.lr.ph68.5, !llvm.loop !11

._crit_edge69.5:                                  ; preds = %.lr.ph68.5, %142
  %.044.lcssa.5 = phi i32 [ %145, %142 ], [ %151, %.lr.ph68.5 ]
  %153 = icmp sgt i32 %.044.lcssa.5, %63
  br i1 %153, label %.critedge.5, label %76

.critedge.5:                                      ; preds = %._crit_edge69.5, %.critedge.4
  %154 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 60012), align 4, !tbaa !5
  %.not54.6 = icmp eq i32 %154, 0
  br i1 %.not54.6, label %.critedge.6, label %155

155:                                              ; preds = %.critedge.5
  %156 = sext i32 %154 to i64
  %157 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 3, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp sgt i32 %158, 0
  br i1 %159, label %.lr.ph68.6, label %._crit_edge69.6

.lr.ph68.6:                                       ; preds = %155, %.lr.ph68.6
  %.04366.6 = phi i32 [ %165, %.lr.ph68.6 ], [ %158, %155 ]
  %.04465.6 = phi i32 [ %164, %.lr.ph68.6 ], [ %158, %155 ]
  %160 = add nsw i32 %.04366.6, -1
  %161 = zext nneg i32 %160 to i64
  %162 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = sub nsw i32 %.04465.6, %163
  %165 = and i32 %160, %.04366.6
  %.not115 = icmp eq i32 %165, 0
  br i1 %.not115, label %._crit_edge69.6, label %.lr.ph68.6, !llvm.loop !11

._crit_edge69.6:                                  ; preds = %.lr.ph68.6, %155
  %.044.lcssa.6 = phi i32 [ %158, %155 ], [ %164, %.lr.ph68.6 ]
  %166 = icmp sgt i32 %.044.lcssa.6, %63
  br i1 %166, label %.critedge.6, label %76

.critedge.6:                                      ; preds = %._crit_edge69.6, %.critedge.5
  %167 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 40008), align 8, !tbaa !5
  %.not54.7 = icmp eq i32 %167, 0
  br i1 %.not54.7, label %.critedge.7, label %168

168:                                              ; preds = %.critedge.6
  %169 = sext i32 %167 to i64
  %170 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 2, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp sgt i32 %171, 0
  br i1 %172, label %.lr.ph68.7, label %._crit_edge69.7

.lr.ph68.7:                                       ; preds = %168, %.lr.ph68.7
  %.04366.7 = phi i32 [ %178, %.lr.ph68.7 ], [ %171, %168 ]
  %.04465.7 = phi i32 [ %177, %.lr.ph68.7 ], [ %171, %168 ]
  %173 = add nsw i32 %.04366.7, -1
  %174 = zext nneg i32 %173 to i64
  %175 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = sub nsw i32 %.04465.7, %176
  %178 = and i32 %173, %.04366.7
  %.not116 = icmp eq i32 %178, 0
  br i1 %.not116, label %._crit_edge69.7, label %.lr.ph68.7, !llvm.loop !11

._crit_edge69.7:                                  ; preds = %.lr.ph68.7, %168
  %.044.lcssa.7 = phi i32 [ %171, %168 ], [ %177, %.lr.ph68.7 ]
  %179 = icmp sgt i32 %.044.lcssa.7, %63
  br i1 %179, label %.critedge.7, label %76

.critedge.7:                                      ; preds = %._crit_edge69.7, %.critedge.6
  %180 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3pos, i64 20004), align 4, !tbaa !5
  %.not54.8 = icmp eq i32 %180, 0
  br i1 %.not54.8, label %.critedge.8, label %181

181:                                              ; preds = %.critedge.7
  %182 = sext i32 %180 to i64
  %183 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 1, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = icmp sgt i32 %184, 0
  br i1 %185, label %.lr.ph68.8, label %._crit_edge69.8

.lr.ph68.8:                                       ; preds = %181, %.lr.ph68.8
  %.04366.8 = phi i32 [ %191, %.lr.ph68.8 ], [ %184, %181 ]
  %.04465.8 = phi i32 [ %190, %.lr.ph68.8 ], [ %184, %181 ]
  %186 = add nsw i32 %.04366.8, -1
  %187 = zext nneg i32 %186 to i64
  %188 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = sub nsw i32 %.04465.8, %189
  %191 = and i32 %186, %.04366.8
  %.not117 = icmp eq i32 %191, 0
  br i1 %.not117, label %._crit_edge69.8, label %.lr.ph68.8, !llvm.loop !11

._crit_edge69.8:                                  ; preds = %.lr.ph68.8, %181
  %.044.lcssa.8 = phi i32 [ %184, %181 ], [ %190, %.lr.ph68.8 ]
  %192 = icmp sgt i32 %.044.lcssa.8, %63
  br i1 %192, label %.critedge.8, label %76

.critedge.8:                                      ; preds = %._crit_edge69.8, %.critedge.7
  %193 = load i32, ptr @_ZZ5solvevE3pos, align 16, !tbaa !5
  %.not54.9 = icmp eq i32 %193, 0
  br i1 %.not54.9, label %.loopexit, label %194

194:                                              ; preds = %.critedge.8
  %195 = sext i32 %193 to i64
  %196 = getelementptr inbounds [11 x [5001 x i32]], ptr @_ZZ5solvevE3pos, i64 0, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = icmp sgt i32 %197, 0
  br i1 %198, label %.lr.ph68.9, label %._crit_edge69.9

.lr.ph68.9:                                       ; preds = %194, %.lr.ph68.9
  %.04366.9 = phi i32 [ %204, %.lr.ph68.9 ], [ %197, %194 ]
  %.04465.9 = phi i32 [ %203, %.lr.ph68.9 ], [ %197, %194 ]
  %199 = add nsw i32 %.04366.9, -1
  %200 = zext nneg i32 %199 to i64
  %201 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE4bits, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = sub nsw i32 %.04465.9, %202
  %204 = and i32 %199, %.04366.9
  %.not118 = icmp eq i32 %204, 0
  br i1 %.not118, label %._crit_edge69.9, label %.lr.ph68.9, !llvm.loop !11

._crit_edge69.9:                                  ; preds = %.lr.ph68.9, %194
  %.044.lcssa.9 = phi i32 [ %197, %194 ], [ %203, %.lr.ph68.9 ]
  %205 = icmp sgt i32 %.044.lcssa.9, %63
  br i1 %205, label %.loopexit, label %76

.loopexit:                                        ; preds = %.lr.ph74, %.critedge.8, %._crit_edge69.9, %76
  %206 = phi i32 [ %.pre95, %76 ], [ %62, %._crit_edge69.9 ], [ %62, %.critedge.8 ], [ %.pre95, %.lr.ph74 ]
  %207 = phi i32 [ %79, %76 ], [ %63, %._crit_edge69.9 ], [ %63, %.critedge.8 ], [ %79, %.lr.ph74 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge76, label %.preheader, !llvm.loop !13

208:                                              ; preds = %._crit_edge76
  %209 = and i32 %207, 1
  %.not = icmp eq i32 %209, 0
  br i1 %.not, label %.lr.ph79.preheader, label %210

210:                                              ; preds = %208
  %211 = add nsw i32 %47, -2
  %212 = zext nneg i32 %211 to i64
  %213 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %212
  %214 = add nsw i32 %47, -1
  %215 = zext nneg i32 %214 to i64
  %216 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %215
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %213, ptr noundef nonnull align 4 dereferenceable(4) %216) #6
  %.pre97 = load i32, ptr %1, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %210, %._crit_edge76
  %218 = phi i32 [ %.pre97, %210 ], [ %47, %._crit_edge76 ]
  %219 = icmp sgt i32 %218, 0
  br i1 %219, label %.lr.ph79.preheader, label %._crit_edge80

.lr.ph79.preheader:                               ; preds = %208, %217
  %.ph = phi i32 [ %218, %217 ], [ %47, %208 ]
  br label %.lr.ph79

._crit_edge80:                                    ; preds = %.lr.ph79, %._crit_edge, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %.lr.ph79
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph79 ], [ 0, %.lr.ph79.preheader ]
  %220 = phi i32 [ %231, %.lr.ph79 ], [ %.ph, %.lr.ph79.preheader ]
  %221 = getelementptr inbounds [5001 x i32], ptr @_ZZ5solvevE3out, i64 0, i64 %indvars.iv92
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = add nsw i32 %220, -1
  %224 = zext i32 %223 to i64
  %225 = icmp eq i64 %indvars.iv92, %224
  %226 = zext i1 %225 to i64
  %227 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !14
  %229 = sext i8 %228 to i32
  %230 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %222, i32 noundef %229)
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %231 = load i32, ptr %1, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = icmp slt i64 %indvars.iv.next93, %232
  br i1 %233, label %.lr.ph79, label %._crit_edge80, !llvm.loop !15
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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

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

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

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

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

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

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

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


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