program	main
  implicit none
  integer(8)::n,a,b,i
  integer(8),allocatable::x(:)
  read*,n,a,b
  allocate(x(n))
  read*,x
  forall(i=1:n-1)x(i)=(x(i+1)-x(i))*a
  where(x>b)x=b
  x(n)=0
  print'(i0)',sum(x)
end program main
; 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"

@_QFEx.0 = internal unnamed_addr global ptr null
@_QFEx.7 = internal unnamed_addr global i64 1
@_QFEx.8 = internal unnamed_addr global i64 0
@_QQcl.311abc78bfd271f636f70364cea025b4 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7567/source.f\00"
@_QQcl.16373402fa3425c6e46827601abb88fa = linkonce constant [76 x i8] c"array left hand side must be allocated when the right hand side is a scalar\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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.311abc78bfd271f636f70364cea025b4, i32 5)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, i32 8)
  %8 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 8)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %10 = load i64, ptr %4, align 8, !tbaa !3
  %11 = call i64 @llvm.smax.i64(i64 %10, i64 0)
  %12 = shl i64 %11, 3
  %13 = call ptr @malloc(i64 %12)
  store ptr %13, ptr @_QFEx.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEx.7, align 8, !tbaa !7
  store i64 %11, ptr @_QFEx.8, align 8, !tbaa !7
  %14 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.311abc78bfd271f636f70364cea025b4, i32 7)
  %.unpack = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack307.unpack.unpack = load i64, ptr @_QFEx.7, align 8, !tbaa !7
  %.unpack307.unpack.unpack309 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %15 = icmp eq i64 %.unpack307.unpack.unpack309, 0
  %16 = select i1 %15, i64 1, i64 %.unpack307.unpack.unpack
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep = 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.gep, align 8, !tbaa !7
  %.fca.2.gep = 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.gep, align 8, !tbaa !7
  %.fca.3.gep = 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.gep, align 4, !tbaa !7
  %.fca.4.gep = 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.gep, align 1, !tbaa !7
  %.fca.5.gep = 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.gep, align 2, !tbaa !7
  %.fca.6.gep = 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.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 %1, i64 0, i32 7, i64 0, i64 0
  store i64 %16, 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 %1, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack307.unpack.unpack309, 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 %1, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %17 = call i1 @_FortranAioInputDescriptor(ptr %14, ptr nonnull %1)
  %18 = call i32 @_FortranAioEndIoStatement(ptr %14)
  %19 = load i64, ptr %4, align 8, !tbaa !3
  %.unpack312 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack319.unpack.unpack = load i64, ptr @_QFEx.7, align 8, !tbaa !7
  %.unpack319.unpack.unpack321 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %20 = shl i64 %.unpack319.unpack.unpack321, 3
  %21 = call ptr @malloc(i64 %20)
  %22 = icmp sgt i64 %.unpack319.unpack.unpack321, 0
  br i1 %22, label %.lr.ph.preheader, label %.preheader395

.lr.ph.preheader:                                 ; preds = %0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %.unpack312, i64 %20, i1 false), !tbaa !3
  br label %.preheader395

.preheader395:                                    ; preds = %.lr.ph.preheader, %0
  %23 = add i64 %19, -1
  %24 = icmp sgt i64 %23, 0
  br i1 %24, label %.lr.ph396, label %.preheader394

.lr.ph396:                                        ; preds = %.preheader395
  %25 = load i64, ptr %2, align 8, !tbaa !3
  %min.iters.check = icmp ult i64 %23, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph396
  %n.vec = and i64 %23, -4
  %ind.end = or i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %25, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert411 = insertelement <2 x i64> poison, i64 %25, i64 0
  %broadcast.splat412 = shufflevector <2 x i64> %broadcast.splatinsert411, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or i64 %index, 1
  %26 = or i64 %index, 2
  %27 = sub i64 %26, %.unpack319.unpack.unpack
  %28 = getelementptr i64, ptr %.unpack312, i64 %27
  %wide.load = load <2 x i64>, ptr %28, align 8, !tbaa !3
  %29 = getelementptr i64, ptr %28, i64 2
  %wide.load408 = load <2 x i64>, ptr %29, align 8, !tbaa !3
  %30 = sub i64 %offset.idx, %.unpack319.unpack.unpack
  %31 = getelementptr i64, ptr %.unpack312, i64 %30
  %wide.load409 = load <2 x i64>, ptr %31, align 8, !tbaa !3
  %32 = getelementptr i64, ptr %31, i64 2
  %wide.load410 = load <2 x i64>, ptr %32, align 8, !tbaa !3
  %33 = sub <2 x i64> %wide.load, %wide.load409
  %34 = sub <2 x i64> %wide.load408, %wide.load410
  %35 = mul <2 x i64> %33, %broadcast.splat
  %36 = mul <2 x i64> %34, %broadcast.splat412
  %37 = getelementptr i64, ptr %21, i64 %30
  store <2 x i64> %35, ptr %37, align 8, !tbaa !3
  %38 = getelementptr i64, ptr %37, i64 2
  store <2 x i64> %36, ptr %38, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %39 = icmp eq i64 %index.next, %n.vec
  br i1 %39, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %23, %n.vec
  br i1 %cmp.n, label %.preheader394, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.lr.ph396, %middle.block
  %.ph471 = phi i64 [ 1, %.lr.ph396 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

.preheader394:                                    ; preds = %scalar.ph, %middle.block, %.preheader395
  br i1 %22, label %.lr.ph397.preheader, label %._crit_edge

.lr.ph397.preheader:                              ; preds = %.preheader394
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %.unpack312, ptr align 8 %21, i64 %20, i1 false), !tbaa !3
  br label %._crit_edge

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %40 = phi i64 [ %41, %scalar.ph ], [ %.ph471, %scalar.ph.preheader ]
  %41 = add nuw i64 %40, 1
  %42 = sub i64 %41, %.unpack319.unpack.unpack
  %43 = getelementptr i64, ptr %.unpack312, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !3
  %45 = sub i64 %40, %.unpack319.unpack.unpack
  %46 = getelementptr i64, ptr %.unpack312, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !3
  %48 = sub i64 %44, %47
  %49 = mul i64 %48, %25
  %50 = getelementptr i64, ptr %21, i64 %45
  store i64 %49, ptr %50, align 8, !tbaa !3
  %exitcond.not = icmp eq i64 %41, %19
  br i1 %exitcond.not, label %.preheader394, label %scalar.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph397.preheader, %.preheader394
  call void @free(ptr %21)
  %51 = load i64, ptr %3, align 8, !tbaa !3
  %52 = shl i64 %.unpack319.unpack.unpack321, 2
  %53 = call ptr @malloc(i64 %52)
  br i1 %22, label %.lr.ph399.preheader, label %._crit_edge400

.lr.ph399.preheader:                              ; preds = %._crit_edge
  %min.iters.check415 = icmp ult i64 %.unpack319.unpack.unpack321, 4
  br i1 %min.iters.check415, label %.lr.ph399.preheader469, label %vector.ph416

vector.ph416:                                     ; preds = %.lr.ph399.preheader
  %n.vec418 = and i64 %.unpack319.unpack.unpack321, -4
  %broadcast.splatinsert425 = insertelement <2 x i64> poison, i64 %51, i64 0
  %broadcast.splat426 = shufflevector <2 x i64> %broadcast.splatinsert425, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert427 = insertelement <2 x i64> poison, i64 %51, i64 0
  %broadcast.splat428 = shufflevector <2 x i64> %broadcast.splatinsert427, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body421

vector.body421:                                   ; preds = %vector.body421, %vector.ph416
  %index422 = phi i64 [ 0, %vector.ph416 ], [ %index.next429, %vector.body421 ]
  %54 = getelementptr i64, ptr %.unpack312, i64 %index422
  %wide.load423 = load <2 x i64>, ptr %54, align 8, !tbaa !3
  %55 = getelementptr i64, ptr %54, i64 2
  %wide.load424 = load <2 x i64>, ptr %55, align 8, !tbaa !3
  %56 = icmp sgt <2 x i64> %wide.load423, %broadcast.splat426
  %57 = icmp sgt <2 x i64> %wide.load424, %broadcast.splat428
  %58 = zext <2 x i1> %56 to <2 x i32>
  %59 = zext <2 x i1> %57 to <2 x i32>
  %60 = getelementptr i32, ptr %53, i64 %index422
  store <2 x i32> %58, ptr %60, align 4, !tbaa !3
  %61 = getelementptr i32, ptr %60, i64 2
  store <2 x i32> %59, ptr %61, align 4, !tbaa !3
  %index.next429 = add nuw i64 %index422, 4
  %62 = icmp eq i64 %index.next429, %n.vec418
  br i1 %62, label %middle.block413, label %vector.body421, !llvm.loop !13

middle.block413:                                  ; preds = %vector.body421
  %cmp.n420 = icmp eq i64 %.unpack319.unpack.unpack321, %n.vec418
  br i1 %cmp.n420, label %.preheader, label %.lr.ph399.preheader469

.lr.ph399.preheader469:                           ; preds = %.lr.ph399.preheader, %middle.block413
  %.ph470 = phi i64 [ 0, %.lr.ph399.preheader ], [ %n.vec418, %middle.block413 ]
  br label %.lr.ph399

.lr.ph399:                                        ; preds = %.lr.ph399.preheader469, %.lr.ph399
  %63 = phi i64 [ %68, %.lr.ph399 ], [ %.ph470, %.lr.ph399.preheader469 ]
  %64 = getelementptr i64, ptr %.unpack312, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !3
  %66 = icmp sgt i64 %65, %51
  %67 = zext i1 %66 to i32
  %68 = add nuw nsw i64 %63, 1
  %69 = getelementptr i32, ptr %53, i64 %63
  store i32 %67, ptr %69, align 4, !tbaa !3
  %exitcond403.not = icmp eq i64 %68, %.unpack319.unpack.unpack321
  br i1 %exitcond403.not, label %.preheader, label %.lr.ph399, !llvm.loop !14

._crit_edge400:                                   ; preds = %._crit_edge
  %.not = icmp eq ptr %.unpack312, null
  br i1 %.not, label %93, label %._crit_edge402

.preheader:                                       ; preds = %.lr.ph399, %middle.block413
  br i1 %22, label %.lr.ph401.preheader, label %._crit_edge402

.lr.ph401.preheader:                              ; preds = %.preheader
  %min.iters.check432 = icmp ult i64 %.unpack319.unpack.unpack321, 4
  br i1 %min.iters.check432, label %.lr.ph401.preheader467, label %vector.ph433

vector.ph433:                                     ; preds = %.lr.ph401.preheader
  %n.vec435 = and i64 %.unpack319.unpack.unpack321, -4
  br label %vector.body438

vector.body438:                                   ; preds = %pred.store.continue447, %vector.ph433
  %index439 = phi i64 [ 0, %vector.ph433 ], [ %index.next448, %pred.store.continue447 ]
  %70 = or i64 %index439, 2
  %71 = getelementptr i32, ptr %53, i64 %index439
  %wide.load440 = load <2 x i32>, ptr %71, align 4, !tbaa !3
  %72 = getelementptr i32, ptr %71, i64 2
  %wide.load441 = load <2 x i32>, ptr %72, align 4, !tbaa !3
  %73 = icmp ne <2 x i32> %wide.load440, zeroinitializer
  %74 = icmp ne <2 x i32> %wide.load441, zeroinitializer
  %75 = extractelement <2 x i1> %73, i64 0
  br i1 %75, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body438
  %76 = getelementptr i64, ptr %.unpack312, i64 %index439
  store i64 %51, ptr %76, align 8, !tbaa !3
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body438
  %77 = extractelement <2 x i1> %73, i64 1
  br i1 %77, label %pred.store.if442, label %pred.store.continue443

pred.store.if442:                                 ; preds = %pred.store.continue
  %78 = or i64 %index439, 1
  %79 = getelementptr i64, ptr %.unpack312, i64 %78
  store i64 %51, ptr %79, align 8, !tbaa !3
  br label %pred.store.continue443

pred.store.continue443:                           ; preds = %pred.store.if442, %pred.store.continue
  %80 = extractelement <2 x i1> %74, i64 0
  br i1 %80, label %pred.store.if444, label %pred.store.continue445

pred.store.if444:                                 ; preds = %pred.store.continue443
  %81 = getelementptr i64, ptr %.unpack312, i64 %70
  store i64 %51, ptr %81, align 8, !tbaa !3
  br label %pred.store.continue445

pred.store.continue445:                           ; preds = %pred.store.if444, %pred.store.continue443
  %82 = extractelement <2 x i1> %74, i64 1
  br i1 %82, label %pred.store.if446, label %pred.store.continue447

pred.store.if446:                                 ; preds = %pred.store.continue445
  %83 = or i64 %index439, 3
  %84 = getelementptr i64, ptr %.unpack312, i64 %83
  store i64 %51, ptr %84, align 8, !tbaa !3
  br label %pred.store.continue447

pred.store.continue447:                           ; preds = %pred.store.if446, %pred.store.continue445
  %index.next448 = add nuw i64 %index439, 4
  %85 = icmp eq i64 %index.next448, %n.vec435
  br i1 %85, label %middle.block430, label %vector.body438, !llvm.loop !15

middle.block430:                                  ; preds = %pred.store.continue447
  %cmp.n437 = icmp eq i64 %.unpack319.unpack.unpack321, %n.vec435
  br i1 %cmp.n437, label %._crit_edge402, label %.lr.ph401.preheader467

.lr.ph401.preheader467:                           ; preds = %.lr.ph401.preheader, %middle.block430
  %.ph468 = phi i64 [ 0, %.lr.ph401.preheader ], [ %n.vec435, %middle.block430 ]
  br label %.lr.ph401

.lr.ph401:                                        ; preds = %.lr.ph401.preheader467, %92
  %86 = phi i64 [ %87, %92 ], [ %.ph468, %.lr.ph401.preheader467 ]
  %87 = add nuw nsw i64 %86, 1
  %88 = getelementptr i32, ptr %53, i64 %86
  %89 = load i32, ptr %88, align 4, !tbaa !3
  %.not393 = icmp eq i32 %89, 0
  br i1 %.not393, label %92, label %90

90:                                               ; preds = %.lr.ph401
  %91 = getelementptr i64, ptr %.unpack312, i64 %86
  store i64 %51, ptr %91, align 8, !tbaa !3
  br label %92

92:                                               ; preds = %90, %.lr.ph401
  %exitcond404.not = icmp eq i64 %87, %.unpack319.unpack.unpack321
  br i1 %exitcond404.not, label %._crit_edge402, label %.lr.ph401, !llvm.loop !16

93:                                               ; preds = %._crit_edge400
  %94 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.311abc78bfd271f636f70364cea025b4, i32 9)
  %.unpack379.unpack.unpack.pre = load i64, ptr @_QFEx.7, align 8, !tbaa !7
  %95 = icmp eq i64 %.unpack319.unpack.unpack321, 0
  %96 = select i1 %95, i64 1, i64 %.unpack379.unpack.unpack.pre
  store ptr %.unpack312, ptr @_QFEx.0, align 8, !tbaa !7
  store i64 %96, ptr @_QFEx.7, align 8, !tbaa !7
  store i64 %.unpack319.unpack.unpack321, ptr @_QFEx.8, align 8, !tbaa !7
  br label %._crit_edge402

