; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/ANDROUND (and)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca [30000 x i64], align 16
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 240000, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %16

16:                                               ; preds = %186, %0
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = add nsw i64 %17, -1
  store i64 %18, ptr %2, align 8, !tbaa !5
  %19 = icmp ne i64 %17, 0
  br i1 %19, label %20, label %187

20:                                               ; preds = %16
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %33, %20
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = load i64, ptr %3, align 8, !tbaa !5
  %26 = icmp slt i64 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %36

28:                                               ; preds = %22
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %30
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %31)
  br label %33

33:                                               ; preds = %28
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %7, align 4, !tbaa !9
  br label %22, !llvm.loop !11

36:                                               ; preds = %27
  %37 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 0
  %38 = load i64, ptr %37, align 16, !tbaa !5
  store i64 %38, ptr %6, align 8, !tbaa !5
  %39 = load i64, ptr %5, align 8, !tbaa !5
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = sdiv i64 %40, 2
  %42 = icmp sgt i64 %39, %41
  br i1 %42, label %43, label %75

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %57, %43
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = load i64, ptr %3, align 8, !tbaa !5
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %60

50:                                               ; preds = %44
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = load i64, ptr %6, align 8, !tbaa !5
  %56 = and i64 %55, %54
  store i64 %56, ptr %6, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %50
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %8, align 4, !tbaa !9
  br label %44, !llvm.loop !13

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

61:                                               ; preds = %70, %60
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = load i64, ptr %3, align 8, !tbaa !5
  %65 = icmp slt i64 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %73

67:                                               ; preds = %61
  %68 = load i64, ptr %6, align 8, !tbaa !5
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %68)
  br label %70

70:                                               ; preds = %67
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %9, align 4, !tbaa !9
  br label %61, !llvm.loop !14

73:                                               ; preds = %66
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %186

75:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %165, %75
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 31
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %168

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %161, %80
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = load i64, ptr %3, align 8, !tbaa !5
  %85 = icmp slt i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %81
  store i32 16, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %164

87:                                               ; preds = %81
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = shl i32 1, %92
  %94 = sext i32 %93 to i64
  %95 = and i64 %91, %94
  %96 = icmp eq i64 %95, 0
  br i1 %96, label %97, label %160

97:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %151, %97
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = load i64, ptr %5, align 8, !tbaa !5
  %102 = icmp sle i64 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  store i32 19, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %154

104:                                              ; preds = %98
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = add nsw i32 %105, %106
  %108 = sext i32 %107 to i64
  %109 = load i64, ptr %3, align 8, !tbaa !5
  %110 = srem i64 %108, %109
  %111 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = shl i32 1, %113
  %115 = xor i32 %114, -1
  %116 = sext i32 %115 to i64
  %117 = and i64 %112, %116
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = add nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = load i64, ptr %3, align 8, !tbaa !5
  %123 = srem i64 %121, %122
  %124 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %123
  store i64 %117, ptr %124, align 8, !tbaa !5
  %125 = load i64, ptr %3, align 8, !tbaa !5
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = add nsw i64 %125, %127
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = sub nsw i64 %128, %130
  %132 = load i64, ptr %3, align 8, !tbaa !5
  %133 = srem i64 %131, %132
  %134 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !5
  %136 = load i32, ptr %10, align 4, !tbaa !9
  %137 = shl i32 1, %136
  %138 = xor i32 %137, -1
  %139 = sext i32 %138 to i64
  %140 = and i64 %135, %139
  %141 = load i64, ptr %3, align 8, !tbaa !5
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = add nsw i64 %141, %143
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = sub nsw i64 %144, %146
  %148 = load i64, ptr %3, align 8, !tbaa !5
  %149 = srem i64 %147, %148
  %150 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %149
  store i64 %140, ptr %150, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %104
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %13, align 4, !tbaa !9
  br label %98, !llvm.loop !15

154:                                              ; preds = %103
  %155 = load i32, ptr %12, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = load i64, ptr %5, align 8, !tbaa !5
  %158 = add nsw i64 %156, %157
  %159 = trunc i64 %158 to i32
  store i32 %159, ptr %12, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %154, %87
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %12, align 4, !tbaa !9
  br label %81, !llvm.loop !16

164:                                              ; preds = %86
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %10, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %10, align 4, !tbaa !9
  br label %76, !llvm.loop !17

168:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %181, %168
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = load i64, ptr %3, align 8, !tbaa !5
  %173 = icmp slt i64 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %169
  store i32 22, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %184

