program island_war
  implicit none
  integer :: n, m, r(100000,2), i, j, s, x
  r = 0
  read(*,*) n, m
  do i = 1, m
    read(*,*) r(i,:)
  end do
  call merge_sort(m,r(1:m,:),2)
  x = -1
  s = 0
  do i = 1, m
    if (x.lt.r(i,1)) then
      s = s + 1
      x = r(i,2) - 1
    end if
  end do
  write(*,'(i0)') s
  stop
contains
  subroutine merge_sort(n,c,idx)
    implicit none
    integer, intent(in)    :: n, idx
    integer, intent(inout) :: c(n,2)
    integer                :: number, length, i, ubnd
    number = n
    length = 1
    do while (number.gt.1)
      do i = 1, number/2
        ubnd = min(2*i*length,n)
        call merge(c(2*(i-1)*length+1:(2*i-1)*length,:),c((2*i-1)*length+1:ubnd,:),idx)
      end do
      length = 2*length
      number = (number+1)/2
    end do
    return
  end subroutine merge_sort
  subroutine merge(c1,c2,idx)
    implicit none
    integer, intent(inout) :: c1(:,:), c2(:,:)
    integer, intent(in)    :: idx
    integer                :: c(size(c1(:,1))+size(c2(:,1)),size(c1(1,:)))
    integer                :: i1, i2, n1, n2
    i1 = 1
    i2 = 1
    n1 = size(c1(:,1))
    n2 = size(c2(:,1))
    do while ((i1.le.n1).and.(i2.le.n2))
      if (c1(i1,idx).le.c2(i2,idx)) then
        c(i1+i2-1,:) = c1(i1,:)
        i1 = i1+1
      else
        c(i1+i2-1,:) = c2(i2,:)
        i2 = i2+1
      end if
    end do
    if (i1.le.n1) then
      c(i1+i2-1:n1+n2,:) = c1(i1:n1,:)
    else if (i2 .le. n2) then
      c(i1+i2-1:n1+n2,:) = c2(i2:n2,:)
    end if
    c1 = c(1:n1,:)
    c2 = c(n1+1:n1+n2,:)
    return
  end subroutine merge
end program island_war
; 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"

@_QFEr = internal global [2 x [100000 x i32]] undef
@_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5749/source.f\00"
@_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

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #2 {
  %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, [2 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, align 8
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, align 8
  %5 = alloca i32, align 4
  %6 = alloca { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) @_QFEr, i8 0, i64 800000, i1 false), !tbaa !3
  %9 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6, i32 5)
  %10 = call i1 @_FortranAioInputInteger(ptr %9, ptr nonnull %8, i32 4)
  %11 = call i1 @_FortranAioInputInteger(ptr %9, ptr nonnull %7, i32 4)
  %12 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %13 = load i32, ptr %7, align 4, !tbaa !3
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %15 = zext i32 %13 to i64
  %.fca.1.gep167 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  %.fca.2.gep169 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  %.fca.3.gep171 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  %.fca.4.gep173 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  %.fca.5.gep175 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  %.fca.6.gep177 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  %.fca.7.0.0.gep179 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep181 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep183 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  br label %16

16:                                               ; preds = %.lr.ph, %16
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %16 ]
  %17 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6, i32 7)
  %18 = add nsw i64 %indvars.iv, -1
  %19 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 0, i64 %18
  store ptr %19, ptr %1, align 8, !tbaa !7
  store i64 4, ptr %.fca.1.gep167, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep169, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep171, align 4, !tbaa !7
  store i8 9, ptr %.fca.4.gep173, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep175, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep177, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep179, align 8, !tbaa !7
  store i64 2, ptr %.fca.7.0.1.gep181, align 8, !tbaa !7
  store i64 400000, ptr %.fca.7.0.2.gep183, align 8, !tbaa !7
  %20 = call i1 @_FortranAioInputDescriptor(ptr %17, ptr nonnull %1)
  %21 = call i32 @_FortranAioEndIoStatement(ptr %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %15
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %16

._crit_edge.loopexit:                             ; preds = %16
  %.pre = load i32, ptr %7, align 4, !tbaa !3
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %22 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %13, %0 ]
  %23 = call i32 @llvm.smax.i32(i32 %22, i32 0)
  %24 = zext i32 %23 to i64
  store ptr @_QFEr, ptr %3, align 8, !tbaa !7
  %.fca.1.gep37 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep37, align 8, !tbaa !7
  %.fca.2.gep39 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep39, align 8, !tbaa !7
  %.fca.3.gep41 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 3
  store i8 2, ptr %.fca.3.gep41, align 4, !tbaa !7
  %.fca.4.gep43 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep43, align 1, !tbaa !7
  %.fca.5.gep45 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep45, align 2, !tbaa !7
  %.fca.6.gep47 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep47, align 1, !tbaa !7
  %.fca.7.0.0.gep49 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep49, align 8, !tbaa !7
  %.fca.7.0.1.gep51 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  store i64 %24, ptr %.fca.7.0.1.gep51, align 8, !tbaa !7
  %.fca.7.0.2.gep53 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep53, align 8, !tbaa !7
  %.fca.7.1.0.gep55 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 1, i64 0
  store i64 1, ptr %.fca.7.1.0.gep55, align 8, !tbaa !7
  %.fca.7.1.1.gep57 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 1, i64 1
  store i64 2, ptr %.fca.7.1.1.gep57, align 8, !tbaa !7
  %.fca.7.1.2.gep59 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 1, i64 2
  store i64 400000, ptr %.fca.7.1.2.gep59, align 8, !tbaa !7
  %25 = call i1 @_FortranAIsContiguous(ptr nonnull %3)
  br i1 %25, label %26, label %28

