; LLVM IR from tangjz/acm-icpc :: 51nod/Contest/Baishan_Geek_Challenge (F)

; 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
  store i32 1, ptr @f, align 16, !tbaa !5
  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 = %23, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = icmp sle i32 %12, 16
  br i1 %13, label %15, label %14

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

15:                                               ; preds = %11
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [17 x i32], ptr @f, i64 0, i64 %17
  store i32 1, ptr %18, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [17 x [17 x i32]], ptr @f, i64 0, i64 %20
  %22 = getelementptr inbounds [17 x i32], ptr %21, i64 0, i64 0
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %15
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !9

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

27:                                               ; preds = %57, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp sle i32 %28, 16
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %60

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

32:                                               ; preds = %53, %31
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = icmp sle i32 %33, 16
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %32
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [16 x [16 x i32]], ptr @_ZL3ans, i64 0, i64 %39
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 2
  %43 = ashr i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [16 x i32], ptr %40, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [17 x [17 x i32]], ptr @f, i64 0, i64 %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [17 x i32], ptr %49, i64 0, i64 %51
  store i32 %46, ptr %52, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %36
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = add nsw i32 %54, 2
  store i32 %55, ptr %5, align 4, !tbaa !5
  br label %32, !llvm.loop !11

56:                                               ; preds = %35
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = add nsw i32 %58, 2
  store i32 %59, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !12

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

61:                                               ; preds = %90, %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = icmp sle i32 %62, 16
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %93

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

66:                                               ; preds = %86, %65
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = icmp sle i32 %67, 16
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %89

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

86:                                               ; preds = %70
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %66, !llvm.loop !13

89:                                               ; preds = %69
  br label %90

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

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

94:                                               ; preds = %126, %93
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = icmp slt i32 %95, 65536
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %129

98:                                               ; preds = %94
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = ashr i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = and i32 %104, 1
  %106 = add nsw i32 %103, %105
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [65536 x i32], ptr @sz, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = and i32 %110, 1
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %98
  br label %121

114:                                              ; preds = %98
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = ashr i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  br label %121

121:                                              ; preds = %114, %113
  %122 = phi i32 [ 0, %113 ], [ %120, %114 ]
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %124
  store i32 %122, ptr %125, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %121
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !5
  br label %94, !llvm.loop !15

