program ABC088B
    implicit none
    integer(8)::N,i
    integer(8)::result=0
    integer(8),allocatable,dimension(:)::A

    read(5,*)N
    allocate(A(N))
    read(5,*)(A(i),i=1,N)

    A=iqsort(A)
    A=A(N:1:-1)
    do i=1,N
        if(mod(i,2)==1)then
            result=result+A(i)
        else
            result=result-A(i)
        end if
    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 ABC088B
; 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"

@_QFEa.0 = internal unnamed_addr global ptr null
@_QFEa.8 = internal unnamed_addr global i64 0
@_QFEresult = internal unnamed_addr global i64 0
@_QQcl.4cce286344b6c60e1b392feb3cf1dec2 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6262/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 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.4cce286344b6c60e1b392feb3cf1dec2, i32 7)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 8)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %7 = load i64, ptr %3, align 8, !tbaa !3
  %8 = call i64 @llvm.smax.i64(i64 %7, i64 0)
  %9 = shl i64 %8, 3
  %10 = call ptr @malloc(i64 %9)
  store ptr %10, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %8, ptr @_QFEa.8, align 8, !tbaa !7
  %11 = call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.4cce286344b6c60e1b392feb3cf1dec2, i32 9)
  %12 = load i64, ptr %3, align 8, !tbaa !3
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %19 = call i32 @_FortranAioEndIoStatement(ptr %11)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack436.unpack.unpack438 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep105 = 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.gep105, align 8, !tbaa !7
  %.fca.2.gep107 = 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.gep107, align 8, !tbaa !7
  %.fca.3.gep109 = 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.gep109, align 4, !tbaa !7
  %.fca.4.gep111 = 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.gep111, align 1, !tbaa !7
  %.fca.5.gep113 = 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.gep113, align 2, !tbaa !7
  %.fca.6.gep115 = 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.gep115, align 1, !tbaa !7
  %.fca.7.0.0.gep117 = 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.gep117, align 8, !tbaa !7
  %.fca.7.0.1.gep119 = 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 %.unpack436.unpack.unpack438, ptr %.fca.7.0.1.gep119, align 8, !tbaa !7
  %.fca.7.0.2.gep121 = 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.gep121, 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.load584 = 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
  %.unpack441 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack441587 = ptrtoint ptr %.unpack441 to i64
  %.not = icmp eq ptr %.unpack441, null
  br i1 %.not, label %89, label %20

20:                                               ; preds = %._crit_edge
  %.unpack448.unpack.unpack450 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  %.not530 = icmp eq i64 %.unpack448.unpack.unpack450, %.fca.7.0.1.load
  br i1 %.not530, label %.preheader537, label %36

.preheader537:                                    ; preds = %20
  %21 = icmp sgt i64 %.fca.7.0.1.load, 0
  br i1 %21, label %.lr.ph541.preheader, label %._crit_edge542

.lr.ph541.preheader:                              ; preds = %.preheader537
  %min.iters.check591 = icmp ult i64 %.fca.7.0.1.load, 6
  %22 = sub i64 %.unpack441587, %.fca.0.load584
  %diff.check588 = icmp ult i64 %22, 32
  %or.cond = select i1 %min.iters.check591, i1 true, i1 %diff.check588
  br i1 %or.cond, label %.lr.ph541.preheader684, label %vector.ph592

vector.ph592:                                     ; preds = %.lr.ph541.preheader
  %n.vec594 = and i64 %.fca.7.0.1.load, -4
  br label %vector.body597

vector.body597:                                   ; preds = %vector.body597, %vector.ph592
  %index598 = phi i64 [ 0, %vector.ph592 ], [ %index.next601, %vector.body597 ]
  %23 = getelementptr i64, ptr %.fca.0.load, i64 %index598
  %wide.load599 = load <2 x i64>, ptr %23, align 8, !tbaa !3
  %24 = getelementptr i64, ptr %23, i64 2
  %wide.load600 = load <2 x i64>, ptr %24, align 8, !tbaa !3
  %25 = getelementptr i64, ptr %.unpack441, i64 %index598
  store <2 x i64> %wide.load599, ptr %25, align 8, !tbaa !3
  %26 = getelementptr i64, ptr %25, i64 2
  store <2 x i64> %wide.load600, ptr %26, align 8, !tbaa !3
  %index.next601 = add nuw i64 %index598, 4
  %27 = icmp eq i64 %index.next601, %n.vec594
  br i1 %27, label %middle.block589, label %vector.body597, !llvm.loop !9

middle.block589:                                  ; preds = %vector.body597
  %cmp.n596 = icmp eq i64 %.fca.7.0.1.load, %n.vec594
  br i1 %cmp.n596, label %._crit_edge542.thread, label %.lr.ph541.preheader684