26:                                               ; preds = %._crit_edge
  %27 = load ptr, ptr %3, align 8, !tbaa !7
  br label %35

28:                                               ; preds = %._crit_edge
  %29 = load i64, ptr %.fca.7.0.1.gep51, align 8, !tbaa !7
  %30 = load i64, ptr %.fca.7.1.1.gep57, align 8, !tbaa !7
  %31 = shl i64 %29, 2
  %32 = mul i64 %31, %30
  %33 = call ptr @malloc(i64 %32)
  store ptr %33, ptr %6, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 3
  store i8 2, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 1
  store i64 %29, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %.fca.7.1.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 1, i64 0
  store i64 1, ptr %.fca.7.1.0.gep, align 8, !tbaa !7
  %.fca.7.1.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 1, i64 1
  store i64 %30, ptr %.fca.7.1.1.gep, align 8, !tbaa !7
  %.fca.7.1.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 1, i64 2
  store i64 %31, ptr %.fca.7.1.2.gep, align 8, !tbaa !7
  %34 = call {} @_FortranAAssign(ptr nonnull %6, ptr nonnull %3, ptr nonnull @_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6, i32 9)
  br label %35

35:                                               ; preds = %26, %28
  %36 = phi ptr [ %27, %26 ], [ %33, %28 ]
  %37 = load i64, ptr %.fca.7.0.1.gep51, align 8, !tbaa !7
  %38 = load i64, ptr %.fca.7.1.1.gep57, align 8, !tbaa !7
  store i32 2, ptr %5, align 4, !tbaa !3
  call void @_QFPmerge_sort(ptr nonnull %7, ptr %36, ptr nonnull %5)
  br i1 %25, label %42, label %39

39:                                               ; preds = %35
  %40 = shl i64 %37, 2
  store ptr %36, ptr %2, align 8, !tbaa !7
  %.fca.1.gep141 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep141, align 8, !tbaa !7
  %.fca.2.gep143 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep143, align 8, !tbaa !7
  %.fca.3.gep145 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 2, ptr %.fca.3.gep145, align 4, !tbaa !7
  %.fca.4.gep147 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep147, align 1, !tbaa !7
  %.fca.5.gep149 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep149, align 2, !tbaa !7
  %.fca.6.gep151 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep151, align 1, !tbaa !7
  %.fca.7.0.0.gep153 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep153, align 8, !tbaa !7
  %.fca.7.0.1.gep155 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %37, ptr %.fca.7.0.1.gep155, align 8, !tbaa !7
  %.fca.7.0.2.gep157 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep157, align 8, !tbaa !7
  %.fca.7.1.0.gep159 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 1, i64 0
  store i64 1, ptr %.fca.7.1.0.gep159, align 8, !tbaa !7
  %.fca.7.1.1.gep161 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 1, i64 1
  store i64 %38, ptr %.fca.7.1.1.gep161, align 8, !tbaa !7
  %.fca.7.1.2.gep163 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 1, i64 2
  store i64 %40, ptr %.fca.7.1.2.gep163, align 8, !tbaa !7
  %.fca.0.load = load ptr, ptr %3, align 8, !tbaa !7
  %.fca.1.load = load i64, ptr %.fca.1.gep37, align 8, !tbaa !7
  %.fca.2.load = load i32, ptr %.fca.2.gep39, align 8, !tbaa !7
  %.fca.3.load = load i8, ptr %.fca.3.gep41, align 4, !tbaa !7
  %.fca.4.load = load i8, ptr %.fca.4.gep43, align 1, !tbaa !7
  %.fca.5.load = load i8, ptr %.fca.5.gep45, align 2, !tbaa !7
  %.fca.6.load = load i8, ptr %.fca.6.gep47, align 1, !tbaa !7
  %.fca.7.0.0.load = load i64, ptr %.fca.7.0.0.gep49, align 8, !tbaa !7
  %.fca.7.0.1.load = load i64, ptr %.fca.7.0.1.gep51, align 8, !tbaa !7
  %.fca.7.0.2.load = load i64, ptr %.fca.7.0.2.gep53, align 8, !tbaa !7
  %.fca.7.1.0.load = load i64, ptr %.fca.7.1.0.gep55, align 8, !tbaa !7
  %.fca.7.1.1.load = load i64, ptr %.fca.7.1.1.gep57, align 8, !tbaa !7
  %.fca.7.1.2.load = load i64, ptr %.fca.7.1.2.gep59, align 8, !tbaa !7
  store ptr %.fca.0.load, ptr %4, align 8, !tbaa !7
  %.fca.1.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 1
  store i64 %.fca.1.load, ptr %.fca.1.gep11, align 8, !tbaa !7
  %.fca.2.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 2
  store i32 %.fca.2.load, ptr %.fca.2.gep13, align 8, !tbaa !7
  %.fca.3.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 3
  store i8 %.fca.3.load, ptr %.fca.3.gep15, align 4, !tbaa !7
  %.fca.4.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 4
  store i8 %.fca.4.load, ptr %.fca.4.gep17, align 1, !tbaa !7
  %.fca.5.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 5
  store i8 %.fca.5.load, ptr %.fca.5.gep19, align 2, !tbaa !7
  %.fca.6.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 6
  store i8 %.fca.6.load, ptr %.fca.6.gep21, align 1, !tbaa !7
  %.fca.7.0.0.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 0
  store i64 %.fca.7.0.0.load, ptr %.fca.7.0.0.gep23, align 8, !tbaa !7
  %.fca.7.0.1.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 1
  store i64 %.fca.7.0.1.load, ptr %.fca.7.0.1.gep25, align 8, !tbaa !7
  %.fca.7.0.2.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 2
  store i64 %.fca.7.0.2.load, ptr %.fca.7.0.2.gep27, align 8, !tbaa !7
  %.fca.7.1.0.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 0
  store i64 %.fca.7.1.0.load, ptr %.fca.7.1.0.gep29, align 8, !tbaa !7
  %.fca.7.1.1.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 1
  store i64 %.fca.7.1.1.load, ptr %.fca.7.1.1.gep31, align 8, !tbaa !7
  %.fca.7.1.2.gep33 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 2
  store i64 %.fca.7.1.2.load, ptr %.fca.7.1.2.gep33, align 8, !tbaa !7
  %41 = call {} @_FortranAAssign(ptr nonnull %4, ptr nonnull %2, ptr nonnull @_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6, i32 9)
  call void @free(ptr %36)
  br label %42

