      MODULE qSortMod
      implicit none
      interface qSort
        module procedure :: i16qSort
        module procedure :: i4qSort
      end interface
      contains
      
      pure recursive function i16qSort( a ) result( r )
          !ref
          !https://t.doujin-constant.net/
          !post/143374686394/fortranをより使いこなしたquick-sort
          !
          !left is Bigger!
        implicit none
        integer(16),intent(in) :: a(:)
        integer(16) :: r( size(a) )
        !integer(16),allocatable :: r(:) !is OK
        
        if( size(a)>1 )then
          r = [ qSort( pack( a(:),a(:)> a(1) ) ), &
                       pack( a(:),a(:)==a(1) )  , &
                qSort( pack( a(:),a(:)< a(1) ) ) ]
        else
          r = a
        end if
      end function i16qSort
      
      pure recursive function i4qSort( a ) result( r )
        implicit none
        integer(4),intent(in) :: a(:)
        integer(4) :: r( size(a) )
        
        if( size(a)>1 )then
          r=[qSort(pack(a,a>a(1))),pack(a,a==a(1)),qSort(pack(a,a<a(1)))]
        else
          r = a
        end if
      end function i4qSort
      END MODULE qSortMod
      
      
      PROGRAM piyo
      USE qSortMod
      IMPLICIT NONE
      INTEGER(16) :: n
      integer(16),allocatable :: a(:)
      integer(16) :: i
      
      read*,n
      allocate( a(n) )
      read*,a(:)
      
      a = qSort( a )
      
      
      do i = 1,n-1
        if( a(i)==a(i+1) )then
          print*,'NO'
          STOP
        end if
      end do
      
      print*,'YES'
      
      END PROGRAM
      
; 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"

@_QQcl.f02e25d83843ec98878b9426d724b8c0 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2458/source.f\00"
@_QFEa.0 = internal unnamed_addr global ptr null
@_QFEa.8 = internal unnamed_addr global i64 0
@_QQcl.4E4F = linkonce constant [2 x i8] c"NO"
@_QQcl.594553 = linkonce constant [3 x i8] c"YES"
@_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 @_QMqsortmodPi16qsort(ptr nocapture writeonly %0, ptr nocapture readonly %1) local_unnamed_addr {
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %6 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %7 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %8 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %9 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %10 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %11 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %12 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %13 = load i64, ptr %12, align 8, !tbaa !3
  %14 = tail call i64 @llvm.smax.i64(i64 %13, i64 0)
  %15 = trunc i64 %13 to i32
  %16 = icmp sgt i32 %15, 1
  br i1 %16, label %22, label %.preheader

.preheader:                                       ; preds = %2
  %.not410 = icmp slt i64 %13, 1
  br i1 %.not410, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %17 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %18 = load i64, ptr %17, align 8, !tbaa !3
  %19 = load ptr, ptr %1, align 8, !tbaa !3
  %20 = add nsw i64 %14, -1
  %xtraiter = and i64 %14, 3
  %21 = icmp ult i64 %20, 3
  br i1 %21, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 9223372036854775804
  br label %172

22:                                               ; preds = %2
  %23 = tail call dereferenceable_or_null(512) ptr @malloc(i64 512)
  %24 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %25 = load i64, ptr %24, align 8, !tbaa !3
  %26 = load ptr, ptr %1, align 8, !tbaa !3
  store ptr %26, ptr %8, align 8, !tbaa !3
  %.fca.1.gep120 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep120, align 8, !tbaa !3
  %.fca.2.gep122 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep122, align 8, !tbaa !3
  %.fca.3.gep124 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep124, align 4, !tbaa !3
  %.fca.4.gep126 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep126, align 1, !tbaa !3
  %.fca.5.gep128 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep128, align 2, !tbaa !3
  %.fca.6.gep130 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep130, align 1, !tbaa !3
  %.fca.7.0.0.gep132 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep132, align 8, !tbaa !3
  %.fca.7.0.1.gep134 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 1
  store i64 %14, ptr %.fca.7.0.1.gep134, align 8, !tbaa !3
  %.fca.7.0.2.gep136 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 2
  store i64 %25, ptr %.fca.7.0.2.gep136, align 8, !tbaa !3
  %27 = load i128, ptr %26, align 8, !tbaa !7
  %28 = shl i64 %14, 2
  %29 = tail call ptr @malloc(i64 %28)
  %.not411 = icmp slt i64 %13, 1
  br i1 %.not411, label %._crit_edge, label %.lr.ph391.preheader

.lr.ph391.preheader:                              ; preds = %22
  %xtraiter421 = and i64 %14, 1
  %30 = icmp eq i64 %14, 1
  br i1 %30, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph391.preheader.new

.lr.ph391.preheader.new:                          ; preds = %.lr.ph391.preheader
  %unroll_iter425 = and i64 %14, 9223372036854775806
  br label %.lr.ph391

.lr.ph391:                                        ; preds = %.lr.ph391, %.lr.ph391.preheader.new
  %31 = phi i64 [ 0, %.lr.ph391.preheader.new ], [ %39, %.lr.ph391 ]
  %niter426 = phi i64 [ 0, %.lr.ph391.preheader.new ], [ %niter426.next.1, %.lr.ph391 ]
  %32 = or i64 %31, 1
  %33 = mul i64 %31, %25
  %34 = getelementptr i8, ptr %26, i64 %33
  %35 = load i128, ptr %34, align 8, !tbaa !7
  %36 = icmp sgt i128 %35, %27
  %37 = zext i1 %36 to i32
  %38 = getelementptr i32, ptr %29, i64 %31
  store i32 %37, ptr %38, align 4, !tbaa !7
  %39 = add nuw nsw i64 %31, 2
  %40 = mul i64 %32, %25
  %41 = getelementptr i8, ptr %26, i64 %40
  %42 = load i128, ptr %41, align 8, !tbaa !7
  %43 = icmp sgt i128 %42, %27
  %44 = zext i1 %43 to i32
  %45 = getelementptr i32, ptr %29, i64 %32
  store i32 %44, ptr %45, align 4, !tbaa !7
  %niter426.next.1 = add i64 %niter426, 2
  %niter426.ncmp.1 = icmp eq i64 %niter426.next.1, %unroll_iter425
  br i1 %niter426.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph391

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph391, %.lr.ph391.preheader
  %.unr423 = phi i64 [ 0, %.lr.ph391.preheader ], [ %39, %.lr.ph391 ]
  %lcmp.mod424.not = icmp eq i64 %xtraiter421, 0
  br i1 %lcmp.mod424.not, label %._crit_edge, label %.lr.ph391.epil

.lr.ph391.epil:                                   ; preds = %._crit_edge.loopexit.unr-lcssa
  %46 = mul i64 %.unr423, %25
  %47 = getelementptr i8, ptr %26, i64 %46
  %48 = load i128, ptr %47, align 8, !tbaa !7
  %49 = icmp sgt i128 %48, %27
  %50 = zext i1 %49 to i32
  %51 = getelementptr i32, ptr %29, i64 %.unr423
  store i32 %50, ptr %51, align 4, !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph391.epil, %._crit_edge.loopexit.unr-lcssa, %22
  store ptr %29, ptr %7, align 8, !tbaa !3
  %.fca.1.gep140 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep140, align 8, !tbaa !3
  %.fca.2.gep142 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep142, align 8, !tbaa !3
  %.fca.3.gep144 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep144, align 4, !tbaa !3
  %.fca.4.gep146 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep146, align 1, !tbaa !3
  %.fca.5.gep148 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep148, align 2, !tbaa !3
  %.fca.6.gep150 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep150, align 1, !tbaa !3
  %.fca.7.0.0.gep152 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep152, align 8, !tbaa !3
  %.fca.7.0.1.gep154 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 1
  store i64 %14, ptr %.fca.7.0.1.gep154, align 8, !tbaa !3
  %.fca.7.0.2.gep156 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep156, align 8, !tbaa !3
  store ptr null, ptr %11, align 8, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %11, i64 0, i32 1
  store i64 16, 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 %11, 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 %11, 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 %11, i64 0, i32 4
  store i8 11, 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 %11, i64 0, i32 5
  store i8 2, 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 %11, 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 %11, 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 %11, i64 0, i32 7, i64 0, i64 1
  store i64 0, 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 %11, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep, align 8, !tbaa !3
  %52 = call {} @_FortranAPack(ptr nonnull %11, ptr nonnull %8, ptr nonnull %7, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 21)
  %.fca.0.load = load ptr, ptr %11, align 8, !tbaa !3
  %.fca.7.0.0.load = load i64, ptr %.fca.7.0.0.gep, align 8, !tbaa !3
  %.fca.7.0.1.load = load i64, ptr %.fca.7.0.1.gep, align 8, !tbaa !3
  %53 = icmp eq i64 %.fca.7.0.1.load, 0
  %54 = select i1 %53, i64 1, i64 %.fca.7.0.0.load
  store ptr %.fca.0.load, ptr %6, align 8, !tbaa !3
  %.fca.1.gep282 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep282, align 8, !tbaa !3
  %.fca.2.gep284 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep284, align 8, !tbaa !3
  %.fca.3.gep286 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep286, align 4, !tbaa !3
  %.fca.4.gep288 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep288, align 1, !tbaa !3
  %.fca.5.gep290 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep290, align 2, !tbaa !3
  %.fca.6.gep292 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep292, align 1, !tbaa !3
  %.fca.7.0.0.gep294 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 0
  store i64 %54, ptr %.fca.7.0.0.gep294, align 8, !tbaa !3
  %.fca.7.0.1.gep296 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 1
  store i64 %.fca.7.0.1.load, ptr %.fca.7.0.1.gep296, align 8, !tbaa !3
  %.fca.7.0.2.gep298 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep298, align 8, !tbaa !3
  %55 = call i64 @llvm.smax.i64(i64 %.fca.7.0.1.load, i64 0)
  %56 = call ptr @llvm.stacksave()
  %57 = alloca i128, i64 %55, align 8
  call void @_QMqsortmodPi16qsort(ptr nonnull %57, ptr nonnull %6)
  %58 = shl i64 %55, 4
  %59 = call ptr @malloc(i64 %58)
  %.not412 = icmp slt i64 %.fca.7.0.1.load, 1
  br i1 %.not412, label %._crit_edge394, label %.lr.ph393.preheader

.lr.ph393.preheader:                              ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr nonnull align 8 %57, i64 %58, i1 false), !tbaa !7
  br label %._crit_edge394

