; LLVM IR from tangjz/acm-icpc :: buaa/oj3rd (1151)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@num = external dso_local global [100100 x i32], align 16
@k = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@prime = external dso_local global [2000110 x i32], align 16
@vis = external dso_local global [2000110 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i8 1, ptr getelementptr inbounds ([2000110 x i8], ptr @vis, i64 0, i64 1), align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 2, ptr %2, align 4, !tbaa !8
  br label %10

10:                                               ; preds = %66, %0
  %11 = load i32, ptr %2, align 4, !tbaa !8
  %12 = icmp slt i32 %11, 2000010
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %10
  %15 = load i32, ptr %2, align 4, !tbaa !8
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = icmp ne i8 %18, 0
  br i1 %19, label %26, label %20

20:                                               ; preds = %14
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = load i32, ptr @tot, align 4, !tbaa !8
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr @tot, align 4, !tbaa !8
  %24 = sext i32 %22 to i64
  %25 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %24
  store i32 %21, ptr %25, align 4, !tbaa !8
  br label %26

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

27:                                               ; preds = %61, %26
  %28 = load i32, ptr %4, align 4, !tbaa !8
  %29 = load i32, ptr @tot, align 4, !tbaa !8
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %34 = sext i32 %33 to i64
  %35 = load i32, ptr %4, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = mul nsw i64 %34, %39
  %41 = icmp sge i64 %40, 2000010
  br i1 %41, label %42, label %43

42:                                               ; preds = %32
  store i32 5, ptr %3, align 4
  br label %64

43:                                               ; preds = %32
  %44 = load i32, ptr %2, align 4, !tbaa !8
  %45 = load i32, ptr %4, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %49 = mul nsw i32 %44, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %50
  store i8 1, ptr %51, align 1, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = load i32, ptr %4, align 4, !tbaa !8
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !8
  %57 = srem i32 %52, %56
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %43
  store i32 5, ptr %3, align 4
  br label %64

60:                                               ; preds = %43
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !8
  br label %27, !llvm.loop !10

64:                                               ; preds = %59, %42, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %2, align 4, !tbaa !8
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !8
  br label %10, !llvm.loop !12

69:                                               ; preds = %13
  br label %70

70:                                               ; preds = %144, %69
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %72 = icmp eq i32 %71, 2
  br i1 %72, label %73, label %145

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

74:                                               ; preds = %106, %73
  %75 = load i32, ptr %5, align 4, !tbaa !8
  %76 = load i32, ptr @n, align 4, !tbaa !8
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %109

79:                                               ; preds = %74
  %80 = load i32, ptr %5, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100100 x i32], ptr @num, i64 0, i64 %81
  store i32 0, ptr %82, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 1, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  br label %83

83:                                               ; preds = %102, %79
  %84 = load i32, ptr %6, align 4, !tbaa !8
  %85 = load i32, ptr @m, align 4, !tbaa !8
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %105

88:                                               ; preds = %83
  %89 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %7)
  %90 = load i32, ptr %7, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !5
  %94 = sext i8 %93 to i32
  %95 = load i32, ptr %6, align 4, !tbaa !8
  %96 = shl i32 %94, %95
  %97 = load i32, ptr %5, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100100 x i32], ptr @num, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !8
  %101 = or i32 %100, %96
  store i32 %101, ptr %99, align 4, !tbaa !8
  br label %102

102:                                              ; preds = %88
  %103 = load i32, ptr %6, align 4, !tbaa !8
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %6, align 4, !tbaa !8
  br label %83, !llvm.loop !13

105:                                              ; preds = %87
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %5, align 4, !tbaa !8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %5, align 4, !tbaa !8
  br label %74, !llvm.loop !14

109:                                              ; preds = %78
  %110 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @k)
  br label %111

111:                                              ; preds = %139, %109
  %112 = load i32, ptr @k, align 4, !tbaa !8
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr @k, align 4, !tbaa !8
  %114 = icmp ne i32 %112, 0
  br i1 %114, label %115, label %144

115:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %116 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8, ptr noundef %9)
  %117 = load i32, ptr %8, align 4, !tbaa !8
  %118 = icmp slt i32 %117, 1
  br i1 %118, label %139, label %119

119:                                              ; preds = %115
  %120 = load i32, ptr %8, align 4, !tbaa !8
  %121 = load i32, ptr @n, align 4, !tbaa !8
  %122 = icmp sgt i32 %120, %121
  br i1 %122, label %139, label %123