42:                                               ; preds = %39, %35
  %43 = load i32, ptr %7, align 4, !tbaa !3
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph192.preheader, label %._crit_edge193

.lr.ph192.preheader:                              ; preds = %42
  %45 = zext i32 %43 to i64
  %xtraiter = and i64 %45, 1
  %46 = icmp eq i32 %43, 1
  br i1 %46, label %._crit_edge193.loopexit.unr-lcssa, label %.lr.ph192.preheader.new

.lr.ph192.preheader.new:                          ; preds = %.lr.ph192.preheader
  %unroll_iter = and i64 %45, 4294967294
  br label %.lr.ph192

.lr.ph192:                                        ; preds = %64, %.lr.ph192.preheader.new
  %indvars.iv195 = phi i64 [ 1, %.lr.ph192.preheader.new ], [ %indvars.iv.next196.1, %64 ]
  %.0190 = phi i32 [ -1, %.lr.ph192.preheader.new ], [ %.1.1, %64 ]
  %.0184189 = phi i32 [ 0, %.lr.ph192.preheader.new ], [ %.1185.1, %64 ]
  %niter = phi i64 [ 0, %.lr.ph192.preheader.new ], [ %niter.next.1, %64 ]
  %47 = add nsw i64 %indvars.iv195, -1
  %48 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !3
  %50 = icmp slt i32 %.0190, %49
  br i1 %50, label %51, label %.lr.ph192.1

51:                                               ; preds = %.lr.ph192
  %52 = add i32 %.0184189, 1
  %53 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 1, i64 %47
  %54 = load i32, ptr %53, align 4, !tbaa !3
  %55 = add i32 %54, -1
  br label %.lr.ph192.1

.lr.ph192.1:                                      ; preds = %51, %.lr.ph192
  %.1185 = phi i32 [ %52, %51 ], [ %.0184189, %.lr.ph192 ]
  %.1 = phi i32 [ %55, %51 ], [ %.0190, %.lr.ph192 ]
  %56 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 0, i64 %indvars.iv195
  %57 = load i32, ptr %56, align 4, !tbaa !3
  %58 = icmp slt i32 %.1, %57
  br i1 %58, label %59, label %64

59:                                               ; preds = %.lr.ph192.1
  %60 = add i32 %.1185, 1
  %61 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 1, i64 %indvars.iv195
  %62 = load i32, ptr %61, align 4, !tbaa !3
  %63 = add i32 %62, -1
  br label %64

64:                                               ; preds = %59, %.lr.ph192.1
  %.1185.1 = phi i32 [ %60, %59 ], [ %.1185, %.lr.ph192.1 ]
  %.1.1 = phi i32 [ %63, %59 ], [ %.1, %.lr.ph192.1 ]
  %indvars.iv.next196.1 = add nuw nsw i64 %indvars.iv195, 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_edge193.loopexit.unr-lcssa.loopexit, label %.lr.ph192

._crit_edge193.loopexit.unr-lcssa.loopexit:       ; preds = %64
  %65 = add nuw nsw i64 %indvars.iv195, 1
  br label %._crit_edge193.loopexit.unr-lcssa

._crit_edge193.loopexit.unr-lcssa:                ; preds = %._crit_edge193.loopexit.unr-lcssa.loopexit, %.lr.ph192.preheader
  %.1185.lcssa.ph = phi i32 [ undef, %.lr.ph192.preheader ], [ %.1185.1, %._crit_edge193.loopexit.unr-lcssa.loopexit ]
  %indvars.iv195.unr = phi i64 [ 0, %.lr.ph192.preheader ], [ %65, %._crit_edge193.loopexit.unr-lcssa.loopexit ]
  %.0190.unr = phi i32 [ -1, %.lr.ph192.preheader ], [ %.1.1, %._crit_edge193.loopexit.unr-lcssa.loopexit ]
  %.0184189.unr = phi i32 [ 0, %.lr.ph192.preheader ], [ %.1185.1, %._crit_edge193.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge193, label %.lr.ph192.epil

.lr.ph192.epil:                                   ; preds = %._crit_edge193.loopexit.unr-lcssa
  %66 = getelementptr [2 x [100000 x i32]], ptr @_QFEr, i64 0, i64 0, i64 %indvars.iv195.unr
  %67 = load i32, ptr %66, align 4, !tbaa !3
  %68 = icmp slt i32 %.0190.unr, %67
  %69 = add i32 %.0184189.unr, 1
  %spec.select = select i1 %68, i32 %69, i32 %.0184189.unr
  br label %._crit_edge193

._crit_edge193:                                   ; preds = %.lr.ph192.epil, %._crit_edge193.loopexit.unr-lcssa, %42
  %.0184.lcssa = phi i32 [ 0, %42 ], [ %.1185.lcssa.ph, %._crit_edge193.loopexit.unr-lcssa ], [ %spec.select, %.lr.ph192.epil ]
  %70 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.41ebcc0dc357d52f37e35c2dd2d189e6, i32 18)
  %71 = call i1 @_FortranAioOutputInteger32(ptr %70, i32 %.0184.lcssa)
  %72 = call i32 @_FortranAioEndIoStatement(ptr %70)
  %73 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none)