._crit_edge394:                                   ; preds = %.lr.ph393.preheader, %._crit_edge
  %60 = icmp ugt i64 %55, 31
  br i1 %60, label %61, label %65

61:                                               ; preds = %._crit_edge394
  %62 = shl nuw i64 %55, 1
  %63 = shl i64 %55, 5
  %64 = call ptr @realloc(ptr %23, i64 %63)
  br label %65

65:                                               ; preds = %61, %._crit_edge394
  %.0 = phi i64 [ %62, %61 ], [ 32, %._crit_edge394 ]
  %66 = phi ptr [ %64, %61 ], [ %23, %._crit_edge394 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %66, ptr align 1 %59, i64 %58, i1 false)
  %67 = load i128, ptr %26, align 8, !tbaa !7
  %68 = call ptr @malloc(i64 %28)
  br i1 %.not411, label %._crit_edge397, label %.lr.ph396

.lr.ph396:                                        ; preds = %65
  %69 = load i64, ptr %24, align 8, !tbaa !3
  %70 = load ptr, ptr %1, align 8, !tbaa !3
  %xtraiter428 = and i64 %14, 1
  %71 = icmp eq i64 %14, 1
  br i1 %71, label %._crit_edge397.loopexit.unr-lcssa, label %.lr.ph396.new

.lr.ph396.new:                                    ; preds = %.lr.ph396
  %unroll_iter432 = and i64 %14, 9223372036854775806
  br label %72

72:                                               ; preds = %72, %.lr.ph396.new
  %73 = phi i64 [ 0, %.lr.ph396.new ], [ %81, %72 ]
  %niter433 = phi i64 [ 0, %.lr.ph396.new ], [ %niter433.next.1, %72 ]
  %74 = or i64 %73, 1
  %75 = mul i64 %69, %73
  %76 = getelementptr i8, ptr %70, i64 %75
  %77 = load i128, ptr %76, align 8, !tbaa !7
  %78 = icmp eq i128 %77, %67
  %79 = zext i1 %78 to i32
  %80 = getelementptr i32, ptr %68, i64 %73
  store i32 %79, ptr %80, align 4, !tbaa !7
  %81 = add nuw nsw i64 %73, 2
  %82 = mul i64 %69, %74
  %83 = getelementptr i8, ptr %70, i64 %82
  %84 = load i128, ptr %83, align 8, !tbaa !7
  %85 = icmp eq i128 %84, %67
  %86 = zext i1 %85 to i32
  %87 = getelementptr i32, ptr %68, i64 %74
  store i32 %86, ptr %87, align 4, !tbaa !7
  %niter433.next.1 = add i64 %niter433, 2
  %niter433.ncmp.1 = icmp eq i64 %niter433.next.1, %unroll_iter432
  br i1 %niter433.ncmp.1, label %._crit_edge397.loopexit.unr-lcssa, label %72

._crit_edge397.loopexit.unr-lcssa:                ; preds = %72, %.lr.ph396
  %.unr430 = phi i64 [ 0, %.lr.ph396 ], [ %81, %72 ]
  %lcmp.mod431.not = icmp eq i64 %xtraiter428, 0
  br i1 %lcmp.mod431.not, label %._crit_edge397, label %._crit_edge397.loopexit.epilog-lcssa

._crit_edge397.loopexit.epilog-lcssa:             ; preds = %._crit_edge397.loopexit.unr-lcssa
  %88 = mul i64 %69, %.unr430
  %89 = getelementptr i8, ptr %70, i64 %88
  %90 = load i128, ptr %89, align 8, !tbaa !7
  %91 = icmp eq i128 %90, %67
  %92 = zext i1 %91 to i32
  %93 = getelementptr i32, ptr %68, i64 %.unr430
  store i32 %92, ptr %93, align 4, !tbaa !7
  br label %._crit_edge397

._crit_edge397:                                   ; preds = %._crit_edge397.loopexit.epilog-lcssa, %._crit_edge397.loopexit.unr-lcssa, %65
  store ptr %68, ptr %5, align 8, !tbaa !3
  %.fca.1.gep302 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep302, align 8, !tbaa !3
  %.fca.2.gep304 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep304, align 8, !tbaa !3
  %.fca.3.gep306 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep306, align 4, !tbaa !3
  %.fca.4.gep308 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep308, align 1, !tbaa !3
  %.fca.5.gep310 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep310, align 2, !tbaa !3
  %.fca.6.gep312 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep312, align 1, !tbaa !3
  %.fca.7.0.0.gep314 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep314, align 8, !tbaa !3
  %.fca.7.0.1.gep316 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 1
  store i64 %14, ptr %.fca.7.0.1.gep316, align 8, !tbaa !3
  %.fca.7.0.2.gep318 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep318, align 8, !tbaa !3
  store ptr null, ptr %10, align 8, !tbaa !3
  %.fca.1.gep20 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep20, align 8, !tbaa !3
  %.fca.2.gep22 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep22, align 8, !tbaa !3
  %.fca.3.gep24 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep24, align 4, !tbaa !3
  %.fca.4.gep26 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep26, align 1, !tbaa !3
  %.fca.5.gep28 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep28, align 2, !tbaa !3
  %.fca.6.gep30 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep30, align 1, !tbaa !3
  %.fca.7.0.0.gep32 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep32, align 8, !tbaa !3
  %.fca.7.0.1.gep34 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.fca.7.0.1.gep34, align 8, !tbaa !3
  %.fca.7.0.2.gep36 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep36, align 8, !tbaa !3
  %94 = call {} @_FortranAPack(ptr nonnull %10, ptr nonnull %8, ptr nonnull %5, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 21)
  %.fca.0.load38 = load ptr, ptr %10, align 8, !tbaa !3
  %.fca.7.0.1.load62 = load i64, ptr %.fca.7.0.1.gep34, align 8, !tbaa !3
  %95 = shl i64 %.fca.7.0.1.load62, 4
  %96 = call ptr @malloc(i64 %95)
  %97 = icmp sgt i64 %.fca.7.0.1.load62, 0
  br i1 %97, label %.lr.ph399.preheader, label %._crit_edge400

.lr.ph399.preheader:                              ; preds = %._crit_edge397
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %96, ptr align 8 %.fca.0.load38, i64 %95, i1 false), !tbaa !7
  br label %._crit_edge400

