; LLVM IR from tangjz/acm-icpc :: projecteuler (594)

; 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
@c = external dso_local global [11 x [11 x i64]], align 16
@a = external dso_local global [11 x [11 x i64]], align 16
@b = external dso_local global [11 x [11 x i64]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4dfs1ii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %55, %0
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = icmp slt i32 %7, 11
  br i1 %8, label %10, label %9

9:                                                ; preds = %6
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %58

10:                                               ; preds = %6
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [11 x [11 x i64]], ptr @c, i64 0, i64 %12
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [11 x i64], ptr %13, i64 0, i64 %15
  store i64 1, ptr %16, align 8, !tbaa !9
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [11 x [11 x i64]], ptr @c, i64 0, i64 %18
  %20 = getelementptr inbounds [11 x i64], ptr %19, i64 0, i64 0
  store i64 1, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %51, %10
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sub nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [11 x [11 x i64]], ptr @c, i64 0, i64 %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sub nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [11 x i64], ptr %30, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [11 x [11 x i64]], ptr @c, i64 0, i64 %38
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [11 x i64], ptr %39, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = add nsw i64 %35, %43
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [11 x [11 x i64]], ptr @c, i64 0, i64 %46
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [11 x i64], ptr %47, i64 0, i64 %49
  store i64 %44, ptr %50, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %26
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !11

54:                                               ; preds = %25
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %2, align 4, !tbaa !5
  br label %6, !llvm.loop !13

58:                                               ; preds = %9
  br label %59

59:                                               ; preds = %121, %58
  %60 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %124

62:                                               ; preds = %59
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = icmp sgt i32 %63, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %62
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @m) #5
  br label %67

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

68:                                               ; preds = %118, %67
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

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

73:                                               ; preds = %68
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [11 x i64], ptr %77, i64 0, i64 %79
  store i64 0, ptr %80, align 8, !tbaa !9
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %82
  %84 = getelementptr inbounds [11 x i64], ptr %83, i64 0, i64 0
  store i64 0, ptr %84, align 8, !tbaa !9
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %86
  %88 = getelementptr inbounds [11 x i64], ptr %87, i64 0, i64 0
  store i64 0, ptr %88, align 8, !tbaa !9
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [11 x i64], ptr @a, i64 0, i64 %90
  store i64 0, ptr %91, align 8, !tbaa !9
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %95
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [11 x i64], ptr %96, i64 0, i64 %99
  store i64 %93, ptr %100, align 8, !tbaa !9
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [11 x i64], ptr @b, i64 0, i64 %102
  store i64 %93, ptr %103, align 8, !tbaa !9
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %106
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [11 x i64], ptr %107, i64 0, i64 %109
  store i64 %93, ptr %110, align 8, !tbaa !9
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %112
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [11 x i64], ptr %113, i64 0, i64 %116
  store i64 %93, ptr %117, align 8, !tbaa !9
  br label %118

118:                                              ; preds = %73
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %5, align 4, !tbaa !5
  br label %68, !llvm.loop !14

121:                                              ; preds = %72
  %122 = call noundef i64 @_Z4dfs1ii(i32 noundef 1, i32 noundef 1)
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %122)
  br label %59, !llvm.loop !15