define void @_QFPmerge_sort(ptr nocapture readonly %0, ptr %1, ptr nocapture readonly %2) local_unnamed_addr #3 {
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, align 8
  %6 = load i32, ptr %0, align 4, !tbaa !3
  %7 = icmp sgt i32 %6, 1
  br i1 %7, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %3
  %8 = zext i32 %6 to i64
  %9 = shl nuw nsw i64 %8, 2
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 2
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 4
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 5
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 6
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 2
  %.fca.7.1.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 1, i64 0
  %.fca.7.1.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 1, i64 1
  %.fca.7.1.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 1, i64 2
  %.fca.1.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 1
  %.fca.2.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 2
  %.fca.3.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 3
  %.fca.4.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 4
  %.fca.5.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 5
  %.fca.6.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 6
  %.fca.7.0.0.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 2
  %.fca.7.1.0.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 0
  %.fca.7.1.1.gep33 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 1
  %.fca.7.1.2.gep35 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 1, i64 2
  br label %10

10:                                               ; preds = %.lr.ph41, %._crit_edge
  %.039 = phi i32 [ %6, %.lr.ph41 ], [ %45, %._crit_edge ]
  %.03638 = phi i32 [ 1, %.lr.ph41 ], [ %43, %._crit_edge ]
  %.not = icmp ult i32 %.039, 2
  br i1 %.not, label %._crit_edge42, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %10
  %11 = lshr i32 %.039, 1
  %12 = zext i32 %11 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %13 = phi i64 [ %12, %.lr.ph.preheader ], [ %41, %.lr.ph ]
  %14 = shl nuw i64 %indvars.iv, 1
  %15 = trunc i64 %14 to i32
  %16 = mul i32 %.03638, %15
  %17 = load i32, ptr %0, align 4, !tbaa !3
  %18 = tail call i32 @llvm.smin.i32(i32 %16, i32 %17)
  %19 = trunc i64 %14 to i32
  %20 = add i32 %19, -2
  %21 = mul i32 %20, %.03638
  %22 = or i32 %21, 1
  %23 = sext i32 %22 to i64
  %24 = trunc i64 %14 to i32
  %25 = add i32 %24, -1
  %26 = mul i32 %25, %.03638
  %27 = sext i32 %26 to i64
  %28 = add nsw i64 %23, -1
  %29 = sub nsw i64 %27, %23
  %30 = tail call i64 @llvm.smax.i64(i64 %29, i64 -1)
  %31 = add nsw i64 %30, 1
  %32 = getelementptr i32, ptr %1, i64 %28
  store ptr %32, ptr %5, align 8, !tbaa !7
  store i64 4, ptr %.fca.1.gep, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  store i8 2, ptr %.fca.3.gep, align 4, !tbaa !7
  store i8 9, ptr %.fca.4.gep, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  store i64 %31, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  store i64 1, ptr %.fca.7.1.0.gep, align 8, !tbaa !7
  store i64 2, ptr %.fca.7.1.1.gep, align 8, !tbaa !7
  store i64 %9, ptr %.fca.7.1.2.gep, align 8, !tbaa !7
  %33 = add i32 %26, 1
  %34 = sext i32 %33 to i64
  %35 = sext i32 %18 to i64
  %36 = add nsw i64 %34, -1
  %37 = sub nsw i64 %35, %34
  %38 = tail call i64 @llvm.smax.i64(i64 %37, i64 -1)
  %39 = add nsw i64 %38, 1
  %40 = getelementptr i32, ptr %1, i64 %36
  store ptr %40, ptr %4, align 8, !tbaa !7
  store i64 4, ptr %.fca.1.gep13, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep15, align 8, !tbaa !7
  store i8 2, ptr %.fca.3.gep17, align 4, !tbaa !7
  store i8 9, ptr %.fca.4.gep19, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep21, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep23, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep25, align 8, !tbaa !7
  store i64 %39, ptr %.fca.7.0.1.gep27, align 8, !tbaa !7
  store i64 4, ptr %.fca.7.0.2.gep29, align 8, !tbaa !7
  store i64 1, ptr %.fca.7.1.0.gep31, align 8, !tbaa !7
  store i64 2, ptr %.fca.7.1.1.gep33, align 8, !tbaa !7
  store i64 %9, ptr %.fca.7.1.2.gep35, align 8, !tbaa !7
  call void @_QFPmerge(ptr nonnull %5, ptr nonnull %4, ptr %2)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = add nsw i64 %13, -1
  %42 = icmp ugt i64 %13, 1
  br i1 %42, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  %43 = shl i32 %.03638, 1
  %44 = add i32 %.039, 1
  %45 = lshr i32 %44, 1
  %46 = icmp sgt i32 %44, 3
  br i1 %46, label %10, label %._crit_edge42

._crit_edge42:                                    ; preds = %10, %._crit_edge, %3
  ret void
}

; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none)
define void @_QFPmerge(ptr nocapture readonly %0, ptr nocapture readonly %1, ptr nocapture readonly %2) local_unnamed_addr #3 {
  %4 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 1
  %5 = load i64, ptr %4, align 8, !tbaa !7
  %6 = tail call i64 @llvm.smax.i64(i64 %5, i64 0)
  %7 = trunc i64 %6 to i32
  %8 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %9 = load i64, ptr %8, align 8, !tbaa !7
  %10 = tail call i64 @llvm.smax.i64(i64 %9, i64 0)
  %11 = trunc i64 %10 to i32
  %12 = add nuw i64 %10, %6
  %sext = shl i64 %12, 32
  %13 = ashr exact i64 %sext, 32
  %14 = tail call i64 @llvm.smax.i64(i64 %13, i64 0)
  %15 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 1, i64 1
  %16 = load i64, ptr %15, align 8, !tbaa !7
  %17 = tail call i64 @llvm.smax.i64(i64 %16, i64 0)
  %18 = and i64 %17, 4294967295
  %19 = trunc i64 %17 to i32
  %20 = icmp sgt i32 %19, 0
  %21 = select i1 %20, i64 %18, i64 0
  %.fr133 = freeze i64 %21
  %22 = mul nuw nsw i64 %14, %.fr133
  %23 = alloca i32, i64 %22, align 4
  %24 = icmp sgt i32 %11, 0
  %25 = icmp sgt i32 %7, 0
  %26 = and i1 %24, %25
  br i1 %26, label %.lr.ph48.lr.ph, label %.outer._crit_edge

.lr.ph48.lr.ph:                                   ; preds = %3
  %27 = load i32, ptr %2, align 4, !tbaa !3
  %28 = sext i32 %27 to i64
  %29 = add nsw i64 %28, -1
  %30 = load ptr, ptr %0, align 8, !tbaa !7
  %31 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 2
  %32 = load i64, ptr %31, align 8, !tbaa !7
  %33 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 1, i64 2
  %34 = load i64, ptr %33, align 8, !tbaa !7
  %35 = mul i64 %34, %29
  %36 = load ptr, ptr %1, align 8, !tbaa !7
  %37 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %38 = load i64, ptr %37, align 8, !tbaa !7
  %39 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 1, i64 2
  %40 = load i64, ptr %39, align 8, !tbaa !7
  %41 = mul i64 %40, %29
  %.not134 = icmp eq i64 %.fr133, 0
  %42 = icmp sgt i64 %.fr133, 0
  %xtraiter = and i64 %.fr133, 1
  %43 = icmp eq i64 %.fr133, 1
  %unroll_iter = and i64 %.fr133, -2
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph48

.lr.ph48:                                         ; preds = %.lr.ph48.lr.ph, %.outer
  %.0.ph116 = phi i32 [ 1, %.lr.ph48.lr.ph ], [ %.us-phi59, %.outer ]
  %.027.ph114 = phi i32 [ 1, %.lr.ph48.lr.ph ], [ %109, %.outer ]
  %44 = sext i32 %.027.ph114 to i64
  %45 = add nsw i64 %44, -1
  %46 = mul i64 %38, %45
  %47 = add i64 %41, %46
  %48 = getelementptr i8, ptr %36, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !3
  %50 = add i32 %.027.ph114, -1
  br i1 %.not134, label %.lr.ph48.split.split, label %.lr.ph48.split.us.split

.lr.ph48.split.us.split:                          ; preds = %.lr.ph48, %._crit_edge.us
  %.047.us = phi i32 [ %73, %._crit_edge.us ], [ %.0.ph116, %.lr.ph48 ]
  %51 = sext i32 %.047.us to i64
  %52 = add nsw i64 %51, -1
  %53 = mul i64 %32, %52
  %54 = add i64 %35, %53
  %55 = getelementptr i8, ptr %30, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !3
  %.not.us = icmp sgt i32 %56, %49
  br i1 %.not.us, label %.split.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph48.split.us.split
  %57 = add i32 %50, %.047.us
  %58 = sext i32 %57 to i64
  %59 = add nsw i64 %58, -1
  br label %60

60:                                               ; preds = %.lr.ph.us, %60
  %61 = phi i64 [ %.fr133, %.lr.ph.us ], [ %71, %60 ]
  %62 = phi i64 [ 0, %.lr.ph.us ], [ %63, %60 ]
  %63 = add nuw nsw i64 %62, 1
  %64 = mul i64 %62, %34
  %65 = add i64 %64, %53
  %66 = getelementptr i8, ptr %30, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !3
  %68 = mul i64 %62, %14
  %69 = add i64 %59, %68
  %70 = getelementptr i32, ptr %23, i64 %69
  store i32 %67, ptr %70, align 4, !tbaa !3
  %71 = add nsw i64 %61, -1
  %72 = icmp sgt i64 %61, 1
  br i1 %72, label %60, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %60
  %73 = add i32 %.047.us, 1
  %.not170 = icmp sgt i32 %73, %7
  br i1 %.not170, label %.thread, label %.lr.ph48.split.us.split

.lr.ph48.split.split:                             ; preds = %.lr.ph48, %80
  %.047 = phi i32 [ %81, %80 ], [ %.0.ph116, %.lr.ph48 ]
  %74 = sext i32 %.047 to i64
  %75 = add nsw i64 %74, -1
  %76 = mul i64 %32, %75
  %77 = add i64 %35, %76
  %78 = getelementptr i8, ptr %30, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !3
  %.not = icmp sgt i32 %79, %49
  br i1 %.not, label %.split.us, label %80

80:                                               ; preds = %.lr.ph48.split.split
  %81 = add i32 %.047, 1
  %.not171 = icmp sgt i32 %81, %7
  br i1 %.not171, label %.thread, label %.lr.ph48.split.split