._crit_edge400:                                   ; preds = %.lr.ph399.preheader, %._crit_edge397
  %98 = add i64 %.fca.7.0.1.load62, %55
  %.not = icmp sgt i64 %.0, %98
  br i1 %.not, label %103, label %99

99:                                               ; preds = %._crit_edge400
  %100 = shl i64 %98, 1
  %101 = shl i64 %98, 5
  %102 = call ptr @realloc(ptr %66, i64 %101)
  br label %103

103:                                              ; preds = %99, %._crit_edge400
  %.1 = phi i64 [ %100, %99 ], [ %.0, %._crit_edge400 ]
  %104 = phi ptr [ %102, %99 ], [ %66, %._crit_edge400 ]
  %105 = getelementptr i128, ptr %104, i64 %55
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 1 %96, i64 %95, i1 false)
  %106 = load i128, ptr %26, align 8, !tbaa !7
  %107 = call ptr @malloc(i64 %28)
  br i1 %.not411, label %._crit_edge403, label %.lr.ph402

.lr.ph402:                                        ; preds = %103
  %108 = load i64, ptr %24, align 8, !tbaa !3
  %109 = load ptr, ptr %1, align 8, !tbaa !3
  %xtraiter435 = and i64 %14, 1
  %110 = icmp eq i64 %14, 1
  br i1 %110, label %._crit_edge403.loopexit.unr-lcssa, label %.lr.ph402.new

.lr.ph402.new:                                    ; preds = %.lr.ph402
  %unroll_iter439 = and i64 %14, 9223372036854775806
  br label %111

111:                                              ; preds = %111, %.lr.ph402.new
  %112 = phi i64 [ 0, %.lr.ph402.new ], [ %120, %111 ]
  %niter440 = phi i64 [ 0, %.lr.ph402.new ], [ %niter440.next.1, %111 ]
  %113 = or i64 %112, 1
  %114 = mul i64 %108, %112
  %115 = getelementptr i8, ptr %109, i64 %114
  %116 = load i128, ptr %115, align 8, !tbaa !7
  %117 = icmp slt i128 %116, %106
  %118 = zext i1 %117 to i32
  %119 = getelementptr i32, ptr %107, i64 %112
  store i32 %118, ptr %119, align 4, !tbaa !7
  %120 = add nuw nsw i64 %112, 2
  %121 = mul i64 %108, %113
  %122 = getelementptr i8, ptr %109, i64 %121
  %123 = load i128, ptr %122, align 8, !tbaa !7
  %124 = icmp slt i128 %123, %106
  %125 = zext i1 %124 to i32
  %126 = getelementptr i32, ptr %107, i64 %113
  store i32 %125, ptr %126, align 4, !tbaa !7
  %niter440.next.1 = add i64 %niter440, 2
  %niter440.ncmp.1 = icmp eq i64 %niter440.next.1, %unroll_iter439
  br i1 %niter440.ncmp.1, label %._crit_edge403.loopexit.unr-lcssa, label %111

._crit_edge403.loopexit.unr-lcssa:                ; preds = %111, %.lr.ph402
  %.unr437 = phi i64 [ 0, %.lr.ph402 ], [ %120, %111 ]
  %lcmp.mod438.not = icmp eq i64 %xtraiter435, 0
  br i1 %lcmp.mod438.not, label %._crit_edge403, label %._crit_edge403.loopexit.epilog-lcssa

._crit_edge403.loopexit.epilog-lcssa:             ; preds = %._crit_edge403.loopexit.unr-lcssa
  %127 = mul i64 %108, %.unr437
  %128 = getelementptr i8, ptr %109, i64 %127
  %129 = load i128, ptr %128, align 8, !tbaa !7
  %130 = icmp slt i128 %129, %106
  %131 = zext i1 %130 to i32
  %132 = getelementptr i32, ptr %107, i64 %.unr437
  store i32 %131, ptr %132, align 4, !tbaa !7
  br label %._crit_edge403

._crit_edge403:                                   ; preds = %._crit_edge403.loopexit.epilog-lcssa, %._crit_edge403.loopexit.unr-lcssa, %103
  store ptr %107, ptr %4, align 8, !tbaa !3
  %.fca.1.gep332 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep332, align 8, !tbaa !3
  %.fca.2.gep334 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep334, align 8, !tbaa !3
  %.fca.3.gep336 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep336, align 4, !tbaa !3
  %.fca.4.gep338 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep338, align 1, !tbaa !3
  %.fca.5.gep340 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep340, align 2, !tbaa !3
  %.fca.6.gep342 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep342, align 1, !tbaa !3
  %.fca.7.0.0.gep344 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep344, align 8, !tbaa !3
  %.fca.7.0.1.gep346 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 1
  store i64 %14, ptr %.fca.7.0.1.gep346, align 8, !tbaa !3
  %.fca.7.0.2.gep348 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep348, align 8, !tbaa !3
  store ptr null, ptr %9, align 8, !tbaa !3
  %.fca.1.gep70 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep70, align 8, !tbaa !3
  %.fca.2.gep72 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep72, align 8, !tbaa !3
  %.fca.3.gep74 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep74, align 4, !tbaa !3
  %.fca.4.gep76 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep76, align 1, !tbaa !3
  %.fca.5.gep78 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep78, align 2, !tbaa !3
  %.fca.6.gep80 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep80, align 1, !tbaa !3
  %.fca.7.0.0.gep82 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep82, align 8, !tbaa !3
  %.fca.7.0.1.gep84 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.fca.7.0.1.gep84, align 8, !tbaa !3
  %.fca.7.0.2.gep86 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep86, align 8, !tbaa !3
  %133 = call {} @_FortranAPack(ptr nonnull %9, ptr nonnull %8, ptr nonnull %4, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 21)
  %.fca.0.load88 = load ptr, ptr %9, align 8, !tbaa !3
  %.fca.7.0.0.load109 = load i64, ptr %.fca.7.0.0.gep82, align 8, !tbaa !3
  %.fca.7.0.1.load112 = load i64, ptr %.fca.7.0.1.gep84, align 8, !tbaa !3
  %134 = icmp eq i64 %.fca.7.0.1.load112, 0
  %135 = select i1 %134, i64 1, i64 %.fca.7.0.0.load109
  store ptr %.fca.0.load88, ptr %3, align 8, !tbaa !3
  %.fca.1.gep362 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep362, align 8, !tbaa !3
  %.fca.2.gep364 = 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.gep364, align 8, !tbaa !3
  %.fca.3.gep366 = 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.gep366, align 4, !tbaa !3
  %.fca.4.gep368 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep368, align 1, !tbaa !3
  %.fca.5.gep370 = 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.gep370, align 2, !tbaa !3
  %.fca.6.gep372 = 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.gep372, align 1, !tbaa !3
  %.fca.7.0.0.gep374 = 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 %135, ptr %.fca.7.0.0.gep374, align 8, !tbaa !3
  %.fca.7.0.1.gep376 = 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 %.fca.7.0.1.load112, ptr %.fca.7.0.1.gep376, align 8, !tbaa !3
  %.fca.7.0.2.gep378 = 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 16, ptr %.fca.7.0.2.gep378, align 8, !tbaa !3
  %136 = call i64 @llvm.smax.i64(i64 %.fca.7.0.1.load112, i64 0)
  %137 = call ptr @llvm.stacksave()
  %138 = alloca i128, i64 %136, align 8
  call void @_QMqsortmodPi16qsort(ptr nonnull %138, ptr nonnull %3)
  %139 = shl i64 %136, 4
  %140 = call ptr @malloc(i64 %139)
  %.not415 = icmp slt i64 %.fca.7.0.1.load112, 1
  br i1 %.not415, label %._crit_edge406, label %.lr.ph405.preheader

.lr.ph405.preheader:                              ; preds = %._crit_edge403
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %140, ptr nonnull align 8 %138, i64 %139, i1 false), !tbaa !7
  br label %._crit_edge406

._crit_edge406:                                   ; preds = %.lr.ph405.preheader, %._crit_edge403
  %141 = add i64 %136, %98
  %.not390 = icmp sgt i64 %.1, %141
  br i1 %.not390, label %145, label %142

142:                                              ; preds = %._crit_edge406
  %143 = shl i64 %141, 5
  %144 = call ptr @realloc(ptr %104, i64 %143)
  br label %145

