; LLVM IR from tangjz/acm-icpc :: luogu (1005)

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

%struct.Big_int = type { i32, [20 x i32] }

@pre = external dso_local global [81 x %struct.Big_int], align 16
@ans = external dso_local global %struct.Big_int, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@num = external dso_local global [81 x i32], 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

; 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 %struct.Big_int, align 4
  %7 = alloca i32, align 4
  %8 = alloca [81 x [81 x %struct.Big_int]], align 16
  %9 = alloca %struct.Big_int, align 4
  %10 = alloca %struct.Big_int, align 4
  %11 = alloca %struct.Big_int, align 4
  %12 = alloca %struct.Big_int, align 4
  %13 = alloca %struct.Big_int, align 4
  %14 = alloca %struct.Big_int, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @_ZN7Big_int4initERKi(ptr noundef nonnull align 4 dereferenceable(84) @pre, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %28, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %20, label %31

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 84, ptr %6) #8
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sub nsw i32 %21, 1
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 2, ptr %7, align 4, !tbaa !5
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %6, ptr noundef nonnull align 4 dereferenceable(84) %24, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %26
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %6, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr %6) #8
  br label %28

28:                                               ; preds = %20
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !11

31:                                               ; preds = %16
  br label %32

32:                                               ; preds = %150, %31
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr @n, align 4, !tbaa !5
  %35 = icmp ne i32 %33, 0
  br i1 %35, label %36, label %151

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 551124, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 551124, i1 false)
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %46, %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = load i32, ptr @m, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %41, label %49

41:                                               ; preds = %37
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %43
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %44)
  br label %46

46:                                               ; preds = %41
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %2, align 4, !tbaa !5
  br label %37, !llvm.loop !13

49:                                               ; preds = %37
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %131, %49
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = load i32, ptr @m, align 4, !tbaa !5
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %54, label %134

54:                                               ; preds = %50
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %127, %54
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %59, label %130

59:                                               ; preds = %55
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = icmp sgt i32 %60, %61
  br i1 %62, label %63, label %95

63:                                               ; preds = %59
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %65
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [81 x %struct.Big_int], ptr %66, i64 0, i64 %68
  call void @llvm.lifetime.start.p0(i64 84, ptr %9) #8
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %72
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [81 x %struct.Big_int], ptr %73, i64 0, i64 %75
  call void @llvm.lifetime.start.p0(i64 84, ptr %10) #8
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %78
  %80 = load i32, ptr @m, align 4, !tbaa !5
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = sub nsw i32 %80, %81
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  %85 = add nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %86
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %10, ptr noundef nonnull align 4 dereferenceable(84) %79, ptr noundef nonnull align 4 dereferenceable(4) %87)
  call void @_ZNK7Big_intplERKS_(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %9, ptr noundef nonnull align 4 dereferenceable(84) %76, ptr noundef nonnull align 4 dereferenceable(84) %10)
  %88 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %69, ptr noundef nonnull align 4 dereferenceable(84) %9)
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %90
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [81 x %struct.Big_int], ptr %91, i64 0, i64 %93
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %94, ptr align 4 %88, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 84, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr %9) #8
  br label %95

95:                                               ; preds = %63, %59
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = icmp sge i32 %96, 1
  br i1 %97, label %98, label %126

98:                                               ; preds = %95
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %100
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [81 x %struct.Big_int], ptr %101, i64 0, i64 %103
  call void @llvm.lifetime.start.p0(i64 84, ptr %11) #8
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %107
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [81 x %struct.Big_int], ptr %108, i64 0, i64 %111
  call void @llvm.lifetime.start.p0(i64 84, ptr %12) #8
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %114
  %116 = load i32, ptr %3, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %117
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %12, ptr noundef nonnull align 4 dereferenceable(84) %115, ptr noundef nonnull align 4 dereferenceable(4) %118)
  call void @_ZNK7Big_intplERKS_(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %11, ptr noundef nonnull align 4 dereferenceable(84) %112, ptr noundef nonnull align 4 dereferenceable(84) %12)
  %119 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %104, ptr noundef nonnull align 4 dereferenceable(84) %11)
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %121
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [81 x %struct.Big_int], ptr %122, i64 0, i64 %124
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %125, ptr align 4 %119, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 84, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr %11) #8
  br label %126

126:                                              ; preds = %98, %95
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %3, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %3, align 4, !tbaa !5
  br label %55, !llvm.loop !14

130:                                              ; preds = %55
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %2, align 4, !tbaa !5
  br label %50, !llvm.loop !15

134:                                              ; preds = %50
  call void @llvm.lifetime.start.p0(i64 84, ptr %13) #8
  call void @llvm.memset.p0.i64(ptr align 4 %13, i8 0, i64 84, i1 false)
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %147, %134
  %136 = load i32, ptr %2, align 4, !tbaa !5
  %137 = load i32, ptr @m, align 4, !tbaa !5
  %138 = icmp sle i32 %136, %137
  br i1 %138, label %139, label %150

