; LLVM IR from tangjz/acm-icpc :: lydsy (1072)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@fact = external dso_local global [11 x i32], align 16
@c = external dso_local global [10 x i32], align 16
@f = external dso_local global [1024 x [1000 x i32]], align 16
@ans = external dso_local global i32, align 4
@s = external dso_local global [10 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 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
  store i32 0, ptr %1, align 4
  store i32 1, ptr @fact, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %24, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp sle i32 %10, 10
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %27

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

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

27:                                               ; preds = %12
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %29

29:                                               ; preds = %161, %27
  %30 = load i32, ptr @t, align 4, !tbaa !5
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr @t, align 4, !tbaa !5
  %32 = icmp ne i32 %30, 0
  br i1 %32, label %33, label %164

33:                                               ; preds = %29
  call void @llvm.memset.p0.i64(ptr align 16 @c, i8 0, i64 40, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 4096000, i1 false)
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @s, ptr noundef @d)
  %35 = call i64 @strlen(ptr noundef @s) #6
  %36 = trunc i64 %35 to i32
  store i32 %36, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %58, %33
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %61

42:                                               ; preds = %37
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = sub nsw i32 %47, 48
  %49 = trunc i32 %48 to i8
  store i8 %49, ptr %45, align 1, !tbaa !11
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = sext i8 %53 to i64
  %55 = getelementptr inbounds [10 x i32], ptr @c, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %42
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %3, align 4, !tbaa !5
  br label %37, !llvm.loop !12

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

62:                                               ; preds = %133, %61
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = shl i32 1, %64
  %66 = icmp slt i32 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %136

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

69:                                               ; preds = %129, %68
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load i32, ptr @d, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %132

74:                                               ; preds = %69
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %76
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1000 x i32], ptr %77, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %128

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

84:                                               ; preds = %124, %83
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %127

89:                                               ; preds = %84
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = shl i32 1, %91
  %93 = and i32 %90, %92
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %123, label %95

95:                                               ; preds = %89
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %97
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1000 x i32], ptr %98, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = shl i32 1, %104
  %106 = or i32 %103, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %107
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = mul nsw i32 %109, 10
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %112
  %114 = load i8, ptr %113, align 1, !tbaa !11
  %115 = sext i8 %114 to i32
  %116 = add nsw i32 %110, %115
  %117 = load i32, ptr @d, align 4, !tbaa !5
  %118 = srem i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [1000 x i32], ptr %108, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add nsw i32 %121, %102
  store i32 %122, ptr %120, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %95, %89
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %7, align 4, !tbaa !5
  br label %84, !llvm.loop !13

127:                                              ; preds = %88
  br label %128

128:                                              ; preds = %127, %74
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !14

132:                                              ; preds = %73
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %4, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %4, align 4, !tbaa !5
  br label %62, !llvm.loop !15

136:                                              ; preds = %67
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = shl i32 1, %137
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %140
  %142 = getelementptr inbounds [1000 x i32], ptr %141, i64 0, i64 0
  %143 = load i32, ptr %142, align 16, !tbaa !5
  store i32 %143, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %158, %136
  %145 = load i32, ptr %8, align 4, !tbaa !5
  %146 = icmp slt i32 %145, 10
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %161

148:                                              ; preds = %144
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [10 x i32], ptr @c, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = load i32, ptr @ans, align 4, !tbaa !5
  %157 = sdiv i32 %156, %155
  store i32 %157, ptr @ans, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %148
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %8, align 4, !tbaa !5
  br label %144, !llvm.loop !16

161:                                              ; preds = %147
  %162 = load i32, ptr @ans, align 4, !tbaa !5
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %162)
  br label %29, !llvm.loop !17

164:                                              ; preds = %29
  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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

declare i32 @printf(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind willreturn memory(read) "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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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

@t = external dso_local global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@d = external dso_local global i32, align 4
@fact = external dso_local local_unnamed_addr global [11 x i32], align 16
@c = external dso_local local_unnamed_addr global [10 x i32], align 16
@f = external dso_local local_unnamed_addr global [1024 x [1000 x i32]], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local global [10 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  store <4 x i32> <i32 1, i32 1, i32 2, i32 6>, ptr @fact, align 16, !tbaa !5
  store <4 x i32> <i32 24, i32 120, i32 720, i32 5040>, ptr getelementptr inbounds (i8, ptr @fact, i64 16), align 16, !tbaa !5
  store i32 40320, ptr getelementptr inbounds (i8, ptr @fact, i64 32), align 16, !tbaa !5
  store i32 362880, ptr getelementptr inbounds (i8, ptr @fact, i64 36), align 4, !tbaa !5
  store i32 3628800, ptr getelementptr inbounds (i8, ptr @fact, i64 40), align 8, !tbaa !5
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not56 = icmp eq i32 %2, 0
  br i1 %.not56, label %._crit_edge59, label %.lr.ph58

.lr.ph58:                                         ; preds = %0, %._crit_edge47
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) @c, i8 0, i64 40, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096000) @f, i8 0, i64 4096000, i1 false)
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @s, ptr noundef nonnull @d)
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #5
  %.fr = freeze i64 %5
  %6 = trunc i64 %.fr to i32
  store i32 %6, ptr @n, align 4, !tbaa !5
  %7 = icmp slt i32 %6, 1
  br i1 %7, label %.preheader36.lr.ph.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph58
  %wide.trip.count = and i64 %.fr, 2147483647
  %xtraiter = and i64 %.fr, 1
  %8 = icmp eq i64 %wide.trip.count, 1
  br i1 %8, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %.lr.ph

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa
  %9 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %indvars.iv.unr
  %10 = load i8, ptr %9, align 1, !tbaa !9
  %11 = add i8 %10, -48
  store i8 %11, ptr %9, align 1, !tbaa !9
  %12 = sext i8 %11 to i64
  %13 = getelementptr inbounds [10 x i32], ptr @c, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr %13, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  store i32 1, ptr @f, align 16, !tbaa !5
  %16 = shl nuw i32 1, %6
  %.not60 = icmp eq i32 %6, 31
  br i1 %.not60, label %._crit_edge47, label %.preheader36.lr.ph