145:                                              ; preds = %142, %._crit_edge406
  %146 = phi ptr [ %144, %142 ], [ %104, %._crit_edge406 ]
  %147 = getelementptr i128, ptr %146, i64 %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %147, ptr align 1 %140, i64 %139, i1 false)
  br i1 %.not411, label %._crit_edge409, label %.lr.ph408.preheader

.lr.ph408.preheader:                              ; preds = %145
  %148 = add nsw i64 %14, -1
  %xtraiter441 = and i64 %14, 3
  %149 = icmp ult i64 %148, 3
  br i1 %149, label %._crit_edge409.loopexit.unr-lcssa, label %.lr.ph408.preheader.new

.lr.ph408.preheader.new:                          ; preds = %.lr.ph408.preheader
  %unroll_iter445 = and i64 %14, 9223372036854775804
  br label %.lr.ph408

.lr.ph408:                                        ; preds = %.lr.ph408, %.lr.ph408.preheader.new
  %150 = phi i64 [ 0, %.lr.ph408.preheader.new ], [ %163, %.lr.ph408 ]
  %niter446 = phi i64 [ 0, %.lr.ph408.preheader.new ], [ %niter446.next.3, %.lr.ph408 ]
  %151 = or i64 %150, 1
  %152 = getelementptr i128, ptr %146, i64 %150
  %153 = load i128, ptr %152, align 8, !tbaa !7
  %154 = getelementptr i128, ptr %0, i64 %150
  store i128 %153, ptr %154, align 8, !tbaa !7
  %155 = or i64 %150, 2
  %156 = getelementptr i128, ptr %146, i64 %151
  %157 = load i128, ptr %156, align 8, !tbaa !7
  %158 = getelementptr i128, ptr %0, i64 %151
  store i128 %157, ptr %158, align 8, !tbaa !7
  %159 = or i64 %150, 3
  %160 = getelementptr i128, ptr %146, i64 %155
  %161 = load i128, ptr %160, align 8, !tbaa !7
  %162 = getelementptr i128, ptr %0, i64 %155
  store i128 %161, ptr %162, align 8, !tbaa !7
  %163 = add nuw nsw i64 %150, 4
  %164 = getelementptr i128, ptr %146, i64 %159
  %165 = load i128, ptr %164, align 8, !tbaa !7
  %166 = getelementptr i128, ptr %0, i64 %159
  store i128 %165, ptr %166, align 8, !tbaa !7
  %niter446.next.3 = add i64 %niter446, 4
  %niter446.ncmp.3 = icmp eq i64 %niter446.next.3, %unroll_iter445
  br i1 %niter446.ncmp.3, label %._crit_edge409.loopexit.unr-lcssa, label %.lr.ph408

._crit_edge409.loopexit.unr-lcssa:                ; preds = %.lr.ph408, %.lr.ph408.preheader
  %.unr443 = phi i64 [ 0, %.lr.ph408.preheader ], [ %163, %.lr.ph408 ]
  %lcmp.mod444.not = icmp eq i64 %xtraiter441, 0
  br i1 %lcmp.mod444.not, label %._crit_edge409, label %.lr.ph408.epil

.lr.ph408.epil:                                   ; preds = %._crit_edge409.loopexit.unr-lcssa, %.lr.ph408.epil
  %167 = phi i64 [ %168, %.lr.ph408.epil ], [ %.unr443, %._crit_edge409.loopexit.unr-lcssa ]
  %epil.iter442 = phi i64 [ %epil.iter442.next, %.lr.ph408.epil ], [ 0, %._crit_edge409.loopexit.unr-lcssa ]
  %168 = add nuw nsw i64 %167, 1
  %169 = getelementptr i128, ptr %146, i64 %167
  %170 = load i128, ptr %169, align 8, !tbaa !7
  %171 = getelementptr i128, ptr %0, i64 %167
  store i128 %170, ptr %171, align 8, !tbaa !7
  %epil.iter442.next = add i64 %epil.iter442, 1
  %epil.iter442.cmp.not = icmp eq i64 %epil.iter442.next, %xtraiter441
  br i1 %epil.iter442.cmp.not, label %._crit_edge409, label %.lr.ph408.epil, !llvm.loop !9

._crit_edge409:                                   ; preds = %._crit_edge409.loopexit.unr-lcssa, %.lr.ph408.epil, %145
  call void @free(ptr %146)
  call void @free(ptr %140)
  call void @llvm.stackrestore(ptr %137)
  call void @free(ptr %.fca.0.load88)
  call void @free(ptr %107)
  call void @free(ptr %96)
  call void @free(ptr %.fca.0.load38)
  call void @free(ptr %68)
  call void @free(ptr %59)
  call void @llvm.stackrestore(ptr %56)
  call void @free(ptr %.fca.0.load)
  call void @free(ptr %29)
  br label %.loopexit

172:                                              ; preds = %172, %.lr.ph.new
  %173 = phi i64 [ 0, %.lr.ph.new ], [ %189, %172 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %172 ]
  %174 = or i64 %173, 1
  %175 = mul i64 %18, %173
  %176 = getelementptr i8, ptr %19, i64 %175
  %177 = load i128, ptr %176, align 8, !tbaa !7
  %178 = getelementptr i128, ptr %0, i64 %173
  store i128 %177, ptr %178, align 8, !tbaa !7
  %179 = or i64 %173, 2
  %180 = mul i64 %18, %174
  %181 = getelementptr i8, ptr %19, i64 %180
  %182 = load i128, ptr %181, align 8, !tbaa !7
  %183 = getelementptr i128, ptr %0, i64 %174
  store i128 %182, ptr %183, align 8, !tbaa !7
  %184 = or i64 %173, 3
  %185 = mul i64 %18, %179
  %186 = getelementptr i8, ptr %19, i64 %185
  %187 = load i128, ptr %186, align 8, !tbaa !7
  %188 = getelementptr i128, ptr %0, i64 %179
  store i128 %187, ptr %188, align 8, !tbaa !7
  %189 = add nuw nsw i64 %173, 4
  %190 = mul i64 %18, %184
  %191 = getelementptr i8, ptr %19, i64 %190
  %192 = load i128, ptr %191, align 8, !tbaa !7
  %193 = getelementptr i128, ptr %0, i64 %184
  store i128 %192, ptr %193, align 8, !tbaa !7
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %172