124:                                              ; preds = %59
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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"

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@c = external dso_local local_unnamed_addr global [11 x [11 x i64]], align 16
@a = external dso_local local_unnamed_addr global [11 x [11 x i64]], align 16
@b = external dso_local local_unnamed_addr global [11 x [11 x i64]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4dfs1ii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
._crit_edge.10:
  store i64 1, ptr @c, align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 192), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 176), align 16, !tbaa !5
  store i64 2, ptr getelementptr inbounds (i8, ptr @c, i64 184), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 288), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 264), align 8, !tbaa !5
  store i64 3, ptr getelementptr inbounds (i8, ptr @c, i64 272), align 16, !tbaa !5
  store i64 3, ptr getelementptr inbounds (i8, ptr @c, i64 280), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 384), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 352), align 16, !tbaa !5
  store i64 4, ptr getelementptr inbounds (i8, ptr @c, i64 360), align 8, !tbaa !5
  store i64 6, ptr getelementptr inbounds (i8, ptr @c, i64 368), align 16, !tbaa !5
  store i64 4, ptr getelementptr inbounds (i8, ptr @c, i64 376), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 480), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 440), align 8, !tbaa !5
  store i64 5, ptr getelementptr inbounds (i8, ptr @c, i64 448), align 16, !tbaa !5
  store i64 10, ptr getelementptr inbounds (i8, ptr @c, i64 456), align 8, !tbaa !5
  store i64 10, ptr getelementptr inbounds (i8, ptr @c, i64 464), align 16, !tbaa !5
  store i64 5, ptr getelementptr inbounds (i8, ptr @c, i64 472), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 576), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 528), align 16, !tbaa !5
  store i64 6, ptr getelementptr inbounds (i8, ptr @c, i64 536), align 8, !tbaa !5
  store i64 15, ptr getelementptr inbounds (i8, ptr @c, i64 544), align 16, !tbaa !5
  store i64 20, ptr getelementptr inbounds (i8, ptr @c, i64 552), align 8, !tbaa !5
  store i64 15, ptr getelementptr inbounds (i8, ptr @c, i64 560), align 16, !tbaa !5
  store i64 6, ptr getelementptr inbounds (i8, ptr @c, i64 568), align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 672), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 616), align 8, !tbaa !5
  %0 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 536), align 8, !tbaa !5
  %1 = add nsw i64 %0, 1
  store i64 %1, ptr getelementptr inbounds (i8, ptr @c, i64 624), align 16, !tbaa !5
  %2 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 544), align 16, !tbaa !5
  %3 = add nsw i64 %2, %0
  store i64 %3, ptr getelementptr inbounds (i8, ptr @c, i64 632), align 8, !tbaa !5
  %4 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 552), align 8, !tbaa !5
  %5 = add nsw i64 %4, %2
  store i64 %5, ptr getelementptr inbounds (i8, ptr @c, i64 640), align 16, !tbaa !5
  %6 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @c, i64 560), align 16, !tbaa !5
  %7 = extractelement <2 x i64> %6, i64 0
  %8 = add nsw i64 %7, %4
  store i64 %8, ptr getelementptr inbounds (i8, ptr @c, i64 648), align 8, !tbaa !5
  %9 = shufflevector <2 x i64> %6, <2 x i64> <i64 poison, i64 1>, <2 x i32> <i32 1, i32 3>
  %10 = add nsw <2 x i64> %6, %9
  store <2 x i64> %10, ptr getelementptr inbounds (i8, ptr @c, i64 656), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 768), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 704), align 16, !tbaa !5
  %11 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 624), align 16, !tbaa !5
  %12 = add nsw i64 %11, 1
  store i64 %12, ptr getelementptr inbounds (i8, ptr @c, i64 712), align 8, !tbaa !5
  %13 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 632), align 8, !tbaa !5
  %14 = add nsw i64 %13, %11
  store i64 %14, ptr getelementptr inbounds (i8, ptr @c, i64 720), align 16, !tbaa !5
  %15 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 640), align 16, !tbaa !5
  %16 = add nsw i64 %15, %13
  store i64 %16, ptr getelementptr inbounds (i8, ptr @c, i64 728), align 8, !tbaa !5
  %17 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 648), align 8, !tbaa !5
  %18 = add nsw i64 %17, %15
  store i64 %18, ptr getelementptr inbounds (i8, ptr @c, i64 736), align 16, !tbaa !5
  %19 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @c, i64 656), align 16, !tbaa !5
  %20 = extractelement <2 x i64> %19, i64 0
  %21 = add nsw i64 %20, %17
  store i64 %21, ptr getelementptr inbounds (i8, ptr @c, i64 744), align 8, !tbaa !5
  %22 = shufflevector <2 x i64> %19, <2 x i64> <i64 poison, i64 1>, <2 x i32> <i32 1, i32 3>
  %23 = add nsw <2 x i64> %19, %22
  store <2 x i64> %23, ptr getelementptr inbounds (i8, ptr @c, i64 752), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 864), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 792), align 8, !tbaa !5
  %24 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 712), align 8, !tbaa !5
  %25 = add nsw i64 %24, 1
  store i64 %25, ptr getelementptr inbounds (i8, ptr @c, i64 800), align 16, !tbaa !5
  %26 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 720), align 16, !tbaa !5
  %27 = add nsw i64 %26, %24
  store i64 %27, ptr getelementptr inbounds (i8, ptr @c, i64 808), align 8, !tbaa !5
  %28 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 728), align 8, !tbaa !5
  %29 = add nsw i64 %28, %26
  store i64 %29, ptr getelementptr inbounds (i8, ptr @c, i64 816), align 16, !tbaa !5
  %30 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 736), align 16, !tbaa !5
  %31 = add nsw i64 %30, %28
  store i64 %31, ptr getelementptr inbounds (i8, ptr @c, i64 824), align 8, !tbaa !5
  %32 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 744), align 8, !tbaa !5
  %33 = add nsw i64 %32, %30
  store i64 %33, ptr getelementptr inbounds (i8, ptr @c, i64 832), align 16, !tbaa !5
  %34 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @c, i64 752), align 16, !tbaa !5
  %35 = extractelement <2 x i64> %34, i64 0
  %36 = add nsw i64 %35, %32
  store i64 %36, ptr getelementptr inbounds (i8, ptr @c, i64 840), align 8, !tbaa !5
  %37 = shufflevector <2 x i64> %34, <2 x i64> <i64 poison, i64 1>, <2 x i32> <i32 1, i32 3>
  %38 = add nsw <2 x i64> %34, %37
  store <2 x i64> %38, ptr getelementptr inbounds (i8, ptr @c, i64 848), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 960), align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @c, i64 880), align 16, !tbaa !5
  %39 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 800), align 16, !tbaa !5
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr getelementptr inbounds (i8, ptr @c, i64 888), align 8, !tbaa !5
  %41 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 808), align 8, !tbaa !5
  %42 = add nsw i64 %41, %39
  store i64 %42, ptr getelementptr inbounds (i8, ptr @c, i64 896), align 16, !tbaa !5
  %43 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 816), align 16, !tbaa !5
  %44 = add nsw i64 %43, %41
  store i64 %44, ptr getelementptr inbounds (i8, ptr @c, i64 904), align 8, !tbaa !5
  %45 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 824), align 8, !tbaa !5
  %46 = add nsw i64 %45, %43
  store i64 %46, ptr getelementptr inbounds (i8, ptr @c, i64 912), align 16, !tbaa !5
  %47 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 832), align 16, !tbaa !5
  %48 = add nsw i64 %47, %45
  store i64 %48, ptr getelementptr inbounds (i8, ptr @c, i64 920), align 8, !tbaa !5
  %49 = load i64, ptr getelementptr inbounds (i8, ptr @c, i64 840), align 8, !tbaa !5
  %50 = add nsw i64 %49, %47
  store i64 %50, ptr getelementptr inbounds (i8, ptr @c, i64 928), align 16, !tbaa !5
  %51 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @c, i64 848), align 16, !tbaa !5
  %52 = extractelement <2 x i64> %51, i64 0
  %53 = add nsw i64 %52, %49
  store i64 %53, ptr getelementptr inbounds (i8, ptr @c, i64 936), align 8, !tbaa !5
  %54 = shufflevector <2 x i64> %51, <2 x i64> <i64 poison, i64 1>, <2 x i32> <i32 1, i32 3>
  %55 = add nsw <2 x i64> %51, %54
  store <2 x i64> %55, ptr getelementptr inbounds (i8, ptr @c, i64 944), align 16, !tbaa !5
  %56 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %57 = icmp eq i32 %56, 2
  br i1 %57, label %.lr.ph34, label %._crit_edge35