139:                                              ; preds = %135
  %140 = load i32, ptr @m, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %8, i64 0, i64 %141
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [81 x %struct.Big_int], ptr %142, i64 0, i64 %144
  %146 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %13, ptr noundef nonnull align 4 dereferenceable(84) %145)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %146, i64 84, i1 false), !tbaa.struct !9
  br label %147

147:                                              ; preds = %139
  %148 = load i32, ptr %2, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %2, align 4, !tbaa !5
  br label %135, !llvm.loop !16

150:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 84, ptr %14) #8
  call void @_ZN7Big_intpLERKS_(ptr dead_on_unwind writable sret(%struct.Big_int) align 4 %14, ptr noundef nonnull align 4 dereferenceable(84) @ans, ptr noundef nonnull align 4 dereferenceable(84) %13)
  call void @llvm.lifetime.end.p0(i64 84, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 551124, ptr %8) #8
  br label %32, !llvm.loop !17

151:                                              ; preds = %32
  call void @_ZN7Big_int5PrintEv(ptr noundef nonnull align 4 dereferenceable(84) @ans)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %152 = load i32, ptr %1, align 4
  ret i32 %152
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Big_int4initERKi(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK7Big_intmlERKi(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Big_intplERKS_(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Big_intpLERKS_(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Big_int5PrintEv(ptr noundef nonnull align 4 dereferenceable(84)) #7 align 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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint 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 #7 = { 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 #8 = { 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 = !{i64 0, i64 4, !5, i64 4, i64 80, !10}
!10 = !{!7, !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}


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

%struct.Big_int = type { i32, [20 x i32] }

@pre = external dso_local global [81 x %struct.Big_int], align 16
@ans = external dso_local global %struct.Big_int, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@num = external dso_local global [81 x i32], 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Big_int, align 4
  %3 = alloca i32, align 4
  %4 = alloca [81 x [81 x %struct.Big_int]], align 16
  %5 = alloca %struct.Big_int, align 4
  %6 = alloca %struct.Big_int, align 4
  %7 = alloca %struct.Big_int, align 4
  %8 = alloca %struct.Big_int, align 4
  %9 = alloca %struct.Big_int, align 4
  %10 = alloca %struct.Big_int, align 4
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 1, ptr %1, align 4, !tbaa !5
  call void @_ZN7Big_int4initERKi(ptr noundef nonnull align 4 dereferenceable(84) @pre, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %.not46 = icmp slt i32 %12, 1
  br i1 %.not46, label %.preheader45, label %.lr.ph

.preheader45:                                     ; preds = %.lr.ph, %0
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr @n, align 4, !tbaa !5
  %.not3859 = icmp eq i32 %13, 0
  br i1 %.not3859, label %._crit_edge61, label %.lr.ph60

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %2) #8
  %15 = add nsw i64 %indvars.iv, -1
  %16 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 2, ptr %3, align 4, !tbaa !5
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %2, ptr noundef nonnull align 4 dereferenceable(84) %16, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %17 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %17, ptr noundef nonnull align 4 dereferenceable(84) %2, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %2) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not.not, label %.lr.ph, label %.preheader45, !llvm.loop !11

.lr.ph60:                                         ; preds = %.preheader45, %._crit_edge58
  call void @llvm.lifetime.start.p0(i64 551124, ptr nonnull %4) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(551124) %4, i8 0, i64 551124, i1 false)
  %20 = load i32, ptr @m, align 4, !tbaa !5
  %.not3948 = icmp slt i32 %20, 1
  br i1 %.not3948, label %._crit_edge, label %.lr.ph50

.preheader44:                                     ; preds = %.lr.ph50
  %.not4052 = icmp slt i32 %23, 1
  br i1 %.not4052, label %._crit_edge, label %.peel.next

.lr.ph50:                                         ; preds = %.lr.ph60, %.lr.ph50
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph50 ], [ 1, %.lr.ph60 ]
  %21 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %indvars.iv63
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %21)
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %.not39.not = icmp slt i64 %indvars.iv63, %24
  br i1 %.not39.not, label %.lr.ph50, label %.preheader44, !llvm.loop !13

.peel.next:                                       ; preds = %.preheader44, %.loopexit
  %25 = phi i32 [ %54, %.loopexit ], [ %23, %.preheader44 ]
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.loopexit ], [ 1, %.preheader44 ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.loopexit ], [ 2, %.preheader44 ]
  %26 = add nsw i64 %indvars.iv75, -1
  %27 = getelementptr inbounds [81 x %struct.Big_int], ptr @pre, i64 0, i64 %indvars.iv75
  %28 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %indvars.iv75, i64 0
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %5) #8
  %29 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %26, i64 0
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %6) #8
  %30 = trunc i64 %indvars.iv75 to i32
  %reass.sub = sub i32 %25, %30
  %31 = add i32 %reass.sub, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %32
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %6, ptr noundef nonnull align 4 dereferenceable(84) %27, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @_ZNK7Big_intplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %5, ptr noundef nonnull align 4 dereferenceable(84) %29, ptr noundef nonnull align 4 dereferenceable(84) %6)
  %34 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %28, ptr noundef nonnull align 4 dereferenceable(84) %5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %28, ptr noundef nonnull align 4 dereferenceable(84) %34, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %5) #8
  br label %35