.loopexit.loopexit.unr-lcssa:                     ; preds = %172, %.lr.ph
  %.unr = phi i64 [ 0, %.lr.ph ], [ %189, %172 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %194 = phi i64 [ %195, %.epil.preheader ], [ %.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %195 = add nuw nsw i64 %194, 1
  %196 = mul i64 %18, %194
  %197 = getelementptr i8, ptr %19, i64 %196
  %198 = load i128, ptr %197, align 8, !tbaa !7
  %199 = getelementptr i128, ptr %0, i64 %194
  store i128 %198, ptr %199, align 8, !tbaa !7
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !11

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %._crit_edge409
  ret void
}

define void @_QMqsortmodPi4qsort(ptr nocapture writeonly %0, ptr %1) local_unnamed_addr {
  %3 = ptrtoint ptr %0 to i64
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %6 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %7 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %8 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %9 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %10 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %11 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %12 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %13 = load i64, ptr %12, align 8, !tbaa !3
  %14 = tail call i64 @llvm.smax.i64(i64 %13, i64 0)
  %15 = trunc i64 %13 to i32
  %16 = icmp sgt i32 %15, 1
  br i1 %16, label %22, label %.preheader

.preheader:                                       ; preds = %2
  %.not390 = icmp slt i64 %13, 1
  br i1 %.not390, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %17 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %18 = load i64, ptr %17, align 8, !tbaa !3
  %19 = load ptr, ptr %1, align 8, !tbaa !3
  %20 = add nsw i64 %14, -1
  %xtraiter = and i64 %14, 3
  %21 = icmp ult i64 %20, 3
  br i1 %21, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 9223372036854775804
  br label %182

22:                                               ; preds = %2
  %23 = tail call dereferenceable_or_null(128) ptr @malloc(i64 128)
  %24 = load ptr, ptr %1, align 8, !tbaa !3
  %25 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %26 = load i32, ptr %24, align 4, !tbaa !7
  %27 = shl i64 %13, 2
  %28 = tail call ptr @malloc(i64 %27)
  %29 = icmp sgt i64 %13, 0
  br i1 %29, label %.lr.ph371, label %._crit_edge

.lr.ph371:                                        ; preds = %22
  %30 = load i64, ptr %25, align 8, !tbaa !3
  %xtraiter401 = and i64 %13, 1
  %31 = icmp eq i64 %13, 1
  br i1 %31, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph371.new

.lr.ph371.new:                                    ; preds = %.lr.ph371
  %unroll_iter405 = and i64 %13, -2
  br label %32

32:                                               ; preds = %32, %.lr.ph371.new
  %33 = phi i64 [ 0, %.lr.ph371.new ], [ %41, %32 ]
  %niter406 = phi i64 [ 0, %.lr.ph371.new ], [ %niter406.next.1, %32 ]
  %34 = or i64 %33, 1
  %35 = mul i64 %30, %33
  %36 = getelementptr i8, ptr %24, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !7
  %38 = icmp sgt i32 %37, %26
  %39 = zext i1 %38 to i32
  %40 = getelementptr i32, ptr %28, i64 %33
  store i32 %39, ptr %40, align 4, !tbaa !7
  %41 = add nuw nsw i64 %33, 2
  %42 = mul i64 %30, %34
  %43 = getelementptr i8, ptr %24, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !7
  %45 = icmp sgt i32 %44, %26
  %46 = zext i1 %45 to i32
  %47 = getelementptr i32, ptr %28, i64 %34
  store i32 %46, ptr %47, align 4, !tbaa !7
  %niter406.next.1 = add i64 %niter406, 2
  %niter406.ncmp.1 = icmp eq i64 %niter406.next.1, %unroll_iter405
  br i1 %niter406.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %32

._crit_edge.loopexit.unr-lcssa:                   ; preds = %32, %.lr.ph371
  %.unr403 = phi i64 [ 0, %.lr.ph371 ], [ %41, %32 ]
  %lcmp.mod404.not = icmp eq i64 %xtraiter401, 0
  br i1 %lcmp.mod404.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %48 = mul i64 %30, %.unr403
  %49 = getelementptr i8, ptr %24, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !7
  %51 = icmp sgt i32 %50, %26
  %52 = zext i1 %51 to i32
  %53 = getelementptr i32, ptr %28, i64 %.unr403
  store i32 %52, ptr %53, align 4, !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %22
  store ptr %28, ptr %8, align 8, !tbaa !3
  %.fca.1.gep120 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep120, align 8, !tbaa !3
  %.fca.2.gep122 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep122, align 8, !tbaa !3
  %.fca.3.gep124 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep124, align 4, !tbaa !3
  %.fca.4.gep126 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep126, align 1, !tbaa !3
  %.fca.5.gep128 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep128, align 2, !tbaa !3
  %.fca.6.gep130 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep130, align 1, !tbaa !3
  %.fca.7.0.0.gep132 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep132, align 8, !tbaa !3
  %.fca.7.0.1.gep134 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 1
  store i64 %13, ptr %.fca.7.0.1.gep134, align 8, !tbaa !3
  %.fca.7.0.2.gep136 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep136, align 8, !tbaa !3
  store ptr null, ptr %11, align 8, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %11, i64 0, i32 1
  store i64 4, 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 %11, 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 %11, 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 %11, i64 0, i32 4
  store i8 9, 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 %11, i64 0, i32 5
  store i8 2, 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 %11, 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 %11, 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 %11, i64 0, i32 7, i64 0, i64 1
  store i64 0, 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 %11, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !3
  %54 = call {} @_FortranAPack(ptr nonnull %11, ptr nonnull %1, ptr nonnull %8, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 35)
  %.fca.0.load = load ptr, ptr %11, align 8, !tbaa !3
  %.fca.7.0.0.load = load i64, ptr %.fca.7.0.0.gep, align 8, !tbaa !3
  %.fca.7.0.1.load = load i64, ptr %.fca.7.0.1.gep, align 8, !tbaa !3
  %55 = icmp eq i64 %.fca.7.0.1.load, 0
  %56 = select i1 %55, i64 1, i64 %.fca.7.0.0.load
  store ptr %.fca.0.load, ptr %7, align 8, !tbaa !3
  %.fca.1.gep262 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep262, align 8, !tbaa !3
  %.fca.2.gep264 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep264, align 8, !tbaa !3
  %.fca.3.gep266 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep266, align 4, !tbaa !3
  %.fca.4.gep268 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep268, align 1, !tbaa !3
  %.fca.5.gep270 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep270, align 2, !tbaa !3
  %.fca.6.gep272 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep272, align 1, !tbaa !3
  %.fca.7.0.0.gep274 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 0
  store i64 %56, ptr %.fca.7.0.0.gep274, align 8, !tbaa !3
  %.fca.7.0.1.gep276 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 1
  store i64 %.fca.7.0.1.load, ptr %.fca.7.0.1.gep276, align 8, !tbaa !3
  %.fca.7.0.2.gep278 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %7, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep278, align 8, !tbaa !3
  %57 = call i64 @llvm.smax.i64(i64 %.fca.7.0.1.load, i64 0)
  %58 = call ptr @llvm.stacksave()
  %59 = alloca i32, i64 %57, align 4
  call void @_QMqsortmodPi4qsort(ptr nonnull %59, ptr nonnull %7)
  %60 = shl i64 %57, 2
  %61 = call ptr @malloc(i64 %60)
  %.not391 = icmp slt i64 %.fca.7.0.1.load, 1
  br i1 %.not391, label %._crit_edge374, label %.lr.ph373.preheader

.lr.ph373.preheader:                              ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr nonnull align 4 %59, i64 %60, i1 false), !tbaa !7
  br label %._crit_edge374

._crit_edge374:                                   ; preds = %.lr.ph373.preheader, %._crit_edge
  %62 = icmp ugt i64 %57, 31
  br i1 %62, label %63, label %67

63:                                               ; preds = %._crit_edge374
  %64 = shl nuw i64 %57, 1
  %65 = shl i64 %57, 3
  %66 = call ptr @realloc(ptr %23, i64 %65)
  br label %67

67:                                               ; preds = %63, %._crit_edge374
  %.0 = phi i64 [ %64, %63 ], [ 32, %._crit_edge374 ]
  %68 = phi ptr [ %66, %63 ], [ %23, %._crit_edge374 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %68, ptr align 1 %61, i64 %60, i1 false)
  %69 = load i32, ptr %24, align 4, !tbaa !7
  %70 = call ptr @malloc(i64 %27)
  br i1 %29, label %.lr.ph376, label %._crit_edge377

.lr.ph376:                                        ; preds = %67
  %71 = load i64, ptr %25, align 8, !tbaa !3
  %72 = load ptr, ptr %1, align 8, !tbaa !3
  %xtraiter408 = and i64 %13, 1
  %73 = icmp eq i64 %13, 1
  br i1 %73, label %._crit_edge377.loopexit.unr-lcssa, label %.lr.ph376.new

.lr.ph376.new:                                    ; preds = %.lr.ph376
  %unroll_iter412 = and i64 %13, -2
  br label %74

74:                                               ; preds = %74, %.lr.ph376.new
  %75 = phi i64 [ 0, %.lr.ph376.new ], [ %83, %74 ]
  %niter413 = phi i64 [ 0, %.lr.ph376.new ], [ %niter413.next.1, %74 ]
  %76 = or i64 %75, 1
  %77 = mul i64 %71, %75
  %78 = getelementptr i8, ptr %72, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !7
  %80 = icmp eq i32 %79, %69
  %81 = zext i1 %80 to i32
  %82 = getelementptr i32, ptr %70, i64 %75
  store i32 %81, ptr %82, align 4, !tbaa !7
  %83 = add nuw nsw i64 %75, 2
  %84 = mul i64 %71, %76
  %85 = getelementptr i8, ptr %72, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !7
  %87 = icmp eq i32 %86, %69
  %88 = zext i1 %87 to i32
  %89 = getelementptr i32, ptr %70, i64 %76
  store i32 %88, ptr %89, align 4, !tbaa !7
  %niter413.next.1 = add i64 %niter413, 2
  %niter413.ncmp.1 = icmp eq i64 %niter413.next.1, %unroll_iter412
  br i1 %niter413.ncmp.1, label %._crit_edge377.loopexit.unr-lcssa, label %74

._crit_edge377.loopexit.unr-lcssa:                ; preds = %74, %.lr.ph376
  %.unr410 = phi i64 [ 0, %.lr.ph376 ], [ %83, %74 ]
  %lcmp.mod411.not = icmp eq i64 %xtraiter408, 0
  br i1 %lcmp.mod411.not, label %._crit_edge377, label %._crit_edge377.loopexit.epilog-lcssa

._crit_edge377.loopexit.epilog-lcssa:             ; preds = %._crit_edge377.loopexit.unr-lcssa
  %90 = mul i64 %71, %.unr410
  %91 = getelementptr i8, ptr %72, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !7
  %93 = icmp eq i32 %92, %69
  %94 = zext i1 %93 to i32
  %95 = getelementptr i32, ptr %70, i64 %.unr410
  store i32 %94, ptr %95, align 4, !tbaa !7
  br label %._crit_edge377

._crit_edge377:                                   ; preds = %._crit_edge377.loopexit.epilog-lcssa, %._crit_edge377.loopexit.unr-lcssa, %67
  store ptr %70, ptr %6, align 8, !tbaa !3
  %.fca.1.gep282 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep282, align 8, !tbaa !3
  %.fca.2.gep284 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep284, align 8, !tbaa !3
  %.fca.3.gep286 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep286, align 4, !tbaa !3
  %.fca.4.gep288 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep288, align 1, !tbaa !3
  %.fca.5.gep290 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep290, align 2, !tbaa !3
  %.fca.6.gep292 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep292, align 1, !tbaa !3
  %.fca.7.0.0.gep294 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep294, align 8, !tbaa !3
  %.fca.7.0.1.gep296 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 1
  store i64 %13, ptr %.fca.7.0.1.gep296, align 8, !tbaa !3
  %.fca.7.0.2.gep298 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep298, align 8, !tbaa !3
  store ptr null, ptr %10, align 8, !tbaa !3
  %.fca.1.gep20 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep20, align 8, !tbaa !3
  %.fca.2.gep22 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep22, align 8, !tbaa !3
  %.fca.3.gep24 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep24, align 4, !tbaa !3
  %.fca.4.gep26 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep26, align 1, !tbaa !3
  %.fca.5.gep28 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep28, align 2, !tbaa !3
  %.fca.6.gep30 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep30, align 1, !tbaa !3
  %.fca.7.0.0.gep32 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep32, align 8, !tbaa !3
  %.fca.7.0.1.gep34 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.fca.7.0.1.gep34, align 8, !tbaa !3
  %.fca.7.0.2.gep36 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep36, align 8, !tbaa !3
  %96 = call {} @_FortranAPack(ptr nonnull %10, ptr nonnull %1, ptr nonnull %6, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 35)
  %.fca.0.load38 = load ptr, ptr %10, align 8, !tbaa !3
  %.fca.7.0.1.load62 = load i64, ptr %.fca.7.0.1.gep34, align 8, !tbaa !3
  %97 = shl i64 %.fca.7.0.1.load62, 2
  %98 = call ptr @malloc(i64 %97)
  %99 = icmp sgt i64 %.fca.7.0.1.load62, 0
  br i1 %99, label %.lr.ph379.preheader, label %._crit_edge380

.lr.ph379.preheader:                              ; preds = %._crit_edge377
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 4 %.fca.0.load38, i64 %97, i1 false), !tbaa !7
  br label %._crit_edge380