.lr.ph541.preheader684:                           ; preds = %.lr.ph541.preheader, %middle.block589
  %.ph685 = phi i64 [ 0, %.lr.ph541.preheader ], [ %n.vec594, %middle.block589 ]
  %28 = xor i64 %.ph685, -1
  %29 = add i64 %.fca.7.0.1.load, %28
  %xtraiter689 = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod690.not = icmp eq i64 %xtraiter689, 0
  br i1 %lcmp.mod690.not, label %.lr.ph541.prol.loopexit, label %.lr.ph541.prol

.lr.ph541.prol:                                   ; preds = %.lr.ph541.preheader684, %.lr.ph541.prol
  %30 = phi i64 [ %33, %.lr.ph541.prol ], [ %.ph685, %.lr.ph541.preheader684 ]
  %prol.iter691 = phi i64 [ %prol.iter691.next, %.lr.ph541.prol ], [ 0, %.lr.ph541.preheader684 ]
  %31 = getelementptr i64, ptr %.fca.0.load, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !3
  %33 = add nuw nsw i64 %30, 1
  %34 = getelementptr i64, ptr %.unpack441, i64 %30
  store i64 %32, ptr %34, align 8, !tbaa !3
  %prol.iter691.next = add i64 %prol.iter691, 1
  %prol.iter691.cmp.not = icmp eq i64 %prol.iter691.next, %xtraiter689
  br i1 %prol.iter691.cmp.not, label %.lr.ph541.prol.loopexit, label %.lr.ph541.prol, !llvm.loop !12

.lr.ph541.prol.loopexit:                          ; preds = %.lr.ph541.prol, %.lr.ph541.preheader684
  %.unr692 = phi i64 [ %.ph685, %.lr.ph541.preheader684 ], [ %33, %.lr.ph541.prol ]
  %35 = icmp ult i64 %29, 3
  br i1 %35, label %._crit_edge542.thread, label %.lr.ph541

36:                                               ; preds = %20
  %37 = shl i64 %.fca.7.0.1.load, 3
  %38 = call ptr @malloc(i64 %37)
  %39 = icmp sgt i64 %.fca.7.0.1.load, 0
  br i1 %39, label %.lr.ph540.preheader, label %.thread522

.lr.ph540.preheader:                              ; preds = %36
  %40 = ptrtoint ptr %38 to i64
  %min.iters.check = icmp ult i64 %.fca.7.0.1.load, 6
  %41 = sub i64 %40, %.fca.0.load584
  %diff.check = icmp ult i64 %41, 32
  %or.cond674 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond674, label %.lr.ph540.preheader686, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph540.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 ]
  %42 = getelementptr i64, ptr %.fca.0.load, i64 %index
  %wide.load = load <2 x i64>, ptr %42, align 8, !tbaa !3
  %43 = getelementptr i64, ptr %42, i64 2
  %wide.load585 = load <2 x i64>, ptr %43, align 8, !tbaa !3
  %44 = getelementptr i64, ptr %38, i64 %index
  store <2 x i64> %wide.load, ptr %44, align 8, !tbaa !3
  %45 = getelementptr i64, ptr %44, i64 2
  store <2 x i64> %wide.load585, ptr %45, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, 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.ph540.preheader686

.lr.ph540.preheader686:                           ; preds = %.lr.ph540.preheader, %middle.block
  %.ph687 = phi i64 [ 0, %.lr.ph540.preheader ], [ %n.vec, %middle.block ]
  %47 = xor i64 %.ph687, -1
  %48 = add i64 %.fca.7.0.1.load, %47
  %xtraiter = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph540.prol.loopexit, label %.lr.ph540.prol

.lr.ph540.prol:                                   ; preds = %.lr.ph540.preheader686, %.lr.ph540.prol
  %49 = phi i64 [ %52, %.lr.ph540.prol ], [ %.ph687, %.lr.ph540.preheader686 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph540.prol ], [ 0, %.lr.ph540.preheader686 ]
  %50 = getelementptr i64, ptr %.fca.0.load, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !3
  %52 = add nuw nsw i64 %49, 1
  %53 = getelementptr i64, ptr %38, i64 %49
  store i64 %51, ptr %53, 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.ph540.prol.loopexit, label %.lr.ph540.prol, !llvm.loop !15

.lr.ph540.prol.loopexit:                          ; preds = %.lr.ph540.prol, %.lr.ph540.preheader686
  %.unr = phi i64 [ %.ph687, %.lr.ph540.preheader686 ], [ %52, %.lr.ph540.prol ]
  %54 = icmp ult i64 %48, 3
  br i1 %54, label %.loopexit, label %.lr.ph540

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

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

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

.lr.ph544.preheader:                              ; preds = %89
  %93 = ptrtoint ptr %91 to i64
  %min.iters.check606 = icmp ult i64 %.fca.7.0.1.load, 6
  %94 = sub i64 %93, %.fca.0.load584
  %diff.check603 = icmp ult i64 %94, 32
  %or.cond675 = select i1 %min.iters.check606, i1 true, i1 %diff.check603
  br i1 %or.cond675, label %.lr.ph544.preheader682, label %vector.ph607

vector.ph607:                                     ; preds = %.lr.ph544.preheader
  %n.vec609 = and i64 %.fca.7.0.1.load, -4
  br label %vector.body612

vector.body612:                                   ; preds = %vector.body612, %vector.ph607
  %index613 = phi i64 [ 0, %vector.ph607 ], [ %index.next616, %vector.body612 ]
  %95 = getelementptr i64, ptr %.fca.0.load, i64 %index613
  %wide.load614 = load <2 x i64>, ptr %95, align 8, !tbaa !3
  %96 = getelementptr i64, ptr %95, i64 2
  %wide.load615 = load <2 x i64>, ptr %96, align 8, !tbaa !3
  %97 = getelementptr i64, ptr %91, i64 %index613
  store <2 x i64> %wide.load614, ptr %97, align 8, !tbaa !3
  %98 = getelementptr i64, ptr %97, i64 2
  store <2 x i64> %wide.load615, ptr %98, align 8, !tbaa !3
  %index.next616 = add nuw i64 %index613, 4
  %99 = icmp eq i64 %index.next616, %n.vec609
  br i1 %99, label %middle.block604, label %vector.body612, !llvm.loop !18

middle.block604:                                  ; preds = %vector.body612
  %cmp.n611 = icmp eq i64 %.fca.7.0.1.load, %n.vec609
  br i1 %cmp.n611, label %.loopexit, label %.lr.ph544.preheader682

.lr.ph544.preheader682:                           ; preds = %.lr.ph544.preheader, %middle.block604
  %.ph683 = phi i64 [ 0, %.lr.ph544.preheader ], [ %n.vec609, %middle.block604 ]
  %100 = xor i64 %.ph683, -1
  %101 = add i64 %.fca.7.0.1.load, %100
  %xtraiter693 = and i64 %.fca.7.0.1.load, 3
  %lcmp.mod694.not = icmp eq i64 %xtraiter693, 0
  br i1 %lcmp.mod694.not, label %.lr.ph544.prol.loopexit, label %.lr.ph544.prol

.lr.ph544.prol:                                   ; preds = %.lr.ph544.preheader682, %.lr.ph544.prol
  %102 = phi i64 [ %105, %.lr.ph544.prol ], [ %.ph683, %.lr.ph544.preheader682 ]
  %prol.iter695 = phi i64 [ %prol.iter695.next, %.lr.ph544.prol ], [ 0, %.lr.ph544.preheader682 ]
  %103 = getelementptr i64, ptr %.fca.0.load, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !3
  %105 = add nuw nsw i64 %102, 1
  %106 = getelementptr i64, ptr %91, i64 %102
  store i64 %104, ptr %106, align 8, !tbaa !3
  %prol.iter695.next = add i64 %prol.iter695, 1
  %prol.iter695.cmp.not = icmp eq i64 %prol.iter695.next, %xtraiter693
  br i1 %prol.iter695.cmp.not, label %.lr.ph544.prol.loopexit, label %.lr.ph544.prol, !llvm.loop !19

.lr.ph544.prol.loopexit:                          ; preds = %.lr.ph544.prol, %.lr.ph544.preheader682
  %.unr696 = phi i64 [ %.ph683, %.lr.ph544.preheader682 ], [ %105, %.lr.ph544.prol ]
  %107 = icmp ult i64 %101, 3
  br i1 %107, label %.loopexit, label %.lr.ph544

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

.loopexit:                                        ; preds = %.lr.ph540.prol.loopexit, %.lr.ph540, %.lr.ph544.prol.loopexit, %.lr.ph544, %middle.block, %middle.block604
  %.ph = phi ptr [ %91, %middle.block604 ], [ %38, %middle.block ], [ %91, %.lr.ph544 ], [ %91, %.lr.ph544.prol.loopexit ], [ %38, %.lr.ph540 ], [ %38, %.lr.ph540.prol.loopexit ]
  br i1 %.not, label %.loopexit.thread, label %.thread522