.split.us:                                        ; preds = %.lr.ph48.split.us.split, %.lr.ph48.split.split
  %.us-phi59 = phi i32 [ %.047, %.lr.ph48.split.split ], [ %.047.us, %.lr.ph48.split.us.split ]
  br i1 %42, label %.lr.ph, label %.outer

.lr.ph:                                           ; preds = %.split.us
  %82 = add i32 %50, %.us-phi59
  %83 = sext i32 %82 to i64
  %84 = add nsw i64 %83, -1
  br i1 %43, label %.outer.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph, %.lr.ph.new
  %85 = phi i64 [ %94, %.lr.ph.new ], [ 0, %.lr.ph ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph.new ], [ 0, %.lr.ph ]
  %86 = or i64 %85, 1
  %87 = mul i64 %85, %40
  %88 = add i64 %87, %46
  %89 = getelementptr i8, ptr %36, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !3
  %91 = mul i64 %85, %14
  %92 = add i64 %84, %91
  %93 = getelementptr i32, ptr %23, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !3
  %94 = add nuw nsw i64 %85, 2
  %95 = mul i64 %86, %40
  %96 = add i64 %95, %46
  %97 = getelementptr i8, ptr %36, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !3
  %99 = mul i64 %86, %14
  %100 = add i64 %84, %99
  %101 = getelementptr i32, ptr %23, i64 %100
  store i32 %98, ptr %101, align 4, !tbaa !3
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.outer.loopexit.unr-lcssa, label %.lr.ph.new

.outer.loopexit.unr-lcssa:                        ; preds = %.lr.ph.new, %.lr.ph
  %.unr = phi i64 [ 0, %.lr.ph ], [ %94, %.lr.ph.new ]
  br i1 %lcmp.mod.not, label %.outer, label %.outer.loopexit.epilog-lcssa

.outer.loopexit.epilog-lcssa:                     ; preds = %.outer.loopexit.unr-lcssa
  %102 = mul i64 %.unr, %40
  %103 = add i64 %102, %46
  %104 = getelementptr i8, ptr %36, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !3
  %106 = mul i64 %.unr, %14
  %107 = add i64 %84, %106
  %108 = getelementptr i32, ptr %23, i64 %107
  store i32 %105, ptr %108, align 4, !tbaa !3
  br label %.outer

.outer:                                           ; preds = %.outer.loopexit.epilog-lcssa, %.outer.loopexit.unr-lcssa, %.split.us
  %109 = add i32 %.027.ph114, 1
  %110 = icmp sle i32 %109, %11
  %111 = icmp sle i32 %.us-phi59, %7
  %112 = and i1 %110, %111
  br i1 %112, label %.lr.ph48, label %.outer._crit_edge

.outer._crit_edge:                                ; preds = %.outer, %3
  %.027.ph.lcssa = phi i32 [ 1, %3 ], [ %109, %.outer ]
  %.0.lcssa = phi i32 [ 1, %3 ], [ %.us-phi59, %.outer ]
  %.lcssa41 = phi i1 [ %25, %3 ], [ %111, %.outer ]
  %.lcssa = phi i1 [ %24, %3 ], [ %110, %.outer ]
  br i1 %.lcssa41, label %113, label %149

113:                                              ; preds = %.outer._crit_edge
  %114 = add i32 %.027.ph.lcssa, -1
  %115 = add i32 %114, %.0.lcssa
  %116 = sext i32 %115 to i64
  %117 = sub nsw i64 %13, %116
  %118 = tail call i64 @llvm.smax.i64(i64 %117, i64 -1)
  %119 = add nsw i64 %118, 1
  %120 = sext i32 %.0.lcssa to i64
  %.not132 = icmp ne i64 %.fr133, 0
  %121 = icmp sgt i64 %117, -1
  %or.cond = select i1 %.not132, i1 %121, i1 false
  br i1 %or.cond, label %.preheader37.lr.ph.split.us, label %.loopexit

.preheader37.lr.ph.split.us:                      ; preds = %113
  %122 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 1, i64 2
  %123 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 2
  %124 = load i64, ptr %123, align 8, !tbaa !7
  %125 = load i64, ptr %122, align 8, !tbaa !7
  %126 = load ptr, ptr %0, align 8, !tbaa !7
  br label %.preheader37.us

.preheader37.us:                                  ; preds = %._crit_edge124.us, %.preheader37.lr.ph.split.us
  %127 = phi i64 [ %.fr133, %.preheader37.lr.ph.split.us ], [ %147, %._crit_edge124.us ]
  %128 = phi i64 [ 0, %.preheader37.lr.ph.split.us ], [ %146, %._crit_edge124.us ]
  %129 = mul i64 %125, %128
  %130 = mul i64 %128, %14
  br label %131

131:                                              ; preds = %.preheader37.us, %131
  %132 = phi i64 [ %119, %.preheader37.us ], [ %144, %131 ]
  %133 = phi i64 [ 0, %.preheader37.us ], [ %134, %131 ]
  %134 = add nuw nsw i64 %133, 1
  %135 = add nsw i64 %133, -1
  %136 = add nsw i64 %135, %120
  %137 = mul i64 %124, %136
  %138 = add i64 %129, %137
  %139 = getelementptr i8, ptr %126, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !3
  %141 = add nsw i64 %135, %116
  %142 = add i64 %141, %130
  %143 = getelementptr i32, ptr %23, i64 %142
  store i32 %140, ptr %143, align 4, !tbaa !3
  %144 = add nsw i64 %132, -1
  %145 = icmp sgt i64 %132, 1
  br i1 %145, label %131, label %._crit_edge124.us