123:                                              ; preds = %119
  %124 = load i32, ptr %9, align 4, !tbaa !8
  %125 = icmp slt i32 %124, 1
  br i1 %125, label %139, label %126

126:                                              ; preds = %123
  %127 = load i32, ptr %9, align 4, !tbaa !8
  %128 = load i32, ptr @m, align 4, !tbaa !8
  %129 = icmp sgt i32 %127, %128
  br i1 %129, label %139, label %130

130:                                              ; preds = %126
  %131 = load i32, ptr %8, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100100 x i32], ptr @num, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !8
  %135 = load i32, ptr %9, align 4, !tbaa !8
  %136 = shl i32 1, %135
  %137 = and i32 %134, %136
  %138 = icmp ne i32 %137, 0
  br label %139

139:                                              ; preds = %130, %126, %123, %119, %115
  %140 = phi i1 [ true, %126 ], [ true, %123 ], [ true, %119 ], [ true, %115 ], [ %138, %130 ]
  %141 = zext i1 %140 to i64
  %142 = select i1 %140, ptr @.str.2, ptr @.str.3
  %143 = call i32 @puts(ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %111, !llvm.loop !15

144:                                              ; preds = %111
  br label %70, !llvm.loop !16

145:                                              ; preds = %70
  ret i32 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

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

declare i32 @puts(ptr noundef) #2

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 = { "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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@num = external dso_local local_unnamed_addr global [100100 x i32], align 16
@k = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@prime = external dso_local local_unnamed_addr global [2000110 x i32], align 16
@vis = external dso_local local_unnamed_addr global [2000110 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  store i8 1, ptr getelementptr inbounds (i8, ptr @vis, i64 1), align 1, !tbaa !5
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !8
  br label %6

.preheader32:                                     ; preds = %._crit_edge
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %5 = icmp eq i32 %4, 2
  br i1 %5, label %.preheader, label %._crit_edge49

6:                                                ; preds = %0, %._crit_edge
  %indvars.iv53 = phi i64 [ 2, %0 ], [ %indvars.iv.next54, %._crit_edge ]
  %7 = phi i32 [ %tot.promoted, %0 ], [ %16, %._crit_edge ]
  %8 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %indvars.iv53
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %.not27 = icmp eq i8 %9, 0
  br i1 %.not27, label %10, label %15

10:                                               ; preds = %6
  %11 = add nsw i32 %7, 1
  store i32 %11, ptr @tot, align 4, !tbaa !8
  %12 = sext i32 %7 to i64
  %13 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %12
  %14 = trunc nuw nsw i64 %indvars.iv53 to i32
  store i32 %14, ptr %13, align 4, !tbaa !8
  br label %15

15:                                               ; preds = %10, %6
  %16 = phi i32 [ %11, %10 ], [ %7, %6 ]
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %15
  %18 = zext nneg i32 %16 to i64
  %19 = trunc nuw nsw i64 %indvars.iv53 to i32
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %25
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %25 ]
  %20 = getelementptr inbounds [2000110 x i32], ptr @prime, i64 0, i64 %indvars.iv
  %21 = load i32, ptr %20, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = mul nsw i64 %indvars.iv53, %22
  %24 = icmp sgt i64 %23, 2000009
  br i1 %24, label %._crit_edge, label %25

25:                                               ; preds = %.lr.ph
  %26 = mul nsw i32 %21, %19
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %27
  store i8 1, ptr %28, align 1, !tbaa !5
  %29 = srem i32 %19, %21
  %30 = icmp ne i32 %29, 0
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = icmp ult i64 %indvars.iv.next, %18
  %or.cond50 = select i1 %30, i1 %31, i1 false
  br i1 %or.cond50, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph, %25, %15
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next54, 2000010
  br i1 %exitcond.not, label %.preheader32, label %6, !llvm.loop !12

.loopexit:                                        ; preds = %75, %._crit_edge45
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %33 = icmp eq i32 %32, 2
  br i1 %33, label %.preheader, label %._crit_edge49, !llvm.loop !13

.preheader:                                       ; preds = %.preheader32, %.loopexit
  %34 = load i32, ptr @n, align 4, !tbaa !8
  %.not42 = icmp slt i32 %34, 1
  br i1 %.not42, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %.preheader
  %35 = load i32, ptr @m, align 4, !tbaa !8
  %36 = icmp slt i32 %35, 1
  br i1 %36, label %.lr.ph44.split.us, label %.lr.ph44.split

.lr.ph44.split.us:                                ; preds = %.lr.ph44
  %37 = zext nneg i32 %34 to i64
  %38 = shl nuw nsw i64 %37, 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) getelementptr inbounds (i8, ptr @num, i64 4), i8 0, i64 %38, i1 false), !tbaa !8
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %._crit_edge41, %.lr.ph44.split.us, %.preheader
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @k)
  %40 = load i32, ptr @k, align 4, !tbaa !8
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr @k, align 4, !tbaa !8
  %.not2546 = icmp eq i32 %40, 0
  br i1 %.not2546, label %.loopexit, label %.lr.ph48

