program two_arrays
  implicit none
  integer :: n
  integer(8) :: a(10000), b(10000), m, x, y
  a = 0_8
  b = 0_8
  read(*,*) n
  read(*,*) a(1:n)
  read(*,*) b(1:n)
  m = sum(b(1:n)-a(1:n))
  x = sum(a(1:n)-b(1:n),a(1:n)-b(1:n).gt.0_8)
  y = sum((b(1:n)-a(1:n)+1_8)/2_8,b(1:n)-a(1:n).gt.0_8)
  if (m.ge.max(x,y)) then
    write(*,'(a)') "Yes"
  else
    write(*,'(a)') "No"
  end if
  stop
end program two_arrays
; 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 = internal global [10000 x i64] undef
@_QFEb = internal global [10000 x i64] undef
@_QQcl.65b13949b8b75faba2476a46f2d1d8fb = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6288/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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

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

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #2 {
.preheader.preheader:
  %0 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca { 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 i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000) @_QFEa, i8 0, i64 80000, i1 false), !tbaa !3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000) @_QFEb, i8 0, i64 80000, i1 false), !tbaa !3
  %7 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 7)
  %8 = call i1 @_FortranAioInputInteger(ptr %7, ptr nonnull %6, i32 4)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %7)
  %10 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 8)
  %11 = load i32, ptr %6, align 4, !tbaa !3
  %12 = call i32 @llvm.smax.i32(i32 %11, i32 0)
  %13 = zext i32 %12 to i64
  store ptr @_QFEa, ptr %5, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, 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 %5, 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 %5, 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 %5, 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 %5, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, 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 %5, 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 %5, i64 0, i32 7, i64 0, i64 1
  store i64 %13, 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 %5, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %14 = call i1 @_FortranAioInputDescriptor(ptr %10, ptr nonnull %5)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %10)
  %16 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 9)
  %17 = load i32, ptr %6, align 4, !tbaa !3
  %18 = call i32 @llvm.smax.i32(i32 %17, i32 0)
  %19 = zext i32 %18 to i64
  store ptr @_QFEb, ptr %4, align 8, !tbaa !7
  %.fca.1.gep6 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep6, align 8, !tbaa !7
  %.fca.2.gep8 = 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.gep8, align 8, !tbaa !7
  %.fca.3.gep10 = 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.gep10, align 4, !tbaa !7
  %.fca.4.gep12 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep12, align 1, !tbaa !7
  %.fca.5.gep14 = 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.gep14, align 2, !tbaa !7
  %.fca.6.gep16 = 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.gep16, align 1, !tbaa !7
  %.fca.7.0.0.gep18 = 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.gep18, align 8, !tbaa !7
  %.fca.7.0.1.gep20 = 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 %19, ptr %.fca.7.0.1.gep20, align 8, !tbaa !7
  %.fca.7.0.2.gep22 = 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 8, ptr %.fca.7.0.2.gep22, align 8, !tbaa !7
  %20 = call i1 @_FortranAioInputDescriptor(ptr %16, ptr nonnull %4)
  %21 = call i32 @_FortranAioEndIoStatement(ptr %16)
  %22 = load i32, ptr %6, align 4, !tbaa !3
  %23 = call i32 @llvm.smax.i32(i32 %22, i32 0)
  %24 = zext i32 %23 to i64
  %25 = shl nuw nsw i64 %24, 3
  %26 = call ptr @malloc(i64 %25)
  %.not141 = icmp slt i32 %22, 1
  br i1 %.not141, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.preheader

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

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %24, 2147483644
  %ind.end = and i64 %24, 3
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %27 = getelementptr i64, ptr @_QFEb, i64 %index
  %wide.load = load <2 x i64>, ptr %27, align 16, !tbaa !3
  %28 = getelementptr i64, ptr %27, i64 2
  %wide.load150 = load <2 x i64>, ptr %28, align 16, !tbaa !3
  %29 = getelementptr i64, ptr @_QFEa, i64 %index
  %wide.load151 = load <2 x i64>, ptr %29, align 16, !tbaa !3
  %30 = getelementptr i64, ptr %29, i64 2
  %wide.load152 = load <2 x i64>, ptr %30, align 16, !tbaa !3
  %31 = sub <2 x i64> %wide.load, %wide.load151
  %32 = sub <2 x i64> %wide.load150, %wide.load152
  %33 = getelementptr i64, ptr %26, i64 %index
  store <2 x i64> %31, ptr %33, align 8, !tbaa !3
  %34 = getelementptr i64, ptr %33, i64 2
  store <2 x i64> %32, ptr %34, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !9

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