._crit_edge124.us:                                ; preds = %131
  %146 = add nuw i64 %128, 1
  %147 = add i64 %127, -1
  %148 = icmp sgt i64 %147, 0
  br i1 %148, label %.preheader37.us, label %.loopexit

149:                                              ; preds = %.outer._crit_edge
  br i1 %.lcssa, label %.thread, label %.loopexit

.thread:                                          ; preds = %._crit_edge.us, %80, %149
  %.027.ph.lcssa176183 = phi i32 [ %.027.ph.lcssa, %149 ], [ %.027.ph114, %80 ], [ %.027.ph114, %._crit_edge.us ]
  %.0.lcssa177182 = phi i32 [ %.0.lcssa, %149 ], [ %81, %80 ], [ %73, %._crit_edge.us ]
  %150 = add i32 %.027.ph.lcssa176183, -1
  %151 = add i32 %150, %.0.lcssa177182
  %152 = sext i32 %151 to i64
  %153 = sub nsw i64 %13, %152
  %154 = tail call i64 @llvm.smax.i64(i64 %153, i64 -1)
  %155 = add nsw i64 %154, 1
  %156 = sext i32 %.027.ph.lcssa176183 to i64
  %.not131 = icmp ne i64 %.fr133, 0
  %157 = icmp sgt i64 %153, -1
  %or.cond196 = select i1 %.not131, i1 %157, i1 false
  br i1 %or.cond196, label %.preheader38.lr.ph.split.us, label %.loopexit

.preheader38.lr.ph.split.us:                      ; preds = %.thread
  %158 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 1, i64 2
  %159 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %160 = load i64, ptr %159, align 8, !tbaa !7
  %161 = load i64, ptr %158, align 8, !tbaa !7
  %162 = load ptr, ptr %1, align 8, !tbaa !7
  br label %.preheader38.us

.preheader38.us:                                  ; preds = %._crit_edge122.us, %.preheader38.lr.ph.split.us
  %163 = phi i64 [ %.fr133, %.preheader38.lr.ph.split.us ], [ %183, %._crit_edge122.us ]
  %164 = phi i64 [ 0, %.preheader38.lr.ph.split.us ], [ %182, %._crit_edge122.us ]
  %165 = mul i64 %161, %164
  %166 = mul i64 %164, %14
  br label %167

167:                                              ; preds = %.preheader38.us, %167
  %168 = phi i64 [ %155, %.preheader38.us ], [ %180, %167 ]
  %169 = phi i64 [ 0, %.preheader38.us ], [ %170, %167 ]
  %170 = add nuw nsw i64 %169, 1
  %171 = add nsw i64 %169, -1
  %172 = add nsw i64 %171, %156
  %173 = mul i64 %160, %172
  %174 = add i64 %165, %173
  %175 = getelementptr i8, ptr %162, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !3
  %177 = add nsw i64 %171, %152
  %178 = add i64 %177, %166
  %179 = getelementptr i32, ptr %23, i64 %178
  store i32 %176, ptr %179, align 4, !tbaa !3
  %180 = add nsw i64 %168, -1
  %181 = icmp sgt i64 %168, 1
  br i1 %181, label %167, label %._crit_edge122.us

._crit_edge122.us:                                ; preds = %167
  %182 = add nuw i64 %164, 1
  %183 = add i64 %163, -1
  %184 = icmp sgt i64 %183, 0
  br i1 %184, label %.preheader38.us, label %.loopexit

.loopexit:                                        ; preds = %._crit_edge122.us, %._crit_edge124.us, %.thread, %113, %149
  %185 = icmp sgt i64 %16, 0
  %186 = icmp sgt i64 %5, 0
  %or.cond197 = select i1 %185, i1 %186, i1 false
  br i1 %or.cond197, label %.preheader36.lr.ph.split.us, label %._crit_edge127

.preheader36.lr.ph.split.us:                      ; preds = %.loopexit
  %187 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 1, i64 2
  %188 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 2
  %189 = load i64, ptr %188, align 8, !tbaa !7
  %190 = load i64, ptr %187, align 8, !tbaa !7
  %191 = load ptr, ptr %0, align 8, !tbaa !7
  %xtraiter223 = and i64 %5, 1
  %192 = icmp eq i64 %5, 1
  %unroll_iter226 = and i64 %5, -2
  %lcmp.mod225.not = icmp eq i64 %xtraiter223, 0
  br label %.preheader36.us

.preheader36.us:                                  ; preds = %._crit_edge126.us, %.preheader36.lr.ph.split.us
  %193 = phi i64 [ 0, %.preheader36.lr.ph.split.us ], [ %217, %._crit_edge126.us ]
  %194 = mul i64 %193, %14
  %195 = mul i64 %190, %193
  br i1 %192, label %._crit_edge126.us.unr-lcssa, label %.preheader36.us.new

.preheader36.us.new:                              ; preds = %.preheader36.us, %.preheader36.us.new
  %196 = phi i64 [ %204, %.preheader36.us.new ], [ 0, %.preheader36.us ]
  %niter227 = phi i64 [ %niter227.next.1, %.preheader36.us.new ], [ 0, %.preheader36.us ]
  %197 = or i64 %196, 1
  %198 = add i64 %196, %194
  %199 = getelementptr i32, ptr %23, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !3
  %201 = mul i64 %189, %196
  %202 = add i64 %195, %201
  %203 = getelementptr i8, ptr %191, i64 %202
  store i32 %200, ptr %203, align 4, !tbaa !3
  %204 = add nuw nsw i64 %196, 2
  %205 = add i64 %197, %194
  %206 = getelementptr i32, ptr %23, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !3
  %208 = mul i64 %189, %197
  %209 = add i64 %195, %208
  %210 = getelementptr i8, ptr %191, i64 %209
  store i32 %207, ptr %210, align 4, !tbaa !3
  %niter227.next.1 = add i64 %niter227, 2
  %niter227.ncmp.1 = icmp eq i64 %niter227.next.1, %unroll_iter226
  br i1 %niter227.ncmp.1, label %._crit_edge126.us.unr-lcssa, label %.preheader36.us.new