129:                                              ; preds = %97
  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 %4, 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 {
.preheader36.preheader:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  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
  %2 = load i32, ptr @_ZL3ans, align 16, !tbaa !5
  store i32 %2, ptr getelementptr inbounds (i8, ptr @f, i64 76), align 4, !tbaa !5
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 4), align 4, !tbaa !5
  store i32 %3, ptr getelementptr inbounds (i8, ptr @f, i64 84), align 4, !tbaa !5
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 8), align 8, !tbaa !5
  store i32 %4, ptr getelementptr inbounds (i8, ptr @f, i64 92), align 4, !tbaa !5
  %5 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 12), align 4, !tbaa !5
  store i32 %5, ptr getelementptr inbounds (i8, ptr @f, i64 100), align 4, !tbaa !5
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 16), align 16, !tbaa !5
  store i32 %6, ptr getelementptr inbounds (i8, ptr @f, i64 108), align 4, !tbaa !5
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 20), align 4, !tbaa !5
  store i32 %7, ptr getelementptr inbounds (i8, ptr @f, i64 116), align 4, !tbaa !5
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 24), align 8, !tbaa !5
  store i32 %8, ptr getelementptr inbounds (i8, ptr @f, i64 124), align 4, !tbaa !5
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 28), align 4, !tbaa !5
  store i32 %9, ptr getelementptr inbounds (i8, ptr @f, i64 132), align 4, !tbaa !5
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 128), align 16, !tbaa !5
  store i32 %10, ptr getelementptr inbounds (i8, ptr @f, i64 212), align 4, !tbaa !5
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 132), align 4, !tbaa !5
  store i32 %11, ptr getelementptr inbounds (i8, ptr @f, i64 220), align 4, !tbaa !5
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 136), align 8, !tbaa !5
  store i32 %12, ptr getelementptr inbounds (i8, ptr @f, i64 228), align 4, !tbaa !5
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 140), align 4, !tbaa !5
  store i32 %13, ptr getelementptr inbounds (i8, ptr @f, i64 236), align 4, !tbaa !5
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 144), align 16, !tbaa !5
  store i32 %14, ptr getelementptr inbounds (i8, ptr @f, i64 244), align 4, !tbaa !5
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 148), align 4, !tbaa !5
  store i32 %15, ptr getelementptr inbounds (i8, ptr @f, i64 252), align 4, !tbaa !5
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 152), align 8, !tbaa !5
  store i32 %16, ptr getelementptr inbounds (i8, ptr @f, i64 260), align 4, !tbaa !5
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 156), align 4, !tbaa !5
  store i32 %17, ptr getelementptr inbounds (i8, ptr @f, i64 268), align 4, !tbaa !5
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 256), align 16, !tbaa !5
  store i32 %18, ptr getelementptr inbounds (i8, ptr @f, i64 348), align 4, !tbaa !5
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 260), align 4, !tbaa !5
  store i32 %19, ptr getelementptr inbounds (i8, ptr @f, i64 356), align 4, !tbaa !5
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 264), align 8, !tbaa !5
  store i32 %20, ptr getelementptr inbounds (i8, ptr @f, i64 364), align 4, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 268), align 4, !tbaa !5
  store i32 %21, ptr getelementptr inbounds (i8, ptr @f, i64 372), align 4, !tbaa !5
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 272), align 16, !tbaa !5
  store i32 %22, ptr getelementptr inbounds (i8, ptr @f, i64 380), align 4, !tbaa !5
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 276), align 4, !tbaa !5
  store i32 %23, ptr getelementptr inbounds (i8, ptr @f, i64 388), align 4, !tbaa !5
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 280), align 8, !tbaa !5
  store i32 %24, ptr getelementptr inbounds (i8, ptr @f, i64 396), align 4, !tbaa !5
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 284), align 4, !tbaa !5
  store i32 %25, ptr getelementptr inbounds (i8, ptr @f, i64 404), align 4, !tbaa !5
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 384), align 16, !tbaa !5
  store i32 %26, ptr getelementptr inbounds (i8, ptr @f, i64 484), align 4, !tbaa !5
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 388), align 4, !tbaa !5
  store i32 %27, ptr getelementptr inbounds (i8, ptr @f, i64 492), align 4, !tbaa !5
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 392), align 8, !tbaa !5
  store i32 %28, ptr getelementptr inbounds (i8, ptr @f, i64 500), align 4, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 396), align 4, !tbaa !5
  store i32 %29, ptr getelementptr inbounds (i8, ptr @f, i64 508), align 4, !tbaa !5
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 400), align 16, !tbaa !5
  store i32 %30, ptr getelementptr inbounds (i8, ptr @f, i64 516), align 4, !tbaa !5
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 404), align 4, !tbaa !5
  store i32 %31, ptr getelementptr inbounds (i8, ptr @f, i64 524), align 4, !tbaa !5
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 408), align 8, !tbaa !5
  store i32 %32, ptr getelementptr inbounds (i8, ptr @f, i64 532), align 4, !tbaa !5
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 412), align 4, !tbaa !5
  store i32 %33, ptr getelementptr inbounds (i8, ptr @f, i64 540), align 4, !tbaa !5
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 512), align 16, !tbaa !5
  store i32 %34, ptr getelementptr inbounds (i8, ptr @f, i64 620), align 4, !tbaa !5
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 516), align 4, !tbaa !5
  store i32 %35, ptr getelementptr inbounds (i8, ptr @f, i64 628), align 4, !tbaa !5
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 520), align 8, !tbaa !5
  store i32 %36, ptr getelementptr inbounds (i8, ptr @f, i64 636), align 4, !tbaa !5
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 524), align 4, !tbaa !5
  store i32 %37, ptr getelementptr inbounds (i8, ptr @f, i64 644), align 4, !tbaa !5
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 528), align 16, !tbaa !5
  store i32 %38, ptr getelementptr inbounds (i8, ptr @f, i64 652), align 4, !tbaa !5
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 532), align 4, !tbaa !5
  store i32 %39, ptr getelementptr inbounds (i8, ptr @f, i64 660), align 4, !tbaa !5
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 536), align 8, !tbaa !5
  store i32 %40, ptr getelementptr inbounds (i8, ptr @f, i64 668), align 4, !tbaa !5
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 540), align 4, !tbaa !5
  store i32 %41, ptr getelementptr inbounds (i8, ptr @f, i64 676), align 4, !tbaa !5
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 640), align 16, !tbaa !5
  store i32 %42, ptr getelementptr inbounds (i8, ptr @f, i64 756), align 4, !tbaa !5
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 644), align 4, !tbaa !5
  store i32 %43, ptr getelementptr inbounds (i8, ptr @f, i64 764), align 4, !tbaa !5
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 648), align 8, !tbaa !5
  store i32 %44, ptr getelementptr inbounds (i8, ptr @f, i64 772), align 4, !tbaa !5
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 652), align 4, !tbaa !5
  store i32 %45, ptr getelementptr inbounds (i8, ptr @f, i64 780), align 4, !tbaa !5
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 656), align 16, !tbaa !5
  store i32 %46, ptr getelementptr inbounds (i8, ptr @f, i64 788), align 4, !tbaa !5
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 660), align 4, !tbaa !5
  store i32 %47, ptr getelementptr inbounds (i8, ptr @f, i64 796), align 4, !tbaa !5
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 664), align 8, !tbaa !5
  store i32 %48, ptr getelementptr inbounds (i8, ptr @f, i64 804), align 4, !tbaa !5
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 668), align 4, !tbaa !5
  store i32 %49, ptr getelementptr inbounds (i8, ptr @f, i64 812), align 4, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 768), align 16, !tbaa !5
  store i32 %50, ptr getelementptr inbounds (i8, ptr @f, i64 892), align 4, !tbaa !5
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 772), align 4, !tbaa !5
  store i32 %51, ptr getelementptr inbounds (i8, ptr @f, i64 900), align 4, !tbaa !5
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 776), align 8, !tbaa !5
  store i32 %52, ptr getelementptr inbounds (i8, ptr @f, i64 908), align 4, !tbaa !5
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 780), align 4, !tbaa !5
  store i32 %53, ptr getelementptr inbounds (i8, ptr @f, i64 916), align 4, !tbaa !5
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 784), align 16, !tbaa !5
  store i32 %54, ptr getelementptr inbounds (i8, ptr @f, i64 924), align 4, !tbaa !5
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 788), align 4, !tbaa !5
  store i32 %55, ptr getelementptr inbounds (i8, ptr @f, i64 932), align 4, !tbaa !5
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 792), align 8, !tbaa !5
  store i32 %56, ptr getelementptr inbounds (i8, ptr @f, i64 940), align 4, !tbaa !5
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 796), align 4, !tbaa !5
  store i32 %57, ptr getelementptr inbounds (i8, ptr @f, i64 948), align 4, !tbaa !5
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 896), align 16, !tbaa !5
  store i32 %58, ptr getelementptr inbounds (i8, ptr @f, i64 1028), align 4, !tbaa !5
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 900), align 4, !tbaa !5
  store i32 %59, ptr getelementptr inbounds (i8, ptr @f, i64 1036), align 4, !tbaa !5
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 904), align 8, !tbaa !5
  store i32 %60, ptr getelementptr inbounds (i8, ptr @f, i64 1044), align 4, !tbaa !5
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 908), align 4, !tbaa !5
  store i32 %61, ptr getelementptr inbounds (i8, ptr @f, i64 1052), align 4, !tbaa !5
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 912), align 16, !tbaa !5
  store i32 %62, ptr getelementptr inbounds (i8, ptr @f, i64 1060), align 4, !tbaa !5
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 916), align 4, !tbaa !5
  store i32 %63, ptr getelementptr inbounds (i8, ptr @f, i64 1068), align 4, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 920), align 8, !tbaa !5
  store i32 %64, ptr getelementptr inbounds (i8, ptr @f, i64 1076), align 4, !tbaa !5
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3ans, i64 924), align 4, !tbaa !5
  store i32 %65, 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
  br label %.preheader

66:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %67 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %0, ptr noundef nonnull %1)
  %68 = icmp eq i32 %67, 2
  br i1 %68, label %.lr.ph, label %._crit_edge

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

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

81:                                               ; preds = %.preheader, %77
  %82 = phi i32 [ %80, %77 ], [ 0, %.preheader ]
  %83 = getelementptr inbounds [65536 x i32], ptr @lbit, i64 0, i64 %indvars.iv
  store i32 %82, ptr %83, 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 %66, label %.preheader, !llvm.loop !9

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

._crit_edge:                                      ; preds = %.lr.ph, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #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