._crit_edge380:                                   ; preds = %.lr.ph379.preheader, %._crit_edge377
  %100 = add i64 %.fca.7.0.1.load62, %57
  %.not = icmp sgt i64 %.0, %100
  br i1 %.not, label %105, label %101

101:                                              ; preds = %._crit_edge380
  %102 = shl i64 %100, 1
  %103 = shl i64 %100, 3
  %104 = call ptr @realloc(ptr %68, i64 %103)
  br label %105

105:                                              ; preds = %101, %._crit_edge380
  %.1 = phi i64 [ %102, %101 ], [ %.0, %._crit_edge380 ]
  %106 = phi ptr [ %104, %101 ], [ %68, %._crit_edge380 ]
  %107 = getelementptr i32, ptr %106, i64 %57
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %107, ptr align 1 %98, i64 %97, i1 false)
  %108 = load i32, ptr %24, align 4, !tbaa !7
  %109 = call ptr @malloc(i64 %27)
  br i1 %29, label %.lr.ph382, label %._crit_edge383

.lr.ph382:                                        ; preds = %105
  %110 = load i64, ptr %25, align 8, !tbaa !3
  %111 = load ptr, ptr %1, align 8, !tbaa !3
  %xtraiter415 = and i64 %13, 1
  %112 = icmp eq i64 %13, 1
  br i1 %112, label %._crit_edge383.loopexit.unr-lcssa, label %.lr.ph382.new

.lr.ph382.new:                                    ; preds = %.lr.ph382
  %unroll_iter419 = and i64 %13, -2
  br label %113

113:                                              ; preds = %113, %.lr.ph382.new
  %114 = phi i64 [ 0, %.lr.ph382.new ], [ %122, %113 ]
  %niter420 = phi i64 [ 0, %.lr.ph382.new ], [ %niter420.next.1, %113 ]
  %115 = or i64 %114, 1
  %116 = mul i64 %110, %114
  %117 = getelementptr i8, ptr %111, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !7
  %119 = icmp slt i32 %118, %108
  %120 = zext i1 %119 to i32
  %121 = getelementptr i32, ptr %109, i64 %114
  store i32 %120, ptr %121, align 4, !tbaa !7
  %122 = add nuw nsw i64 %114, 2
  %123 = mul i64 %110, %115
  %124 = getelementptr i8, ptr %111, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !7
  %126 = icmp slt i32 %125, %108
  %127 = zext i1 %126 to i32
  %128 = getelementptr i32, ptr %109, i64 %115
  store i32 %127, ptr %128, align 4, !tbaa !7
  %niter420.next.1 = add i64 %niter420, 2
  %niter420.ncmp.1 = icmp eq i64 %niter420.next.1, %unroll_iter419
  br i1 %niter420.ncmp.1, label %._crit_edge383.loopexit.unr-lcssa, label %113

._crit_edge383.loopexit.unr-lcssa:                ; preds = %113, %.lr.ph382
  %.unr417 = phi i64 [ 0, %.lr.ph382 ], [ %122, %113 ]
  %lcmp.mod418.not = icmp eq i64 %xtraiter415, 0
  br i1 %lcmp.mod418.not, label %._crit_edge383, label %._crit_edge383.loopexit.epilog-lcssa

._crit_edge383.loopexit.epilog-lcssa:             ; preds = %._crit_edge383.loopexit.unr-lcssa
  %129 = mul i64 %110, %.unr417
  %130 = getelementptr i8, ptr %111, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !7
  %132 = icmp slt i32 %131, %108
  %133 = zext i1 %132 to i32
  %134 = getelementptr i32, ptr %109, i64 %.unr417
  store i32 %133, ptr %134, align 4, !tbaa !7
  br label %._crit_edge383