._crit_edge126.us.unr-lcssa:                      ; preds = %.preheader36.us.new, %.preheader36.us
  %.unr224 = phi i64 [ 0, %.preheader36.us ], [ %204, %.preheader36.us.new ]
  br i1 %lcmp.mod225.not, label %._crit_edge126.us, label %._crit_edge126.us.epilog-lcssa

._crit_edge126.us.epilog-lcssa:                   ; preds = %._crit_edge126.us.unr-lcssa
  %211 = add i64 %.unr224, %194
  %212 = getelementptr i32, ptr %23, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !3
  %214 = mul i64 %189, %.unr224
  %215 = add i64 %195, %214
  %216 = getelementptr i8, ptr %191, i64 %215
  store i32 %213, ptr %216, align 4, !tbaa !3
  br label %._crit_edge126.us

._crit_edge126.us:                                ; preds = %._crit_edge126.us.unr-lcssa, %._crit_edge126.us.epilog-lcssa
  %217 = add nuw i64 %193, 1
  %exitcond167.not = icmp eq i64 %217, %16
  br i1 %exitcond167.not, label %._crit_edge127, label %.preheader36.us

._crit_edge127:                                   ; preds = %._crit_edge126.us, %.loopexit
  %218 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 1, i64 1
  %219 = load i64, ptr %218, align 8, !tbaa !7
  %220 = icmp sgt i64 %219, 0
  br i1 %220, label %.preheader.lr.ph, label %._crit_edge130

.preheader.lr.ph:                                 ; preds = %._crit_edge127
  %221 = shl i64 %6, 32
  %sext35 = add i64 %221, 4294967296
  %222 = ashr exact i64 %sext35, 32
  %223 = icmp sgt i64 %9, 0
  %224 = add nsw i64 %222, -1
  br i1 %223, label %.preheader.lr.ph.split.us, label %._crit_edge130

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %225 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 1, i64 2
  %226 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [2 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %227 = load i64, ptr %226, align 8, !tbaa !7
  %228 = load i64, ptr %225, align 8, !tbaa !7
  %229 = load ptr, ptr %1, align 8, !tbaa !7
  %xtraiter229 = and i64 %9, 1
  %230 = icmp eq i64 %9, 1
  %unroll_iter232 = and i64 %9, -2
  %lcmp.mod231.not = icmp eq i64 %xtraiter229, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge129.us, %.preheader.lr.ph.split.us
  %231 = phi i64 [ 0, %.preheader.lr.ph.split.us ], [ %256, %._crit_edge129.us ]
  %232 = mul i64 %231, %14
  %233 = add i64 %224, %232
  %234 = mul i64 %228, %231
  br i1 %230, label %._crit_edge129.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %235 = phi i64 [ %243, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter233 = phi i64 [ %niter233.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %236 = or i64 %235, 1
  %237 = add i64 %233, %235
  %238 = getelementptr i32, ptr %23, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !3
  %240 = mul i64 %227, %235
  %241 = add i64 %234, %240
  %242 = getelementptr i8, ptr %229, i64 %241
  store i32 %239, ptr %242, align 4, !tbaa !3
  %243 = add nuw nsw i64 %235, 2
  %244 = add i64 %233, %236
  %245 = getelementptr i32, ptr %23, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !3
  %247 = mul i64 %227, %236
  %248 = add i64 %234, %247
  %249 = getelementptr i8, ptr %229, i64 %248
  store i32 %246, ptr %249, align 4, !tbaa !3
  %niter233.next.1 = add i64 %niter233, 2
  %niter233.ncmp.1 = icmp eq i64 %niter233.next.1, %unroll_iter232
  br i1 %niter233.ncmp.1, label %._crit_edge129.us.unr-lcssa, label %.preheader.us.new

._crit_edge129.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.unr230 = phi i64 [ 0, %.preheader.us ], [ %243, %.preheader.us.new ]
  br i1 %lcmp.mod231.not, label %._crit_edge129.us, label %._crit_edge129.us.epilog-lcssa

._crit_edge129.us.epilog-lcssa:                   ; preds = %._crit_edge129.us.unr-lcssa
  %250 = add i64 %233, %.unr230
  %251 = getelementptr i32, ptr %23, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !3
  %253 = mul i64 %227, %.unr230
  %254 = add i64 %234, %253
  %255 = getelementptr i8, ptr %229, i64 %254
  store i32 %252, ptr %255, align 4, !tbaa !3
  br label %._crit_edge129.us

._crit_edge129.us:                                ; preds = %._crit_edge129.us.unr-lcssa, %._crit_edge129.us.epilog-lcssa
  %256 = add nuw i64 %231, 1
  %exitcond169.not = icmp eq i64 %256, %219
  br i1 %exitcond169.not, label %._crit_edge130, label %.preheader.us

._crit_edge130:                                   ; preds = %._crit_edge129.us, %.preheader.lr.ph, %._crit_edge127
  ret void
}

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 i1 @_FortranAIsContiguous(ptr) local_unnamed_addr

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

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

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

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

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

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

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 = { noreturn }
attributes #3 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