.lr.ph.preheader254:                              ; preds = %.lr.ph.preheader, %middle.block
  %.ph255 = phi i64 [ %24, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.ph256 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader254, %.lr.ph
  %36 = phi i64 [ %45, %.lr.ph ], [ %.ph255, %.lr.ph.preheader254 ]
  %37 = phi i64 [ %38, %.lr.ph ], [ %.ph256, %.lr.ph.preheader254 ]
  %38 = add nuw nsw i64 %37, 1
  %39 = getelementptr i64, ptr @_QFEb, i64 %37
  %40 = load i64, ptr %39, align 8, !tbaa !3
  %41 = getelementptr i64, ptr @_QFEa, i64 %37
  %42 = load i64, ptr %41, align 8, !tbaa !3
  %43 = sub i64 %40, %42
  %44 = getelementptr i64, ptr %26, i64 %37
  store i64 %43, ptr %44, align 8, !tbaa !3
  %45 = add nsw i64 %36, -1
  %46 = icmp ugt i64 %36, 1
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  br i1 %.not141, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i.preheader

.lr.ph.i.preheader:                               ; preds = %._crit_edge
  %min.iters.check155 = icmp ult i32 %23, 4
  br i1 %min.iters.check155, label %.lr.ph.i.preheader249, label %vector.ph156

vector.ph156:                                     ; preds = %.lr.ph.i.preheader
  %n.vec158 = and i64 %24, 2147483644
  br label %vector.body161

vector.body161:                                   ; preds = %vector.body161, %vector.ph156
  %index162 = phi i64 [ 0, %vector.ph156 ], [ %index.next166, %vector.body161 ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph156 ], [ %50, %vector.body161 ]
  %vec.phi163 = phi <2 x i64> [ zeroinitializer, %vector.ph156 ], [ %51, %vector.body161 ]
  %47 = shl i64 %index162, 3
  %48 = getelementptr i8, ptr %26, i64 %47
  %wide.load164 = load <2 x i64>, ptr %48, align 8, !tbaa !3
  %49 = getelementptr i64, ptr %48, i64 2
  %wide.load165 = load <2 x i64>, ptr %49, align 8, !tbaa !3
  %50 = add <2 x i64> %wide.load164, %vec.phi
  %51 = add <2 x i64> %wide.load165, %vec.phi163
  %index.next166 = add nuw i64 %index162, 4
  %52 = icmp eq i64 %index.next166, %n.vec158
  br i1 %52, label %middle.block153, label %vector.body161, !llvm.loop !13

middle.block153:                                  ; preds = %vector.body161
  %bin.rdx = add <2 x i64> %51, %50
  %53 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n160 = icmp eq i64 %n.vec158, %24
  br i1 %cmp.n160, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i.preheader249

.lr.ph.i.preheader249:                            ; preds = %.lr.ph.i.preheader, %middle.block153
  %.ph250 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %53, %middle.block153 ]
  %.ph251 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec158, %middle.block153 ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader249, %.lr.ph.i
  %54 = phi i64 [ %59, %.lr.ph.i ], [ %.ph250, %.lr.ph.i.preheader249 ]
  %55 = phi i64 [ %60, %.lr.ph.i ], [ %.ph251, %.lr.ph.i.preheader249 ]
  %56 = shl i64 %55, 3
  %57 = getelementptr i8, ptr %26, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !3
  %59 = add i64 %58, %54
  %60 = add nuw nsw i64 %55, 1
  %exitcond.not.i = icmp eq i64 %60, %24
  br i1 %exitcond.not.i, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !14

_FortranASumInteger8x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block153, %.preheader.preheader, %._crit_edge
  %.lcssa.i = phi i64 [ 0, %._crit_edge ], [ 0, %.preheader.preheader ], [ %53, %middle.block153 ], [ %59, %.lr.ph.i ]
  call void @free(ptr %26)
  %61 = call ptr @malloc(i64 %25)
  br i1 %.not141, label %._crit_edge131, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %_FortranASumInteger8x1_contract_simplified.exit
  %62 = call i64 @llvm.smax.i64(i64 %24, i64 1)
  %min.iters.check169 = icmp ult i64 %62, 4
  br i1 %min.iters.check169, label %.lr.ph130.preheader246, label %vector.ph170