175:                                              ; preds = %169
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [30000 x i64], ptr %4, i64 0, i64 %177
  %179 = load i64, ptr %178, align 8, !tbaa !5
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %179)
  br label %181

181:                                              ; preds = %175
  %182 = load i32, ptr %14, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %14, align 4, !tbaa !9
  br label %169, !llvm.loop !18

184:                                              ; preds = %174
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %186

186:                                              ; preds = %184, %73
  br label %16, !llvm.loop !19

187:                                              ; preds = %16
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 240000, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  %188 = load i32, ptr %1, align 4
  ret i32 %188
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [30000 x i64], align 16
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 240000, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = add nsw i64 %6, -1
  store i64 %7, ptr %1, align 8, !tbaa !5
  %.not77 = icmp eq i64 %6, 0
  br i1 %.not77, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %0, %._crit_edge76
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %4)
  %9 = load i64, ptr %2, align 8, !tbaa !5
  %10 = icmp sgt i64 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph79
  %11 = phi i64 [ %9, %.lr.ph79 ], [ %48, %.lr.ph ]
  %12 = load i64, ptr %4, align 8, !tbaa !5
  %.fr = freeze i64 %12
  %13 = sdiv i64 %11, 2
  %14 = icmp sgt i64 %.fr, %13
  br i1 %14, label %50, label %.preheader51

.preheader51:                                     ; preds = %._crit_edge
  %15 = icmp sgt i64 %11, 0
  %16 = trunc i64 %.fr to i32
  br i1 %15, label %.preheader51.split.us, label %._crit_edge76

.preheader51.split.us:                            ; preds = %.preheader51
  %.not4753 = icmp slt i64 %.fr, 1
  br i1 %.not4753, label %.lr.ph67.preheader, label %.preheader48.us

.preheader48.us:                                  ; preds = %.preheader51.split.us, %._crit_edge59.split.us64
  %.03560.us = phi i32 [ %45, %._crit_edge59.split.us64 ], [ 0, %.preheader51.split.us ]
  %17 = shl nuw nsw i32 1, %.03560.us
  %18 = zext nneg i32 %17 to i64
  %19 = xor i32 %17, -1
  %20 = sext i32 %19 to i64
  br label %21

21:                                               ; preds = %.preheader48.us, %38
  %22 = phi i64 [ 0, %.preheader48.us ], [ %40, %38 ]
  %.03457.us61 = phi i32 [ 0, %.preheader48.us ], [ %39, %38 ]
  %23 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %22
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = and i64 %24, %18
  %26 = icmp eq i64 %25, 0
  br i1 %26, label %.preheader.us63, label %38

27:                                               ; preds = %.preheader.us63, %27
  %indvars.iv86 = phi i64 [ 1, %.preheader.us63 ], [ %indvars.iv.next87, %27 ]
  %28 = add nsw i64 %indvars.iv86, %43
  %29 = srem i64 %28, %11
  %30 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %29
  %31 = load i64, ptr %30, align 8, !tbaa !5
  %32 = and i64 %31, %20
  store i64 %32, ptr %30, align 8, !tbaa !5
  %33 = sub i64 %42, %indvars.iv86
  %34 = srem i64 %33, %11
  %35 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = and i64 %36, %20
  store i64 %37, ptr %35, align 8, !tbaa !5
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond = icmp eq i64 %indvars.iv86, %.fr
  br i1 %exitcond, label %._crit_edge56.us, label %27, !llvm.loop !9

38:                                               ; preds = %._crit_edge56.us, %21
  %.1.us62 = phi i32 [ %44, %._crit_edge56.us ], [ %.03457.us61, %21 ]
  %39 = add nsw i32 %.1.us62, 1
  %40 = sext i32 %39 to i64
  %41 = icmp sgt i64 %11, %40
  br i1 %41, label %21, label %._crit_edge59.split.us64, !llvm.loop !11

.preheader.us63:                                  ; preds = %21
  %42 = add nsw i64 %22, %11
  %43 = sext i32 %.03457.us61 to i64
  br label %27

._crit_edge56.us:                                 ; preds = %27
  %44 = add i32 %.03457.us61, %16
  br label %38

._crit_edge59.split.us64:                         ; preds = %38
  %45 = add nuw nsw i32 %.03560.us, 1
  %exitcond89.not = icmp eq i32 %45, 31
  br i1 %exitcond89.not, label %.preheader50, label %.preheader48.us, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph79, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph79 ]
  %46 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %indvars.iv
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %46)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = load i64, ptr %2, align 8, !tbaa !5
  %49 = icmp sgt i64 %48, %indvars.iv.next
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !13