._crit_edge383:                                   ; preds = %._crit_edge383.loopexit.epilog-lcssa, %._crit_edge383.loopexit.unr-lcssa, %105
  store ptr %109, ptr %5, align 8, !tbaa !3
  %.fca.1.gep312 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep312, align 8, !tbaa !3
  %.fca.2.gep314 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep314, align 8, !tbaa !3
  %.fca.3.gep316 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep316, align 4, !tbaa !3
  %.fca.4.gep318 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep318, align 1, !tbaa !3
  %.fca.5.gep320 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep320, align 2, !tbaa !3
  %.fca.6.gep322 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep322, align 1, !tbaa !3
  %.fca.7.0.0.gep324 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep324, align 8, !tbaa !3
  %.fca.7.0.1.gep326 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 1
  store i64 %13, ptr %.fca.7.0.1.gep326, align 8, !tbaa !3
  %.fca.7.0.2.gep328 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep328, align 8, !tbaa !3
  store ptr null, ptr %9, align 8, !tbaa !3
  %.fca.1.gep70 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep70, align 8, !tbaa !3
  %.fca.2.gep72 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep72, align 8, !tbaa !3
  %.fca.3.gep74 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep74, align 4, !tbaa !3
  %.fca.4.gep76 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep76, align 1, !tbaa !3
  %.fca.5.gep78 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep78, align 2, !tbaa !3
  %.fca.6.gep80 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep80, align 1, !tbaa !3
  %.fca.7.0.0.gep82 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep82, align 8, !tbaa !3
  %.fca.7.0.1.gep84 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.fca.7.0.1.gep84, align 8, !tbaa !3
  %.fca.7.0.2.gep86 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep86, align 8, !tbaa !3
  %135 = call {} @_FortranAPack(ptr nonnull %9, ptr nonnull %1, ptr nonnull %5, ptr null, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 35)
  %.fca.0.load88 = load ptr, ptr %9, align 8, !tbaa !3
  %.fca.7.0.0.load109 = load i64, ptr %.fca.7.0.0.gep82, align 8, !tbaa !3
  %.fca.7.0.1.load112 = load i64, ptr %.fca.7.0.1.gep84, align 8, !tbaa !3
  %136 = icmp eq i64 %.fca.7.0.1.load112, 0
  %137 = select i1 %136, i64 1, i64 %.fca.7.0.0.load109
  store ptr %.fca.0.load88, ptr %4, align 8, !tbaa !3
  %.fca.1.gep342 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep342, align 8, !tbaa !3
  %.fca.2.gep344 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep344, align 8, !tbaa !3
  %.fca.3.gep346 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep346, align 4, !tbaa !3
  %.fca.4.gep348 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep348, align 1, !tbaa !3
  %.fca.5.gep350 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep350, align 2, !tbaa !3
  %.fca.6.gep352 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep352, align 1, !tbaa !3
  %.fca.7.0.0.gep354 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 0
  store i64 %137, ptr %.fca.7.0.0.gep354, align 8, !tbaa !3
  %.fca.7.0.1.gep356 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 1
  store i64 %.fca.7.0.1.load112, ptr %.fca.7.0.1.gep356, align 8, !tbaa !3
  %.fca.7.0.2.gep358 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep358, align 8, !tbaa !3
  %138 = call i64 @llvm.smax.i64(i64 %.fca.7.0.1.load112, i64 0)
  %139 = call ptr @llvm.stacksave()
  %140 = alloca i32, i64 %138, align 4
  call void @_QMqsortmodPi4qsort(ptr nonnull %140, ptr nonnull %4)
  %141 = shl i64 %138, 2
  %142 = call ptr @malloc(i64 %141)
  %.not392 = icmp slt i64 %.fca.7.0.1.load112, 1
  br i1 %.not392, label %._crit_edge386, label %.lr.ph385.preheader

.lr.ph385.preheader:                              ; preds = %._crit_edge383
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %142, ptr nonnull align 4 %140, i64 %141, i1 false), !tbaa !7
  br label %._crit_edge386

._crit_edge386:                                   ; preds = %.lr.ph385.preheader, %._crit_edge383
  %143 = add i64 %138, %100
  %.not370 = icmp sgt i64 %.1, %143
  br i1 %.not370, label %147, label %144

144:                                              ; preds = %._crit_edge386
  %145 = shl i64 %143, 3
  %146 = call ptr @realloc(ptr %106, i64 %145)
  br label %147

147:                                              ; preds = %144, %._crit_edge386
  %148 = phi ptr [ %146, %144 ], [ %106, %._crit_edge386 ]
  %149 = getelementptr i32, ptr %148, i64 %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %149, ptr align 1 %142, i64 %141, i1 false)
  %.not393 = icmp slt i64 %13, 1
  br i1 %.not393, label %._crit_edge389, label %.lr.ph388.preheader

.lr.ph388.preheader:                              ; preds = %147
  %150 = ptrtoint ptr %148 to i64
  %min.iters.check = icmp ult i64 %14, 8
  %151 = sub i64 %3, %150
  %diff.check = icmp ult i64 %151, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph388.preheader399, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph388.preheader
  %n.vec = and i64 %14, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %152 = getelementptr i32, ptr %148, i64 %index
  %wide.load = load <4 x i32>, ptr %152, align 4, !tbaa !7
  %153 = getelementptr i32, ptr %152, i64 4
  %wide.load398 = load <4 x i32>, ptr %153, align 4, !tbaa !7
  %154 = getelementptr i32, ptr %0, i64 %index
  store <4 x i32> %wide.load, ptr %154, align 4, !tbaa !7
  %155 = getelementptr i32, ptr %154, i64 4
  store <4 x i32> %wide.load398, ptr %155, align 4, !tbaa !7
  %index.next = add nuw i64 %index, 8
  %156 = icmp eq i64 %index.next, %n.vec
  br i1 %156, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %14, %n.vec
  br i1 %cmp.n, label %._crit_edge389, label %.lr.ph388.preheader399

.lr.ph388.preheader399:                           ; preds = %.lr.ph388.preheader, %middle.block
  %.ph = phi i64 [ 0, %.lr.ph388.preheader ], [ %n.vec, %middle.block ]
  %157 = xor i64 %.ph, -1
  %158 = add nsw i64 %14, %157
  %xtraiter421 = and i64 %14, 3
  %lcmp.mod422.not = icmp eq i64 %xtraiter421, 0
  br i1 %lcmp.mod422.not, label %.lr.ph388.prol.loopexit, label %.lr.ph388.prol

.lr.ph388.prol:                                   ; preds = %.lr.ph388.preheader399, %.lr.ph388.prol
  %159 = phi i64 [ %160, %.lr.ph388.prol ], [ %.ph, %.lr.ph388.preheader399 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph388.prol ], [ 0, %.lr.ph388.preheader399 ]
  %160 = add nuw nsw i64 %159, 1
  %161 = getelementptr i32, ptr %148, i64 %159
  %162 = load i32, ptr %161, align 4, !tbaa !7
  %163 = getelementptr i32, ptr %0, i64 %159
  store i32 %162, ptr %163, align 4, !tbaa !7
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter421
  br i1 %prol.iter.cmp.not, label %.lr.ph388.prol.loopexit, label %.lr.ph388.prol, !llvm.loop !15

.lr.ph388.prol.loopexit:                          ; preds = %.lr.ph388.prol, %.lr.ph388.preheader399
  %.unr423 = phi i64 [ %.ph, %.lr.ph388.preheader399 ], [ %160, %.lr.ph388.prol ]
  %164 = icmp ult i64 %158, 3
  br i1 %164, label %._crit_edge389, label %.lr.ph388

.lr.ph388:                                        ; preds = %.lr.ph388.prol.loopexit, %.lr.ph388
  %165 = phi i64 [ %178, %.lr.ph388 ], [ %.unr423, %.lr.ph388.prol.loopexit ]
  %166 = add nuw nsw i64 %165, 1
  %167 = getelementptr i32, ptr %148, i64 %165
  %168 = load i32, ptr %167, align 4, !tbaa !7
  %169 = getelementptr i32, ptr %0, i64 %165
  store i32 %168, ptr %169, align 4, !tbaa !7
  %170 = add nuw nsw i64 %165, 2
  %171 = getelementptr i32, ptr %148, i64 %166
  %172 = load i32, ptr %171, align 4, !tbaa !7
  %173 = getelementptr i32, ptr %0, i64 %166
  store i32 %172, ptr %173, align 4, !tbaa !7
  %174 = add nuw nsw i64 %165, 3
  %175 = getelementptr i32, ptr %148, i64 %170
  %176 = load i32, ptr %175, align 4, !tbaa !7
  %177 = getelementptr i32, ptr %0, i64 %170
  store i32 %176, ptr %177, align 4, !tbaa !7
  %178 = add nuw nsw i64 %165, 4
  %179 = getelementptr i32, ptr %148, i64 %174
  %180 = load i32, ptr %179, align 4, !tbaa !7
  %181 = getelementptr i32, ptr %0, i64 %174
  store i32 %180, ptr %181, align 4, !tbaa !7
  %exitcond397.not.3 = icmp eq i64 %178, %14
  br i1 %exitcond397.not.3, label %._crit_edge389, label %.lr.ph388, !llvm.loop !16

._crit_edge389:                                   ; preds = %.lr.ph388.prol.loopexit, %.lr.ph388, %middle.block, %147
  call void @free(ptr %148)
  call void @free(ptr %142)
  call void @llvm.stackrestore(ptr %139)
  call void @free(ptr %.fca.0.load88)
  call void @free(ptr %109)
  call void @free(ptr %98)
  call void @free(ptr %.fca.0.load38)
  call void @free(ptr %70)
  call void @free(ptr %61)
  call void @llvm.stackrestore(ptr %58)
  call void @free(ptr %.fca.0.load)
  call void @free(ptr %28)
  br label %.loopexit

182:                                              ; preds = %182, %.lr.ph.new
  %183 = phi i64 [ 0, %.lr.ph.new ], [ %199, %182 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %182 ]
  %184 = or i64 %183, 1
  %185 = mul i64 %18, %183
  %186 = getelementptr i8, ptr %19, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !7
  %188 = getelementptr i32, ptr %0, i64 %183
  store i32 %187, ptr %188, align 4, !tbaa !7
  %189 = or i64 %183, 2
  %190 = mul i64 %18, %184
  %191 = getelementptr i8, ptr %19, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !7
  %193 = getelementptr i32, ptr %0, i64 %184
  store i32 %192, ptr %193, align 4, !tbaa !7
  %194 = or i64 %183, 3
  %195 = mul i64 %18, %189
  %196 = getelementptr i8, ptr %19, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !7
  %198 = getelementptr i32, ptr %0, i64 %189
  store i32 %197, ptr %198, align 4, !tbaa !7
  %199 = add nuw nsw i64 %183, 4
  %200 = mul i64 %18, %194
  %201 = getelementptr i8, ptr %19, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !7
  %203 = getelementptr i32, ptr %0, i64 %194
  store i32 %202, ptr %203, align 4, !tbaa !7
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %182

.loopexit.loopexit.unr-lcssa:                     ; preds = %182, %.lr.ph
  %.unr = phi i64 [ 0, %.lr.ph ], [ %199, %182 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %204 = phi i64 [ %205, %.epil.preheader ], [ %.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %205 = add nuw nsw i64 %204, 1
  %206 = mul i64 %18, %204
  %207 = getelementptr i8, ptr %19, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !7
  %209 = getelementptr i32, ptr %0, i64 %204
  store i32 %208, ptr %209, align 4, !tbaa !7
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !17

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %._crit_edge389
  ret void
}

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 i128, align 8
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 50)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 16)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %7 = load i128, ptr %3, align 8, !tbaa !7
  %8 = trunc i128 %7 to i64
  %9 = call i64 @llvm.smax.i64(i64 %8, i64 0)
  %10 = shl i64 %9, 4
  %11 = call ptr @malloc(i64 %10)
  store ptr %11, ptr @_QFEa.0, align 8, !tbaa !3
  store i64 %9, ptr @_QFEa.8, align 8, !tbaa !3
  %12 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 52)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !3
  %.unpack221.unpack.unpack223 = load i64, ptr @_QFEa.8, align 8, !tbaa !3
  %13 = call i64 @llvm.smax.i64(i64 %.unpack221.unpack.unpack223, i64 0)
  store ptr %.unpack, ptr %2, align 8, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 16, 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 %2, 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 %2, 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 %2, i64 0, i32 4
  store i8 11, 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 %2, 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 %2, 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 %2, 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 %2, 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 %2, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep, align 8, !tbaa !3
  %14 = call i1 @_FortranAioInputDescriptor(ptr %12, ptr nonnull %2)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %12)
  %.unpack226 = load ptr, ptr @_QFEa.0, align 8, !tbaa !3
  %.unpack233.unpack.unpack235 = load i64, ptr @_QFEa.8, align 8, !tbaa !3
  store ptr %.unpack226, ptr %1, align 8, !tbaa !3
  %.fca.1.gep74 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep74, align 8, !tbaa !3
  %.fca.2.gep76 = 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.gep76, align 8, !tbaa !3
  %.fca.3.gep78 = 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.gep78, align 4, !tbaa !3
  %.fca.4.gep80 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep80, align 1, !tbaa !3
  %.fca.5.gep82 = 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.gep82, align 2, !tbaa !3
  %.fca.6.gep84 = 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.gep84, align 1, !tbaa !3
  %.fca.7.0.0.gep86 = 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.gep86, align 8, !tbaa !3
  %.fca.7.0.1.gep88 = 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 %.unpack233.unpack.unpack235, ptr %.fca.7.0.1.gep88, align 8, !tbaa !3
  %.fca.7.0.2.gep90 = 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 16, ptr %.fca.7.0.2.gep90, align 8, !tbaa !3
  %16 = call i64 @llvm.smax.i64(i64 %.unpack233.unpack.unpack235, i64 0)
  %17 = call ptr @llvm.stacksave()
  %18 = alloca i128, i64 %16, align 8
  call void @_QMqsortmodPi16qsort(ptr nonnull %18, ptr nonnull %1)
  %.unpack238 = load ptr, ptr @_QFEa.0, align 8, !tbaa !3
  %.not = icmp eq ptr %.unpack238, null
  br i1 %.not, label %24, label %19

19:                                               ; preds = %0
  %.unpack245.unpack.unpack247 = load i64, ptr @_QFEa.8, align 8, !tbaa !3
  %.not272 = icmp eq i64 %.unpack245.unpack.unpack247, %16
  br i1 %.not272, label %.preheader, label %21

.preheader:                                       ; preds = %19
  %.not278 = icmp slt i64 %.unpack233.unpack.unpack235, 1
  br i1 %.not278, label %._crit_edge._crit_edge, label %.lr.ph274.preheader

.lr.ph274.preheader:                              ; preds = %.preheader
  %20 = shl nuw i64 %16, 4
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %.unpack238, ptr nonnull align 8 %18, i64 %20, i1 false), !tbaa !7
  br label %._crit_edge._crit_edge

21:                                               ; preds = %19
  %22 = shl i64 %16, 4
  %23 = call ptr @malloc(i64 %22)
  %.not277 = icmp slt i64 %.unpack233.unpack.unpack235, 1
  br i1 %.not277, label %.thread271, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr nonnull align 8 %18, i64 %22, i1 false), !tbaa !7
  br label %.thread271

24:                                               ; preds = %0
  %25 = shl i64 %16, 4
  %26 = call ptr @malloc(i64 %25)
  %.not279 = icmp slt i64 %.unpack233.unpack.unpack235, 1
  br i1 %.not279, label %.loopexit.thread, label %.lr.ph276.preheader

.lr.ph276.preheader:                              ; preds = %24
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr nonnull align 8 %18, i64 %25, i1 false), !tbaa !7
  br label %.loopexit.thread

.thread271:                                       ; preds = %21, %.lr.ph.preheader
  call void @free(ptr nonnull %.unpack238)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %24, %.lr.ph276.preheader, %.thread271
  %.ph284 = phi ptr [ %23, %.thread271 ], [ %26, %.lr.ph276.preheader ], [ %26, %24 ]
  store ptr %.ph284, ptr @_QFEa.0, align 8, !tbaa !3
  store i64 %16, ptr @_QFEa.8, align 8, !tbaa !3
  br label %._crit_edge._crit_edge

._crit_edge._crit_edge:                           ; preds = %.lr.ph274.preheader, %.preheader, %.loopexit.thread
  %.unpack250 = phi ptr [ %.ph284, %.loopexit.thread ], [ %.unpack238, %.preheader ], [ %.unpack238, %.lr.ph274.preheader ]
  call void @llvm.stackrestore(ptr %17)
  %27 = load i128, ptr %3, align 8, !tbaa !7
  br label %28

28:                                               ; preds = %30, %._crit_edge._crit_edge
  %.0201.in = phi i128 [ %27, %._crit_edge._crit_edge ], [ %.0201, %30 ]
  %.0 = phi i128 [ 1, %._crit_edge._crit_edge ], [ %35, %30 ]
  %.0201 = add i128 %.0201.in, -1
  %29 = icmp sgt i128 %.0201, 0
  br i1 %29, label %30, label %46

30:                                               ; preds = %28
  %31 = trunc i128 %.0 to i64
  %32 = add i64 %31, -1
  %33 = getelementptr i128, ptr %.unpack250, i64 %32
  %34 = load i128, ptr %33, align 8, !tbaa !7
  %35 = add nuw i128 %.0, 1
  %36 = trunc i128 %35 to i64
  %37 = add i64 %36, -1
  %38 = getelementptr i128, ptr %.unpack250, i64 %37
  %39 = load i128, ptr %38, align 8, !tbaa !7
  %40 = icmp eq i128 %34, %39
  br i1 %40, label %41, label %28

41:                                               ; preds = %30
  %42 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 59)
  %43 = call i1 @_FortranAioOutputAscii(ptr %42, ptr nonnull @_QQcl.4E4F, i64 2)
  %44 = call i32 @_FortranAioEndIoStatement(ptr %42)
  %45 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

46:                                               ; preds = %28
  %47 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.f02e25d83843ec98878b9426d724b8c0, i32 64)
  %48 = call i1 @_FortranAioOutputAscii(ptr %47, ptr nonnull @_QQcl.594553, i64 3)
  %49 = call i32 @_FortranAioEndIoStatement(ptr %47)
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave() #2

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore(ptr) #2

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 ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) 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) #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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !10}
