; LLVM IR from tangjz/acm-icpc :: 51nod (1575)

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

@cipher = external dso_local global ptr, align 8
@tot = external dso_local global i32, align 4
@pr = external dso_local global [31623 x i32], align 16
@d = external dso_local global [31623 x i32], align 16
@tf = external dso_local global [10001 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %64, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 31623
  br i1 %13, label %15, label %14

14:                                               ; preds = %11
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %67

15:                                               ; preds = %11
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %30, label %21

21:                                               ; preds = %15
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %24
  store i32 %22, ptr %25, align 4, !tbaa !5
  %26 = load i32, ptr @tot, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr @tot, align 4, !tbaa !5
  %28 = sext i32 %26 to i64
  %29 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %28
  store i32 %22, ptr %29, align 4, !tbaa !5
  br label %30

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

31:                                               ; preds = %59, %30
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = mul nsw i32 %32, %36
  store i32 %37, ptr %5, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 31623
  br i1 %38, label %40, label %39

39:                                               ; preds = %31
  store i32 5, ptr %3, align 4
  br label %62

40:                                               ; preds = %31
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %46
  store i32 %44, ptr %47, align 4, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp eq i32 %51, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %40
  store i32 5, ptr %3, align 4
  br label %62

58:                                               ; preds = %40
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !9

62:                                               ; preds = %57, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

67:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %68 = load ptr, ptr @cipher, align 8, !tbaa !12
  store ptr %68, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %104, %67
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 10001
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %107

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

74:                                               ; preds = %98, %73
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = icmp slt i32 %75, 5
  br i1 %76, label %78, label %77

77:                                               ; preds = %74
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %103

78:                                               ; preds = %74
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [10001 x i32], ptr @tf, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = mul nsw i32 %82, 89
  %84 = load ptr, ptr %6, align 8, !tbaa !12
  %85 = load i8, ptr %84, align 1, !tbaa !14
  %86 = sext i8 %85 to i32
  %87 = sub nsw i32 %86, 37
  %88 = load ptr, ptr %6, align 8, !tbaa !12
  %89 = load i8, ptr %88, align 1, !tbaa !14
  %90 = sext i8 %89 to i32
  %91 = icmp sgt i32 %90, 92
  %92 = zext i1 %91 to i32
  %93 = sub nsw i32 %87, %92
  %94 = add nsw i32 %83, %93
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [10001 x i32], ptr @tf, i64 0, i64 %96
  store i32 %94, ptr %97, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %78
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %8, align 4, !tbaa !5
  %101 = load ptr, ptr %6, align 8, !tbaa !12
  %102 = getelementptr inbounds i8, ptr %101, i32 1
  store ptr %102, ptr %6, align 8, !tbaa !12
  br label %74, !llvm.loop !15

103:                                              ; preds = %77
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !5
  br label %69, !llvm.loop !16

107:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %108 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %9)
  br label %109

109:                                              ; preds = %113, %107
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %9, align 4, !tbaa !5
  %112 = icmp ne i32 %110, 0
  br i1 %112, label %113, label %118

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %114 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %10)
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = call noundef i32 @_Z5solvei(i32 noundef %115)
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %116)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %109, !llvm.loop !17

118:                                              ; preds = %109
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %119 = load i32, ptr %1, align 4
  ret i32 %119
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5solvei(i32 noundef) #3

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


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