.lr.ph34:                                         ; preds = %._crit_edge.10, %._crit_edge33
  %58 = load i32, ptr @n, align 4, !tbaa !9
  %59 = load i32, ptr @m, align 4, !tbaa !9
  %60 = icmp sgt i32 %58, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %.lr.ph34
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @m) #4
  %.pre = load i32, ptr @n, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %61, %.lr.ph34
  %63 = phi i32 [ %.pre, %61 ], [ %58, %.lr.ph34 ]
  %.not29 = icmp slt i32 %63, 1
  br i1 %.not29, label %._crit_edge33, label %.lr.ph32

.lr.ph32:                                         ; preds = %62
  %64 = add nuw nsw i32 %63, 1
  %65 = zext nneg i32 %64 to i64
  %66 = load i32, ptr @m, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  br label %72

._crit_edge33:                                    ; preds = %72, %62
  %68 = tail call noundef i64 @_Z4dfs1ii(i32 noundef 1, i32 noundef 1)
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %68)
  %70 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %71 = icmp eq i32 %70, 2
  br i1 %71, label %.lr.ph34, label %._crit_edge35, !llvm.loop !11

72:                                               ; preds = %.lr.ph32, %72
  %indvars.iv = phi i64 [ 1, %.lr.ph32 ], [ %indvars.iv.next, %72 ]
  %73 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %65, i64 %indvars.iv
  store i64 0, ptr %73, align 8, !tbaa !5
  %74 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %indvars.iv
  store i64 0, ptr %74, align 8, !tbaa !5
  %75 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %indvars.iv
  store i64 0, ptr %75, align 8, !tbaa !5
  %76 = getelementptr inbounds [11 x i64], ptr @a, i64 0, i64 %indvars.iv
  store i64 0, ptr %76, align 8, !tbaa !5
  %77 = getelementptr inbounds [11 x [11 x i64]], ptr @b, i64 0, i64 %indvars.iv, i64 %65
  store i64 %67, ptr %77, align 8, !tbaa !5
  %78 = getelementptr inbounds [11 x i64], ptr @b, i64 0, i64 %indvars.iv
  store i64 %67, ptr %78, align 8, !tbaa !5
  %79 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %65, i64 %indvars.iv
  store i64 %67, ptr %79, align 8, !tbaa !5
  %80 = getelementptr inbounds [11 x [11 x i64]], ptr @a, i64 0, i64 %indvars.iv, i64 %65
  store i64 %67, ptr %80, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %65
  br i1 %exitcond.not, label %._crit_edge33, label %72, !llvm.loop !13

._crit_edge35:                                    ; preds = %._crit_edge33, %._crit_edge.10
  ret i32 0
}

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

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

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

attributes #0 = { 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 #1 = { 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 #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 = { inlinehint 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 = { 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}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass