program d
  implicit none
  integer,allocatable :: A(:),B(:)
  integer :: N,i,j,M,sm

  read(*,*) N
  allocate(A(N))
  read(*,*) A

  allocate(B(N))
  B=666
  do i=((N+1)/2),N
     B(i)=A(i)
  enddo
  do i=(N/2),1,-1
     sm=0
     do j=2,(N/i)
        sm=sm+B(j*i)
     enddo
     B(i)=mod(mod(A(i)-sm,2)+2,2)

  enddo
  !write(*,*) B                                                                 
  M=sum(B)
  write(*,'(i0)') M
  do i=1,N
     if(B(i).eq.1) then
        write(*,'(i0)',advance='no') i
        write(*,'(a)',advance='no') ' '
     endif
  enddo
  write(*,*)

end program d


; 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
@_QFEb.0 = internal unnamed_addr global ptr null
@_QFEb.7 = internal unnamed_addr global i64 1
@_QQcl.f59158a58fcceb1211f0aadad1f4177c = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3750/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)"
@_QQcl.6E6F = linkonce constant [2 x i8] c"no"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.20 = linkonce constant [1 x i8] c" "
@_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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 6)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = load i32, ptr %2, align 4, !tbaa !3
  %7 = call i32 @llvm.smax.i32(i32 %6, i32 0)
  %8 = zext i32 %7 to i64
  %9 = shl nuw nsw i64 %8, 2
  %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 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 8)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack461.unpack.unpack463 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  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 4, 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 9, 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 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 %1, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack461.unpack.unpack463, 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 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %12 = call i1 @_FortranAioInputDescriptor(ptr %11, ptr nonnull %1)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %11)
  %14 = load i32, ptr %2, align 4, !tbaa !3
  %15 = call i32 @llvm.smax.i32(i32 %14, i32 0)
  %16 = zext i32 %15 to i64
  %17 = shl nuw nsw i64 %16, 2
  %18 = call ptr @malloc(i64 %17)
  %19 = ptrtoint ptr %18 to i64
  store ptr %18, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb.7, align 8, !tbaa !7
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %29, label %.preheader

.preheader:                                       ; preds = %0
  %.not591 = icmp slt i32 %14, 1
  br i1 %.not591, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %min.iters.check = icmp ult i32 %15, 8
  br i1 %min.iters.check, label %.lr.ph.preheader649, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %16, 2147483640
  %ind.end = and i64 %16, 7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %20 = getelementptr i32, ptr %18, i64 %index
  store <4 x i32> <i32 666, i32 666, i32 666, i32 666>, ptr %20, align 4, !tbaa !3
  %21 = getelementptr i32, ptr %20, i64 4
  store <4 x i32> <i32 666, i32 666, i32 666, i32 666>, ptr %21, align 4, !tbaa !3
  %index.next = add nuw i64 %index, 8
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %16
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader649

.lr.ph.preheader649:                              ; preds = %.lr.ph.preheader, %middle.block
  %.ph650 = phi i64 [ %16, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.ph651 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader649, %.lr.ph
  %23 = phi i64 [ %27, %.lr.ph ], [ %.ph650, %.lr.ph.preheader649 ]
  %24 = phi i64 [ %25, %.lr.ph ], [ %.ph651, %.lr.ph.preheader649 ]
  %25 = add nuw nsw i64 %24, 1
  %26 = getelementptr i32, ptr %18, i64 %24
  store i32 666, ptr %26, align 4, !tbaa !3
  %27 = add nsw i64 %23, -1
  %28 = icmp ugt i64 %23, 1
  br i1 %28, label %.lr.ph, label %.loopexit, !llvm.loop !12

29:                                               ; preds = %0
  %30 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 11)
  %.unpack567.unpack.unpack = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  %31 = icmp slt i32 %14, 1
  %32 = select i1 %31, i64 1, i64 %.unpack567.unpack.unpack
  store ptr null, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 %32, ptr @_QFEb.7, align 8, !tbaa !7
  %.pre = load i32, ptr %2, align 4, !tbaa !3
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %middle.block, %.preheader, %29
  %.unpack531.unpack.unpack = phi i64 [ 1, %.preheader ], [ %32, %29 ], [ 1, %middle.block ], [ 1, %.lr.ph ]
  %33 = phi i32 [ %14, %.preheader ], [ %.pre, %29 ], [ %14, %middle.block ], [ %14, %.lr.ph ]
  %34 = add i32 %33, 1
  %35 = sdiv i32 %34, 2
  %36 = sext i32 %33 to i64
  %narrow = sub nsw i32 0, %35
  %.neg = sext i32 %narrow to i64
  %37 = add nsw i64 %36, 1
  %38 = add nsw i64 %37, %.neg
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %.lr.ph581, label %._crit_edge

.lr.ph581:                                        ; preds = %.loopexit
  %.unpack536 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack536611 = ptrtoint ptr %.unpack536 to i64
  %min.iters.check614 = icmp ult i64 %38, 20
  br i1 %min.iters.check614, label %scalar.ph613.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph581
  %40 = sext i32 %35 to i64
  %41 = sub nsw i64 %36, %40
  %42 = trunc i64 %41 to i32
  %43 = add i32 %35, %42
  %44 = icmp slt i32 %43, %35
  %45 = icmp ugt i64 %41, 4294967295
  %46 = or i1 %44, %45
  br i1 %46, label %scalar.ph613.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %47 = sext i32 %35 to i64
  %48 = shl nsw i64 %47, 2
  %49 = add i64 %48, %19
  %50 = shl i64 %.unpack531.unpack.unpack, 2
  %51 = add i64 %48, %.unpack536611
  %52 = add i64 %51, -4
  %53 = add i64 %50, %52
  %54 = sub i64 %49, %53
  %diff.check = icmp ult i64 %54, 32
  br i1 %diff.check, label %scalar.ph613.preheader, label %vector.ph615

vector.ph615:                                     ; preds = %vector.memcheck
  %n.vec617 = and i64 %38, -8
  %ind.end618 = and i64 %38, 7
  %.cast = trunc i64 %n.vec617 to i32
  %ind.end620 = add i32 %35, %.cast
  br label %vector.body623

vector.body623:                                   ; preds = %vector.body623, %vector.ph615
  %index624 = phi i64 [ 0, %vector.ph615 ], [ %index.next627, %vector.body623 ]
  %.cast625 = trunc i64 %index624 to i32
  %offset.idx = add i32 %35, %.cast625
  %55 = sext i32 %offset.idx to i64
  %56 = add nsw i64 %55, -1
  %57 = getelementptr i32, ptr %.unpack536, i64 %56
  %wide.load = load <4 x i32>, ptr %57, align 4, !tbaa !3
  %58 = getelementptr i32, ptr %57, i64 4
  %wide.load626 = load <4 x i32>, ptr %58, align 4, !tbaa !3
  %59 = sub i64 %55, %.unpack531.unpack.unpack
  %60 = getelementptr i32, ptr %18, i64 %59
  store <4 x i32> %wide.load, ptr %60, align 4, !tbaa !3
  %61 = getelementptr i32, ptr %60, i64 4
  store <4 x i32> %wide.load626, ptr %61, align 4, !tbaa !3
  %index.next627 = add nuw i64 %index624, 8
  %62 = icmp eq i64 %index.next627, %n.vec617
  br i1 %62, label %middle.block612, label %vector.body623, !llvm.loop !13

middle.block612:                                  ; preds = %vector.body623
  %cmp.n622 = icmp eq i64 %38, %n.vec617
  br i1 %cmp.n622, label %._crit_edge, label %scalar.ph613.preheader

scalar.ph613.preheader:                           ; preds = %vector.memcheck, %vector.scevcheck, %.lr.ph581, %middle.block612
  %.ph647 = phi i64 [ %38, %vector.memcheck ], [ %38, %vector.scevcheck ], [ %38, %.lr.ph581 ], [ %ind.end618, %middle.block612 ]
  %.ph648 = phi i32 [ %35, %vector.memcheck ], [ %35, %vector.scevcheck ], [ %35, %.lr.ph581 ], [ %ind.end620, %middle.block612 ]
  br label %scalar.ph613

scalar.ph613:                                     ; preds = %scalar.ph613.preheader, %scalar.ph613
  %63 = phi i64 [ %72, %scalar.ph613 ], [ %.ph647, %scalar.ph613.preheader ]
  %64 = phi i32 [ %71, %scalar.ph613 ], [ %.ph648, %scalar.ph613.preheader ]
  %65 = sext i32 %64 to i64
  %66 = add nsw i64 %65, -1
  %67 = getelementptr i32, ptr %.unpack536, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !3
  %69 = sub i64 %65, %.unpack531.unpack.unpack
  %70 = getelementptr i32, ptr %18, i64 %69
  store i32 %68, ptr %70, align 4, !tbaa !3
  %71 = add i32 %64, 1
  %72 = add nsw i64 %63, -1
  %73 = icmp ugt i64 %63, 1
  br i1 %73, label %scalar.ph613, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %scalar.ph613, %middle.block612, %.loopexit
  %74 = icmp sgt i32 %33, 1
  br i1 %74, label %.lr.ph587, label %._crit_edge588

.lr.ph587:                                        ; preds = %._crit_edge
  %75 = lshr i32 %33, 1
  %76 = zext i32 %75 to i64
  %.unpack500 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  br label %77

77:                                               ; preds = %.lr.ph587, %._crit_edge585
  %78 = phi i64 [ %76, %.lr.ph587 ], [ %110, %._crit_edge585 ]
  %79 = trunc i64 %78 to i32
  %80 = sdiv i32 %33, %79
  %81 = icmp sgt i32 %80, 1
  br i1 %81, label %.lr.ph584.preheader, label %._crit_edge585

.lr.ph584.preheader:                              ; preds = %77
  %82 = zext i32 %80 to i64
  %83 = add nsw i64 %82, -1
  %xtraiter = and i64 %83, 1
  %84 = icmp eq i32 %80, 2
  br i1 %84, label %._crit_edge585.loopexit.unr-lcssa, label %.lr.ph584.preheader.new

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

.lr.ph584:                                        ; preds = %.lr.ph584, %.lr.ph584.preheader.new
  %indvars.iv = phi i64 [ 2, %.lr.ph584.preheader.new ], [ %indvars.iv.next.1, %.lr.ph584 ]
  %.0582 = phi i32 [ 0, %.lr.ph584.preheader.new ], [ %96, %.lr.ph584 ]
  %niter = phi i64 [ 0, %.lr.ph584.preheader.new ], [ %niter.next.1, %.lr.ph584 ]
  %85 = mul i64 %indvars.iv, %78
  %sext = shl i64 %85, 32
  %86 = ashr exact i64 %sext, 32
  %87 = sub i64 %86, %.unpack531.unpack.unpack
  %88 = getelementptr i32, ptr %18, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !3
  %90 = add i32 %89, %.0582
  %indvars.iv.next = or i64 %indvars.iv, 1
  %91 = mul i64 %indvars.iv.next, %78
  %sext.1 = shl i64 %91, 32
  %92 = ashr exact i64 %sext.1, 32
  %93 = sub i64 %92, %.unpack531.unpack.unpack
  %94 = getelementptr i32, ptr %18, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !3
  %96 = add i32 %95, %90
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %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_edge585.loopexit.unr-lcssa, label %.lr.ph584

._crit_edge585.loopexit.unr-lcssa:                ; preds = %.lr.ph584, %.lr.ph584.preheader
  %.lcssa646.ph = phi i32 [ undef, %.lr.ph584.preheader ], [ %96, %.lr.ph584 ]
  %indvars.iv.unr = phi i64 [ 2, %.lr.ph584.preheader ], [ %indvars.iv.next.1, %.lr.ph584 ]
  %.0582.unr = phi i32 [ 0, %.lr.ph584.preheader ], [ %96, %.lr.ph584 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge585, label %.lr.ph584.epil

.lr.ph584.epil:                                   ; preds = %._crit_edge585.loopexit.unr-lcssa
  %97 = mul i64 %indvars.iv.unr, %78
  %sext.epil = shl i64 %97, 32
  %98 = ashr exact i64 %sext.epil, 32
  %99 = sub i64 %98, %.unpack531.unpack.unpack
  %100 = getelementptr i32, ptr %18, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !3
  %102 = add i32 %101, %.0582.unr
  br label %._crit_edge585

._crit_edge585:                                   ; preds = %.lr.ph584.epil, %._crit_edge585.loopexit.unr-lcssa, %77
  %.0.lcssa = phi i32 [ 0, %77 ], [ %.lcssa646.ph, %._crit_edge585.loopexit.unr-lcssa ], [ %102, %.lr.ph584.epil ]
  %103 = add i64 %78, -1
  %104 = getelementptr i32, ptr %.unpack500, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !3
  %106 = sub i32 %105, %.0.lcssa
  %107 = and i32 %106, 1
  %108 = sub i64 %78, %.unpack531.unpack.unpack
  %109 = getelementptr i32, ptr %18, i64 %108
  store i32 %107, ptr %109, align 4, !tbaa !3
  %110 = add nsw i64 %78, -1
  %111 = icmp sgt i64 %78, 1
  br i1 %111, label %77, label %._crit_edge588

._crit_edge588:                                   ; preds = %._crit_edge585, %._crit_edge
  %.not607 = icmp slt i32 %14, 1
  br i1 %.not607, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i.preheader

.lr.ph.i.preheader:                               ; preds = %._crit_edge588
  %min.iters.check630 = icmp ult i32 %15, 8
  br i1 %min.iters.check630, label %.lr.ph.i.preheader642, label %vector.ph631

vector.ph631:                                     ; preds = %.lr.ph.i.preheader
  %n.vec633 = and i64 %16, 2147483640
  br label %vector.body636

vector.body636:                                   ; preds = %vector.body636, %vector.ph631
  %index637 = phi i64 [ 0, %vector.ph631 ], [ %index.next641, %vector.body636 ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph631 ], [ %115, %vector.body636 ]
  %vec.phi638 = phi <4 x i32> [ zeroinitializer, %vector.ph631 ], [ %116, %vector.body636 ]
  %112 = shl i64 %index637, 2
  %113 = getelementptr i8, ptr %18, i64 %112
  %wide.load639 = load <4 x i32>, ptr %113, align 4, !tbaa !3
  %114 = getelementptr i32, ptr %113, i64 4
  %wide.load640 = load <4 x i32>, ptr %114, align 4, !tbaa !3
  %115 = add <4 x i32> %wide.load639, %vec.phi
  %116 = add <4 x i32> %wide.load640, %vec.phi638
  %index.next641 = add nuw i64 %index637, 8
  %117 = icmp eq i64 %index.next641, %n.vec633
  br i1 %117, label %middle.block628, label %vector.body636, !llvm.loop !15

middle.block628:                                  ; preds = %vector.body636
  %bin.rdx = add <4 x i32> %116, %115
  %118 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n635 = icmp eq i64 %n.vec633, %16
  br i1 %cmp.n635, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i.preheader642

.lr.ph.i.preheader642:                            ; preds = %.lr.ph.i.preheader, %middle.block628
  %.ph = phi i32 [ 0, %.lr.ph.i.preheader ], [ %118, %middle.block628 ]
  %.ph643 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec633, %middle.block628 ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader642, %.lr.ph.i
  %119 = phi i32 [ %124, %.lr.ph.i ], [ %.ph, %.lr.ph.i.preheader642 ]
  %120 = phi i64 [ %125, %.lr.ph.i ], [ %.ph643, %.lr.ph.i.preheader642 ]
  %121 = shl i64 %120, 2
  %122 = getelementptr i8, ptr %18, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !3
  %124 = add i32 %123, %119
  %125 = add nuw nsw i64 %120, 1
  %exitcond.not.i = icmp eq i64 %125, %16
  br i1 %exitcond.not.i, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !16

_FortranASumInteger4x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block628, %._crit_edge588
  %.lcssa.i = phi i32 [ 0, %._crit_edge588 ], [ %118, %middle.block628 ], [ %124, %.lr.ph.i ]
  %126 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 25)
  %127 = call i1 @_FortranAioOutputInteger32(ptr %126, i32 %.lcssa.i)
  %128 = call i32 @_FortranAioEndIoStatement(ptr %126)
  %129 = load i32, ptr %2, align 4, !tbaa !3
  %130 = icmp sgt i32 %129, 0
  br i1 %130, label %.lr.ph589.preheader, label %._crit_edge590

