program ABC067B
    implicit none
    integer(8)::N,K,i
    integer(8)::result=0
    integer(8),allocatable,dimension(:)::L
    read(5,*)N,K
    allocate(L(N))
    read(5,*)(L(i),i=1,N)
    L=iqsort(L)

    do i=0,K-1
        result=result+L(N-i)
    end do
    print'(i0)',result
contains
    recursive function iqsort(ix) result(ires)
      integer(8), allocatable :: ires(:)
      integer(8), intent(in)  :: ix(:)
      integer :: k
      if (size(ix) <= 1) then 
        ires = ix
      else  
        k = ix(size(ix) / 2)
        ires = [iqsort(pack(ix, ix < k)), pack(ix, ix == k), iqsort(pack(ix, ix > k))] 
      end if
    end function iqsort
end program ABC067B
; 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"

@_QFEl.0 = internal unnamed_addr global ptr null
@_QFEl.8 = internal unnamed_addr global i64 0
@_QFEresult = internal unnamed_addr global i64 0
@_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7115/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

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 i64, align 8
  %4 = alloca i64, align 8
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 6)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 8)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %9 = load i64, ptr %4, align 8, !tbaa !3
  %10 = call i64 @llvm.smax.i64(i64 %9, i64 0)
  %11 = shl i64 %10, 3
  %12 = call ptr @malloc(i64 %11)
  store ptr %12, ptr @_QFEl.0, align 8, !tbaa !7
  store i64 %10, ptr @_QFEl.8, align 8, !tbaa !7
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 8)
  %14 = load i64, ptr %4, align 8, !tbaa !3
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %16 = phi i64 [ %20, %.lr.ph ], [ 1, %0 ]
  %.unpack347 = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %17 = add i64 %16, -1
  %18 = getelementptr i64, ptr %.unpack347, i64 %17
  %19 = call i1 @_FortranAioInputInteger(ptr %13, ptr %18, i32 8)
  %20 = add nuw i64 %16, 1
  %exitcond.not = icmp eq i64 %16, %14
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %21 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %.unpack = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %.unpack308.unpack.unpack310 = load i64, ptr @_QFEl.8, align 8, !tbaa !7
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep103 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep103, align 8, !tbaa !7
  %.fca.2.gep105 = 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.gep105, align 8, !tbaa !7
  %.fca.3.gep107 = 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.gep107, align 4, !tbaa !7
  %.fca.4.gep109 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep109, align 1, !tbaa !7
  %.fca.5.gep111 = 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.gep111, align 2, !tbaa !7
  %.fca.6.gep113 = 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.gep113, align 1, !tbaa !7
  %.fca.7.0.0.gep115 = 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.gep115, align 8, !tbaa !7
  %.fca.7.0.1.gep117 = 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 %.unpack308.unpack.unpack310, ptr %.fca.7.0.1.gep117, align 8, !tbaa !7
  %.fca.7.0.2.gep119 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep119, align 8, !tbaa !7
  call void @_QFPiqsort(ptr nonnull %2, ptr nonnull %1)
  %.fca.0.load = load ptr, ptr %2, align 8, !tbaa !7
  %.fca.0.load385 = ptrtoint ptr %.fca.0.load to i64
  %.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
  %.fca.7.0.1.load = load i64, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.unpack313 = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %.unpack313388 = ptrtoint ptr %.unpack313 to i64
  %.not = icmp eq ptr %.unpack313, null
  br i1 %.not, label %91, label %22

22:                                               ; preds = %._crit_edge
  %.unpack320.unpack.unpack322 = load i64, ptr @_QFEl.8, align 8, !tbaa !7
  %.not360 = icmp eq i64 %.unpack320.unpack.unpack322, %.fca.7.0.1.load
  br i1 %.not360, label %.preheader, label %38

.preheader:                                       ; preds = %22
  %23 = icmp sgt i64 %.fca.7.0.1.load, 0
  br i1 %23, label %.lr.ph365.preheader, label %._crit_edge366

.lr.ph365.preheader:                              ; preds = %.preheader
  %min.iters.check392 = icmp ult i64 %.fca.7.0.1.load, 6
  %24 = sub i64 %.unpack313388, %.fca.0.load385
  %diff.check389 = icmp ult i64 %24, 32
  %or.cond = select i1 %min.iters.check392, i1 true, i1 %diff.check389
  br i1 %or.cond, label %.lr.ph365.preheader443, label %vector.ph393

vector.ph393:                                     ; preds = %.lr.ph365.preheader
  %n.vec395 = and i64 %.fca.7.0.1.load, -4
  br label %vector.body398

vector.body398:                                   ; preds = %vector.body398, %vector.ph393
  %index399 = phi i64 [ 0, %vector.ph393 ], [ %index.next402, %vector.body398 ]
  %25 = getelementptr i64, ptr %.fca.0.load, i64 %index399
  %wide.load400 = load <2 x i64>, ptr %25, align 8, !tbaa !3
  %26 = getelementptr i64, ptr %25, i64 2
  %wide.load401 = load <2 x i64>, ptr %26, align 8, !tbaa !3
  %27 = getelementptr i64, ptr %.unpack313, i64 %index399
  store <2 x i64> %wide.load400, ptr %27, align 8, !tbaa !3
  %28 = getelementptr i64, ptr %27, i64 2
  store <2 x i64> %wide.load401, ptr %28, align 8, !tbaa !3
  %index.next402 = add nuw i64 %index399, 4
  %29 = icmp eq i64 %index.next402, %n.vec395
  br i1 %29, label %middle.block390, label %vector.body398, !llvm.loop !9

middle.block390:                                  ; preds = %vector.body398
  %cmp.n397 = icmp eq i64 %.fca.7.0.1.load, %n.vec395
  br i1 %cmp.n397, label %._crit_edge366.thread, label %.lr.ph365.preheader443

.lr.ph365.preheader443:                           ; preds = %.lr.ph365.preheader, %middle.block390
  %.ph444 = phi i64 [ 0, %.lr.ph365.preheader ], [ %n.vec395, %middle.block390 ]
  %30 = xor i64 %.ph444, -1
  %31 = add i64 %.fca.7.0.1.load, %30
  %xtraiter448 = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod449.not = icmp eq i64 %xtraiter448, 0
  br i1 %lcmp.mod449.not, label %.lr.ph365.prol.loopexit, label %.lr.ph365.prol

.lr.ph365.prol:                                   ; preds = %.lr.ph365.preheader443, %.lr.ph365.prol
  %32 = phi i64 [ %35, %.lr.ph365.prol ], [ %.ph444, %.lr.ph365.preheader443 ]
  %prol.iter450 = phi i64 [ %prol.iter450.next, %.lr.ph365.prol ], [ 0, %.lr.ph365.preheader443 ]
  %33 = getelementptr i64, ptr %.fca.0.load, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !3
  %35 = add nuw nsw i64 %32, 1
  %36 = getelementptr i64, ptr %.unpack313, i64 %32
  store i64 %34, ptr %36, align 8, !tbaa !3
  %prol.iter450.next = add i64 %prol.iter450, 1
  %prol.iter450.cmp.not = icmp eq i64 %prol.iter450.next, %xtraiter448
  br i1 %prol.iter450.cmp.not, label %.lr.ph365.prol.loopexit, label %.lr.ph365.prol, !llvm.loop !12

.lr.ph365.prol.loopexit:                          ; preds = %.lr.ph365.prol, %.lr.ph365.preheader443
  %.unr451 = phi i64 [ %.ph444, %.lr.ph365.preheader443 ], [ %35, %.lr.ph365.prol ]
  %37 = icmp ult i64 %31, 3
  br i1 %37, label %._crit_edge366.thread, label %.lr.ph365

38:                                               ; preds = %22
  %39 = shl i64 %.fca.7.0.1.load, 3
  %40 = call ptr @malloc(i64 %39)
  %41 = icmp sgt i64 %.fca.7.0.1.load, 0
  br i1 %41, label %.lr.ph364.preheader, label %.thread359

.lr.ph364.preheader:                              ; preds = %38
  %42 = ptrtoint ptr %40 to i64
  %min.iters.check = icmp ult i64 %.fca.7.0.1.load, 6
  %43 = sub i64 %42, %.fca.0.load385
  %diff.check = icmp ult i64 %43, 32
  %or.cond434 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond434, label %.lr.ph364.preheader445, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph364.preheader
  %n.vec = and i64 %.fca.7.0.1.load, -4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %44 = getelementptr i64, ptr %.fca.0.load, i64 %index
  %wide.load = load <2 x i64>, ptr %44, align 8, !tbaa !3
  %45 = getelementptr i64, ptr %44, i64 2
  %wide.load386 = load <2 x i64>, ptr %45, align 8, !tbaa !3
  %46 = getelementptr i64, ptr %40, i64 %index
  store <2 x i64> %wide.load, ptr %46, align 8, !tbaa !3
  %47 = getelementptr i64, ptr %46, i64 2
  store <2 x i64> %wide.load386, ptr %47, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.fca.7.0.1.load, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph364.preheader445

.lr.ph364.preheader445:                           ; preds = %.lr.ph364.preheader, %middle.block
  %.ph446 = phi i64 [ 0, %.lr.ph364.preheader ], [ %n.vec, %middle.block ]
  %49 = xor i64 %.ph446, -1
  %50 = add i64 %.fca.7.0.1.load, %49
  %xtraiter = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph364.prol.loopexit, label %.lr.ph364.prol

.lr.ph364.prol:                                   ; preds = %.lr.ph364.preheader445, %.lr.ph364.prol
  %51 = phi i64 [ %54, %.lr.ph364.prol ], [ %.ph446, %.lr.ph364.preheader445 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph364.prol ], [ 0, %.lr.ph364.preheader445 ]
  %52 = getelementptr i64, ptr %.fca.0.load, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !3
  %54 = add nuw nsw i64 %51, 1
  %55 = getelementptr i64, ptr %40, i64 %51
  store i64 %53, ptr %55, align 8, !tbaa !3
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph364.prol.loopexit, label %.lr.ph364.prol, !llvm.loop !15

.lr.ph364.prol.loopexit:                          ; preds = %.lr.ph364.prol, %.lr.ph364.preheader445
  %.unr = phi i64 [ %.ph446, %.lr.ph364.preheader445 ], [ %54, %.lr.ph364.prol ]
  %56 = icmp ult i64 %50, 3
  br i1 %56, label %.loopexit, label %.lr.ph364

.lr.ph364:                                        ; preds = %.lr.ph364.prol.loopexit, %.lr.ph364
  %57 = phi i64 [ %72, %.lr.ph364 ], [ %.unr, %.lr.ph364.prol.loopexit ]
  %58 = getelementptr i64, ptr %.fca.0.load, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !3
  %60 = add nuw nsw i64 %57, 1
  %61 = getelementptr i64, ptr %40, i64 %57
  store i64 %59, ptr %61, align 8, !tbaa !3
  %62 = getelementptr i64, ptr %.fca.0.load, i64 %60
  %63 = load i64, ptr %62, align 8, !tbaa !3
  %64 = add nuw nsw i64 %57, 2
  %65 = getelementptr i64, ptr %40, i64 %60
  store i64 %63, ptr %65, align 8, !tbaa !3
  %66 = getelementptr i64, ptr %.fca.0.load, i64 %64
  %67 = load i64, ptr %66, align 8, !tbaa !3
  %68 = add nuw nsw i64 %57, 3
  %69 = getelementptr i64, ptr %40, i64 %64
  store i64 %67, ptr %69, align 8, !tbaa !3
  %70 = getelementptr i64, ptr %.fca.0.load, i64 %68
  %71 = load i64, ptr %70, align 8, !tbaa !3
  %72 = add nuw nsw i64 %57, 4
  %73 = getelementptr i64, ptr %40, i64 %68
  store i64 %71, ptr %73, align 8, !tbaa !3
  %exitcond373.not.3 = icmp eq i64 %72, %.fca.7.0.1.load
  br i1 %exitcond373.not.3, label %.loopexit, label %.lr.ph364, !llvm.loop !16

.lr.ph365:                                        ; preds = %.lr.ph365.prol.loopexit, %.lr.ph365
  %74 = phi i64 [ %89, %.lr.ph365 ], [ %.unr451, %.lr.ph365.prol.loopexit ]
  %75 = getelementptr i64, ptr %.fca.0.load, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !3
  %77 = add nuw nsw i64 %74, 1
  %78 = getelementptr i64, ptr %.unpack313, i64 %74
  store i64 %76, ptr %78, align 8, !tbaa !3
  %79 = getelementptr i64, ptr %.fca.0.load, i64 %77
  %80 = load i64, ptr %79, align 8, !tbaa !3
  %81 = add nuw nsw i64 %74, 2
  %82 = getelementptr i64, ptr %.unpack313, i64 %77
  store i64 %80, ptr %82, align 8, !tbaa !3
  %83 = getelementptr i64, ptr %.fca.0.load, i64 %81
  %84 = load i64, ptr %83, align 8, !tbaa !3
  %85 = add nuw nsw i64 %74, 3
  %86 = getelementptr i64, ptr %.unpack313, i64 %81
  store i64 %84, ptr %86, align 8, !tbaa !3
  %87 = getelementptr i64, ptr %.fca.0.load, i64 %85
  %88 = load i64, ptr %87, align 8, !tbaa !3
  %89 = add nuw nsw i64 %74, 4
  %90 = getelementptr i64, ptr %.unpack313, i64 %85
  store i64 %88, ptr %90, align 8, !tbaa !3
  %exitcond374.not.3 = icmp eq i64 %89, %.fca.7.0.1.load
  br i1 %exitcond374.not.3, label %._crit_edge366.thread, label %.lr.ph365, !llvm.loop !17

91:                                               ; preds = %._crit_edge
  %92 = shl i64 %.fca.7.0.1.load, 3
  %93 = call ptr @malloc(i64 %92)
  %94 = icmp sgt i64 %.fca.7.0.1.load, 0
  br i1 %94, label %.lr.ph368.preheader, label %.loopexit.thread

.lr.ph368.preheader:                              ; preds = %91
  %95 = ptrtoint ptr %93 to i64
  %min.iters.check407 = icmp ult i64 %.fca.7.0.1.load, 6
  %96 = sub i64 %95, %.fca.0.load385
  %diff.check404 = icmp ult i64 %96, 32
  %or.cond435 = select i1 %min.iters.check407, i1 true, i1 %diff.check404
  br i1 %or.cond435, label %.lr.ph368.preheader441, label %vector.ph408

vector.ph408:                                     ; preds = %.lr.ph368.preheader
  %n.vec410 = and i64 %.fca.7.0.1.load, -4
  br label %vector.body413

vector.body413:                                   ; preds = %vector.body413, %vector.ph408
  %index414 = phi i64 [ 0, %vector.ph408 ], [ %index.next417, %vector.body413 ]
  %97 = getelementptr i64, ptr %.fca.0.load, i64 %index414
  %wide.load415 = load <2 x i64>, ptr %97, align 8, !tbaa !3
  %98 = getelementptr i64, ptr %97, i64 2
  %wide.load416 = load <2 x i64>, ptr %98, align 8, !tbaa !3
  %99 = getelementptr i64, ptr %93, i64 %index414
  store <2 x i64> %wide.load415, ptr %99, align 8, !tbaa !3
  %100 = getelementptr i64, ptr %99, i64 2
  store <2 x i64> %wide.load416, ptr %100, align 8, !tbaa !3
  %index.next417 = add nuw i64 %index414, 4
  %101 = icmp eq i64 %index.next417, %n.vec410
  br i1 %101, label %middle.block405, label %vector.body413, !llvm.loop !18