.thread522:                                       ; preds = %36, %.loopexit
  %.ph579 = phi ptr [ %.ph, %.loopexit ], [ %38, %36 ]
  call void @free(ptr nonnull %.unpack441)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %89, %.thread522, %.loopexit
  %.ph576 = phi ptr [ %.ph579, %.thread522 ], [ %.ph, %.loopexit ], [ %91, %89 ]
  store ptr %.ph576, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %.fca.7.0.1.load, ptr @_QFEa.8, align 8, !tbaa !7
  br label %._crit_edge542

._crit_edge542:                                   ; preds = %.preheader537, %.loopexit.thread
  %.unpack454574 = phi ptr [ %.ph576, %.loopexit.thread ], [ %.unpack441, %.preheader537 ]
  %.not453 = icmp eq ptr %.fca.0.load, null
  br i1 %.not453, label %125, label %._crit_edge542.thread

._crit_edge542.thread:                            ; preds = %.lr.ph541.prol.loopexit, %.lr.ph541, %middle.block589, %._crit_edge542
  call void @free(ptr nonnull %.fca.0.load)
  %.unpack454.pre = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  br label %125

125:                                              ; preds = %._crit_edge542.thread, %._crit_edge542
  %.unpack454 = phi ptr [ %.unpack454.pre, %._crit_edge542.thread ], [ %.unpack454574, %._crit_edge542 ]
  %126 = load i64, ptr %3, align 8, !tbaa !3
  %127 = call i64 @llvm.smax.i64(i64 %126, i64 0)
  %.not466 = icmp eq ptr %.unpack454, null
  br i1 %.not466, label %215, label %128

128:                                              ; preds = %125
  %.unpack461.unpack.unpack463 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  %.not500 = icmp eq i64 %.unpack461.unpack.unpack463, %127
  %129 = shl i64 %127, 3
  %130 = call ptr @malloc(i64 %129)
  %.not561 = icmp slt i64 %126, 1
  br i1 %.not500, label %173, label %131

131:                                              ; preds = %128
  br i1 %.not561, label %.thread526, label %.lr.ph546.preheader

.lr.ph546.preheader:                              ; preds = %131
  %min.iters.check622 = icmp ult i64 %127, 10
  br i1 %min.iters.check622, label %.lr.ph546.preheader680, label %vector.memcheck617

vector.memcheck617:                               ; preds = %.lr.ph546.preheader
  %132 = shl i64 %127, 3
  %uglygep = getelementptr i8, ptr %130, i64 %132
  %133 = shl i64 %126, 3
  %134 = sub i64 %133, %132
  %uglygep618 = getelementptr i8, ptr %.unpack454, i64 %134
  %uglygep619 = getelementptr i8, ptr %.unpack454, i64 %133
  %bound0 = icmp ult ptr %130, %uglygep619
  %bound1 = icmp ult ptr %uglygep618, %uglygep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph546.preheader680, label %vector.ph623

vector.ph623:                                     ; preds = %vector.memcheck617
  %n.vec625 = and i64 %127, 9223372036854775804
  br label %vector.body628

vector.body628:                                   ; preds = %vector.body628, %vector.ph623
  %index629 = phi i64 [ 0, %vector.ph623 ], [ %index.next633, %vector.body628 ]
  %.neg = xor i64 %index629, -1
  %135 = add i64 %126, %.neg
  %136 = getelementptr i64, ptr %.unpack454, i64 %135
  %137 = getelementptr i64, ptr %136, i64 -1
  %wide.load630 = load <2 x i64>, ptr %137, align 8, !tbaa !3, !alias.scope !21
  %reverse = shufflevector <2 x i64> %wide.load630, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %138 = getelementptr i64, ptr %136, i64 -2
  %139 = getelementptr i64, ptr %138, i64 -1
  %wide.load631 = load <2 x i64>, ptr %139, align 8, !tbaa !3, !alias.scope !21
  %reverse632 = shufflevector <2 x i64> %wide.load631, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %140 = getelementptr i64, ptr %130, i64 %index629
  store <2 x i64> %reverse, ptr %140, align 8, !tbaa !3, !alias.scope !24, !noalias !21
  %141 = getelementptr i64, ptr %140, i64 2
  store <2 x i64> %reverse632, ptr %141, align 8, !tbaa !3, !alias.scope !24, !noalias !21
  %index.next633 = add nuw i64 %index629, 4
  %142 = icmp eq i64 %index.next633, %n.vec625
  br i1 %142, label %middle.block620, label %vector.body628, !llvm.loop !26

middle.block620:                                  ; preds = %vector.body628
  %cmp.n627 = icmp eq i64 %127, %n.vec625
  br i1 %cmp.n627, label %.thread526, label %.lr.ph546.preheader680

.lr.ph546.preheader680:                           ; preds = %vector.memcheck617, %.lr.ph546.preheader, %middle.block620
  %.ph681 = phi i64 [ 0, %vector.memcheck617 ], [ 0, %.lr.ph546.preheader ], [ %n.vec625, %middle.block620 ]
  %143 = xor i64 %.ph681, -1
  %144 = add nsw i64 %127, %143
  %xtraiter697 = and i64 %127, 3
  %lcmp.mod698.not = icmp eq i64 %xtraiter697, 0
  br i1 %lcmp.mod698.not, label %.lr.ph546.prol.loopexit, label %.lr.ph546.prol

.lr.ph546.prol:                                   ; preds = %.lr.ph546.preheader680, %.lr.ph546.prol
  %145 = phi i64 [ %149, %.lr.ph546.prol ], [ %.ph681, %.lr.ph546.preheader680 ]
  %prol.iter699 = phi i64 [ %prol.iter699.next, %.lr.ph546.prol ], [ 0, %.lr.ph546.preheader680 ]
  %.neg671.prol = xor i64 %145, -1
  %146 = add i64 %126, %.neg671.prol
  %147 = getelementptr i64, ptr %.unpack454, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !3
  %149 = add nuw nsw i64 %145, 1
  %150 = getelementptr i64, ptr %130, i64 %145
  store i64 %148, ptr %150, align 8, !tbaa !3
  %prol.iter699.next = add i64 %prol.iter699, 1
  %prol.iter699.cmp.not = icmp eq i64 %prol.iter699.next, %xtraiter697
  br i1 %prol.iter699.cmp.not, label %.lr.ph546.prol.loopexit, label %.lr.ph546.prol, !llvm.loop !27

.lr.ph546.prol.loopexit:                          ; preds = %.lr.ph546.prol, %.lr.ph546.preheader680
  %.unr700 = phi i64 [ %.ph681, %.lr.ph546.preheader680 ], [ %149, %.lr.ph546.prol ]
  %151 = icmp ult i64 %144, 3
  br i1 %151, label %.thread526, label %.lr.ph546

.lr.ph546:                                        ; preds = %.lr.ph546.prol.loopexit, %.lr.ph546
  %152 = phi i64 [ %171, %.lr.ph546 ], [ %.unr700, %.lr.ph546.prol.loopexit ]
  %.neg671 = xor i64 %152, -1
  %153 = add i64 %126, %.neg671
  %154 = getelementptr i64, ptr %.unpack454, i64 %153
  %155 = load i64, ptr %154, align 8, !tbaa !3
  %156 = add nuw nsw i64 %152, 1
  %157 = getelementptr i64, ptr %130, i64 %152
  store i64 %155, ptr %157, align 8, !tbaa !3
  %.neg671.1 = sub i64 -2, %152
  %158 = add i64 %126, %.neg671.1
  %159 = getelementptr i64, ptr %.unpack454, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !3
  %161 = add nuw nsw i64 %152, 2
  %162 = getelementptr i64, ptr %130, i64 %156
  store i64 %160, ptr %162, align 8, !tbaa !3
  %.neg671.2 = sub i64 -3, %152
  %163 = add i64 %126, %.neg671.2
  %164 = getelementptr i64, ptr %.unpack454, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !3
  %166 = add nuw nsw i64 %152, 3
  %167 = getelementptr i64, ptr %130, i64 %161
  store i64 %165, ptr %167, align 8, !tbaa !3
  %.neg671.3 = sub i64 -4, %152
  %168 = add i64 %126, %.neg671.3
  %169 = getelementptr i64, ptr %.unpack454, i64 %168
  %170 = load i64, ptr %169, align 8, !tbaa !3
  %171 = add nuw nsw i64 %152, 4
  %172 = getelementptr i64, ptr %130, i64 %166
  store i64 %170, ptr %172, align 8, !tbaa !3
  %exitcond569.not.3 = icmp eq i64 %171, %127
  br i1 %exitcond569.not.3, label %.thread526, label %.lr.ph546, !llvm.loop !28

173:                                              ; preds = %128
  br i1 %.not561, label %._crit_edge551, label %.lr.ph549

.lr.ph549:                                        ; preds = %173
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %130, ptr nonnull align 8 %.unpack454, i64 %129, i1 false), !tbaa !3
  %min.iters.check643 = icmp ult i64 %127, 10
  br i1 %min.iters.check643, label %scalar.ph642.preheader, label %vector.memcheck634