50:                                               ; preds = %._crit_edge
  %51 = load i64, ptr %3, align 16, !tbaa !5
  %52 = icmp sgt i64 %11, 0
  br i1 %52, label %.lr.ph72.preheader, label %._crit_edge76

.lr.ph72.preheader:                               ; preds = %50
  %min.iters.check = icmp ult i64 %11, 4
  br i1 %min.iters.check, label %.lr.ph72.preheader107, label %vector.ph

.lr.ph72.preheader107:                            ; preds = %middle.block, %.lr.ph72.preheader
  %indvars.iv93.ph = phi i64 [ 0, %.lr.ph72.preheader ], [ %n.vec, %middle.block ]
  %.03969.ph = phi i64 [ %51, %.lr.ph72.preheader ], [ %59, %middle.block ]
  br label %.lr.ph72

vector.ph:                                        ; preds = %.lr.ph72.preheader
  %n.vec = and i64 %11, 9223372036854775804
  %53 = insertelement <2 x i64> <i64 poison, i64 -1>, i64 %51, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %53, %vector.ph ], [ %56, %vector.body ]
  %vec.phi105 = phi <2 x i64> [ <i64 -1, i64 -1>, %vector.ph ], [ %57, %vector.body ]
  %54 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %index
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load = load <2 x i64>, ptr %54, align 16, !tbaa !5
  %wide.load106 = load <2 x i64>, ptr %55, align 16, !tbaa !5
  %56 = and <2 x i64> %wide.load, %vec.phi
  %57 = and <2 x i64> %wide.load106, %vec.phi105
  %index.next = add nuw i64 %index, 4
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = and <2 x i64> %57, %56
  %59 = call i64 @llvm.vector.reduce.and.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %11, %n.vec
  br i1 %cmp.n, label %.preheader49, label %.lr.ph72.preheader107

.preheader49:                                     ; preds = %.lr.ph72, %middle.block
  %.lcssa104 = phi i64 [ %59, %middle.block ], [ %62, %.lr.ph72 ]
  br i1 %52, label %.lr.ph75, label %._crit_edge76

.lr.ph72:                                         ; preds = %.lr.ph72.preheader107, %.lr.ph72
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph72 ], [ %indvars.iv93.ph, %.lr.ph72.preheader107 ]
  %.03969 = phi i64 [ %62, %.lr.ph72 ], [ %.03969.ph, %.lr.ph72.preheader107 ]
  %60 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %indvars.iv93
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = and i64 %61, %.03969
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next94, %11
  br i1 %exitcond96.not, label %.preheader49, label %.lr.ph72, !llvm.loop !17

.lr.ph75:                                         ; preds = %.preheader49, %.lr.ph75
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.lr.ph75 ], [ 0, %.preheader49 ]
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.lcssa104)
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %64 = load i64, ptr %2, align 8, !tbaa !5
  %65 = icmp sgt i64 %64, %indvars.iv.next98
  br i1 %65, label %.lr.ph75, label %._crit_edge76, !llvm.loop !18

.preheader50:                                     ; preds = %._crit_edge59.split.us64
  br i1 %15, label %.lr.ph67.preheader, label %._crit_edge76

.lr.ph67.preheader:                               ; preds = %.preheader51.split.us, %.preheader50
  br label %.lr.ph67

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %.lr.ph67
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph67 ], [ 0, %.lr.ph67.preheader ]
  %66 = getelementptr inbounds [30000 x i64], ptr %3, i64 0, i64 %indvars.iv90
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %67)
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %69 = load i64, ptr %2, align 8, !tbaa !5
  %70 = icmp sgt i64 %69, %indvars.iv.next91
  br i1 %70, label %.lr.ph67, label %._crit_edge76, !llvm.loop !19

._crit_edge76:                                    ; preds = %.lr.ph67, %.lr.ph75, %.preheader50, %.preheader51, %.preheader49, %50
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %72 = load i64, ptr %1, align 8, !tbaa !5
  %73 = add nsw i64 %72, -1
  store i64 %73, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %72, 0
  br i1 %.not, label %._crit_edge80, label %.lr.ph79, !llvm.loop !20

._crit_edge80:                                    ; preds = %._crit_edge76, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 240000, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.and.v2i64(<2 x i64>) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long long", !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, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10, !16, !15}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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