35:                                               ; preds = %.peel.next, %48
  %indvars.iv66 = phi i64 [ 1, %.peel.next ], [ %indvars.iv.next67, %48 ]
  %36 = icmp ugt i64 %indvars.iv75, %indvars.iv66
  br i1 %36, label %37, label %48

37:                                               ; preds = %35
  %38 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %indvars.iv75, i64 %indvars.iv66
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %5) #8
  %39 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %26, i64 %indvars.iv66
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %6) #8
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = sub nsw i64 %indvars.iv66, %indvars.iv75
  %42 = trunc i64 %41 to i32
  %43 = add i32 %42, 1
  %44 = add i32 %43, %40
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %45
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %6, ptr noundef nonnull align 4 dereferenceable(84) %27, ptr noundef nonnull align 4 dereferenceable(4) %46)
  call void @_ZNK7Big_intplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %5, ptr noundef nonnull align 4 dereferenceable(84) %39, ptr noundef nonnull align 4 dereferenceable(84) %6)
  %47 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %38, ptr noundef nonnull align 4 dereferenceable(84) %5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %38, ptr noundef nonnull align 4 dereferenceable(84) %47, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %5) #8
  br label %48

48:                                               ; preds = %37, %35
  %49 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %indvars.iv75, i64 %indvars.iv66
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %7) #8
  %50 = add nsw i64 %indvars.iv66, -1
  %51 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %26, i64 %50
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %8) #8
  %52 = getelementptr inbounds [81 x i32], ptr @num, i64 0, i64 %indvars.iv66
  call void @_ZNK7Big_intmlERKi(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %8, ptr noundef nonnull align 4 dereferenceable(84) %27, ptr noundef nonnull align 4 dereferenceable(4) %52)
  call void @_ZNK7Big_intplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %7, ptr noundef nonnull align 4 dereferenceable(84) %51, ptr noundef nonnull align 4 dereferenceable(84) %8)
  %53 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %49, ptr noundef nonnull align 4 dereferenceable(84) %7)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %49, ptr noundef nonnull align 4 dereferenceable(84) %53, i64 84, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %7) #8
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next67, %indvars.iv73
  br i1 %exitcond.not, label %.loopexit, label %35, !llvm.loop !14

.loopexit:                                        ; preds = %48
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %.not40.not = icmp slt i64 %indvars.iv75, %55
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  br i1 %.not40.not, label %.peel.next, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %.loopexit, %.lr.ph60, %.preheader44
  %56 = phi i32 [ %23, %.preheader44 ], [ %20, %.lr.ph60 ], [ %54, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %9) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %9, i8 0, i64 84, i1 false)
  %.not4154 = icmp slt i32 %56, 0
  br i1 %.not4154, label %._crit_edge58, label %.lr.ph57

.lr.ph57:                                         ; preds = %._crit_edge, %.lr.ph57
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph57 ], [ 0, %._crit_edge ]
  %57 = phi i32 [ %61, %.lr.ph57 ], [ %56, %._crit_edge ]
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [81 x [81 x %struct.Big_int]], ptr %4, i64 0, i64 %58, i64 %indvars.iv80
  %60 = call noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84) %9, ptr noundef nonnull align 4 dereferenceable(84) %59)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(84) %9, ptr noundef nonnull align 4 dereferenceable(84) %60, i64 84, i1 false), !tbaa.struct !9
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %61 = load i32, ptr @m, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %.not41.not = icmp slt i64 %indvars.iv80, %62
  br i1 %.not41.not, label %.lr.ph57, label %._crit_edge58, !llvm.loop !17

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %10) #8
  call void @_ZN7Big_intpLERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Big_int) align 4 %10, ptr noundef nonnull align 4 dereferenceable(84) @ans, ptr noundef nonnull align 4 dereferenceable(84) %9)
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 551124, ptr nonnull %4) #8
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = add nsw i32 %63, -1
  store i32 %64, ptr @n, align 4, !tbaa !5
  %.not38 = icmp eq i32 %63, 0
  br i1 %.not38, label %._crit_edge61, label %.lr.ph60, !llvm.loop !18

._crit_edge61:                                    ; preds = %._crit_edge58, %.preheader45
  call void @_ZN7Big_int5PrintEv(ptr noundef nonnull align 4 dereferenceable(84) @ans)
  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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Big_int4initERKi(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; 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 nounwind uwtable
declare dso_local void @_ZNK7Big_intmlERKi(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(84) ptr @_Z3maxI7Big_intERKT_S3_S3_(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Big_intplERKS_(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Big_intpLERKS_(ptr dead_on_unwind noalias writable sret(%struct.Big_int) align 4, ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Big_int5PrintEv(ptr noundef nonnull align 4 dereferenceable(84)) local_unnamed_addr #7 align 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 = { 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint 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 #7 = { 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 #8 = { 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 = !{i64 0, i64 4, !5, i64 4, i64 80, !10}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass