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

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

@sz = external dso_local global [65536 x i32], align 16
@lbit = external dso_local global [65536 x i32], align 16
@f = external dso_local global [17 x [17 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL3ans = external hidden constant <{ <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32] }>, align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5solveii(i32 noundef, i32 noundef) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

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

15:                                               ; preds = %11
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = ashr i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = and i32 %21, 1
  %23 = add nsw i32 %20, %22
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %25
  store i32 %23, ptr %26, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = and i32 %27, 1
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %15
  br label %38

31:                                               ; preds = %15
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = ashr i32 %32, 1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  br label %38

38:                                               ; preds = %31, %30
  %39 = phi i32 [ 0, %30 ], [ %37, %31 ]
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %41
  store i32 %39, ptr %42, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %38
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !9

46:                                               ; preds = %14
  store i32 1, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %59, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp sle i32 %48, 16
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %62

51:                                               ; preds = %47
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [17 x i32], ptr @f, i64 0, i64 %53
  store i32 1, ptr %54, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [17 x [17 x i32]], ptr @f, i64 0, i64 %56
  %58 = getelementptr inbounds [17 x i32], ptr %57, i64 0, i64 0
  store i32 1, ptr %58, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %51
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %3, align 4, !tbaa !5
  br label %47, !llvm.loop !11

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

63:                                               ; preds = %93, %62
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = icmp sle i32 %64, 16
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %96

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %89, %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = icmp sle i32 %69, 16
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %92

72:                                               ; preds = %68
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = sub nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [16 x [16 x i32]], ptr @_ZL3ans, i64 0, i64 %75
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = sub nsw i32 %77, 2
  %79 = ashr i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [16 x i32], ptr %76, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [17 x [17 x i32]], ptr @f, i64 0, i64 %84
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [17 x i32], ptr %85, i64 0, i64 %87
  store i32 %82, ptr %88, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %72
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = add nsw i32 %90, 2
  store i32 %91, ptr %6, align 4, !tbaa !5
  br label %68, !llvm.loop !12

92:                                               ; preds = %71
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = add nsw i32 %94, 2
  store i32 %95, ptr %4, align 4, !tbaa !5
  br label %63, !llvm.loop !13

96:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 2, ptr %7, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %126, %96
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = icmp sle i32 %98, 16
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %129

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %122, %101
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = icmp sle i32 %103, 16
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %125

106:                                              ; preds = %102
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sub nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [16 x [16 x i32]], ptr @_ZL3ans, i64 0, i64 %109
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sub nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [16 x i32], ptr %110, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [17 x [17 x i32]], ptr @f, i64 0, i64 %117
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [17 x i32], ptr %118, i64 0, i64 %120
  store i32 %115, ptr %121, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %106
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !5
  br label %102, !llvm.loop !14

125:                                              ; preds = %105
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = add nsw i32 %127, 2
  store i32 %128, ptr %7, align 4, !tbaa !5
  br label %97, !llvm.loop !15

129:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  br label %130

130:                                              ; preds = %133, %129
  %131 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %9, ptr noundef %10)
  %132 = icmp eq i32 %131, 2
  br i1 %132, label %133, label %138

133:                                              ; preds = %130
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = call noundef i32 @_Z5solveii(i32 noundef %134, i32 noundef %135)
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %136)
  br label %130, !llvm.loop !16

138:                                              ; preds = %130
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %139 = load i32, ptr %1, align 4
  ret i32 %139
}

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

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

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


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