vector.ph170:                                     ; preds = %.lr.ph130.preheader
  %n.vec172 = and i64 %62, 2147483644
  %ind.end173 = sub nsw i64 %24, %n.vec172
  br label %vector.body177

vector.body177:                                   ; preds = %vector.body177, %vector.ph170
  %index178 = phi i64 [ 0, %vector.ph170 ], [ %index.next183, %vector.body177 ]
  %63 = getelementptr i64, ptr @_QFEa, i64 %index178
  %wide.load179 = load <2 x i64>, ptr %63, align 16, !tbaa !3
  %64 = getelementptr i64, ptr %63, i64 2
  %wide.load180 = load <2 x i64>, ptr %64, align 16, !tbaa !3
  %65 = getelementptr i64, ptr @_QFEb, i64 %index178
  %wide.load181 = load <2 x i64>, ptr %65, align 16, !tbaa !3
  %66 = getelementptr i64, ptr %65, i64 2
  %wide.load182 = load <2 x i64>, ptr %66, align 16, !tbaa !3
  %67 = sub <2 x i64> %wide.load179, %wide.load181
  %68 = sub <2 x i64> %wide.load180, %wide.load182
  %69 = getelementptr i64, ptr %61, i64 %index178
  store <2 x i64> %67, ptr %69, align 8, !tbaa !3
  %70 = getelementptr i64, ptr %69, i64 2
  store <2 x i64> %68, ptr %70, align 8, !tbaa !3
  %index.next183 = add nuw i64 %index178, 4
  %71 = icmp eq i64 %index.next183, %n.vec172
  br i1 %71, label %middle.block167, label %vector.body177, !llvm.loop !15

middle.block167:                                  ; preds = %vector.body177
  %cmp.n176 = icmp eq i64 %62, %n.vec172
  br i1 %cmp.n176, label %._crit_edge131, label %.lr.ph130.preheader246

.lr.ph130.preheader246:                           ; preds = %.lr.ph130.preheader, %middle.block167
  %.ph247 = phi i64 [ %24, %.lr.ph130.preheader ], [ %ind.end173, %middle.block167 ]
  %.ph248 = phi i64 [ 0, %.lr.ph130.preheader ], [ %n.vec172, %middle.block167 ]
  br label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph130.preheader246, %.lr.ph130
  %72 = phi i64 [ %81, %.lr.ph130 ], [ %.ph247, %.lr.ph130.preheader246 ]
  %73 = phi i64 [ %74, %.lr.ph130 ], [ %.ph248, %.lr.ph130.preheader246 ]
  %74 = add nuw nsw i64 %73, 1
  %75 = getelementptr i64, ptr @_QFEa, i64 %73
  %76 = load i64, ptr %75, align 8, !tbaa !3
  %77 = getelementptr i64, ptr @_QFEb, i64 %73
  %78 = load i64, ptr %77, align 8, !tbaa !3
  %79 = sub i64 %76, %78
  %80 = getelementptr i64, ptr %61, i64 %73
  store i64 %79, ptr %80, align 8, !tbaa !3
  %81 = add nsw i64 %72, -1
  %82 = icmp sgt i64 %72, 1
  br i1 %82, label %.lr.ph130, label %._crit_edge131, !llvm.loop !16

._crit_edge131:                                   ; preds = %.lr.ph130, %middle.block167, %_FortranASumInteger8x1_contract_simplified.exit
  store ptr %61, ptr %3, align 8, !tbaa !7
  %.fca.1.gep46 = 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.gep46, align 8, !tbaa !7
  %.fca.2.gep48 = 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.gep48, align 8, !tbaa !7
  %.fca.3.gep50 = 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.gep50, align 4, !tbaa !7
  %.fca.4.gep52 = 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.gep52, align 1, !tbaa !7
  %.fca.5.gep54 = 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.gep54, align 2, !tbaa !7
  %.fca.6.gep56 = 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.gep56, align 1, !tbaa !7
  %.fca.7.0.0.gep58 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep58, align 8, !tbaa !7
  %.fca.7.0.1.gep60 = 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 %24, ptr %.fca.7.0.1.gep60, align 8, !tbaa !7
  %.fca.7.0.2.gep62 = 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.gep62, align 8, !tbaa !7
  %83 = shl nuw nsw i64 %24, 2
  %84 = call ptr @malloc(i64 %83)
  br i1 %.not141, label %._crit_edge134, label %.lr.ph133.preheader

.lr.ph133.preheader:                              ; preds = %._crit_edge131
  %85 = call i64 @llvm.smax.i64(i64 %24, i64 1)
  %min.iters.check187 = icmp ult i64 %85, 4
  br i1 %min.iters.check187, label %.lr.ph133.preheader243, label %vector.ph188

vector.ph188:                                     ; preds = %.lr.ph133.preheader
  %n.vec190 = and i64 %85, 2147483644
  %ind.end191 = sub nsw i64 %24, %n.vec190
  br label %vector.body195

vector.body195:                                   ; preds = %vector.body195, %vector.ph188
  %index196 = phi i64 [ 0, %vector.ph188 ], [ %index.next201, %vector.body195 ]
  %86 = getelementptr i64, ptr @_QFEa, i64 %index196
  %wide.load197 = load <2 x i64>, ptr %86, align 16, !tbaa !3
  %87 = getelementptr i64, ptr %86, i64 2
  %wide.load198 = load <2 x i64>, ptr %87, align 16, !tbaa !3
  %88 = getelementptr i64, ptr @_QFEb, i64 %index196
  %wide.load199 = load <2 x i64>, ptr %88, align 16, !tbaa !3
  %89 = getelementptr i64, ptr %88, i64 2
  %wide.load200 = load <2 x i64>, ptr %89, align 16, !tbaa !3
  %90 = sub <2 x i64> %wide.load197, %wide.load199
  %91 = sub <2 x i64> %wide.load198, %wide.load200
  %92 = icmp sgt <2 x i64> %90, zeroinitializer
  %93 = icmp sgt <2 x i64> %91, zeroinitializer
  %94 = zext <2 x i1> %92 to <2 x i32>
  %95 = zext <2 x i1> %93 to <2 x i32>
  %96 = getelementptr i32, ptr %84, i64 %index196
  store <2 x i32> %94, ptr %96, align 4, !tbaa !3
  %97 = getelementptr i32, ptr %96, i64 2
  store <2 x i32> %95, ptr %97, align 4, !tbaa !3
  %index.next201 = add nuw i64 %index196, 4
  %98 = icmp eq i64 %index.next201, %n.vec190
  br i1 %98, label %middle.block185, label %vector.body195, !llvm.loop !17

middle.block185:                                  ; preds = %vector.body195
  %cmp.n194 = icmp eq i64 %85, %n.vec190
  br i1 %cmp.n194, label %._crit_edge134, label %.lr.ph133.preheader243

.lr.ph133.preheader243:                           ; preds = %.lr.ph133.preheader, %middle.block185
  %.ph244 = phi i64 [ %24, %.lr.ph133.preheader ], [ %ind.end191, %middle.block185 ]
  %.ph245 = phi i64 [ 0, %.lr.ph133.preheader ], [ %n.vec190, %middle.block185 ]
  br label %.lr.ph133

.lr.ph133:                                        ; preds = %.lr.ph133.preheader243, %.lr.ph133
  %99 = phi i64 [ %110, %.lr.ph133 ], [ %.ph244, %.lr.ph133.preheader243 ]
  %100 = phi i64 [ %101, %.lr.ph133 ], [ %.ph245, %.lr.ph133.preheader243 ]
  %101 = add nuw nsw i64 %100, 1
  %102 = getelementptr i64, ptr @_QFEa, i64 %100
  %103 = load i64, ptr %102, align 8, !tbaa !3
  %104 = getelementptr i64, ptr @_QFEb, i64 %100
  %105 = load i64, ptr %104, align 8, !tbaa !3
  %106 = sub i64 %103, %105
  %107 = icmp sgt i64 %106, 0
  %108 = zext i1 %107 to i32
  %109 = getelementptr i32, ptr %84, i64 %100
  store i32 %108, ptr %109, align 4, !tbaa !3
  %110 = add nsw i64 %99, -1
  %111 = icmp sgt i64 %99, 1
  br i1 %111, label %.lr.ph133, label %._crit_edge134, !llvm.loop !18