middle.block405:                                  ; preds = %vector.body413
  %cmp.n412 = icmp eq i64 %.fca.7.0.1.load, %n.vec410
  br i1 %cmp.n412, label %.loopexit, label %.lr.ph368.preheader441

.lr.ph368.preheader441:                           ; preds = %.lr.ph368.preheader, %middle.block405
  %.ph442 = phi i64 [ 0, %.lr.ph368.preheader ], [ %n.vec410, %middle.block405 ]
  %102 = xor i64 %.ph442, -1
  %103 = add i64 %.fca.7.0.1.load, %102
  %xtraiter452 = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod453.not = icmp eq i64 %xtraiter452, 0
  br i1 %lcmp.mod453.not, label %.lr.ph368.prol.loopexit, label %.lr.ph368.prol

.lr.ph368.prol:                                   ; preds = %.lr.ph368.preheader441, %.lr.ph368.prol
  %104 = phi i64 [ %107, %.lr.ph368.prol ], [ %.ph442, %.lr.ph368.preheader441 ]
  %prol.iter454 = phi i64 [ %prol.iter454.next, %.lr.ph368.prol ], [ 0, %.lr.ph368.preheader441 ]
  %105 = getelementptr i64, ptr %.fca.0.load, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !3
  %107 = add nuw nsw i64 %104, 1
  %108 = getelementptr i64, ptr %93, i64 %104
  store i64 %106, ptr %108, align 8, !tbaa !3
  %prol.iter454.next = add i64 %prol.iter454, 1
  %prol.iter454.cmp.not = icmp eq i64 %prol.iter454.next, %xtraiter452
  br i1 %prol.iter454.cmp.not, label %.lr.ph368.prol.loopexit, label %.lr.ph368.prol, !llvm.loop !19

.lr.ph368.prol.loopexit:                          ; preds = %.lr.ph368.prol, %.lr.ph368.preheader441
  %.unr455 = phi i64 [ %.ph442, %.lr.ph368.preheader441 ], [ %107, %.lr.ph368.prol ]
  %109 = icmp ult i64 %103, 3
  br i1 %109, label %.loopexit, label %.lr.ph368

.lr.ph368:                                        ; preds = %.lr.ph368.prol.loopexit, %.lr.ph368
  %110 = phi i64 [ %125, %.lr.ph368 ], [ %.unr455, %.lr.ph368.prol.loopexit ]
  %111 = getelementptr i64, ptr %.fca.0.load, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !3
  %113 = add nuw nsw i64 %110, 1
  %114 = getelementptr i64, ptr %93, i64 %110
  store i64 %112, ptr %114, align 8, !tbaa !3
  %115 = getelementptr i64, ptr %.fca.0.load, i64 %113
  %116 = load i64, ptr %115, align 8, !tbaa !3
  %117 = add nuw nsw i64 %110, 2
  %118 = getelementptr i64, ptr %93, i64 %113
  store i64 %116, ptr %118, align 8, !tbaa !3
  %119 = getelementptr i64, ptr %.fca.0.load, i64 %117
  %120 = load i64, ptr %119, align 8, !tbaa !3
  %121 = add nuw nsw i64 %110, 3
  %122 = getelementptr i64, ptr %93, i64 %117
  store i64 %120, ptr %122, align 8, !tbaa !3
  %123 = getelementptr i64, ptr %.fca.0.load, i64 %121
  %124 = load i64, ptr %123, align 8, !tbaa !3
  %125 = add nuw nsw i64 %110, 4
  %126 = getelementptr i64, ptr %93, i64 %121
  store i64 %124, ptr %126, align 8, !tbaa !3
  %exitcond375.not.3 = icmp eq i64 %125, %.fca.7.0.1.load
  br i1 %exitcond375.not.3, label %.loopexit, label %.lr.ph368, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph364.prol.loopexit, %.lr.ph364, %.lr.ph368.prol.loopexit, %.lr.ph368, %middle.block, %middle.block405
  %.ph = phi ptr [ %93, %middle.block405 ], [ %40, %middle.block ], [ %93, %.lr.ph368 ], [ %93, %.lr.ph368.prol.loopexit ], [ %40, %.lr.ph364 ], [ %40, %.lr.ph364.prol.loopexit ]
  br i1 %.not, label %.loopexit.thread, label %.thread359

.thread359:                                       ; preds = %38, %.loopexit
  %.ph381 = phi ptr [ %.ph, %.loopexit ], [ %40, %38 ]
  call void @free(ptr nonnull %.unpack313)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %91, %.thread359, %.loopexit
  %.ph378 = phi ptr [ %.ph381, %.thread359 ], [ %.ph, %.loopexit ], [ %93, %91 ]
  store ptr %.ph378, ptr @_QFEl.0, align 8, !tbaa !7
  store i64 %.fca.7.0.1.load, ptr @_QFEl.8, align 8, !tbaa !7
  br label %._crit_edge366

._crit_edge366:                                   ; preds = %.preheader, %.loopexit.thread
  %.not325 = icmp eq ptr %.fca.0.load, null
  br i1 %.not325, label %127, label %._crit_edge366.thread

._crit_edge366.thread:                            ; preds = %.lr.ph365.prol.loopexit, %.lr.ph365, %middle.block390, %._crit_edge366
  call void @free(ptr nonnull %.fca.0.load)
  br label %127

127:                                              ; preds = %._crit_edge366.thread, %._crit_edge366
  %128 = load i64, ptr %3, align 8, !tbaa !3
  %129 = icmp sgt i64 %128, 0
  br i1 %129, label %.lr.ph370, label %148

.lr.ph370:                                        ; preds = %127
  %_QFEresult.promoted = load i64, ptr @_QFEresult, align 8, !tbaa !3
  %.unpack326 = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %130 = load i64, ptr %4, align 8, !tbaa !3
  %min.iters.check420 = icmp ult i64 %128, 4
  br i1 %min.iters.check420, label %scalar.ph419.preheader, label %vector.ph421

vector.ph421:                                     ; preds = %.lr.ph370
  %n.vec423 = and i64 %128, -4
  %131 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %_QFEresult.promoted, i64 0
  br label %vector.body426

vector.body426:                                   ; preds = %vector.body426, %vector.ph421
  %index427 = phi i64 [ 0, %vector.ph421 ], [ %index.next432, %vector.body426 ]
  %vec.phi = phi <2 x i64> [ %131, %vector.ph421 ], [ %137, %vector.body426 ]
  %vec.phi428 = phi <2 x i64> [ zeroinitializer, %vector.ph421 ], [ %138, %vector.body426 ]
  %.neg = xor i64 %index427, -1
  %132 = add i64 %130, %.neg
  %133 = getelementptr i64, ptr %.unpack326, i64 %132
  %134 = getelementptr i64, ptr %133, i64 -1
  %wide.load429 = load <2 x i64>, ptr %134, align 8, !tbaa !3
  %reverse = shufflevector <2 x i64> %wide.load429, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %135 = getelementptr i64, ptr %133, i64 -2
  %136 = getelementptr i64, ptr %135, i64 -1
  %wide.load430 = load <2 x i64>, ptr %136, align 8, !tbaa !3
  %reverse431 = shufflevector <2 x i64> %wide.load430, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %137 = add <2 x i64> %reverse, %vec.phi
  %138 = add <2 x i64> %reverse431, %vec.phi428
  %index.next432 = add nuw i64 %index427, 4
  %139 = icmp eq i64 %index.next432, %n.vec423
  br i1 %139, label %middle.block418, label %vector.body426, !llvm.loop !21

middle.block418:                                  ; preds = %vector.body426
  %bin.rdx = add <2 x i64> %138, %137
  %140 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n425 = icmp eq i64 %128, %n.vec423
  br i1 %cmp.n425, label %._crit_edge371, label %scalar.ph419.preheader

scalar.ph419.preheader:                           ; preds = %.lr.ph370, %middle.block418
  %.ph436 = phi i64 [ 0, %.lr.ph370 ], [ %n.vec423, %middle.block418 ]
  %.ph437 = phi i64 [ %_QFEresult.promoted, %.lr.ph370 ], [ %140, %middle.block418 ]
  br label %scalar.ph419

scalar.ph419:                                     ; preds = %scalar.ph419.preheader, %scalar.ph419
  %141 = phi i64 [ %147, %scalar.ph419 ], [ %.ph436, %scalar.ph419.preheader ]
  %142 = phi i64 [ %146, %scalar.ph419 ], [ %.ph437, %scalar.ph419.preheader ]
  %.neg433 = xor i64 %141, -1
  %143 = add i64 %130, %.neg433
  %144 = getelementptr i64, ptr %.unpack326, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !3
  %146 = add i64 %145, %142
  %147 = add nuw nsw i64 %141, 1
  %exitcond376.not = icmp eq i64 %147, %128
  br i1 %exitcond376.not, label %._crit_edge371, label %scalar.ph419, !llvm.loop !22

._crit_edge371:                                   ; preds = %scalar.ph419, %middle.block418
  %.lcssa = phi i64 [ %140, %middle.block418 ], [ %146, %scalar.ph419 ]
  store i64 %.lcssa, ptr @_QFEresult, align 8, !tbaa !3
  br label %148

148:                                              ; preds = %._crit_edge371, %127
  %149 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 14)
  %150 = load i64, ptr @_QFEresult, align 8, !tbaa !3
  %151 = call i1 @_FortranAioOutputInteger64(ptr %149, i64 %150)
  %152 = call i32 @_FortranAioEndIoStatement(ptr %149)
  ret void
}

define void @_QFPiqsort(ptr nocapture %0, ptr %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 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  store ptr null, ptr %0, align 8, !tbaa !7
  %.repack754 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 1
  store i64 8, ptr %.repack754, align 8, !tbaa !7
  %.repack755 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 2
  store i32 20180515, ptr %.repack755, align 8, !tbaa !7
  %.repack756 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 3
  store i8 1, ptr %.repack756, align 4, !tbaa !7
  %.repack757 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 4
  store i8 10, ptr %.repack757, align 1, !tbaa !7
  %.repack758 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 5
  store i8 2, ptr %.repack758, align 2, !tbaa !7
  %.repack759 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 6
  store i8 0, ptr %.repack759, align 1, !tbaa !7
  %.repack760 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7
  store i64 1, ptr %.repack760, align 8, !tbaa !7
  %.repack760.repack761 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.repack760.repack761, align 8, !tbaa !7
  %.repack760.repack762 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.repack760.repack762, align 8, !tbaa !7
  %13 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %14 = load i64, ptr %13, align 8, !tbaa !7
  %15 = trunc i64 %14 to i32
  %16 = icmp slt i32 %15, 2
  br i1 %16, label %17, label %53

17:                                               ; preds = %2
  %18 = shl i64 %14, 3
  %19 = tail call ptr @malloc(i64 %18)
  %20 = icmp sgt i64 %14, 0
  br i1 %20, label %.lr.ph848, label %._crit_edge849

.lr.ph848:                                        ; preds = %17
  %21 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %22 = load i64, ptr %21, align 8, !tbaa !7
  %23 = load ptr, ptr %1, align 8, !tbaa !7
  %xtraiter917 = and i64 %14, 3
  %24 = icmp ult i64 %14, 4
  br i1 %24, label %._crit_edge849.loopexit.unr-lcssa, label %.lr.ph848.new

.lr.ph848.new:                                    ; preds = %.lr.ph848
  %unroll_iter920 = and i64 %14, -4
  br label %25

25:                                               ; preds = %25, %.lr.ph848.new
  %26 = phi i64 [ 0, %.lr.ph848.new ], [ %42, %25 ]
  %niter921 = phi i64 [ 0, %.lr.ph848.new ], [ %niter921.next.3, %25 ]
  %27 = or i64 %26, 1
  %28 = mul i64 %22, %26
  %29 = getelementptr i8, ptr %23, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !3
  %31 = getelementptr i64, ptr %19, i64 %26
  store i64 %30, ptr %31, align 8, !tbaa !3
  %32 = or i64 %26, 2
  %33 = mul i64 %22, %27
  %34 = getelementptr i8, ptr %23, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !3
  %36 = getelementptr i64, ptr %19, i64 %27
  store i64 %35, ptr %36, align 8, !tbaa !3
  %37 = or i64 %26, 3
  %38 = mul i64 %22, %32
  %39 = getelementptr i8, ptr %23, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !3
  %41 = getelementptr i64, ptr %19, i64 %32
  store i64 %40, ptr %41, align 8, !tbaa !3
  %42 = add nuw nsw i64 %26, 4
  %43 = mul i64 %22, %37
  %44 = getelementptr i8, ptr %23, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !3
  %46 = getelementptr i64, ptr %19, i64 %37
  store i64 %45, ptr %46, align 8, !tbaa !3
  %niter921.next.3 = add i64 %niter921, 4
  %niter921.ncmp.3 = icmp eq i64 %niter921.next.3, %unroll_iter920
  br i1 %niter921.ncmp.3, label %._crit_edge849.loopexit.unr-lcssa, label %25

._crit_edge849.loopexit.unr-lcssa:                ; preds = %25, %.lr.ph848
  %.unr918 = phi i64 [ 0, %.lr.ph848 ], [ %42, %25 ]
  %lcmp.mod919.not = icmp eq i64 %xtraiter917, 0
  br i1 %lcmp.mod919.not, label %._crit_edge849, label %.epil.preheader916

.epil.preheader916:                               ; preds = %._crit_edge849.loopexit.unr-lcssa, %.epil.preheader916
  %47 = phi i64 [ %48, %.epil.preheader916 ], [ %.unr918, %._crit_edge849.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader916 ], [ 0, %._crit_edge849.loopexit.unr-lcssa ]
  %48 = add nuw nsw i64 %47, 1
  %49 = mul i64 %22, %47
  %50 = getelementptr i8, ptr %23, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !3
  %52 = getelementptr i64, ptr %19, i64 %47
  store i64 %51, ptr %52, align 8, !tbaa !3
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter917
  br i1 %epil.iter.cmp.not, label %._crit_edge849, label %.epil.preheader916, !llvm.loop !23

._crit_edge849:                                   ; preds = %._crit_edge849.loopexit.unr-lcssa, %.epil.preheader916, %17
  store ptr %19, ptr %0, align 8, !tbaa !7
  store i64 8, ptr %.repack754, align 8, !tbaa !7
  store i32 20180515, ptr %.repack755, align 8, !tbaa !7
  store i8 1, ptr %.repack756, align 4, !tbaa !7
  store i8 10, ptr %.repack757, align 1, !tbaa !7
  store i8 2, ptr %.repack758, align 2, !tbaa !7
  store i8 0, ptr %.repack759, align 1, !tbaa !7
  store i64 1, ptr %.repack760, align 8, !tbaa !7
  store i64 %14, ptr %.repack760.repack761, align 8, !tbaa !7
  store i64 8, ptr %.repack760.repack762, align 8, !tbaa !7
  br label %229

53:                                               ; preds = %2
  %54 = lshr i64 %14, 1
  %55 = and i64 %54, 2147483647
  %56 = add nsw i64 %55, -1
  %57 = load ptr, ptr %1, align 8, !tbaa !7
  %58 = getelementptr { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  %59 = load i64, ptr %58, align 8, !tbaa !7
  %60 = mul i64 %59, %56
  %61 = getelementptr i8, ptr %57, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !3
  %63 = tail call dereferenceable_or_null(256) ptr @malloc(i64 256)
  %sext = shl i64 %62, 32
  %64 = ashr exact i64 %sext, 32
  %65 = shl i64 %14, 2
  %66 = tail call ptr @malloc(i64 %65)
  %67 = icmp sgt i64 %14, 0
  br i1 %67, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %53
  %xtraiter = and i64 %14, 1
  %68 = icmp eq i64 %14, 1
  br i1 %68, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %69 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %77, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %70 = or i64 %69, 1
  %71 = mul i64 %69, %59
  %72 = getelementptr i8, ptr %57, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !3
  %74 = icmp slt i64 %73, %64
  %75 = zext i1 %74 to i32
  %76 = getelementptr i32, ptr %66, i64 %69
  store i32 %75, ptr %76, align 4, !tbaa !3
  %77 = add nuw nsw i64 %69, 2
  %78 = mul i64 %70, %59
  %79 = getelementptr i8, ptr %57, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !3
  %81 = icmp slt i64 %80, %64
  %82 = zext i1 %81 to i32
  %83 = getelementptr i32, ptr %66, i64 %70
  store i32 %82, ptr %83, 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 %._crit_edge.loopexit.unr-lcssa, label %.lr.ph

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

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %84 = mul i64 %.unr, %59
  %85 = getelementptr i8, ptr %57, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !3
  %87 = icmp slt i64 %86, %64
  %88 = zext i1 %87 to i32
  %89 = getelementptr i32, ptr %66, i64 %.unr
  store i32 %88, ptr %89, align 4, !tbaa !3
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %53
  store ptr %66, ptr %7, align 8, !tbaa !7
  %.fca.1.gep400 = 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.gep400, align 8, !tbaa !7
  %.fca.2.gep402 = 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.gep402, align 8, !tbaa !7
  %.fca.3.gep404 = 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.gep404, align 4, !tbaa !7
  %.fca.4.gep406 = 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.gep406, align 1, !tbaa !7
  %.fca.5.gep408 = 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.gep408, align 2, !tbaa !7
  %.fca.6.gep410 = 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.gep410, align 1, !tbaa !7
  %.fca.7.0.0.gep412 = 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.gep412, align 8, !tbaa !7
  %.fca.7.0.1.gep414 = 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.gep414, align 8, !tbaa !7
  %.fca.7.0.2.gep416 = 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.gep416, align 8, !tbaa !7
  store ptr null, ptr %12, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, 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, [1 x [3 x i64]] }, ptr %12, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, 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, [1 x [3 x i64]] }, ptr %12, 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, [1 x [3 x i64]] }, ptr %12, i64 0, i32 7, i64 0, i64 1
  store i64 0, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %12, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %90 = call {} @_FortranAPack(ptr nonnull %12, ptr nonnull %1, ptr nonnull %7, ptr null, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 24)
  %.fca.0.load = load ptr, ptr %12, align 8, !tbaa !7
  %.fca.7.0.0.load = load i64, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.load = load i64, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %91 = icmp eq i64 %.fca.7.0.1.load, 0
  %92 = select i1 %91, i64 1, i64 %.fca.7.0.0.load
  store ptr %.fca.0.load, ptr %6, align 8, !tbaa !7
  %.fca.1.gep423 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep423, align 8, !tbaa !7
  %.fca.2.gep425 = 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.gep425, align 8, !tbaa !7
  %.fca.3.gep427 = 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.gep427, align 4, !tbaa !7
  %.fca.4.gep429 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep429, align 1, !tbaa !7
  %.fca.5.gep431 = 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.gep431, align 2, !tbaa !7
  %.fca.6.gep433 = 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.gep433, align 1, !tbaa !7
  %.fca.7.0.0.gep435 = 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 %92, ptr %.fca.7.0.0.gep435, align 8, !tbaa !7
  %.fca.7.0.1.gep437 = 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.gep437, align 8, !tbaa !7
  %.fca.7.0.2.gep439 = 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 8, ptr %.fca.7.0.2.gep439, align 8, !tbaa !7
  call void @_QFPiqsort(ptr nonnull %11, ptr nonnull %6)
  %.fca.0.load21 = load ptr, ptr %11, align 8, !tbaa !7
  %.fca.7.0.1.gep44 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %11, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.1.load45 = load i64, ptr %.fca.7.0.1.gep44, align 8, !tbaa !7
  %93 = shl i64 %.fca.7.0.1.load45, 3
  %94 = call ptr @malloc(i64 %93)
  %95 = icmp sgt i64 %.fca.7.0.1.load45, 0
  br i1 %95, label %._crit_edge828, label %._crit_edge828.thread

._crit_edge828:                                   ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %94, ptr align 8 %.fca.0.load21, i64 %93, i1 false), !tbaa !3
  %96 = icmp ugt i64 %.fca.7.0.1.load45, 31
  br i1 %96, label %97, label %._crit_edge828.thread

97:                                               ; preds = %._crit_edge828
  %98 = shl nuw i64 %.fca.7.0.1.load45, 1
  %99 = shl i64 %.fca.7.0.1.load45, 4
  %100 = call ptr @realloc(ptr %63, i64 %99)
  br label %._crit_edge828.thread

._crit_edge828.thread:                            ; preds = %._crit_edge, %97, %._crit_edge828
  %.0 = phi i64 [ %98, %97 ], [ 32, %._crit_edge828 ], [ 32, %._crit_edge ]
  %101 = phi ptr [ %100, %97 ], [ %63, %._crit_edge828 ], [ %63, %._crit_edge ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %101, ptr align 1 %94, i64 %93, i1 false)
  %102 = call ptr @malloc(i64 %65)
  br i1 %67, label %.lr.ph830, label %._crit_edge831

.lr.ph830:                                        ; preds = %._crit_edge828.thread
  %103 = load i64, ptr %58, align 8, !tbaa !7
  %104 = load ptr, ptr %1, align 8, !tbaa !7
  %xtraiter905 = and i64 %14, 1
  %105 = icmp eq i64 %14, 1
  br i1 %105, label %._crit_edge831.loopexit.unr-lcssa, label %.lr.ph830.new

.lr.ph830.new:                                    ; preds = %.lr.ph830
  %unroll_iter908 = and i64 %14, -2
  br label %106

106:                                              ; preds = %106, %.lr.ph830.new
  %107 = phi i64 [ 0, %.lr.ph830.new ], [ %115, %106 ]
  %niter909 = phi i64 [ 0, %.lr.ph830.new ], [ %niter909.next.1, %106 ]
  %108 = or i64 %107, 1
  %109 = mul i64 %103, %107
  %110 = getelementptr i8, ptr %104, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !3
  %112 = icmp eq i64 %111, %64
  %113 = zext i1 %112 to i32
  %114 = getelementptr i32, ptr %102, i64 %107
  store i32 %113, ptr %114, align 4, !tbaa !3
  %115 = add nuw nsw i64 %107, 2
  %116 = mul i64 %103, %108
  %117 = getelementptr i8, ptr %104, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !3
  %119 = icmp eq i64 %118, %64
  %120 = zext i1 %119 to i32
  %121 = getelementptr i32, ptr %102, i64 %108
  store i32 %120, ptr %121, align 4, !tbaa !3
  %niter909.next.1 = add i64 %niter909, 2
  %niter909.ncmp.1 = icmp eq i64 %niter909.next.1, %unroll_iter908
  br i1 %niter909.ncmp.1, label %._crit_edge831.loopexit.unr-lcssa, label %106

._crit_edge831.loopexit.unr-lcssa:                ; preds = %106, %.lr.ph830
  %.unr906 = phi i64 [ 0, %.lr.ph830 ], [ %115, %106 ]
  %lcmp.mod907.not = icmp eq i64 %xtraiter905, 0
  br i1 %lcmp.mod907.not, label %._crit_edge831, label %._crit_edge831.loopexit.epilog-lcssa

._crit_edge831.loopexit.epilog-lcssa:             ; preds = %._crit_edge831.loopexit.unr-lcssa
  %122 = mul i64 %103, %.unr906
  %123 = getelementptr i8, ptr %104, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !3
  %125 = icmp eq i64 %124, %64
  %126 = zext i1 %125 to i32
  %127 = getelementptr i32, ptr %102, i64 %.unr906
  store i32 %126, ptr %127, align 4, !tbaa !3
  br label %._crit_edge831

._crit_edge831:                                   ; preds = %._crit_edge831.loopexit.epilog-lcssa, %._crit_edge831.loopexit.unr-lcssa, %._crit_edge828.thread
  store ptr %102, ptr %5, align 8, !tbaa !7
  %.fca.1.gep453 = 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.gep453, align 8, !tbaa !7
  %.fca.2.gep455 = 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.gep455, align 8, !tbaa !7
  %.fca.3.gep457 = 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.gep457, align 4, !tbaa !7
  %.fca.4.gep459 = 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.gep459, align 1, !tbaa !7
  %.fca.5.gep461 = 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.gep461, align 2, !tbaa !7
  %.fca.6.gep463 = 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.gep463, align 1, !tbaa !7
  %.fca.7.0.0.gep465 = 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.gep465, align 8, !tbaa !7
  %.fca.7.0.1.gep467 = 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.gep467, align 8, !tbaa !7
  %.fca.7.0.2.gep469 = 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.gep469, align 8, !tbaa !7
  store ptr null, ptr %10, align 8, !tbaa !7
  %.fca.1.gep83 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep83, align 8, !tbaa !7
  %.fca.2.gep85 = 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.gep85, align 8, !tbaa !7
  %.fca.3.gep87 = 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.gep87, align 4, !tbaa !7
  %.fca.4.gep89 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %10, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep89, align 1, !tbaa !7
  %.fca.5.gep91 = 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.gep91, align 2, !tbaa !7
  %.fca.6.gep93 = 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.gep93, align 1, !tbaa !7
  %.fca.7.0.0.gep95 = 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.gep95, align 8, !tbaa !7
  %.fca.7.0.1.gep97 = 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.gep97, align 8, !tbaa !7
  %.fca.7.0.2.gep99 = 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 8, ptr %.fca.7.0.2.gep99, align 8, !tbaa !7
  %128 = call {} @_FortranAPack(ptr nonnull %10, ptr nonnull %1, ptr nonnull %5, ptr null, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 24)
  %.fca.0.load101 = load ptr, ptr %10, align 8, !tbaa !7
  %.fca.7.0.1.load125 = load i64, ptr %.fca.7.0.1.gep97, align 8, !tbaa !7
  %129 = shl i64 %.fca.7.0.1.load125, 3
  %130 = call ptr @malloc(i64 %129)
  %131 = icmp sgt i64 %.fca.7.0.1.load125, 0
  br i1 %131, label %.lr.ph833.preheader, label %._crit_edge834

.lr.ph833.preheader:                              ; preds = %._crit_edge831
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %130, ptr align 8 %.fca.0.load101, i64 %129, i1 false), !tbaa !3
  br label %._crit_edge834

._crit_edge834:                                   ; preds = %.lr.ph833.preheader, %._crit_edge831
  %132 = add i64 %.fca.7.0.1.load125, %.fca.7.0.1.load45
  %.not = icmp sgt i64 %.0, %132
  br i1 %.not, label %137, label %133

133:                                              ; preds = %._crit_edge834
  %134 = shl i64 %132, 1
  %135 = shl i64 %132, 4
  %136 = call ptr @realloc(ptr %101, i64 %135)
  br label %137

137:                                              ; preds = %133, %._crit_edge834
  %.1 = phi i64 [ %134, %133 ], [ %.0, %._crit_edge834 ]
  %138 = phi ptr [ %136, %133 ], [ %101, %._crit_edge834 ]
  %139 = getelementptr i64, ptr %138, i64 %.fca.7.0.1.load45
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %139, ptr align 1 %130, i64 %129, i1 false)
  %140 = call ptr @malloc(i64 %65)
  br i1 %67, label %.lr.ph836, label %._crit_edge837

.lr.ph836:                                        ; preds = %137
  %141 = load i64, ptr %58, align 8, !tbaa !7
  %142 = load ptr, ptr %1, align 8, !tbaa !7
  %xtraiter911 = and i64 %14, 1
  %143 = icmp eq i64 %14, 1
  br i1 %143, label %._crit_edge837.loopexit.unr-lcssa, label %.lr.ph836.new

.lr.ph836.new:                                    ; preds = %.lr.ph836
  %unroll_iter914 = and i64 %14, -2
  br label %144

144:                                              ; preds = %144, %.lr.ph836.new
  %145 = phi i64 [ 0, %.lr.ph836.new ], [ %153, %144 ]
  %niter915 = phi i64 [ 0, %.lr.ph836.new ], [ %niter915.next.1, %144 ]
  %146 = or i64 %145, 1
  %147 = mul i64 %141, %145
  %148 = getelementptr i8, ptr %142, i64 %147
  %149 = load i64, ptr %148, align 8, !tbaa !3
  %150 = icmp sgt i64 %149, %64
  %151 = zext i1 %150 to i32
  %152 = getelementptr i32, ptr %140, i64 %145
  store i32 %151, ptr %152, align 4, !tbaa !3
  %153 = add nuw nsw i64 %145, 2
  %154 = mul i64 %141, %146
  %155 = getelementptr i8, ptr %142, i64 %154
  %156 = load i64, ptr %155, align 8, !tbaa !3
  %157 = icmp sgt i64 %156, %64
  %158 = zext i1 %157 to i32
  %159 = getelementptr i32, ptr %140, i64 %146
  store i32 %158, ptr %159, align 4, !tbaa !3
  %niter915.next.1 = add i64 %niter915, 2
  %niter915.ncmp.1 = icmp eq i64 %niter915.next.1, %unroll_iter914
  br i1 %niter915.ncmp.1, label %._crit_edge837.loopexit.unr-lcssa, label %144

._crit_edge837.loopexit.unr-lcssa:                ; preds = %144, %.lr.ph836
  %.unr912 = phi i64 [ 0, %.lr.ph836 ], [ %153, %144 ]
  %lcmp.mod913.not = icmp eq i64 %xtraiter911, 0
  br i1 %lcmp.mod913.not, label %._crit_edge837, label %._crit_edge837.loopexit.epilog-lcssa

._crit_edge837.loopexit.epilog-lcssa:             ; preds = %._crit_edge837.loopexit.unr-lcssa
  %160 = mul i64 %141, %.unr912
  %161 = getelementptr i8, ptr %142, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !3
  %163 = icmp sgt i64 %162, %64
  %164 = zext i1 %163 to i32
  %165 = getelementptr i32, ptr %140, i64 %.unr912
  store i32 %164, ptr %165, align 4, !tbaa !3
  br label %._crit_edge837

._crit_edge837:                                   ; preds = %._crit_edge837.loopexit.epilog-lcssa, %._crit_edge837.loopexit.unr-lcssa, %137
  store ptr %140, ptr %4, align 8, !tbaa !7
  %.fca.1.gep483 = 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.gep483, align 8, !tbaa !7
  %.fca.2.gep485 = 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.gep485, align 8, !tbaa !7
  %.fca.3.gep487 = 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.gep487, align 4, !tbaa !7
  %.fca.4.gep489 = 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.gep489, align 1, !tbaa !7
  %.fca.5.gep491 = 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.gep491, align 2, !tbaa !7
  %.fca.6.gep493 = 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.gep493, align 1, !tbaa !7
  %.fca.7.0.0.gep495 = 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.gep495, align 8, !tbaa !7
  %.fca.7.0.1.gep497 = 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.gep497, align 8, !tbaa !7
  %.fca.7.0.2.gep499 = 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.gep499, align 8, !tbaa !7
  store ptr null, ptr %9, align 8, !tbaa !7
  %.fca.1.gep133 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep133, align 8, !tbaa !7
  %.fca.2.gep135 = 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.gep135, align 8, !tbaa !7
  %.fca.3.gep137 = 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.gep137, align 4, !tbaa !7
  %.fca.4.gep139 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %9, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep139, align 1, !tbaa !7
  %.fca.5.gep141 = 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.gep141, align 2, !tbaa !7
  %.fca.6.gep143 = 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.gep143, align 1, !tbaa !7
  %.fca.7.0.0.gep145 = 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.gep145, align 8, !tbaa !7
  %.fca.7.0.1.gep147 = 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.gep147, align 8, !tbaa !7
  %.fca.7.0.2.gep149 = 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 8, ptr %.fca.7.0.2.gep149, align 8, !tbaa !7
  %166 = call {} @_FortranAPack(ptr nonnull %9, ptr nonnull %1, ptr nonnull %4, ptr null, ptr nonnull @_QQcl.4a4123a0ed7110a2e7fc95a8c985cf89, i32 24)
  %.fca.0.load151 = load ptr, ptr %9, align 8, !tbaa !7
  %.fca.7.0.0.load172 = load i64, ptr %.fca.7.0.0.gep145, align 8, !tbaa !7
  %.fca.7.0.1.load175 = load i64, ptr %.fca.7.0.1.gep147, align 8, !tbaa !7
  %167 = icmp eq i64 %.fca.7.0.1.load175, 0
  %168 = select i1 %167, i64 1, i64 %.fca.7.0.0.load172
  store ptr %.fca.0.load151, ptr %3, align 8, !tbaa !7
  %.fca.1.gep513 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep513, align 8, !tbaa !7
  %.fca.2.gep515 = 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.gep515, align 8, !tbaa !7
  %.fca.3.gep517 = 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.gep517, align 4, !tbaa !7
  %.fca.4.gep519 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep519, align 1, !tbaa !7
  %.fca.5.gep521 = 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.gep521, align 2, !tbaa !7
  %.fca.6.gep523 = 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.gep523, align 1, !tbaa !7
  %.fca.7.0.0.gep525 = 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 %168, ptr %.fca.7.0.0.gep525, align 8, !tbaa !7
  %.fca.7.0.1.gep527 = 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.load175, ptr %.fca.7.0.1.gep527, align 8, !tbaa !7
  %.fca.7.0.2.gep529 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep529, align 8, !tbaa !7
  call void @_QFPiqsort(ptr nonnull %8, ptr nonnull %3)
  %.fca.0.load181 = load ptr, ptr %8, align 8, !tbaa !7
  %.fca.7.0.1.gep204 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %8, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.1.load205 = load i64, ptr %.fca.7.0.1.gep204, align 8, !tbaa !7
  %169 = shl i64 %.fca.7.0.1.load205, 3
  %170 = call ptr @malloc(i64 %169)
  %171 = icmp sgt i64 %.fca.7.0.1.load205, 0
  br i1 %171, label %.lr.ph839.preheader, label %._crit_edge840

.lr.ph839.preheader:                              ; preds = %._crit_edge837
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %170, ptr align 8 %.fca.0.load181, i64 %169, i1 false), !tbaa !3
  br label %._crit_edge840

._crit_edge840:                                   ; preds = %.lr.ph839.preheader, %._crit_edge837
  %172 = add i64 %.fca.7.0.1.load205, %132
  %.not763 = icmp sgt i64 %.1, %172
  br i1 %.not763, label %176, label %173

173:                                              ; preds = %._crit_edge840
  %174 = shl i64 %172, 4
  %175 = call ptr @realloc(ptr %138, i64 %174)
  br label %176

176:                                              ; preds = %173, %._crit_edge840
  %177 = phi ptr [ %175, %173 ], [ %138, %._crit_edge840 ]
  %178 = ptrtoint ptr %177 to i64
  %179 = getelementptr i64, ptr %177, i64 %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %179, ptr align 1 %170, i64 %169, i1 false)
  %.unpack = load ptr, ptr %0, align 8, !tbaa !7
  %.unpack866 = ptrtoint ptr %.unpack to i64
  %.not784 = icmp eq ptr %.unpack, null
  br i1 %.not784, label %209, label %180

180:                                              ; preds = %176
  %.unpack777.unpack.unpack780 = load i64, ptr %.repack760.repack761, align 8, !tbaa !7
  %.not824 = icmp eq i64 %.unpack777.unpack.unpack780, %172
  br i1 %.not824, label %.preheader, label %188

.preheader:                                       ; preds = %180
  %181 = icmp sgt i64 %172, 0
  br i1 %181, label %.lr.ph843.preheader, label %._crit_edge844

.lr.ph843.preheader:                              ; preds = %.preheader
  %min.iters.check870 = icmp ult i64 %172, 6
  %182 = sub i64 %.unpack866, %178
  %diff.check867 = icmp ult i64 %182, 32
  %or.cond = select i1 %min.iters.check870, i1 true, i1 %diff.check867
  br i1 %or.cond, label %.lr.ph843.preheader900, label %vector.ph871

vector.ph871:                                     ; preds = %.lr.ph843.preheader
  %n.vec873 = and i64 %172, -4
  br label %vector.body876

vector.body876:                                   ; preds = %vector.body876, %vector.ph871
  %index877 = phi i64 [ 0, %vector.ph871 ], [ %index.next880, %vector.body876 ]
  %183 = getelementptr i64, ptr %177, i64 %index877
  %wide.load878 = load <2 x i64>, ptr %183, align 8, !tbaa !3
  %184 = getelementptr i64, ptr %183, i64 2
  %wide.load879 = load <2 x i64>, ptr %184, align 8, !tbaa !3
  %185 = getelementptr i64, ptr %.unpack, i64 %index877
  store <2 x i64> %wide.load878, ptr %185, align 8, !tbaa !3
  %186 = getelementptr i64, ptr %185, i64 2
  store <2 x i64> %wide.load879, ptr %186, align 8, !tbaa !3
  %index.next880 = add nuw i64 %index877, 4
  %187 = icmp eq i64 %index.next880, %n.vec873
  br i1 %187, label %middle.block868, label %vector.body876, !llvm.loop !24

middle.block868:                                  ; preds = %vector.body876
  %cmp.n875 = icmp eq i64 %172, %n.vec873
  br i1 %cmp.n875, label %._crit_edge844, label %.lr.ph843.preheader900

.lr.ph843.preheader900:                           ; preds = %.lr.ph843.preheader, %middle.block868
  %.ph901 = phi i64 [ 0, %.lr.ph843.preheader ], [ %n.vec873, %middle.block868 ]
  br label %.lr.ph843

188:                                              ; preds = %180
  %189 = shl i64 %172, 3
  %190 = call ptr @malloc(i64 %189)
  %191 = icmp sgt i64 %172, 0
  br i1 %191, label %.lr.ph842.preheader, label %.thread823

.lr.ph842.preheader:                              ; preds = %188
  %192 = ptrtoint ptr %190 to i64
  %min.iters.check = icmp ult i64 %172, 6
  %193 = sub i64 %192, %178
  %diff.check = icmp ult i64 %193, 32
  %or.cond896 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond896, label %.lr.ph842.preheader902, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph842.preheader
  %n.vec = and i64 %172, -4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %194 = getelementptr i64, ptr %177, i64 %index
  %wide.load = load <2 x i64>, ptr %194, align 8, !tbaa !3
  %195 = getelementptr i64, ptr %194, i64 2
  %wide.load864 = load <2 x i64>, ptr %195, align 8, !tbaa !3
  %196 = getelementptr i64, ptr %190, i64 %index
  store <2 x i64> %wide.load, ptr %196, align 8, !tbaa !3
  %197 = getelementptr i64, ptr %196, i64 2
  store <2 x i64> %wide.load864, ptr %197, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %198 = icmp eq i64 %index.next, %n.vec
  br i1 %198, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %172, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph842.preheader902

.lr.ph842.preheader902:                           ; preds = %.lr.ph842.preheader, %middle.block
  %.ph903 = phi i64 [ 0, %.lr.ph842.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph842

.lr.ph842:                                        ; preds = %.lr.ph842.preheader902, %.lr.ph842
  %199 = phi i64 [ %200, %.lr.ph842 ], [ %.ph903, %.lr.ph842.preheader902 ]
  %200 = add nuw nsw i64 %199, 1
  %201 = getelementptr i64, ptr %177, i64 %199
  %202 = load i64, ptr %201, align 8, !tbaa !3
  %203 = getelementptr i64, ptr %190, i64 %199
  store i64 %202, ptr %203, align 8, !tbaa !3
  %exitcond853.not = icmp eq i64 %200, %172
  br i1 %exitcond853.not, label %.loopexit, label %.lr.ph842, !llvm.loop !26

.lr.ph843:                                        ; preds = %.lr.ph843.preheader900, %.lr.ph843
  %204 = phi i64 [ %205, %.lr.ph843 ], [ %.ph901, %.lr.ph843.preheader900 ]
  %205 = add nuw nsw i64 %204, 1
  %206 = getelementptr i64, ptr %177, i64 %204
  %207 = load i64, ptr %206, align 8, !tbaa !3
  %208 = getelementptr i64, ptr %.unpack, i64 %204
  store i64 %207, ptr %208, align 8, !tbaa !3
  %exitcond854.not = icmp eq i64 %205, %172
  br i1 %exitcond854.not, label %._crit_edge844, label %.lr.ph843, !llvm.loop !27

209:                                              ; preds = %176
  %210 = shl i64 %172, 3
  %211 = call ptr @malloc(i64 %210)
  %212 = icmp sgt i64 %172, 0
  br i1 %212, label %.lr.ph846.preheader, label %.loopexit.thread

.lr.ph846.preheader:                              ; preds = %209
  %213 = ptrtoint ptr %211 to i64
  %min.iters.check885 = icmp ult i64 %172, 6
  %214 = sub i64 %213, %178
  %diff.check882 = icmp ult i64 %214, 32
  %or.cond897 = or i1 %min.iters.check885, %diff.check882
  br i1 %or.cond897, label %.lr.ph846.preheader898, label %vector.ph886

vector.ph886:                                     ; preds = %.lr.ph846.preheader
  %n.vec888 = and i64 %172, -4
  br label %vector.body891

vector.body891:                                   ; preds = %vector.body891, %vector.ph886
  %index892 = phi i64 [ 0, %vector.ph886 ], [ %index.next895, %vector.body891 ]
  %215 = getelementptr i64, ptr %177, i64 %index892
  %wide.load893 = load <2 x i64>, ptr %215, align 8, !tbaa !3
  %216 = getelementptr i64, ptr %215, i64 2
  %wide.load894 = load <2 x i64>, ptr %216, align 8, !tbaa !3
  %217 = getelementptr i64, ptr %211, i64 %index892
  store <2 x i64> %wide.load893, ptr %217, align 8, !tbaa !3
  %218 = getelementptr i64, ptr %217, i64 2
  store <2 x i64> %wide.load894, ptr %218, align 8, !tbaa !3
  %index.next895 = add nuw i64 %index892, 4
  %219 = icmp eq i64 %index.next895, %n.vec888
  br i1 %219, label %middle.block883, label %vector.body891, !llvm.loop !28

middle.block883:                                  ; preds = %vector.body891
  %cmp.n890 = icmp eq i64 %172, %n.vec888
  br i1 %cmp.n890, label %.loopexit, label %.lr.ph846.preheader898

.lr.ph846.preheader898:                           ; preds = %.lr.ph846.preheader, %middle.block883
  %.ph899 = phi i64 [ 0, %.lr.ph846.preheader ], [ %n.vec888, %middle.block883 ]
  br label %.lr.ph846

.lr.ph846:                                        ; preds = %.lr.ph846.preheader898, %.lr.ph846
  %220 = phi i64 [ %221, %.lr.ph846 ], [ %.ph899, %.lr.ph846.preheader898 ]
  %221 = add nuw nsw i64 %220, 1
  %222 = getelementptr i64, ptr %177, i64 %220
  %223 = load i64, ptr %222, align 8, !tbaa !3
  %224 = getelementptr i64, ptr %211, i64 %220
  store i64 %223, ptr %224, align 8, !tbaa !3
  %exitcond855.not = icmp eq i64 %221, %172
  br i1 %exitcond855.not, label %.loopexit, label %.lr.ph846, !llvm.loop !29

.loopexit:                                        ; preds = %.lr.ph842, %.lr.ph846, %middle.block, %middle.block883
  %.ph = phi ptr [ %211, %middle.block883 ], [ %190, %middle.block ], [ %211, %.lr.ph846 ], [ %190, %.lr.ph842 ]
  br i1 %.not784, label %.loopexit.thread, label %.thread823

.thread823:                                       ; preds = %188, %.loopexit
  %.ph861 = phi ptr [ %.ph, %.loopexit ], [ %190, %188 ]
  call void @free(ptr nonnull %.unpack)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %209, %.thread823, %.loopexit
  %.ph858 = phi ptr [ %.ph861, %.thread823 ], [ %.ph, %.loopexit ], [ %211, %209 ]
  store ptr %.ph858, ptr %0, align 8, !tbaa !7
  store i64 8, ptr %.repack754, align 8, !tbaa !7
  store i32 20180515, ptr %.repack755, align 8, !tbaa !7
  store i8 1, ptr %.repack756, align 4, !tbaa !7
  store i8 10, ptr %.repack757, align 1, !tbaa !7
  store i8 2, ptr %.repack758, align 2, !tbaa !7
  store i8 0, ptr %.repack759, align 1, !tbaa !7
  store i64 1, ptr %.repack760, align 8, !tbaa !7
  store i64 %172, ptr %.repack760.repack761, align 8, !tbaa !7
  store i64 8, ptr %.repack760.repack762, align 8, !tbaa !7
  br label %._crit_edge844

._crit_edge844:                                   ; preds = %.lr.ph843, %middle.block868, %.preheader, %.loopexit.thread
  call void @free(ptr %177)
  call void @free(ptr %170)
  %.fca.0.load211 = load ptr, ptr %8, align 8, !tbaa !7
  %.not785 = icmp eq ptr %.fca.0.load211, null
  br i1 %.not785, label %226, label %225

225:                                              ; preds = %._crit_edge844
  call void @free(ptr nonnull %.fca.0.load211)
  br label %226

226:                                              ; preds = %225, %._crit_edge844
  call void @free(ptr %.fca.0.load151)
  call void @free(ptr %140)
  call void @free(ptr %130)
  call void @free(ptr %.fca.0.load101)
  call void @free(ptr %102)
  call void @free(ptr %94)
  %.fca.0.load51 = load ptr, ptr %11, align 8, !tbaa !7
  %.not786 = icmp eq ptr %.fca.0.load51, null
  br i1 %.not786, label %228, label %227

227:                                              ; preds = %226
  call void @free(ptr nonnull %.fca.0.load51)
  br label %228

228:                                              ; preds = %227, %226
  call void @free(ptr %.fca.0.load)
  call void @free(ptr %66)
  br label %229

229:                                              ; preds = %._crit_edge849, %228
  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 ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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

; 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 #2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x 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 nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind 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 = !{!"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}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !11}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !11}
!22 = distinct !{!22, !11, !10}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !10, !11}
!25 = distinct !{!25, !10, !11}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10, !11}
!29 = distinct !{!29, !10}