vector.memcheck634:                               ; preds = %.lr.ph549
  %174 = shl i64 %127, 3
  %uglygep635 = getelementptr i8, ptr %130, i64 %174
  %175 = shl i64 %126, 3
  %176 = sub i64 %175, %174
  %uglygep636 = getelementptr i8, ptr %.unpack454, i64 %176
  %uglygep637 = getelementptr i8, ptr %.unpack454, i64 %175
  %bound0638 = icmp ult ptr %130, %uglygep637
  %bound1639 = icmp ult ptr %uglygep636, %uglygep635
  %found.conflict640 = and i1 %bound0638, %bound1639
  br i1 %found.conflict640, label %scalar.ph642.preheader, label %vector.ph644

vector.ph644:                                     ; preds = %vector.memcheck634
  %n.vec646 = and i64 %127, 9223372036854775804
  br label %vector.body649

vector.body649:                                   ; preds = %vector.body649, %vector.ph644
  %index650 = phi i64 [ 0, %vector.ph644 ], [ %index.next655, %vector.body649 ]
  %.neg672 = xor i64 %index650, -1
  %177 = add i64 %126, %.neg672
  %178 = getelementptr i64, ptr %.unpack454, i64 %177
  %179 = getelementptr i64, ptr %178, i64 -1
  %wide.load651 = load <2 x i64>, ptr %179, align 8, !tbaa !3, !alias.scope !29
  %reverse652 = shufflevector <2 x i64> %wide.load651, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %180 = getelementptr i64, ptr %178, i64 -2
  %181 = getelementptr i64, ptr %180, i64 -1
  %wide.load653 = load <2 x i64>, ptr %181, align 8, !tbaa !3, !alias.scope !29
  %reverse654 = shufflevector <2 x i64> %wide.load653, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %182 = getelementptr i64, ptr %130, i64 %index650
  store <2 x i64> %reverse652, ptr %182, align 8, !tbaa !3, !alias.scope !32, !noalias !29
  %183 = getelementptr i64, ptr %182, i64 2
  store <2 x i64> %reverse654, ptr %183, align 8, !tbaa !3, !alias.scope !32, !noalias !29
  %index.next655 = add nuw i64 %index650, 4
  %184 = icmp eq i64 %index.next655, %n.vec646
  br i1 %184, label %middle.block641, label %vector.body649, !llvm.loop !34

middle.block641:                                  ; preds = %vector.body649
  %cmp.n648 = icmp eq i64 %127, %n.vec646
  br i1 %cmp.n648, label %.preheader, label %scalar.ph642.preheader

scalar.ph642.preheader:                           ; preds = %vector.memcheck634, %.lr.ph549, %middle.block641
  %.ph679 = phi i64 [ 0, %vector.memcheck634 ], [ 0, %.lr.ph549 ], [ %n.vec646, %middle.block641 ]
  %185 = xor i64 %.ph679, -1
  %186 = add nsw i64 %127, %185
  %xtraiter701 = and i64 %127, 3
  %lcmp.mod702.not = icmp eq i64 %xtraiter701, 0
  br i1 %lcmp.mod702.not, label %scalar.ph642.prol.loopexit, label %scalar.ph642.prol

scalar.ph642.prol:                                ; preds = %scalar.ph642.preheader, %scalar.ph642.prol
  %187 = phi i64 [ %191, %scalar.ph642.prol ], [ %.ph679, %scalar.ph642.preheader ]
  %prol.iter703 = phi i64 [ %prol.iter703.next, %scalar.ph642.prol ], [ 0, %scalar.ph642.preheader ]
  %.neg673.prol = xor i64 %187, -1
  %188 = add i64 %126, %.neg673.prol
  %189 = getelementptr i64, ptr %.unpack454, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !3
  %191 = add nuw nsw i64 %187, 1
  %192 = getelementptr i64, ptr %130, i64 %187
  store i64 %190, ptr %192, align 8, !tbaa !3
  %prol.iter703.next = add i64 %prol.iter703, 1
  %prol.iter703.cmp.not = icmp eq i64 %prol.iter703.next, %xtraiter701
  br i1 %prol.iter703.cmp.not, label %scalar.ph642.prol.loopexit, label %scalar.ph642.prol, !llvm.loop !35

scalar.ph642.prol.loopexit:                       ; preds = %scalar.ph642.prol, %scalar.ph642.preheader
  %.unr704 = phi i64 [ %.ph679, %scalar.ph642.preheader ], [ %191, %scalar.ph642.prol ]
  %193 = icmp ult i64 %186, 3
  br i1 %193, label %.preheader, label %scalar.ph642

.preheader:                                       ; preds = %scalar.ph642.prol.loopexit, %scalar.ph642, %middle.block641
  br i1 %.not561, label %._crit_edge551, label %.lr.ph550.preheader

.lr.ph550.preheader:                              ; preds = %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %.unpack454, ptr nonnull align 8 %130, i64 %129, i1 false), !tbaa !3
  br label %._crit_edge551

scalar.ph642:                                     ; preds = %scalar.ph642.prol.loopexit, %scalar.ph642
  %194 = phi i64 [ %213, %scalar.ph642 ], [ %.unr704, %scalar.ph642.prol.loopexit ]
  %.neg673 = xor i64 %194, -1
  %195 = add i64 %126, %.neg673
  %196 = getelementptr i64, ptr %.unpack454, i64 %195
  %197 = load i64, ptr %196, align 8, !tbaa !3
  %198 = add nuw nsw i64 %194, 1
  %199 = getelementptr i64, ptr %130, i64 %194
  store i64 %197, ptr %199, align 8, !tbaa !3
  %.neg673.1 = sub i64 -2, %194
  %200 = add i64 %126, %.neg673.1
  %201 = getelementptr i64, ptr %.unpack454, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !3
  %203 = add nuw nsw i64 %194, 2
  %204 = getelementptr i64, ptr %130, i64 %198
  store i64 %202, ptr %204, align 8, !tbaa !3
  %.neg673.2 = sub i64 -3, %194
  %205 = add i64 %126, %.neg673.2
  %206 = getelementptr i64, ptr %.unpack454, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !3
  %208 = add nuw nsw i64 %194, 3
  %209 = getelementptr i64, ptr %130, i64 %203
  store i64 %207, ptr %209, align 8, !tbaa !3
  %.neg673.3 = sub i64 -4, %194
  %210 = add i64 %126, %.neg673.3
  %211 = getelementptr i64, ptr %.unpack454, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !3
  %213 = add nuw nsw i64 %194, 4
  %214 = getelementptr i64, ptr %130, i64 %208
  store i64 %212, ptr %214, align 8, !tbaa !3
  %exitcond570.not.3 = icmp eq i64 %213, %127
  br i1 %exitcond570.not.3, label %.preheader, label %scalar.ph642, !llvm.loop !36

215:                                              ; preds = %125
  %216 = shl i64 %127, 3
  %217 = call ptr @malloc(i64 %216)
  %.not564 = icmp slt i64 %126, 1
  call void @llvm.assume(i1 %.not564)
  br label %._crit_edge554

._crit_edge551:                                   ; preds = %173, %.lr.ph550.preheader, %.preheader
  call void @free(ptr %130)
  br label %218

.thread526:                                       ; preds = %.lr.ph546.prol.loopexit, %.lr.ph546, %middle.block620, %131
  call void @free(ptr nonnull %.unpack454)
  br label %._crit_edge554

._crit_edge554:                                   ; preds = %215, %.thread526
  %.ph524529 = phi ptr [ %130, %.thread526 ], [ %217, %215 ]
  store ptr %.ph524529, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %127, ptr @_QFEa.8, align 8, !tbaa !7
  br label %218

218:                                              ; preds = %._crit_edge551, %._crit_edge554
  %219 = load i64, ptr %3, align 8, !tbaa !3
  %220 = icmp sgt i64 %219, 0
  br i1 %220, label %.lr.ph558, label %244

.lr.ph558:                                        ; preds = %218
  %_QFEresult.promoted = load i64, ptr @_QFEresult, align 8, !tbaa !3
  %.unpack467 = load ptr, ptr @_QFEa.0, align 8
  %min.iters.check658 = icmp ult i64 %219, 4
  br i1 %min.iters.check658, label %scalar.ph657.preheader, label %vector.ph659

vector.ph659:                                     ; preds = %.lr.ph558
  %n.vec661 = and i64 %219, -4
  %ind.end = or i64 %n.vec661, 1
  %221 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %_QFEresult.promoted, i64 0
  br label %vector.body664

vector.body664:                                   ; preds = %vector.body664, %vector.ph659
  %index665 = phi i64 [ 0, %vector.ph659 ], [ %index.next670, %vector.body664 ]
  %vec.ind = phi <2 x i64> [ <i64 1, i64 2>, %vector.ph659 ], [ %vec.ind.next, %vector.body664 ]
  %vec.phi = phi <2 x i64> [ %221, %vector.ph659 ], [ %232, %vector.body664 ]
  %vec.phi667 = phi <2 x i64> [ zeroinitializer, %vector.ph659 ], [ %233, %vector.body664 ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %222 = and <2 x i64> %vec.ind, <i64 -9223372036854775807, i64 -9223372036854775807>
  %223 = and <2 x i64> %step.add, <i64 -9223372036854775807, i64 -9223372036854775807>
  %224 = icmp eq <2 x i64> %222, <i64 1, i64 1>
  %225 = icmp eq <2 x i64> %223, <i64 1, i64 1>
  %226 = getelementptr i64, ptr %.unpack467, i64 %index665
  %wide.load668 = load <2 x i64>, ptr %226, align 8, !tbaa !3
  %227 = getelementptr i64, ptr %226, i64 2
  %wide.load669 = load <2 x i64>, ptr %227, align 8, !tbaa !3
  %228 = sub <2 x i64> zeroinitializer, %wide.load668
  %229 = sub <2 x i64> zeroinitializer, %wide.load669
  %230 = select <2 x i1> %224, <2 x i64> %wide.load668, <2 x i64> %228
  %231 = select <2 x i1> %225, <2 x i64> %wide.load669, <2 x i64> %229
  %232 = add <2 x i64> %vec.phi, %230
  %233 = add <2 x i64> %vec.phi667, %231
  %index.next670 = add nuw i64 %index665, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %234 = icmp eq i64 %index.next670, %n.vec661
  br i1 %234, label %middle.block656, label %vector.body664, !llvm.loop !37

middle.block656:                                  ; preds = %vector.body664
  %bin.rdx = add <2 x i64> %233, %232
  %235 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n663 = icmp eq i64 %219, %n.vec661
  br i1 %cmp.n663, label %._crit_edge559, label %scalar.ph657.preheader

scalar.ph657.preheader:                           ; preds = %.lr.ph558, %middle.block656
  %.ph676 = phi i64 [ 1, %.lr.ph558 ], [ %ind.end, %middle.block656 ]
  %storemerge555556.ph = phi i64 [ %_QFEresult.promoted, %.lr.ph558 ], [ %235, %middle.block656 ]
  br label %scalar.ph657

scalar.ph657:                                     ; preds = %scalar.ph657.preheader, %scalar.ph657
  %236 = phi i64 [ %243, %scalar.ph657 ], [ %.ph676, %scalar.ph657.preheader ]
  %storemerge555556 = phi i64 [ %storemerge, %scalar.ph657 ], [ %storemerge555556.ph, %scalar.ph657.preheader ]
  %237 = and i64 %236, -9223372036854775807
  %238 = icmp eq i64 %237, 1
  %239 = add i64 %236, -1
  %240 = getelementptr i64, ptr %.unpack467, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !3
  %242 = sub i64 0, %241
  %storemerge.p = select i1 %238, i64 %241, i64 %242
  %storemerge = add i64 %storemerge555556, %storemerge.p
  %243 = add nuw i64 %236, 1
  %exitcond572.not = icmp eq i64 %236, %219
  br i1 %exitcond572.not, label %._crit_edge559, label %scalar.ph657, !llvm.loop !38

._crit_edge559:                                   ; preds = %scalar.ph657, %middle.block656
  %storemerge.lcssa = phi i64 [ %235, %middle.block656 ], [ %storemerge, %scalar.ph657 ]
  store i64 %storemerge.lcssa, ptr @_QFEresult, align 8, !tbaa !3
  br label %244

244:                                              ; preds = %._crit_edge559, %218
  %245 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.4cce286344b6c60e1b392feb3cf1dec2, i32 21)
  %246 = load i64, ptr @_QFEresult, align 8, !tbaa !3
  %247 = call i1 @_FortranAioOutputInteger64(ptr %245, i64 %246)
  %248 = call i32 @_FortranAioEndIoStatement(ptr %245)
  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 !39

._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.4cce286344b6c60e1b392feb3cf1dec2, i32 31)
  %.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.4cce286344b6c60e1b392feb3cf1dec2, i32 31)
  %.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.4cce286344b6c60e1b392feb3cf1dec2, i32 31)
  %.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 !40

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 !41

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 !42

.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 !43

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 !44

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 !45

.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(inaccessiblemem: readwrite)
declare void @llvm.assume(i1 noundef) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #6

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { mustprogress 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(inaccessiblemem: readwrite) }
attributes #6 = { 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 = !{!22}
!22 = distinct !{!22, !23}
!23 = distinct !{!23, !"LVerDomain"}
!24 = !{!25}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !10, !11}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !10}
!29 = !{!30}
!30 = distinct !{!30, !31}
!31 = distinct !{!31, !"LVerDomain"}
!32 = !{!33}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !10, !11}
!35 = distinct !{!35, !13}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10, !11}
!38 = distinct !{!38, !11, !10}
!39 = distinct !{!39, !13}
!40 = distinct !{!40, !10, !11}
!41 = distinct !{!41, !10, !11}
!42 = distinct !{!42, !10}
!43 = distinct !{!43, !10}
!44 = distinct !{!44, !10, !11}
!45 = distinct !{!45, !10}