._crit_edge134:                                   ; preds = %.lr.ph133, %middle.block185, %._crit_edge131
  store ptr %84, ptr %2, align 8, !tbaa !7
  %.fca.1.gep66 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep66, align 8, !tbaa !7
  %.fca.2.gep68 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep68, align 8, !tbaa !7
  %.fca.3.gep70 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep70, align 4, !tbaa !7
  %.fca.4.gep72 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep72, align 1, !tbaa !7
  %.fca.5.gep74 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep74, align 2, !tbaa !7
  %.fca.6.gep76 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep76, align 1, !tbaa !7
  %.fca.7.0.0.gep78 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep78, align 8, !tbaa !7
  %.fca.7.0.1.gep80 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %24, ptr %.fca.7.0.1.gep80, align 8, !tbaa !7
  %.fca.7.0.2.gep82 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep82, align 8, !tbaa !7
  %112 = call i64 @_FortranASumInteger8(ptr nonnull %3, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 11, i32 0, ptr nonnull %2)
  call void @free(ptr %84)
  call void @free(ptr %61)
  %113 = load i32, ptr %6, align 4, !tbaa !3
  %114 = call i32 @llvm.smax.i32(i32 %113, i32 0)
  %115 = zext i32 %114 to i64
  %116 = shl nuw nsw i64 %115, 3
  %117 = call ptr @malloc(i64 %116)
  %.not144 = icmp slt i32 %113, 1
  br i1 %.not144, label %._crit_edge137, label %.lr.ph136.preheader

.lr.ph136.preheader:                              ; preds = %._crit_edge134
  %min.iters.check205 = icmp ult i32 %114, 4
  br i1 %min.iters.check205, label %.lr.ph136.preheader240, label %vector.ph206

vector.ph206:                                     ; preds = %.lr.ph136.preheader
  %n.vec208 = and i64 %115, 2147483644
  %ind.end209 = and i64 %115, 3
  br label %vector.body213

vector.body213:                                   ; preds = %vector.body213, %vector.ph206
  %index214 = phi i64 [ 0, %vector.ph206 ], [ %index.next219, %vector.body213 ]
  %118 = getelementptr i64, ptr @_QFEb, i64 %index214
  %wide.load215 = load <2 x i64>, ptr %118, align 16, !tbaa !3
  %119 = getelementptr i64, ptr %118, i64 2
  %wide.load216 = load <2 x i64>, ptr %119, align 16, !tbaa !3
  %120 = getelementptr i64, ptr @_QFEa, i64 %index214
  %wide.load217 = load <2 x i64>, ptr %120, align 16, !tbaa !3
  %121 = getelementptr i64, ptr %120, i64 2
  %wide.load218 = load <2 x i64>, ptr %121, align 16, !tbaa !3
  %122 = add <2 x i64> %wide.load215, <i64 1, i64 1>
  %123 = add <2 x i64> %wide.load216, <i64 1, i64 1>
  %124 = sub <2 x i64> %122, %wide.load217
  %125 = sub <2 x i64> %123, %wide.load218
  %126 = sdiv <2 x i64> %124, <i64 2, i64 2>
  %127 = sdiv <2 x i64> %125, <i64 2, i64 2>
  %128 = getelementptr i64, ptr %117, i64 %index214
  store <2 x i64> %126, ptr %128, align 8, !tbaa !3
  %129 = getelementptr i64, ptr %128, i64 2
  store <2 x i64> %127, ptr %129, align 8, !tbaa !3
  %index.next219 = add nuw i64 %index214, 4
  %130 = icmp eq i64 %index.next219, %n.vec208
  br i1 %130, label %middle.block203, label %vector.body213, !llvm.loop !19

middle.block203:                                  ; preds = %vector.body213
  %cmp.n212 = icmp eq i64 %n.vec208, %115
  br i1 %cmp.n212, label %._crit_edge137, label %.lr.ph136.preheader240

.lr.ph136.preheader240:                           ; preds = %.lr.ph136.preheader, %middle.block203
  %.ph241 = phi i64 [ %115, %.lr.ph136.preheader ], [ %ind.end209, %middle.block203 ]
  %.ph242 = phi i64 [ 0, %.lr.ph136.preheader ], [ %n.vec208, %middle.block203 ]
  br label %.lr.ph136

.lr.ph136:                                        ; preds = %.lr.ph136.preheader240, %.lr.ph136
  %131 = phi i64 [ %142, %.lr.ph136 ], [ %.ph241, %.lr.ph136.preheader240 ]
  %132 = phi i64 [ %133, %.lr.ph136 ], [ %.ph242, %.lr.ph136.preheader240 ]
  %133 = add nuw nsw i64 %132, 1
  %134 = getelementptr i64, ptr @_QFEb, i64 %132
  %135 = load i64, ptr %134, align 8, !tbaa !3
  %136 = getelementptr i64, ptr @_QFEa, i64 %132
  %137 = load i64, ptr %136, align 8, !tbaa !3
  %138 = add i64 %135, 1
  %139 = sub i64 %138, %137
  %140 = sdiv i64 %139, 2
  %141 = getelementptr i64, ptr %117, i64 %132
  store i64 %140, ptr %141, align 8, !tbaa !3
  %142 = add nsw i64 %131, -1
  %143 = icmp ugt i64 %131, 1
  br i1 %143, label %.lr.ph136, label %._crit_edge137, !llvm.loop !20

._crit_edge137:                                   ; preds = %.lr.ph136, %middle.block203, %._crit_edge134
  store ptr %117, ptr %1, align 8, !tbaa !7
  %.fca.1.gep86 = 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.gep86, align 8, !tbaa !7
  %.fca.2.gep88 = 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.gep88, align 8, !tbaa !7
  %.fca.3.gep90 = 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.gep90, align 4, !tbaa !7
  %.fca.4.gep92 = 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.gep92, align 1, !tbaa !7
  %.fca.5.gep94 = 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.gep94, align 2, !tbaa !7
  %.fca.6.gep96 = 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.gep96, align 1, !tbaa !7
  %.fca.7.0.0.gep98 = 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.gep98, align 8, !tbaa !7
  %.fca.7.0.1.gep100 = 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 %115, ptr %.fca.7.0.1.gep100, align 8, !tbaa !7
  %.fca.7.0.2.gep102 = 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.gep102, align 8, !tbaa !7
  %144 = shl nuw nsw i64 %115, 2
  %145 = call ptr @malloc(i64 %144)
  br i1 %.not144, label %._crit_edge140, label %.lr.ph139.preheader

.lr.ph139.preheader:                              ; preds = %._crit_edge137
  %146 = call i64 @llvm.smax.i64(i64 %115, i64 1)
  %min.iters.check223 = icmp ult i64 %146, 4
  br i1 %min.iters.check223, label %.lr.ph139.preheader238, label %vector.ph224

vector.ph224:                                     ; preds = %.lr.ph139.preheader
  %n.vec226 = and i64 %146, 2147483644
  %ind.end227 = sub nsw i64 %115, %n.vec226
  br label %vector.body231

vector.body231:                                   ; preds = %vector.body231, %vector.ph224
  %index232 = phi i64 [ 0, %vector.ph224 ], [ %index.next237, %vector.body231 ]
  %147 = getelementptr i64, ptr @_QFEb, i64 %index232
  %wide.load233 = load <2 x i64>, ptr %147, align 16, !tbaa !3
  %148 = getelementptr i64, ptr %147, i64 2
  %wide.load234 = load <2 x i64>, ptr %148, align 16, !tbaa !3
  %149 = getelementptr i64, ptr @_QFEa, i64 %index232
  %wide.load235 = load <2 x i64>, ptr %149, align 16, !tbaa !3
  %150 = getelementptr i64, ptr %149, i64 2
  %wide.load236 = load <2 x i64>, ptr %150, align 16, !tbaa !3
  %151 = sub <2 x i64> %wide.load233, %wide.load235
  %152 = sub <2 x i64> %wide.load234, %wide.load236
  %153 = icmp sgt <2 x i64> %151, zeroinitializer
  %154 = icmp sgt <2 x i64> %152, zeroinitializer
  %155 = zext <2 x i1> %153 to <2 x i32>
  %156 = zext <2 x i1> %154 to <2 x i32>
  %157 = getelementptr i32, ptr %145, i64 %index232
  store <2 x i32> %155, ptr %157, align 4, !tbaa !3
  %158 = getelementptr i32, ptr %157, i64 2
  store <2 x i32> %156, ptr %158, align 4, !tbaa !3
  %index.next237 = add nuw i64 %index232, 4
  %159 = icmp eq i64 %index.next237, %n.vec226
  br i1 %159, label %middle.block221, label %vector.body231, !llvm.loop !21