.lr.ph589.preheader:                              ; preds = %_FortranASumInteger4x1_contract_simplified.exit
  %131 = zext i32 %129 to i64
  %.unpack488.pre601 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack495.unpack.unpack.pre604 = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  br label %.lr.ph589

.lr.ph589:                                        ; preds = %.lr.ph589.preheader, %146
  %.unpack495.unpack.unpack = phi i64 [ %.unpack495.unpack.unpack.pre604, %.lr.ph589.preheader ], [ %.unpack495.unpack.unpack605, %146 ]
  %.unpack488 = phi ptr [ %.unpack488.pre601, %.lr.ph589.preheader ], [ %.unpack488602, %146 ]
  %indvars.iv595 = phi i64 [ 1, %.lr.ph589.preheader ], [ %indvars.iv.next596, %146 ]
  %132 = sub i64 %indvars.iv595, %.unpack495.unpack.unpack
  %133 = getelementptr i32, ptr %.unpack488, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !3
  %135 = icmp eq i32 %134, 1
  br i1 %135, label %136, label %146

136:                                              ; preds = %.lr.ph589
  %137 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 28)
  %138 = call i1 @_FortranAioSetAdvance(ptr %137, ptr nonnull @_QQcl.6E6F, i64 2)
  %139 = trunc i64 %indvars.iv595 to i32
  %140 = call i1 @_FortranAioOutputInteger32(ptr %137, i32 %139)
  %141 = call i32 @_FortranAioEndIoStatement(ptr %137)
  %142 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 29)
  %143 = call i1 @_FortranAioSetAdvance(ptr %142, ptr nonnull @_QQcl.6E6F, i64 2)
  %144 = call i1 @_FortranAioOutputAscii(ptr %142, ptr nonnull @_QQcl.20, i64 1)
  %145 = call i32 @_FortranAioEndIoStatement(ptr %142)
  %.unpack488.pre = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack495.unpack.unpack.pre = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  br label %146

146:                                              ; preds = %136, %.lr.ph589
  %.unpack495.unpack.unpack605 = phi i64 [ %.unpack495.unpack.unpack.pre, %136 ], [ %.unpack495.unpack.unpack, %.lr.ph589 ]
  %.unpack488602 = phi ptr [ %.unpack488.pre, %136 ], [ %.unpack488, %.lr.ph589 ]
  %indvars.iv.next596 = add nuw nsw i64 %indvars.iv595, 1
  %exitcond598.not = icmp eq i64 %indvars.iv595, %131
  br i1 %exitcond598.not, label %._crit_edge590, label %.lr.ph589

._crit_edge590:                                   ; preds = %146, %_FortranASumInteger4x1_contract_simplified.exit
  %147 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.f59158a58fcceb1211f0aadad1f4177c, i32 32)
  %148 = call i32 @_FortranAioEndIoStatement(ptr %147)
  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 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

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

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

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

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

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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, !10}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !11, !10}