.lr.ph44.split:                                   ; preds = %.lr.ph44, %._crit_edge41
  %42 = phi i32 [ %45, %._crit_edge41 ], [ %34, %.lr.ph44 ]
  %43 = phi i32 [ %46, %._crit_edge41 ], [ %35, %.lr.ph44 ]
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge41 ], [ 1, %.lr.ph44 ]
  %44 = getelementptr inbounds [100100 x i32], ptr @num, i64 0, i64 %indvars.iv56
  store i32 0, ptr %44, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %.not2637 = icmp slt i32 %43, 1
  br i1 %.not2637, label %._crit_edge41, label %.lr.ph40

._crit_edge41.loopexit:                           ; preds = %.lr.ph40
  %.pre = load i32, ptr @n, align 4, !tbaa !8
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit, %.lr.ph44.split
  %45 = phi i32 [ %.pre, %._crit_edge41.loopexit ], [ %42, %.lr.ph44.split ]
  %46 = phi i32 [ %58, %._crit_edge41.loopexit ], [ %43, %.lr.ph44.split ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %47 = sext i32 %45 to i64
  %.not.not = icmp slt i64 %indvars.iv56, %47
  br i1 %.not.not, label %.lr.ph44.split, label %._crit_edge45, !llvm.loop !14

.lr.ph40:                                         ; preds = %.lr.ph44.split, %.lr.ph40
  %.038 = phi i32 [ %57, %.lr.ph40 ], [ 1, %.lr.ph44.split ]
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %49 = load i32, ptr %1, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2000110 x i8], ptr @vis, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = sext i8 %52 to i32
  %54 = shl i32 %53, %.038
  %55 = load i32, ptr %44, align 4, !tbaa !8
  %56 = or i32 %54, %55
  store i32 %56, ptr %44, align 4, !tbaa !8
  %57 = add nuw nsw i32 %.038, 1
  %58 = load i32, ptr @m, align 4, !tbaa !8
  %.not26.not = icmp slt i32 %.038, %58
  br i1 %.not26.not, label %.lr.ph40, label %._crit_edge41.loopexit, !llvm.loop !16

.lr.ph48:                                         ; preds = %._crit_edge45, %75
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %59 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = icmp slt i32 %60, 1
  br i1 %61, label %.thread, label %62

62:                                               ; preds = %.lr.ph48
  %63 = load i32, ptr @n, align 4, !tbaa !8
  %64 = icmp sgt i32 %60, %63
  %65 = load i32, ptr %3, align 4
  %66 = icmp slt i32 %65, 1
  %or.cond = select i1 %64, i1 true, i1 %66
  %67 = load i32, ptr @m, align 4
  %68 = icmp sgt i32 %65, %67
  %or.cond29 = select i1 %or.cond, i1 true, i1 %68
  br i1 %or.cond29, label %.thread, label %69

69:                                               ; preds = %62
  %70 = zext nneg i32 %60 to i64
  %71 = getelementptr inbounds [100100 x i32], ptr @num, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = shl nuw i32 1, %65
  %74 = and i32 %72, %73
  %.fr = freeze i32 %74
  %.not31 = icmp eq i32 %.fr, 0
  br i1 %.not31, label %75, label %.thread

.thread:                                          ; preds = %.lr.ph48, %62, %69
  br label %75

75:                                               ; preds = %69, %.thread
  %76 = phi ptr [ @.str.2, %.thread ], [ @.str.3, %69 ]
  %77 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %76)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %78 = load i32, ptr @k, align 4, !tbaa !8
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr @k, align 4, !tbaa !8
  %.not25 = icmp eq i32 %78, 0
  br i1 %.not25, label %.loopexit, label %.lr.ph48, !llvm.loop !17

._crit_edge49:                                    ; preds = %.loopexit, %.preheader32
  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 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 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}


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