.preheader36.lr.ph:                               ; preds = %._crit_edge
  %17 = load i32, ptr @d, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 1
  %brmerge = or i1 %18, %7
  br i1 %brmerge, label %._crit_edge47, label %.preheader36.us.us.preheader

.preheader36.lr.ph.thread:                        ; preds = %.lr.ph58
  store i32 1, ptr @f, align 16, !tbaa !5
  %19 = shl nuw nsw i32 1, %6
  br label %._crit_edge47

.preheader36.us.us.preheader:                     ; preds = %.preheader36.lr.ph
  %smax = tail call i32 @llvm.smax.i32(i32 %16, i32 1)
  %wide.trip.count79 = zext nneg i32 %smax to i64
  %wide.trip.count74 = zext nneg i32 %17 to i64
  %wide.trip.count69 = and i64 %.fr, 2147483647
  br label %.preheader36.us.us

.preheader36.us.us:                               ; preds = %.preheader36.us.us.preheader, %._crit_edge44.split.us.us.us
  %indvars.iv76 = phi i64 [ 0, %.preheader36.us.us.preheader ], [ %indvars.iv.next77, %._crit_edge44.split.us.us.us ]
  %20 = trunc nuw nsw i64 %indvars.iv76 to i32
  br label %21

21:                                               ; preds = %..loopexit_crit_edge.us.us.us, %.preheader36.us.us
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %..loopexit_crit_edge.us.us.us ], [ 0, %.preheader36.us.us ]
  %22 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %indvars.iv76, i64 %indvars.iv71
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %.not34.us.us.us = icmp eq i32 %23, 0
  br i1 %.not34.us.us.us, label %..loopexit_crit_edge.us.us.us, label %.preheader.us.us.us

24:                                               ; preds = %.preheader.us.us.us, %41
  %indvars.iv66 = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next67, %41 ]
  %25 = trunc nuw nsw i64 %indvars.iv66 to i32
  %26 = shl nuw i32 1, %25
  %27 = and i32 %26, %20
  %.not35.us.us.us = icmp eq i32 %27, 0
  br i1 %.not35.us.us.us, label %28, label %41

28:                                               ; preds = %24
  %29 = load i32, ptr %22, align 4, !tbaa !5
  %30 = or i32 %26, %20
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %indvars.iv66
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %34 = sext i8 %33 to i32
  %35 = add nsw i32 %43, %34
  %36 = srem i32 %35, %17
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %31, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, %29
  store i32 %40, ptr %38, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %28, %24
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69
  br i1 %exitcond70.not, label %..loopexit_crit_edge.us.us.us, label %24, !llvm.loop !10

..loopexit_crit_edge.us.us.us:                    ; preds = %41, %21
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge44.split.us.us.us, label %21, !llvm.loop !12

.preheader.us.us.us:                              ; preds = %21
  %42 = trunc i64 %indvars.iv71 to i32
  %43 = mul i32 %42, 10
  br label %24

._crit_edge44.split.us.us.us:                     ; preds = %..loopexit_crit_edge.us.us.us
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge47, label %.preheader36.us.us, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %44 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %indvars.iv
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = add i8 %45, -48
  store i8 %46, ptr %44, align 1, !tbaa !9
  %47 = sext i8 %46 to i64
  %48 = getelementptr inbounds [10 x i32], ptr @c, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %51 = getelementptr inbounds [10 x i8], ptr @s, i64 0, i64 %indvars.iv.next
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = add i8 %52, -48
  store i8 %53, ptr %51, align 1, !tbaa !9
  %54 = sext i8 %53 to i64
  %55 = getelementptr inbounds [10 x i32], ptr @c, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !14

._crit_edge47:                                    ; preds = %._crit_edge44.split.us.us.us, %.preheader36.lr.ph, %.preheader36.lr.ph.thread, %._crit_edge
  %58 = phi i32 [ -2147483648, %._crit_edge ], [ %16, %.preheader36.lr.ph ], [ %19, %.preheader36.lr.ph.thread ], [ %16, %._crit_edge44.split.us.us.us ]
  %59 = add nsw i32 %58, -1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1024 x [1000 x i32]], ptr @f, i64 0, i64 %60
  %62 = load i32, ptr %61, align 16, !tbaa !5
  %63 = load i32, ptr @c, align 16, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sdiv i32 %62, %66
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sdiv i32 %67, %71
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sdiv i32 %72, %76
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sdiv i32 %77, %81
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sdiv i32 %82, %86
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 20), align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sdiv i32 %87, %91
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 24), align 8, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sdiv i32 %92, %96
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 28), align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sdiv i32 %97, %101
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 32), align 16, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sdiv i32 %102, %106
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 36), align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [11 x i32], ptr @fact, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sdiv i32 %107, %111
  store i32 %112, ptr @ans, align 4, !tbaa !5
  %113 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %112)
  %114 = load i32, ptr @t, align 4, !tbaa !5
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %114, 0
  br i1 %.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !15

._crit_edge59:                                    ; preds = %._crit_edge47, %0
  ret i32 0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 willreturn memory(read) }

!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 = !{!7, !7, 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}


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