@sz = external dso_local local_unnamed_addr global [65536 x i32], align 16
@lbit = external dso_local local_unnamed_addr global [65536 x i32], align 16
@f = external dso_local local_unnamed_addr global [17 x [17 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL3ans = external hidden local_unnamed_addr constant <{ <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32], <{ [8 x i32], [8 x i32] }>, [16 x i32] }>, align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5solveii(i32 noundef, i32 noundef) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  br label %69

.preheader35.preheader:                           ; preds = %82
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 68), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 136), align 8, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr @f, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 204), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 272), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 340), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 408), align 8, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 16), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 476), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 544), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 612), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 680), align 8, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 32), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 748), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 816), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 884), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 952), align 8, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 48), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 1020), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 64), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 1088), align 16, !tbaa !5
  %3 = load i32, ptr @_ZL3ans, align 16, !tbaa !5
  store i32 %3, ptr getelementptr inbounds (i8, ptr @f, i64 76), align 4, !tbaa !5
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 4), align 4, !tbaa !5
  store i32 %4, ptr getelementptr inbounds (i8, ptr @f, i64 84), align 4, !tbaa !5
  %5 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 8), align 8, !tbaa !5
  store i32 %5, ptr getelementptr inbounds (i8, ptr @f, i64 92), align 4, !tbaa !5
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 12), align 4, !tbaa !5
  store i32 %6, ptr getelementptr inbounds (i8, ptr @f, i64 100), align 4, !tbaa !5
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 16), align 16, !tbaa !5
  store i32 %7, ptr getelementptr inbounds (i8, ptr @f, i64 108), align 4, !tbaa !5
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 20), align 4, !tbaa !5
  store i32 %8, ptr getelementptr inbounds (i8, ptr @f, i64 116), align 4, !tbaa !5
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 24), align 8, !tbaa !5
  store i32 %9, ptr getelementptr inbounds (i8, ptr @f, i64 124), align 4, !tbaa !5
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 28), align 4, !tbaa !5
  store i32 %10, ptr getelementptr inbounds (i8, ptr @f, i64 132), align 4, !tbaa !5
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 128), align 16, !tbaa !5
  store i32 %11, ptr getelementptr inbounds (i8, ptr @f, i64 212), align 4, !tbaa !5
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 132), align 4, !tbaa !5
  store i32 %12, ptr getelementptr inbounds (i8, ptr @f, i64 220), align 4, !tbaa !5
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 136), align 8, !tbaa !5
  store i32 %13, ptr getelementptr inbounds (i8, ptr @f, i64 228), align 4, !tbaa !5
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 140), align 4, !tbaa !5
  store i32 %14, ptr getelementptr inbounds (i8, ptr @f, i64 236), align 4, !tbaa !5
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 144), align 16, !tbaa !5
  store i32 %15, ptr getelementptr inbounds (i8, ptr @f, i64 244), align 4, !tbaa !5
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 148), align 4, !tbaa !5
  store i32 %16, ptr getelementptr inbounds (i8, ptr @f, i64 252), align 4, !tbaa !5
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 152), align 8, !tbaa !5
  store i32 %17, ptr getelementptr inbounds (i8, ptr @f, i64 260), align 4, !tbaa !5
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 156), align 4, !tbaa !5
  store i32 %18, ptr getelementptr inbounds (i8, ptr @f, i64 268), align 4, !tbaa !5
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 256), align 16, !tbaa !5
  store i32 %19, ptr getelementptr inbounds (i8, ptr @f, i64 348), align 4, !tbaa !5
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 260), align 4, !tbaa !5
  store i32 %20, ptr getelementptr inbounds (i8, ptr @f, i64 356), align 4, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 264), align 8, !tbaa !5
  store i32 %21, ptr getelementptr inbounds (i8, ptr @f, i64 364), align 4, !tbaa !5
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 268), align 4, !tbaa !5
  store i32 %22, ptr getelementptr inbounds (i8, ptr @f, i64 372), align 4, !tbaa !5
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 272), align 16, !tbaa !5
  store i32 %23, ptr getelementptr inbounds (i8, ptr @f, i64 380), align 4, !tbaa !5
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 276), align 4, !tbaa !5
  store i32 %24, ptr getelementptr inbounds (i8, ptr @f, i64 388), align 4, !tbaa !5
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 280), align 8, !tbaa !5
  store i32 %25, ptr getelementptr inbounds (i8, ptr @f, i64 396), align 4, !tbaa !5
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 284), align 4, !tbaa !5
  store i32 %26, ptr getelementptr inbounds (i8, ptr @f, i64 404), align 4, !tbaa !5
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 384), align 16, !tbaa !5
  store i32 %27, ptr getelementptr inbounds (i8, ptr @f, i64 484), align 4, !tbaa !5
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 388), align 4, !tbaa !5
  store i32 %28, ptr getelementptr inbounds (i8, ptr @f, i64 492), align 4, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 392), align 8, !tbaa !5
  store i32 %29, ptr getelementptr inbounds (i8, ptr @f, i64 500), align 4, !tbaa !5
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 396), align 4, !tbaa !5
  store i32 %30, ptr getelementptr inbounds (i8, ptr @f, i64 508), align 4, !tbaa !5
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 400), align 16, !tbaa !5
  store i32 %31, ptr getelementptr inbounds (i8, ptr @f, i64 516), align 4, !tbaa !5
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 404), align 4, !tbaa !5
  store i32 %32, ptr getelementptr inbounds (i8, ptr @f, i64 524), align 4, !tbaa !5
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 408), align 8, !tbaa !5
  store i32 %33, ptr getelementptr inbounds (i8, ptr @f, i64 532), align 4, !tbaa !5
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 412), align 4, !tbaa !5
  store i32 %34, ptr getelementptr inbounds (i8, ptr @f, i64 540), align 4, !tbaa !5
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 512), align 16, !tbaa !5
  store i32 %35, ptr getelementptr inbounds (i8, ptr @f, i64 620), align 4, !tbaa !5
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 516), align 4, !tbaa !5
  store i32 %36, ptr getelementptr inbounds (i8, ptr @f, i64 628), align 4, !tbaa !5
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 520), align 8, !tbaa !5
  store i32 %37, ptr getelementptr inbounds (i8, ptr @f, i64 636), align 4, !tbaa !5
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 524), align 4, !tbaa !5
  store i32 %38, ptr getelementptr inbounds (i8, ptr @f, i64 644), align 4, !tbaa !5
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 528), align 16, !tbaa !5
  store i32 %39, ptr getelementptr inbounds (i8, ptr @f, i64 652), align 4, !tbaa !5
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 532), align 4, !tbaa !5
  store i32 %40, ptr getelementptr inbounds (i8, ptr @f, i64 660), align 4, !tbaa !5
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 536), align 8, !tbaa !5
  store i32 %41, ptr getelementptr inbounds (i8, ptr @f, i64 668), align 4, !tbaa !5
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 540), align 4, !tbaa !5
  store i32 %42, ptr getelementptr inbounds (i8, ptr @f, i64 676), align 4, !tbaa !5
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 640), align 16, !tbaa !5
  store i32 %43, ptr getelementptr inbounds (i8, ptr @f, i64 756), align 4, !tbaa !5
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 644), align 4, !tbaa !5
  store i32 %44, ptr getelementptr inbounds (i8, ptr @f, i64 764), align 4, !tbaa !5
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 648), align 8, !tbaa !5
  store i32 %45, ptr getelementptr inbounds (i8, ptr @f, i64 772), align 4, !tbaa !5
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 652), align 4, !tbaa !5
  store i32 %46, ptr getelementptr inbounds (i8, ptr @f, i64 780), align 4, !tbaa !5
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 656), align 16, !tbaa !5
  store i32 %47, ptr getelementptr inbounds (i8, ptr @f, i64 788), align 4, !tbaa !5
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 660), align 4, !tbaa !5
  store i32 %48, ptr getelementptr inbounds (i8, ptr @f, i64 796), align 4, !tbaa !5
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 664), align 8, !tbaa !5
  store i32 %49, ptr getelementptr inbounds (i8, ptr @f, i64 804), align 4, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 668), align 4, !tbaa !5
  store i32 %50, ptr getelementptr inbounds (i8, ptr @f, i64 812), align 4, !tbaa !5
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 768), align 16, !tbaa !5
  store i32 %51, ptr getelementptr inbounds (i8, ptr @f, i64 892), align 4, !tbaa !5
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 772), align 4, !tbaa !5
  store i32 %52, ptr getelementptr inbounds (i8, ptr @f, i64 900), align 4, !tbaa !5
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 776), align 8, !tbaa !5
  store i32 %53, ptr getelementptr inbounds (i8, ptr @f, i64 908), align 4, !tbaa !5
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 780), align 4, !tbaa !5
  store i32 %54, ptr getelementptr inbounds (i8, ptr @f, i64 916), align 4, !tbaa !5
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 784), align 16, !tbaa !5
  store i32 %55, ptr getelementptr inbounds (i8, ptr @f, i64 924), align 4, !tbaa !5
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 788), align 4, !tbaa !5
  store i32 %56, ptr getelementptr inbounds (i8, ptr @f, i64 932), align 4, !tbaa !5
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 792), align 8, !tbaa !5
  store i32 %57, ptr getelementptr inbounds (i8, ptr @f, i64 940), align 4, !tbaa !5
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 796), align 4, !tbaa !5
  store i32 %58, ptr getelementptr inbounds (i8, ptr @f, i64 948), align 4, !tbaa !5
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 896), align 16, !tbaa !5
  store i32 %59, ptr getelementptr inbounds (i8, ptr @f, i64 1028), align 4, !tbaa !5
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 900), align 4, !tbaa !5
  store i32 %60, ptr getelementptr inbounds (i8, ptr @f, i64 1036), align 4, !tbaa !5
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 904), align 8, !tbaa !5
  store i32 %61, ptr getelementptr inbounds (i8, ptr @f, i64 1044), align 4, !tbaa !5
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 908), align 4, !tbaa !5
  store i32 %62, ptr getelementptr inbounds (i8, ptr @f, i64 1052), align 4, !tbaa !5
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 912), align 16, !tbaa !5
  store i32 %63, ptr getelementptr inbounds (i8, ptr @f, i64 1060), align 4, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 916), align 4, !tbaa !5
  store i32 %64, ptr getelementptr inbounds (i8, ptr @f, i64 1068), align 4, !tbaa !5
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 920), align 8, !tbaa !5
  store i32 %65, ptr getelementptr inbounds (i8, ptr @f, i64 1076), align 4, !tbaa !5
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 924), align 4, !tbaa !5
  store i32 %66, ptr getelementptr inbounds (i8, ptr @f, i64 1084), align 4, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 140), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 64), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 276), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 192), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 412), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 320), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 548), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 448), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 684), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 576), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 820), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 704), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 956), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 832), i64 64, i1 false), !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) getelementptr inbounds (i8, ptr @f, i64 1092), ptr noundef nonnull align 16 dereferenceable(64) getelementptr inbounds (i8, ptr @_ZL3ans, i64 960), i64 64, i1 false), !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %67 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %68 = icmp eq i32 %67, 2
  br i1 %68, label %.lr.ph, label %._crit_edge

69:                                               ; preds = %0, %82
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next, %82 ]
  %70 = trunc nuw nsw i64 %indvars.iv to i32
  %71 = lshr i64 %indvars.iv, 1
  %72 = and i64 %71, 2147483647
  %73 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = and i32 %70, 1
  %76 = add nsw i32 %74, %75
  %77 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %indvars.iv
  store i32 %76, ptr %77, align 4, !tbaa !5
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %78, label %82

78:                                               ; preds = %69
  %79 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %72
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  br label %82

82:                                               ; preds = %69, %78
  %83 = phi i32 [ %81, %78 ], [ 0, %69 ]
  %84 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %indvars.iv
  store i32 %83, ptr %84, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 65536
  br i1 %exitcond.not, label %.preheader35.preheader, label %69, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader35.preheader, %.lr.ph
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = call noundef i32 @_Z5solveii(i32 noundef %85, i32 noundef %86)
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %87)
  %89 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %.preheader35.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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}


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