@cipher = external dso_local local_unnamed_addr global ptr, align 8
@tot = external dso_local local_unnamed_addr global i32, align 4
@pr = external dso_local local_unnamed_addr global [31623 x i32], align 16
@d = external dso_local local_unnamed_addr global [31623 x i32], align 16
@tf = external dso_local local_unnamed_addr global [10001 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  br label %41

vector.memcheck:                                  ; preds = %._crit_edge
  %3 = load ptr, ptr @cipher, align 8, !tbaa !9
  %scevgep = getelementptr i8, ptr %3, i64 50000
  %bound0 = icmp ugt ptr %scevgep, getelementptr inbounds (i8, ptr @tf, i64 4)
  %bound1 = icmp ult ptr %3, getelementptr inbounds (i8, ptr @tf, i64 40004)
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %offset.idx = or disjoint i64 %index, 1
  %offset.idx49 = mul i64 %index, 5
  %next.gep = getelementptr i8, ptr %3, i64 %offset.idx49
  %4 = getelementptr inbounds [10001 x i32], ptr @tf, i64 0, i64 %offset.idx
  %wide.load = load <4 x i32>, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %5 = mul nsw <4 x i32> %wide.load, <i32 89, i32 89, i32 89, i32 89>
  %wide.vec = load <20 x i8>, ptr %next.gep, align 1, !tbaa !16
  %strided.vec = shufflevector <20 x i8> %wide.vec, <20 x i8> poison, <4 x i32> <i32 0, i32 5, i32 10, i32 15>
  %strided.vec50 = shufflevector <20 x i8> %wide.vec, <20 x i8> poison, <4 x i32> <i32 1, i32 6, i32 11, i32 16>
  %strided.vec51 = shufflevector <20 x i8> %wide.vec, <20 x i8> poison, <4 x i32> <i32 2, i32 7, i32 12, i32 17>
  %strided.vec52 = shufflevector <20 x i8> %wide.vec, <20 x i8> poison, <4 x i32> <i32 3, i32 8, i32 13, i32 18>
  %strided.vec53 = shufflevector <20 x i8> %wide.vec, <20 x i8> poison, <4 x i32> <i32 4, i32 9, i32 14, i32 19>
  %6 = sext <4 x i8> %strided.vec to <4 x i32>
  %7 = icmp sgt <4 x i8> %strided.vec, <i8 92, i8 92, i8 92, i8 92>
  %8 = sext <4 x i1> %7 to <4 x i32>
  %9 = add <4 x i32> %5, <i32 -37, i32 -37, i32 -37, i32 -37>
  %10 = add <4 x i32> %9, %6
  %11 = add <4 x i32> %10, %8
  store <4 x i32> %11, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %12 = mul nsw <4 x i32> %11, <i32 89, i32 89, i32 89, i32 89>
  %13 = sext <4 x i8> %strided.vec50 to <4 x i32>
  %14 = icmp sgt <4 x i8> %strided.vec50, <i8 92, i8 92, i8 92, i8 92>
  %15 = sext <4 x i1> %14 to <4 x i32>
  %16 = add <4 x i32> %12, <i32 -37, i32 -37, i32 -37, i32 -37>
  %17 = add <4 x i32> %16, %13
  %18 = add <4 x i32> %17, %15
  store <4 x i32> %18, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %19 = mul nsw <4 x i32> %18, <i32 89, i32 89, i32 89, i32 89>
  %20 = sext <4 x i8> %strided.vec51 to <4 x i32>
  %21 = icmp sgt <4 x i8> %strided.vec51, <i8 92, i8 92, i8 92, i8 92>
  %22 = sext <4 x i1> %21 to <4 x i32>
  %23 = add <4 x i32> %19, <i32 -37, i32 -37, i32 -37, i32 -37>
  %24 = add <4 x i32> %23, %20
  %25 = add <4 x i32> %24, %22
  store <4 x i32> %25, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %26 = mul nsw <4 x i32> %25, <i32 89, i32 89, i32 89, i32 89>
  %27 = sext <4 x i8> %strided.vec52 to <4 x i32>
  %28 = icmp sgt <4 x i8> %strided.vec52, <i8 92, i8 92, i8 92, i8 92>
  %29 = sext <4 x i1> %28 to <4 x i32>
  %30 = add <4 x i32> %26, <i32 -37, i32 -37, i32 -37, i32 -37>
  %31 = add <4 x i32> %30, %27
  %32 = add <4 x i32> %31, %29
  store <4 x i32> %32, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %33 = mul nsw <4 x i32> %32, <i32 89, i32 89, i32 89, i32 89>
  %34 = sext <4 x i8> %strided.vec53 to <4 x i32>
  %35 = icmp sgt <4 x i8> %strided.vec53, <i8 92, i8 92, i8 92, i8 92>
  %36 = sext <4 x i1> %35 to <4 x i32>
  %37 = add <4 x i32> %33, <i32 -37, i32 -37, i32 -37, i32 -37>
  %38 = add <4 x i32> %37, %34
  %39 = add <4 x i32> %38, %36
  store <4 x i32> %39, ptr %4, align 4, !tbaa !5, !alias.scope !11, !noalias !14
  %index.next = add nuw i64 %index, 4
  %40 = icmp eq i64 %index.next, 10000
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !17

41:                                               ; preds = %0, %._crit_edge
  %indvars.iv39 = phi i64 [ 2, %0 ], [ %indvars.iv.next40, %._crit_edge ]
  %42 = phi i32 [ %tot.promoted, %0 ], [ %50, %._crit_edge ]
  %43 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %indvars.iv39
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %.not26 = icmp eq i32 %44, 0
  %45 = trunc nuw nsw i64 %indvars.iv39 to i32
  br i1 %.not26, label %46, label %._crit_edge47

46:                                               ; preds = %41
  store i32 %45, ptr %43, align 4, !tbaa !5
  %47 = add nsw i32 %42, 1
  store i32 %47, ptr @tot, align 4, !tbaa !5
  %48 = sext i32 %42 to i64
  %49 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %48
  store i32 %45, ptr %49, align 4, !tbaa !5
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %41, %46
  %50 = phi i32 [ %47, %46 ], [ %42, %41 ]
  %51 = load i32, ptr @pr, align 16, !tbaa !5
  %52 = mul nsw i32 %51, %45
  %53 = icmp slt i32 %52, 31623
  br i1 %53, label %.lr.ph, label %._crit_edge

54:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = getelementptr inbounds [31623 x i32], ptr @pr, i64 0, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = mul nsw i32 %56, %45
  %58 = icmp slt i32 %57, 31623
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !21

.lr.ph:                                           ; preds = %._crit_edge47, %54
  %indvars.iv = phi i64 [ %indvars.iv.next, %54 ], [ 0, %._crit_edge47 ]
  %59 = phi i32 [ %57, %54 ], [ %52, %._crit_edge47 ]
  %60 = phi i32 [ %56, %54 ], [ %51, %._crit_edge47 ]
  %61 = sext i32 %59 to i64
  %62 = getelementptr inbounds [31623 x i32], ptr @d, i64 0, i64 %61
  store i32 %60, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %43, align 4, !tbaa !5
  %64 = icmp eq i32 %63, %60
  br i1 %64, label %._crit_edge, label %54

._crit_edge:                                      ; preds = %54, %.lr.ph, %._crit_edge47
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next40, 31623
  br i1 %exitcond.not, label %vector.memcheck, label %41, !llvm.loop !22

.preheader:                                       ; preds = %vector.memcheck, %.preheader
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %.preheader ], [ 1, %vector.memcheck ]
  %.02232 = phi ptr [ %105, %.preheader ], [ %3, %vector.memcheck ]
  %65 = getelementptr inbounds [10001 x i32], ptr @tf, i64 0, i64 %indvars.iv43
  %.promoted = load i32, ptr %65, align 4, !tbaa !5
  %66 = mul nsw i32 %.promoted, 89
  %67 = load i8, ptr %.02232, align 1, !tbaa !16
  %68 = sext i8 %67 to i32
  %69 = icmp sgt i8 %67, 92
  %.neg = sext i1 %69 to i32
  %70 = add i32 %66, -37
  %71 = add i32 %70, %68
  %72 = add i32 %71, %.neg
  store i32 %72, ptr %65, align 4, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %.02232, i64 1
  %74 = mul nsw i32 %72, 89
  %75 = load i8, ptr %73, align 1, !tbaa !16
  %76 = sext i8 %75 to i32
  %77 = icmp sgt i8 %75, 92
  %.neg.1 = sext i1 %77 to i32
  %78 = add i32 %74, -37
  %79 = add i32 %78, %76
  %80 = add i32 %79, %.neg.1
  store i32 %80, ptr %65, align 4, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %.02232, i64 2
  %82 = mul nsw i32 %80, 89
  %83 = load i8, ptr %81, align 1, !tbaa !16
  %84 = sext i8 %83 to i32
  %85 = icmp sgt i8 %83, 92
  %.neg.2 = sext i1 %85 to i32
  %86 = add i32 %82, -37
  %87 = add i32 %86, %84
  %88 = add i32 %87, %.neg.2
  store i32 %88, ptr %65, align 4, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %.02232, i64 3
  %90 = mul nsw i32 %88, 89
  %91 = load i8, ptr %89, align 1, !tbaa !16
  %92 = sext i8 %91 to i32
  %93 = icmp sgt i8 %91, 92
  %.neg.3 = sext i1 %93 to i32
  %94 = add i32 %90, -37
  %95 = add i32 %94, %92
  %96 = add i32 %95, %.neg.3
  store i32 %96, ptr %65, align 4, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %.02232, i64 4
  %98 = mul nsw i32 %96, 89
  %99 = load i8, ptr %97, align 1, !tbaa !16
  %100 = sext i8 %99 to i32
  %101 = icmp sgt i8 %99, 92
  %.neg.4 = sext i1 %101 to i32
  %102 = add i32 %98, -37
  %103 = add i32 %102, %100
  %104 = add i32 %103, %.neg.4
  store i32 %104, ptr %65, align 4, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %.02232, i64 5
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next44, 10001
  br i1 %exitcond46.not, label %middle.block, label %.preheader, !llvm.loop !23

middle.block:                                     ; preds = %vector.body, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %106 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %1, align 4, !tbaa !5
  %.not34 = icmp eq i32 %107, 0
  br i1 %.not34, label %._crit_edge37, label %.lr.ph36

.lr.ph36:                                         ; preds = %middle.block, %.lr.ph36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %109 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %110 = load i32, ptr %2, align 4, !tbaa !5
  %111 = call noundef i32 @_Z5solvei(i32 noundef %110)
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %111)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = add nsw i32 %113, -1
  store i32 %114, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %113, 0
  br i1 %.not, label %._crit_edge37, label %.lr.ph36, !llvm.loop !24

._crit_edge37:                                    ; preds = %.lr.ph36, %middle.block
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5solvei(i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress norecurse 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 #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 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 = !{!12}
!12 = distinct !{!12, !13}
!13 = distinct !{!13, !"LVerDomain"}
!14 = !{!15}
!15 = distinct !{!15, !13}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18, !19}
!24 = distinct !{!24, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass