module modulo_util
  implicit none
  integer(8), parameter :: md = 1000000007
  integer(8), allocatable :: f(:), invf(:)
contains
  subroutine init(n)
    integer, intent(in) :: n
    integer :: i
    if (allocated(f)) deallocate(f)
    if (allocated(invf)) deallocate(invf)
    allocate(f(0:n),invf(0:n))
    f = 0_8
    invf = 0_8
    f(0) = 1_8
    do i = 1, n
      f(i) = mod(f(i-1)*int(i,8),md)
    end do
    invf(n) = inv(f(n))
    do i = n, 1, -1
      invf(i-1) = mod(invf(i)*int(i,8),md)
    end do
  end
  integer(8) function perm(n,k)
    integer, intent(in) :: n, k
    perm = 0_8
    if (k > n .or. n < 0 .or. k < 0) return
    perm = mod(f(n)*invf(n-k),md)
  end
  integer(8) function comb(n,k)
    integer, intent(in) :: n, k
    comb = mod(perm(n,k)*invf(k),md)
  end
  integer(8) function homo(n,k)
    integer, intent(in) :: n, k
    homo = 1_8
    if (n == 0 .and. k == 0) return
    homo = comb(n+k-1,k)
  end
  function inv(n) result(y)
    integer(8), intent(in) :: n
    integer(8) :: a, b, x, y, t, q
    a = modulo(n,md)
    b = md
    x = 0_8
    y = 1_8
    do while (b /= 0_8)
      q = a/b
      t = b
      b = mod(a,b)
      a = t
      t = y
      y = x
      x = t-q*x
    end do
    y = modulo(y,md)
  end
  function pow(a,b) result(r)
    integer(8), intent(in) :: a
    integer, intent(in) :: b
    integer :: k
    integer(8) :: r, p
    r = 1_8
    p = a
    k = b
    do while (k > 0)
      if (btest(k,0)) r = mod(r*p,md)
      p = mod(p*p,md)
      k = rshift(k,1)
    end do
  end
end module modulo_util
program max_min_sums
  use modulo_util
  implicit none
  integer :: n, k, i
  integer(8) :: a(100000) = 0, ans = 0
  read(*,*) n, k
  read(*,*) a(1:n)
  a(1:n) = a(1:n)-minval(a(1:n))
  call quick_sort(a(1:n))
  call init(n)
  do i = 1, n
    ans = mod(ans+modulo((comb(i-1,k-1)-comb(n-i,k-1))*a(i),md),md)
  end do
  write(*,'(i0)') ans
contains
  recursive subroutine quick_sort(a)
    integer(8), intent(inout) :: a(:)
    integer :: n, l, r, m
    integer(8) :: p
    n = size(a,1)
    l = 1
    r = n
    m = (n+1)/2
    p = a(l)+a(m)+a(r)-max(a(l),a(m),a(r))-min(a(l),a(m),a(r))
    do
      do while (a(l) < p)
        l = l+1
      end do
      do while (a(r) > p)
        r = r-1
      end do
      if (l >= r) exit
      a(l) = xor(a(l),a(r))
      a(r) = xor(a(l),a(r))
      a(l) = xor(a(l),a(r))
      l = l+1
      r = r-1
    end do
    if (l-1 > 1) call quick_sort(a(1:l-1))
    if (n > r+1) call quick_sort(a(r+1:n))
  end
end program max_min_sums
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QMmodulo_utilEf = local_unnamed_addr global { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } { ptr null, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64), i32 20180515, i8 1, i8 10, i8 2, i8 0, [1 x [3 x i64]] [[3 x i64] [i64 1, i64 0, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64)]] }
@_QMmodulo_utilEinvf = local_unnamed_addr global { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } { ptr null, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64), i32 20180515, i8 1, i8 10, i8 2, i8 0, [1 x [3 x i64]] [[3 x i64] [i64 1, i64 0, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64)]] }
@_QMmodulo_utilECmd = local_unnamed_addr constant i64 1000000007
@_QQcl.ecd58abf71476c922526d38995efae7c = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2647/source.f\00"
@_QQcl.16373402fa3425c6e46827601abb88fa = linkonce constant [76 x i8] c"array left hand side must be allocated when the right hand side is a scalar\00"
@_QFEa = internal global [100000 x i64] zeroinitializer
@_QFEans = internal unnamed_addr global i64 0
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

define void @_QMmodulo_utilPinit(ptr nocapture readonly %0) local_unnamed_addr {
  %.unpack = load ptr, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  %.not = icmp eq ptr %.unpack, null
  br i1 %.not, label %3, label %2

2:                                                ; preds = %1
  tail call void @free(ptr nonnull %.unpack)
  store ptr null, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 1), align 8, !tbaa !3
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 2), align 16, !tbaa !3
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 3), align 4, !tbaa !3
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 4), align 1, !tbaa !3
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 5), align 2, !tbaa !3
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 6), align 1, !tbaa !3
  store i64 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  store i64 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !3
  br label %3

3:                                                ; preds = %2, %1
  %.unpack468 = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.not480 = icmp eq ptr %.unpack468, null
  br i1 %.not480, label %5, label %4

4:                                                ; preds = %3
  tail call void @free(ptr nonnull %.unpack468)
  br label %5

5:                                                ; preds = %4, %3
  %6 = load i32, ptr %0, align 4, !tbaa !7
  %7 = tail call i32 @llvm.smax.i32(i32 %6, i32 -1)
  %8 = sext i32 %7 to i64
  %9 = add nsw i64 %8, 1
  %10 = shl nuw nsw i64 %9, 3
  %11 = tail call ptr @malloc(i64 %10)
  %12 = icmp eq i64 %9, 0
  %13 = zext i1 %12 to i64
  store ptr %11, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 1), align 8, !tbaa !3
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 2), align 16, !tbaa !3
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 3), align 4, !tbaa !3
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 4), align 1, !tbaa !3
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 5), align 2, !tbaa !3
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 6), align 1, !tbaa !3
  store i64 %13, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  store i64 %9, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !3
  %14 = tail call ptr @malloc(i64 %10)
  store ptr %14, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 1), align 8, !tbaa !3
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 2), align 16, !tbaa !3
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 3), align 4, !tbaa !3
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 4), align 1, !tbaa !3
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 5), align 2, !tbaa !3
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 6), align 1, !tbaa !3
  store i64 %13, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  store i64 %9, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !3
  %.not511 = icmp eq ptr %11, null
  br i1 %.not511, label %19, label %.preheader628

.preheader628:                                    ; preds = %5
  %15 = icmp sgt i32 %6, -1
  br i1 %15, label %.lr.ph.preheader, label %.loopexit629

.lr.ph.preheader:                                 ; preds = %.preheader628
  %16 = add nsw i64 %8, 2
  %smin = tail call i64 @llvm.smin.i64(i64 %9, i64 1)
  %17 = sub nuw nsw i64 %16, %smin
  %18 = shl nuw nsw i64 %17, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %11, i8 0, i64 %18, i1 false), !tbaa !7
  br label %.loopexit629

19:                                               ; preds = %5
  %20 = tail call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 12)
  %.unpack613.unpack.unpack = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  %21 = select i1 %12, i64 1, i64 %.unpack613.unpack.unpack
  store ptr null, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 1), align 8, !tbaa !3
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 2), align 16, !tbaa !3
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 3), align 4, !tbaa !3
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 4), align 1, !tbaa !3
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 5), align 2, !tbaa !3
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 6), align 1, !tbaa !3
  store i64 %21, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  store i64 %9, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !3
  %.unpack512.pre = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack519.unpack.unpack521.pre = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  br label %.loopexit629

.loopexit629:                                     ; preds = %.lr.ph.preheader, %.preheader628, %19
  %.unpack532.unpack.unpack641 = phi i64 [ %13, %.lr.ph.preheader ], [ %13, %.preheader628 ], [ %21, %19 ]
  %.unpack519.unpack.unpack521 = phi i64 [ %9, %.lr.ph.preheader ], [ %9, %.preheader628 ], [ %.unpack519.unpack.unpack521.pre, %19 ]
  %.unpack512 = phi ptr [ %14, %.lr.ph.preheader ], [ %14, %.preheader628 ], [ %.unpack512.pre, %19 ]
  %.not524 = icmp eq ptr %.unpack512, null
  br i1 %.not524, label %24, label %.preheader

.preheader:                                       ; preds = %.loopexit629
  %22 = icmp sgt i64 %.unpack519.unpack.unpack521, 0
  br i1 %22, label %.lr.ph630.preheader, label %.loopexit

.lr.ph630.preheader:                              ; preds = %.preheader
  %23 = shl nuw i64 %.unpack519.unpack.unpack521, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.unpack512, i8 0, i64 %23, i1 false), !tbaa !7
  br label %.loopexit

24:                                               ; preds = %.loopexit629
  %25 = tail call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 13)
  %.unpack592.unpack.unpack = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  %26 = icmp eq i64 %.unpack519.unpack.unpack521, 0
  %27 = select i1 %26, i64 1, i64 %.unpack592.unpack.unpack
  store ptr null, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 1), align 8, !tbaa !3
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 2), align 16, !tbaa !3
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 3), align 4, !tbaa !3
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 4), align 1, !tbaa !3
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 5), align 2, !tbaa !3
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 6), align 1, !tbaa !3
  store i64 %27, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  store i64 %.unpack519.unpack.unpack521, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !3
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !3
  %.unpack525.pre = load ptr, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  %.unpack532.unpack.unpack.pre = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph630.preheader, %.preheader, %24
  %.unpack532.unpack.unpack = phi i64 [ %.unpack532.unpack.unpack641, %.lr.ph630.preheader ], [ %.unpack532.unpack.unpack641, %.preheader ], [ %.unpack532.unpack.unpack.pre, %24 ]
  %.unpack525 = phi ptr [ %11, %.lr.ph630.preheader ], [ %11, %.preheader ], [ %.unpack525.pre, %24 ]
  %28 = sub i64 0, %.unpack532.unpack.unpack
  %29 = getelementptr i64, ptr %.unpack525, i64 %28
  store i64 1, ptr %29, align 8, !tbaa !7
  %30 = load i32, ptr %0, align 4, !tbaa !7
  %31 = sext i32 %30 to i64
  %32 = icmp sgt i32 %30, 0
  br i1 %32, label %.lr.ph631.preheader, label %._crit_edge

.lr.ph631.preheader:                              ; preds = %.loopexit
  %33 = mul i64 %.unpack532.unpack.unpack, -8
  %uglygep = getelementptr i8, ptr %.unpack525, i64 %33
  %load_initial = load i64, ptr %uglygep, align 8
  %xtraiter = and i64 %31, 1
  %34 = icmp eq i32 %30, 1
  br i1 %34, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph631.preheader.new

.lr.ph631.preheader.new:                          ; preds = %.lr.ph631.preheader
  %unroll_iter = and i64 %31, -2
  br label %.lr.ph631

.lr.ph631:                                        ; preds = %.lr.ph631, %.lr.ph631.preheader.new
  %store_forwarded = phi i64 [ %load_initial, %.lr.ph631.preheader.new ], [ %40, %.lr.ph631 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph631.preheader.new ], [ %indvars.iv.next.1, %.lr.ph631 ]
  %niter = phi i64 [ 0, %.lr.ph631.preheader.new ], [ %niter.next.1, %.lr.ph631 ]
  %35 = mul i64 %store_forwarded, %indvars.iv
  %36 = srem i64 %35, 1000000007
  %37 = sub i64 %indvars.iv, %.unpack532.unpack.unpack
  %38 = getelementptr i64, ptr %.unpack525, i64 %37
  store i64 %36, ptr %38, align 8, !tbaa !7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = mul i64 %36, %indvars.iv.next
  %40 = srem i64 %39, 1000000007
  %41 = sub i64 %indvars.iv.next, %.unpack532.unpack.unpack
  %42 = getelementptr i64, ptr %.unpack525, i64 %41
  store i64 %40, ptr %42, align 8, !tbaa !7
  %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.loopexit.unr-lcssa, label %.lr.ph631

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

.lr.ph631.epil:                                   ; preds = %._crit_edge.loopexit.unr-lcssa
  %43 = mul i64 %store_forwarded.unr, %indvars.iv.unr
  %44 = srem i64 %43, 1000000007
  %45 = sub i64 %indvars.iv.unr, %.unpack532.unpack.unpack
  %46 = getelementptr i64, ptr %.unpack525, i64 %45
  store i64 %44, ptr %46, align 8, !tbaa !7
  br label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph631.epil
  %.pre = load i32, ptr %0, align 4, !tbaa !7
  %.pre643 = sext i32 %.pre to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit
  %.pre-phi = phi i64 [ %.pre643, %._crit_edge.loopexit ], [ %31, %.loopexit ]
  %47 = sub i64 %.pre-phi, %.unpack532.unpack.unpack
  %48 = getelementptr i64, ptr %.unpack525, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !7
  %50 = srem i64 %49, 1000000007
  %51 = icmp slt i64 %49, 0
  %52 = icmp ne i64 %50, 0
  %53 = and i1 %51, %52
  %54 = add nsw i64 %50, 1000000007
  %55 = select i1 %53, i64 %54, i64 %50
  br label %56

56:                                               ; preds = %56, %._crit_edge
  %.020.i = phi i64 [ 1, %._crit_edge ], [ %.01419.i, %56 ]
  %.01419.i = phi i64 [ 0, %._crit_edge ], [ %60, %56 ]
  %.01518.i = phi i64 [ %55, %._crit_edge ], [ %.01617.i, %56 ]
  %.01617.i = phi i64 [ 1000000007, %._crit_edge ], [ %58, %56 ]
  %57 = sdiv i64 %.01518.i, %.01617.i
  %58 = srem i64 %.01518.i, %.01617.i
  %59 = mul i64 %57, %.01419.i
  %60 = sub i64 %.020.i, %59
  %.not.i = icmp eq i64 %58, 0
  br i1 %.not.i, label %_QMmodulo_utilPinv.exit, label %56

_QMmodulo_utilPinv.exit:                          ; preds = %56
  %61 = srem i64 %.01419.i, 1000000007
  %62 = icmp slt i64 %.01419.i, 0
  %63 = icmp ne i64 %61, 0
  %64 = and i1 %62, %63
  %65 = add nsw i64 %61, 1000000007
  %66 = select i1 %64, i64 %65, i64 %61
  %.unpack556.unpack.unpack = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  %67 = sub i64 %.pre-phi, %.unpack556.unpack.unpack
  %68 = getelementptr i64, ptr %.unpack512, i64 %67
  store i64 %66, ptr %68, align 8, !tbaa !7
  %69 = load i32, ptr %0, align 4, !tbaa !7
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.lr.ph632.preheader, label %._crit_edge633

.lr.ph632.preheader:                              ; preds = %_QMmodulo_utilPinv.exit
  %71 = zext i32 %69 to i64
  br label %.lr.ph632

.lr.ph632:                                        ; preds = %.lr.ph632.preheader, %.lr.ph632
  %72 = phi i64 [ %79, %.lr.ph632 ], [ %71, %.lr.ph632.preheader ]
  %sext = shl i64 %72, 32
  %73 = ashr exact i64 %sext, 32
  %74 = sub i64 %73, %.unpack556.unpack.unpack
  %75 = getelementptr i64, ptr %.unpack512, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !7
  %77 = mul i64 %76, %73
  %78 = srem i64 %77, 1000000007
  %79 = add nsw i64 %72, -1
  %sext644 = shl i64 %79, 32
  %80 = ashr exact i64 %sext644, 32
  %81 = sub i64 %80, %.unpack556.unpack.unpack
  %82 = getelementptr i64, ptr %.unpack512, i64 %81
  store i64 %78, ptr %82, align 8, !tbaa !7
  %83 = icmp ugt i64 %72, 1
  br i1 %83, label %.lr.ph632, label %._crit_edge633

._crit_edge633:                                   ; preds = %.lr.ph632, %_QMmodulo_utilPinv.exit
  ret void
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none)
define i64 @_QMmodulo_utilPperm(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #2 {
  %3 = load i32, ptr %1, align 4, !tbaa !7
  %4 = load i32, ptr %0, align 4, !tbaa !7
  %5 = icmp slt i32 %4, %3
  %6 = or i32 %4, %3
  %7 = icmp slt i32 %6, 0
  %8 = or i1 %5, %7
  br i1 %8, label %21, label %9

9:                                                ; preds = %2
  %.unpack = load ptr, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  %.unpack29.unpack.unpack = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  %10 = zext i32 %4 to i64
  %11 = sub i64 %10, %.unpack29.unpack.unpack
  %12 = getelementptr i64, ptr %.unpack, i64 %11
  %13 = load i64, ptr %12, align 8, !tbaa !7
  %.unpack34 = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack41.unpack.unpack = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  %14 = sub i32 %4, %3
  %15 = sext i32 %14 to i64
  %16 = sub i64 %15, %.unpack41.unpack.unpack
  %17 = getelementptr i64, ptr %.unpack34, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !7
  %19 = mul i64 %18, %13
  %20 = srem i64 %19, 1000000007
  br label %21

21:                                               ; preds = %9, %2
  %.0 = phi i64 [ 0, %2 ], [ %20, %9 ]
  ret i64 %.0
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none)
define i64 @_QMmodulo_utilPcomb(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #2 {
  %3 = load i32, ptr %1, align 4, !tbaa !7
  %4 = load i32, ptr %0, align 4, !tbaa !7
  %5 = icmp slt i32 %4, %3
  %6 = or i32 %4, %3
  %7 = icmp slt i32 %6, 0
  %8 = or i1 %5, %7
  br i1 %8, label %._QMmodulo_utilPperm.exit_crit_edge, label %9

._QMmodulo_utilPperm.exit_crit_edge:              ; preds = %2
  %.unpack.pre = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack7.unpack.unpack.pre = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  br label %_QMmodulo_utilPperm.exit

9:                                                ; preds = %2
  %.unpack.i = load ptr, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  %.unpack29.unpack.unpack.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  %10 = zext i32 %4 to i64
  %11 = sub i64 %10, %.unpack29.unpack.unpack.i
  %12 = getelementptr i64, ptr %.unpack.i, i64 %11
  %13 = load i64, ptr %12, align 8, !tbaa !7
  %.unpack34.i = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack41.unpack.unpack.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  %14 = sub i32 %4, %3
  %15 = sext i32 %14 to i64
  %16 = sub i64 %15, %.unpack41.unpack.unpack.i
  %17 = getelementptr i64, ptr %.unpack34.i, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !7
  %19 = mul i64 %18, %13
  %20 = srem i64 %19, 1000000007
  br label %_QMmodulo_utilPperm.exit

_QMmodulo_utilPperm.exit:                         ; preds = %._QMmodulo_utilPperm.exit_crit_edge, %9
  %.unpack7.unpack.unpack = phi i64 [ %.unpack7.unpack.unpack.pre, %._QMmodulo_utilPperm.exit_crit_edge ], [ %.unpack41.unpack.unpack.i, %9 ]
  %.unpack = phi ptr [ %.unpack.pre, %._QMmodulo_utilPperm.exit_crit_edge ], [ %.unpack34.i, %9 ]
  %.0.i = phi i64 [ 0, %._QMmodulo_utilPperm.exit_crit_edge ], [ %20, %9 ]
  %21 = sext i32 %3 to i64
  %22 = sub i64 %21, %.unpack7.unpack.unpack
  %23 = getelementptr i64, ptr %.unpack, i64 %22
  %24 = load i64, ptr %23, align 8, !tbaa !7
  %25 = mul i64 %24, %.0.i
  %26 = srem i64 %25, 1000000007
  ret i64 %26
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none)
define i64 @_QMmodulo_utilPhomo(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #2 {
  %3 = load i32, ptr %0, align 4, !tbaa !7
  %4 = load i32, ptr %1, align 4, !tbaa !7
  %5 = or i32 %4, %3
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %31, label %7

7:                                                ; preds = %2
  %8 = add i32 %3, -1
  %9 = add i32 %8, %4
  %10 = icmp slt i32 %9, %4
  %11 = or i32 %9, %4
  %12 = icmp slt i32 %11, 0
  %13 = or i1 %10, %12
  br i1 %13, label %._QMmodulo_utilPperm.exit_crit_edge.i, label %14

._QMmodulo_utilPperm.exit_crit_edge.i:            ; preds = %7
  %.unpack.pre.i = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack7.unpack.unpack.pre.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  br label %_QMmodulo_utilPcomb.exit

14:                                               ; preds = %7
  %.unpack.i.i = load ptr, ptr @_QMmodulo_utilEf, align 16, !tbaa !3
  %.unpack29.unpack.unpack.i.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8, !tbaa !3
  %15 = zext i32 %9 to i64
  %16 = sub i64 %15, %.unpack29.unpack.unpack.i.i
  %17 = getelementptr i64, ptr %.unpack.i.i, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !7
  %.unpack34.i.i = load ptr, ptr @_QMmodulo_utilEinvf, align 16, !tbaa !3
  %.unpack41.unpack.unpack.i.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8, !tbaa !3
  %19 = sext i32 %8 to i64
  %20 = sub i64 %19, %.unpack41.unpack.unpack.i.i
  %21 = getelementptr i64, ptr %.unpack34.i.i, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !7
  %23 = mul i64 %22, %18
  %24 = srem i64 %23, 1000000007
  br label %_QMmodulo_utilPcomb.exit

_QMmodulo_utilPcomb.exit:                         ; preds = %._QMmodulo_utilPperm.exit_crit_edge.i, %14
  %.unpack7.unpack.unpack.i = phi i64 [ %.unpack7.unpack.unpack.pre.i, %._QMmodulo_utilPperm.exit_crit_edge.i ], [ %.unpack41.unpack.unpack.i.i, %14 ]
  %.unpack.i = phi ptr [ %.unpack.pre.i, %._QMmodulo_utilPperm.exit_crit_edge.i ], [ %.unpack34.i.i, %14 ]
  %.0.i.i = phi i64 [ 0, %._QMmodulo_utilPperm.exit_crit_edge.i ], [ %24, %14 ]
  %25 = sext i32 %4 to i64
  %26 = sub i64 %25, %.unpack7.unpack.unpack.i
  %27 = getelementptr i64, ptr %.unpack.i, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !7
  %29 = mul i64 %28, %.0.i.i
  %30 = srem i64 %29, 1000000007
  br label %31

31:                                               ; preds = %_QMmodulo_utilPcomb.exit, %2
  %.0 = phi i64 [ 1, %2 ], [ %30, %_QMmodulo_utilPcomb.exit ]
  ret i64 %.0
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read)
define i64 @_QMmodulo_utilPinv(ptr nocapture readonly %0) local_unnamed_addr #3 {
  %2 = load i64, ptr %0, align 8, !tbaa !7
  %3 = srem i64 %2, 1000000007
  %4 = icmp slt i64 %2, 0
  %5 = icmp ne i64 %3, 0
  %6 = and i1 %4, %5
  %7 = add nsw i64 %3, 1000000007
  %8 = select i1 %6, i64 %7, i64 %3
  br label %9

9:                                                ; preds = %1, %9
  %.020 = phi i64 [ 1, %1 ], [ %.01419, %9 ]
  %.01419 = phi i64 [ 0, %1 ], [ %13, %9 ]
  %.01518 = phi i64 [ %8, %1 ], [ %.01617, %9 ]
  %.01617 = phi i64 [ 1000000007, %1 ], [ %11, %9 ]
  %10 = sdiv i64 %.01518, %.01617
  %11 = srem i64 %.01518, %.01617
  %12 = mul i64 %10, %.01419
  %13 = sub i64 %.020, %12
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %14, label %9

14:                                               ; preds = %9
  %15 = srem i64 %.01419, 1000000007
  %16 = icmp slt i64 %.01419, 0
  %17 = icmp ne i64 %15, 0
  %18 = and i1 %16, %17
  %19 = add nsw i64 %15, 1000000007
  %20 = select i1 %18, i64 %19, i64 %15
  ret i64 %20
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read)
define i64 @_QMmodulo_utilPpow(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #3 {
  %3 = load i32, ptr %1, align 4, !tbaa !7
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %2
  %5 = load i64, ptr %0, align 8, !tbaa !7
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %10
  %.011 = phi i64 [ %.1, %10 ], [ 1, %.lr.ph.preheader ]
  %.0710 = phi i64 [ %12, %10 ], [ %5, %.lr.ph.preheader ]
  %.089 = phi i32 [ %13, %10 ], [ %3, %.lr.ph.preheader ]
  %6 = and i32 %.089, 1
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %.lr.ph
  %8 = mul i64 %.011, %.0710
  %9 = srem i64 %8, 1000000007
  br label %10

10:                                               ; preds = %7, %.lr.ph
  %.1 = phi i64 [ %9, %7 ], [ %.011, %.lr.ph ]
  %11 = mul i64 %.0710, %.0710
  %12 = srem i64 %11, 1000000007
  %13 = lshr i32 %.089, 1
  %.not12 = icmp ult i32 %.089, 2
  br i1 %.not12, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %10, %2
  %.0.lcssa = phi i64 [ 1, %2 ], [ %.1, %10 ]
  ret i64 %.0.lcssa
}

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 77)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %5, i32 4)
  %8 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %4, i32 4)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %10 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 78)
  %11 = load i32, ptr %5, align 4, !tbaa !7
  %12 = call i32 @llvm.smax.i32(i32 %11, i32 0)
  %13 = zext i32 %12 to i64
  store ptr @_QFEa, ptr %3, align 8, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep, align 8, !tbaa !3
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !3
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep, align 1, !tbaa !3
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !3
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !3
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !3
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  store i64 %13, ptr %.fca.7.0.1.gep, align 8, !tbaa !3
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !3
  %14 = call i1 @_FortranAioInputDescriptor(ptr %10, ptr nonnull %3)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %10)
  %16 = load i32, ptr %5, align 4, !tbaa !7
  %17 = call i32 @llvm.smax.i32(i32 %16, i32 0)
  %18 = zext i32 %17 to i64
  store ptr @_QFEa, ptr %2, align 8, !tbaa !3
  %.fca.1.gep7 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep7, align 8, !tbaa !3
  %.fca.2.gep9 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep9, align 8, !tbaa !3
  %.fca.3.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep11, align 4, !tbaa !3
  %.fca.4.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep13, align 1, !tbaa !3
  %.fca.5.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep15, align 2, !tbaa !3
  %.fca.6.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep17, align 1, !tbaa !3
  %.fca.7.0.0.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep19, align 8, !tbaa !3
  %.fca.7.0.1.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %18, ptr %.fca.7.0.1.gep21, align 8, !tbaa !3
  %.fca.7.0.2.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep23, align 8, !tbaa !3
  %19 = call i64 @_FortranAMinvalInteger8(ptr nonnull %2, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 79, i32 0, ptr null)
  %.not = icmp slt i32 %16, 1
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %min.iters.check = icmp ult i32 %17, 4
  br i1 %min.iters.check, label %.lr.ph.preheader67, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %18, 2147483644
  %ind.end = and i64 %18, 3
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %19, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert65 = insertelement <2 x i64> poison, i64 %19, i64 0
  %broadcast.splat66 = shufflevector <2 x i64> %broadcast.splatinsert65, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %20 = getelementptr i64, ptr @_QFEa, i64 %index
  %wide.load = load <2 x i64>, ptr %20, align 16, !tbaa !7
  %21 = getelementptr i64, ptr %20, i64 2
  %wide.load64 = load <2 x i64>, ptr %21, align 16, !tbaa !7
  %22 = sub <2 x i64> %wide.load, %broadcast.splat
  %23 = sub <2 x i64> %wide.load64, %broadcast.splat66
  store <2 x i64> %22, ptr %20, align 16, !tbaa !7
  store <2 x i64> %23, ptr %21, align 16, !tbaa !7
  %index.next = add nuw i64 %index, 4
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %18
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader67

.lr.ph.preheader67:                               ; preds = %.lr.ph.preheader, %middle.block
  %.ph = phi i64 [ %18, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.ph68 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader67, %.lr.ph
  %25 = phi i64 [ %31, %.lr.ph ], [ %.ph, %.lr.ph.preheader67 ]
  %26 = phi i64 [ %27, %.lr.ph ], [ %.ph68, %.lr.ph.preheader67 ]
  %27 = add nuw nsw i64 %26, 1
  %28 = getelementptr i64, ptr @_QFEa, i64 %26
  %29 = load i64, ptr %28, align 8, !tbaa !7
  %30 = sub i64 %29, %19
  store i64 %30, ptr %28, align 8, !tbaa !7
  %31 = add nsw i64 %25, -1
  %32 = icmp ugt i64 %25, 1
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %33 = load i32, ptr %5, align 4, !tbaa !7
  %34 = call i32 @llvm.smax.i32(i32 %33, i32 0)
  %35 = zext i32 %34 to i64
  store ptr @_QFEa, ptr %1, align 8, !tbaa !3
  %.fca.1.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep27, align 8, !tbaa !3
  %.fca.2.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep29, align 8, !tbaa !3
  %.fca.3.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep31, align 4, !tbaa !3
  %.fca.4.gep33 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep33, align 1, !tbaa !3
  %.fca.5.gep35 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep35, align 2, !tbaa !3
  %.fca.6.gep37 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep37, align 1, !tbaa !3
  %.fca.7.0.0.gep39 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep39, align 8, !tbaa !3
  %.fca.7.0.1.gep41 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  store i64 %35, ptr %.fca.7.0.1.gep41, align 8, !tbaa !3
  %.fca.7.0.2.gep43 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep43, align 8, !tbaa !3
  call void @_QFPquick_sort(ptr nonnull %1)
  call void @_QMmodulo_utilPinit(ptr nonnull %5)
  %36 = load i32, ptr %5, align 4, !tbaa !7
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph60, label %98

.lr.ph60:                                         ; preds = %._crit_edge
  %38 = zext i32 %36 to i64
  %_QFEans.promoted = load i64, ptr @_QFEans, align 8, !tbaa !7
  %39 = load i32, ptr %4, align 4, !tbaa !7
  %40 = add i32 %39, -1
  %.unpack.i.i = load ptr, ptr @_QMmodulo_utilEf, align 16
  %.unpack29.unpack.unpack.i.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEf, i64 0, i32 7), align 8
  %.unpack34.i.i = load ptr, ptr @_QMmodulo_utilEinvf, align 16
  %.unpack41.unpack.unpack.i.i = load i64, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QMmodulo_utilEinvf, i64 0, i32 7), align 8
  %41 = sext i32 %40 to i64
  %42 = sub i64 %41, %.unpack41.unpack.unpack.i.i
  %43 = getelementptr i64, ptr %.unpack34.i.i, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !7
  br label %45

45:                                               ; preds = %.lr.ph60, %_QMmodulo_utilPcomb.exit55
  %indvars.iv = phi i64 [ 1, %.lr.ph60 ], [ %indvars.iv.next, %_QMmodulo_utilPcomb.exit55 ]
  %46 = phi i64 [ %_QFEans.promoted, %.lr.ph60 ], [ %97, %_QMmodulo_utilPcomb.exit55 ]
  %47 = add nsw i64 %indvars.iv, -1
  %48 = icmp sle i64 %indvars.iv, %41
  %49 = trunc i64 %47 to i32
  %50 = or i32 %40, %49
  %51 = icmp slt i32 %50, 0
  %52 = or i1 %48, %51
  br i1 %52, label %_QMmodulo_utilPcomb.exit, label %53

53:                                               ; preds = %45
  %54 = sub i64 %47, %.unpack29.unpack.unpack.i.i
  %55 = getelementptr i64, ptr %.unpack.i.i, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !7
  %57 = sub i32 %49, %40
  %58 = sext i32 %57 to i64
  %59 = sub i64 %58, %.unpack41.unpack.unpack.i.i
  %60 = getelementptr i64, ptr %.unpack34.i.i, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !7
  %62 = mul i64 %61, %56
  %63 = srem i64 %62, 1000000007
  br label %_QMmodulo_utilPcomb.exit

_QMmodulo_utilPcomb.exit:                         ; preds = %45, %53
  %.0.i.i = phi i64 [ %63, %53 ], [ 0, %45 ]
  %64 = mul i64 %44, %.0.i.i
  %65 = srem i64 %64, 1000000007
  %66 = trunc i64 %indvars.iv to i32
  %67 = sub i32 %36, %66
  %68 = icmp slt i32 %67, %40
  %69 = or i32 %40, %67
  %70 = icmp slt i32 %69, 0
  %71 = or i1 %68, %70
  br i1 %71, label %_QMmodulo_utilPcomb.exit55, label %72

72:                                               ; preds = %_QMmodulo_utilPcomb.exit
  %73 = zext i32 %67 to i64
  %74 = sub i64 %73, %.unpack29.unpack.unpack.i.i
  %75 = getelementptr i64, ptr %.unpack.i.i, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !7
  %77 = sub i32 %67, %40
  %78 = sext i32 %77 to i64
  %79 = sub i64 %78, %.unpack41.unpack.unpack.i.i
  %80 = getelementptr i64, ptr %.unpack34.i.i, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !7
  %82 = mul i64 %81, %76
  %83 = srem i64 %82, 1000000007
  br label %_QMmodulo_utilPcomb.exit55

_QMmodulo_utilPcomb.exit55:                       ; preds = %_QMmodulo_utilPcomb.exit, %72
  %.0.i.i54 = phi i64 [ %83, %72 ], [ 0, %_QMmodulo_utilPcomb.exit ]
  %84 = mul i64 %44, %.0.i.i54
  %85 = srem i64 %84, 1000000007
  %86 = sub nsw i64 %65, %85
  %87 = getelementptr [100000 x i64], ptr @_QFEa, i64 0, i64 %47
  %88 = load i64, ptr %87, align 8, !tbaa !7
  %89 = mul i64 %86, %88
  %90 = srem i64 %89, 1000000007
  %91 = icmp slt i64 %89, 0
  %92 = icmp ne i64 %90, 0
  %93 = and i1 %91, %92
  %94 = add nsw i64 %90, 1000000007
  %95 = select i1 %93, i64 %94, i64 %90
  %96 = add i64 %95, %46
  %97 = srem i64 %96, 1000000007
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %38
  br i1 %exitcond.not, label %._crit_edge61, label %45

._crit_edge61:                                    ; preds = %_QMmodulo_utilPcomb.exit55
  store i64 %97, ptr @_QFEans, align 8, !tbaa !7
  br label %98

98:                                               ; preds = %._crit_edge61, %._crit_edge
  %99 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.ecd58abf71476c922526d38995efae7c, i32 85)
  %100 = load i64, ptr @_QFEans, align 8, !tbaa !7
  %101 = call i1 @_FortranAioOutputInteger64(ptr %99, i64 %100)
  %102 = call i32 @_FortranAioEndIoStatement(ptr %99)
  ret void
}

; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none)
define void @_QFPquick_sort(ptr nocapture readonly %0) local_unnamed_addr #4 {
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 1
  %5 = load i64, ptr %4, align 8, !tbaa !3
  %6 = trunc i64 %5 to i32
  %7 = add i32 %6, 1
  %8 = sdiv i32 %7, 2
  %9 = load ptr, ptr %0, align 8, !tbaa !3
  %10 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 2
  %11 = load i64, ptr %10, align 8, !tbaa !3
  %12 = load i64, ptr %9, align 8, !tbaa !7
  %narrow = add nsw i32 %8, -1
  %13 = sext i32 %narrow to i64
  %14 = mul i64 %11, %13
  %15 = getelementptr i8, ptr %9, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !7
  %sext = shl i64 %5, 32
  %17 = ashr exact i64 %sext, 32
  %18 = add nsw i64 %17, -1
  %19 = mul i64 %18, %11
  %20 = getelementptr i8, ptr %9, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !7
  %22 = tail call i64 @llvm.smax.i64(i64 %12, i64 %16)
  %23 = tail call i64 @llvm.smax.i64(i64 %22, i64 %21)
  %24 = tail call i64 @llvm.smin.i64(i64 %12, i64 %16)
  %25 = tail call i64 @llvm.smin.i64(i64 %24, i64 %21)
  %.neg52 = add i64 %16, %12
  %26 = add i64 %.neg52, %21
  %27 = add i64 %25, %23
  %28 = sub i64 %26, %27
  br label %.outer

.outer:                                           ; preds = %66, %1
  %.047.ph = phi i32 [ %36, %66 ], [ 1, %1 ]
  %.0.ph = phi i32 [ %45, %66 ], [ %6, %1 ]
  br label %29

29:                                               ; preds = %29, %.outer
  %.047 = phi i32 [ %36, %29 ], [ %.047.ph, %.outer ]
  %30 = sext i32 %.047 to i64
  %31 = add nsw i64 %30, -1
  %32 = mul i64 %31, %11
  %33 = getelementptr i8, ptr %9, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !7
  %35 = icmp slt i64 %34, %28
  %36 = add i32 %.047, 1
  br i1 %35, label %29, label %.preheader

.preheader:                                       ; preds = %29
  %37 = getelementptr i8, ptr %9, i64 %32
  br label %38

38:                                               ; preds = %38, %.preheader
  %.1 = phi i32 [ %45, %38 ], [ %.0.ph, %.preheader ]
  %39 = sext i32 %.1 to i64
  %40 = add nsw i64 %39, -1
  %41 = mul i64 %40, %11
  %42 = getelementptr i8, ptr %9, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !7
  %44 = icmp sgt i64 %43, %28
  %45 = add i32 %.1, -1
  br i1 %44, label %38, label %46

46:                                               ; preds = %38
  %.not = icmp slt i32 %.047, %.1
  br i1 %.not, label %66, label %47

47:                                               ; preds = %46
  %48 = add i32 %.047, -1
  %49 = icmp sgt i32 %48, 1
  br i1 %49, label %50, label %52

50:                                               ; preds = %47
  %51 = zext i32 %48 to i64
  store ptr %9, ptr %2, align 8, !tbaa !3
  %.fca.1.gep30 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep30, align 8, !tbaa !3
  %.fca.2.gep32 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep32, align 8, !tbaa !3
  %.fca.3.gep34 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep34, align 4, !tbaa !3
  %.fca.4.gep36 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep36, align 1, !tbaa !3
  %.fca.5.gep38 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep38, align 2, !tbaa !3
  %.fca.6.gep40 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep40, align 1, !tbaa !3
  %.fca.7.0.0.gep42 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep42, align 8, !tbaa !3
  %.fca.7.0.1.gep44 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %51, ptr %.fca.7.0.1.gep44, align 8, !tbaa !3
  %.fca.7.0.2.gep46 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 %11, ptr %.fca.7.0.2.gep46, align 8, !tbaa !3
  call void @_QFPquick_sort(ptr nonnull %2)
  br label %52

52:                                               ; preds = %50, %47
  %53 = add i32 %.1, 1
  %54 = icmp slt i32 %53, %6
  br i1 %54, label %55, label %65

55:                                               ; preds = %52
  %56 = sext i32 %53 to i64
  %57 = load i64, ptr %10, align 8, !tbaa !3
  %58 = load ptr, ptr %0, align 8, !tbaa !3
  %59 = add nsw i64 %56, -1
  %60 = mul i64 %57, %59
  %61 = getelementptr i8, ptr %58, i64 %60
  %62 = sub nsw i64 %17, %56
  %63 = tail call i64 @llvm.smax.i64(i64 %62, i64 -1)
  %64 = add nsw i64 %63, 1
  store ptr %61, ptr %3, align 8, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep, align 8, !tbaa !3
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !3
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep, align 1, !tbaa !3
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !3
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !3
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !3
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  store i64 %64, ptr %.fca.7.0.1.gep, align 8, !tbaa !3
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 %57, ptr %.fca.7.0.2.gep, align 8, !tbaa !3
  call void @_QFPquick_sort(ptr nonnull %3)
  br label %65

65:                                               ; preds = %55, %52
  ret void

66:                                               ; preds = %46
  %67 = getelementptr i8, ptr %9, i64 %41
  %68 = xor i64 %43, %34
  store i64 %68, ptr %37, align 8, !tbaa !7
  %69 = load i64, ptr %67, align 8, !tbaa !7
  %70 = xor i64 %69, %68
  store i64 %70, ptr %67, align 8, !tbaa !7
  %71 = load i64, ptr %37, align 8, !tbaa !7
  %72 = xor i64 %71, %70
  store i64 %72, ptr %37, align 8, !tbaa !7
  br label %.outer
}

declare {} @_FortranAReportFatalUserError(ptr, ptr, i32) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare i64 @_FortranAMinvalInteger8(ptr, ptr, i32, i32, ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #5

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) }
attributes #3 = { nofree norecurse nosync nounwind memory(argmem: read) }
attributes #4 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }

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

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"descriptor member", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any data access", !5, i64 0}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !11, !10}