._crit_edge402:                                   ; preds = %92, %middle.block430, %._crit_edge400, %.preheader, %93
  %.unpack355.unpack.unpack = phi i64 [ %96, %93 ], [ %.unpack319.unpack.unpack, %.preheader ], [ %.unpack319.unpack.unpack, %._crit_edge400 ], [ %.unpack319.unpack.unpack, %middle.block430 ], [ %.unpack319.unpack.unpack, %92 ]
  call void @free(ptr %53)
  %97 = load i64, ptr %4, align 8, !tbaa !3
  %98 = sub i64 %97, %.unpack355.unpack.unpack
  %99 = getelementptr i64, ptr %.unpack312, i64 %98
  store i64 0, ptr %99, align 8, !tbaa !3
  %100 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.311abc78bfd271f636f70364cea025b4, i32 11)
  %.unpack360 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack367.unpack.unpack369 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %101 = icmp sgt i64 %.unpack367.unpack.unpack369, 0
  br i1 %101, label %.lr.ph.i.preheader, label %_FortranASumInteger8x1_contract_simplified.exit

.lr.ph.i.preheader:                               ; preds = %._crit_edge402
  %min.iters.check451 = icmp ult i64 %.unpack367.unpack.unpack369, 4
  br i1 %min.iters.check451, label %.lr.ph.i.preheader463, label %vector.ph452

vector.ph452:                                     ; preds = %.lr.ph.i.preheader
  %n.vec454 = and i64 %.unpack367.unpack.unpack369, -4
  br label %vector.body457

vector.body457:                                   ; preds = %vector.body457, %vector.ph452
  %index458 = phi i64 [ 0, %vector.ph452 ], [ %index.next462, %vector.body457 ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph452 ], [ %105, %vector.body457 ]
  %vec.phi459 = phi <2 x i64> [ zeroinitializer, %vector.ph452 ], [ %106, %vector.body457 ]
  %102 = shl i64 %index458, 3
  %103 = getelementptr i8, ptr %.unpack360, i64 %102
  %wide.load460 = load <2 x i64>, ptr %103, align 8, !tbaa !3
  %104 = getelementptr i64, ptr %103, i64 2
  %wide.load461 = load <2 x i64>, ptr %104, align 8, !tbaa !3
  %105 = add <2 x i64> %wide.load460, %vec.phi
  %106 = add <2 x i64> %wide.load461, %vec.phi459
  %index.next462 = add nuw i64 %index458, 4
  %107 = icmp eq i64 %index.next462, %n.vec454
  br i1 %107, label %middle.block449, label %vector.body457, !llvm.loop !17

middle.block449:                                  ; preds = %vector.body457
  %bin.rdx = add <2 x i64> %106, %105
  %108 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n456 = icmp eq i64 %.unpack367.unpack.unpack369, %n.vec454
  br i1 %cmp.n456, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i.preheader463

.lr.ph.i.preheader463:                            ; preds = %.lr.ph.i.preheader, %middle.block449
  %.ph = phi i64 [ 0, %.lr.ph.i.preheader ], [ %108, %middle.block449 ]
  %.ph464 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec454, %middle.block449 ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader463, %.lr.ph.i
  %109 = phi i64 [ %114, %.lr.ph.i ], [ %.ph, %.lr.ph.i.preheader463 ]
  %110 = phi i64 [ %115, %.lr.ph.i ], [ %.ph464, %.lr.ph.i.preheader463 ]
  %111 = shl i64 %110, 3
  %112 = getelementptr i8, ptr %.unpack360, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !3
  %114 = add i64 %113, %109
  %115 = add nuw nsw i64 %110, 1
  %exitcond.not.i = icmp eq i64 %115, %.unpack367.unpack.unpack369
  br i1 %exitcond.not.i, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !18

_FortranASumInteger8x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block449, %._crit_edge402
  %.lcssa.i = phi i64 [ 0, %._crit_edge402 ], [ %108, %middle.block449 ], [ %114, %.lr.ph.i ]
  %116 = call i1 @_FortranAioOutputInteger64(ptr %100, i64 %.lcssa.i)
  %117 = call i32 @_FortranAioEndIoStatement(ptr %100)
  ret void
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

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

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

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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

; Function Attrs: 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 willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #4

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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}