middle.block221:                                  ; preds = %vector.body231
  %cmp.n230 = icmp eq i64 %146, %n.vec226
  br i1 %cmp.n230, label %._crit_edge140, label %.lr.ph139.preheader238

.lr.ph139.preheader238:                           ; preds = %.lr.ph139.preheader, %middle.block221
  %.ph = phi i64 [ %115, %.lr.ph139.preheader ], [ %ind.end227, %middle.block221 ]
  %.ph239 = phi i64 [ 0, %.lr.ph139.preheader ], [ %n.vec226, %middle.block221 ]
  br label %.lr.ph139

.lr.ph139:                                        ; preds = %.lr.ph139.preheader238, %.lr.ph139
  %160 = phi i64 [ %171, %.lr.ph139 ], [ %.ph, %.lr.ph139.preheader238 ]
  %161 = phi i64 [ %162, %.lr.ph139 ], [ %.ph239, %.lr.ph139.preheader238 ]
  %162 = add nuw nsw i64 %161, 1
  %163 = getelementptr i64, ptr @_QFEb, i64 %161
  %164 = load i64, ptr %163, align 8, !tbaa !3
  %165 = getelementptr i64, ptr @_QFEa, i64 %161
  %166 = load i64, ptr %165, align 8, !tbaa !3
  %167 = sub i64 %164, %166
  %168 = icmp sgt i64 %167, 0
  %169 = zext i1 %168 to i32
  %170 = getelementptr i32, ptr %145, i64 %161
  store i32 %169, ptr %170, align 4, !tbaa !3
  %171 = add nsw i64 %160, -1
  %172 = icmp sgt i64 %160, 1
  br i1 %172, label %.lr.ph139, label %._crit_edge140, !llvm.loop !22

._crit_edge140:                                   ; preds = %.lr.ph139, %middle.block221, %._crit_edge137
  store ptr %145, ptr %0, align 8, !tbaa !7
  %.fca.1.gep106 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep106, align 8, !tbaa !7
  %.fca.2.gep108 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep108, align 8, !tbaa !7
  %.fca.3.gep110 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep110, align 4, !tbaa !7
  %.fca.4.gep112 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep112, align 1, !tbaa !7
  %.fca.5.gep114 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep114, align 2, !tbaa !7
  %.fca.6.gep116 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep116, align 1, !tbaa !7
  %.fca.7.0.0.gep118 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %0, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep118, align 8, !tbaa !7
  %.fca.7.0.1.gep120 = 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 %115, ptr %.fca.7.0.1.gep120, align 8, !tbaa !7
  %.fca.7.0.2.gep122 = 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 4, ptr %.fca.7.0.2.gep122, align 8, !tbaa !7
  %173 = call i64 @_FortranASumInteger8(ptr nonnull %1, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 12, i32 0, ptr nonnull %0)
  call void @free(ptr %145)
  call void @free(ptr %117)
  %174 = call i64 @llvm.smax.i64(i64 %112, i64 %173)
  %.not = icmp slt i64 %.lcssa.i, %174
  %. = select i1 %.not, i32 16, i32 14
  %.148 = select i1 %.not, i64 2, i64 3
  %_QQcl.4E6F._QQcl.596573 = select i1 %.not, ptr @_QQcl.4E6F, ptr @_QQcl.596573
  %175 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.65b13949b8b75faba2476a46f2d1d8fb, i32 %.)
  %176 = call i1 @_FortranAioOutputAscii(ptr %175, ptr nonnull %_QQcl.4E6F._QQcl.596573, i64 %.148)
  %177 = call i32 @_FortranAioEndIoStatement(ptr %175)
  %178 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

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

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

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { noreturn }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, !10}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !11, !10}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !11, !10}
!17 = distinct !{!17, !10, !11}
!18 = distinct !{!18, !11, !10}
!19 = distinct !{!19, !10, !11}
!20 = distinct !{!20, !11, !10}
!21 = distinct !{!21, !10, !11}
!22 = distinct !{!22, !11, !10}
