program main
  implicit none
  integer i,N,i2,ball,j,t
  integer,allocatable :: a(:),b(:),b2(:)
  !read(*, *) (L(i), i = 1,N)
  read(*, *) N
  allocate(a(N))
  allocate(b(N))
  allocate(b2(N))
  read(*, *) (a(i), i = 1,N)
  b2 = a
  t = 1
  do i = 1,N
    i2 = N-i+1
    ball = 0
    do j = 1,N/i2
      ball = ball+b2(i2*j)
    end do
    !b(i2) = mod(ball,2)
    ball = mod(ball,2)
    b2(i2) = ball
    if (ball == 1) then
      b(t) = i2
      t = t+1
    end if
  end do
  write(*, *) t-1
  if (t /= 1) then
    write(*, *) b(1:t-1)
  end if
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"

@_QFEa.0 = internal unnamed_addr global ptr null
@_QFEa.8 = internal unnamed_addr global i64 0
@_QFEb.0 = internal unnamed_addr global ptr null
@_QFEb2.0 = internal unnamed_addr global ptr null
@_QFEb2.7 = internal unnamed_addr global i64 1
@_QFEb2.8 = internal unnamed_addr global i64 0
@_QQcl.88babaff4cbcce3631432a54e6af795e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3749/source.f\00"
@_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 i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.88babaff4cbcce3631432a54e6af795e, 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 @malloc(i64 %9)
  store ptr %11, ptr @_QFEb.0, align 8, !tbaa !7
  %12 = call ptr @malloc(i64 %9)
  store ptr %12, ptr @_QFEb2.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb2.7, align 8, !tbaa !7
  store i64 %8, ptr @_QFEb2.8, align 8, !tbaa !7
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.88babaff4cbcce3631432a54e6af795e, i32 10)
  %14 = load i32, ptr %2, align 4, !tbaa !3
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %16 = zext i32 %14 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %17 = phi i64 [ %22, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %.unpack460 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %sext = shl i64 %17, 32
  %18 = ashr exact i64 %sext, 32
  %19 = add nsw i64 %18, -1
  %20 = getelementptr i32, ptr %.unpack460, i64 %19
  %21 = call i1 @_FortranAioInputInteger(ptr %13, ptr %20, i32 4)
  %22 = add nuw nsw i64 %17, 1
  %exitcond.not = icmp eq i64 %17, %16
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %23 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack505 = ptrtoint ptr %.unpack to i64
  %.unpack385.unpack.unpack387 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  %.unpack390 = load ptr, ptr @_QFEb2.0, align 8, !tbaa !7
  %.unpack390508 = ptrtoint ptr %.unpack390 to i64
  %.not = icmp eq ptr %.unpack390, null
  br i1 %.not, label %93, label %24

24:                                               ; preds = %._crit_edge
  %.unpack397.unpack.unpack399 = load i64, ptr @_QFEb2.8, align 8, !tbaa !7
  %.not473 = icmp eq i64 %.unpack397.unpack.unpack399, %.unpack385.unpack.unpack387
  br i1 %.not473, label %.preheader, label %40

.preheader:                                       ; preds = %24
  %25 = icmp sgt i64 %.unpack385.unpack.unpack387, 0
  br i1 %25, label %.lr.ph477.preheader, label %._crit_edge478

.lr.ph477.preheader:                              ; preds = %.preheader
  %min.iters.check512 = icmp ult i64 %.unpack385.unpack.unpack387, 8
  %26 = sub i64 %.unpack390508, %.unpack505
  %diff.check509 = icmp ult i64 %26, 32
  %or.cond = select i1 %min.iters.check512, i1 true, i1 %diff.check509
  br i1 %or.cond, label %.lr.ph477.preheader542, label %vector.ph513

vector.ph513:                                     ; preds = %.lr.ph477.preheader
  %n.vec515 = and i64 %.unpack385.unpack.unpack387, -8
  br label %vector.body518

vector.body518:                                   ; preds = %vector.body518, %vector.ph513
  %index519 = phi i64 [ 0, %vector.ph513 ], [ %index.next522, %vector.body518 ]
  %27 = getelementptr i32, ptr %.unpack, i64 %index519
  %wide.load520 = load <4 x i32>, ptr %27, align 4, !tbaa !3
  %28 = getelementptr i32, ptr %27, i64 4
  %wide.load521 = load <4 x i32>, ptr %28, align 4, !tbaa !3
  %29 = getelementptr i32, ptr %.unpack390, i64 %index519
  store <4 x i32> %wide.load520, ptr %29, align 4, !tbaa !3
  %30 = getelementptr i32, ptr %29, i64 4
  store <4 x i32> %wide.load521, ptr %30, align 4, !tbaa !3
  %index.next522 = add nuw i64 %index519, 8
  %31 = icmp eq i64 %index.next522, %n.vec515
  br i1 %31, label %middle.block510, label %vector.body518, !llvm.loop !9

middle.block510:                                  ; preds = %vector.body518
  %cmp.n517 = icmp eq i64 %.unpack385.unpack.unpack387, %n.vec515
  br i1 %cmp.n517, label %._crit_edge478, label %.lr.ph477.preheader542

.lr.ph477.preheader542:                           ; preds = %.lr.ph477.preheader, %middle.block510
  %.ph543 = phi i64 [ 0, %.lr.ph477.preheader ], [ %n.vec515, %middle.block510 ]
  %32 = xor i64 %.ph543, -1
  %33 = add i64 %.unpack385.unpack.unpack387, %32
  %xtraiter547 = and i64 %.unpack385.unpack.unpack387, 3
  %lcmp.mod548.not = icmp eq i64 %xtraiter547, 0
  br i1 %lcmp.mod548.not, label %.lr.ph477.prol.loopexit, label %.lr.ph477.prol

.lr.ph477.prol:                                   ; preds = %.lr.ph477.preheader542, %.lr.ph477.prol
  %34 = phi i64 [ %37, %.lr.ph477.prol ], [ %.ph543, %.lr.ph477.preheader542 ]
  %prol.iter549 = phi i64 [ %prol.iter549.next, %.lr.ph477.prol ], [ 0, %.lr.ph477.preheader542 ]
  %35 = getelementptr i32, ptr %.unpack, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !3
  %37 = add nuw nsw i64 %34, 1
  %38 = getelementptr i32, ptr %.unpack390, i64 %34
  store i32 %36, ptr %38, align 4, !tbaa !3
  %prol.iter549.next = add i64 %prol.iter549, 1
  %prol.iter549.cmp.not = icmp eq i64 %prol.iter549.next, %xtraiter547
  br i1 %prol.iter549.cmp.not, label %.lr.ph477.prol.loopexit, label %.lr.ph477.prol, !llvm.loop !12

.lr.ph477.prol.loopexit:                          ; preds = %.lr.ph477.prol, %.lr.ph477.preheader542
  %.unr550 = phi i64 [ %.ph543, %.lr.ph477.preheader542 ], [ %37, %.lr.ph477.prol ]
  %39 = icmp ult i64 %33, 3
  br i1 %39, label %._crit_edge478, label %.lr.ph477

40:                                               ; preds = %24
  %41 = shl i64 %.unpack385.unpack.unpack387, 2
  %42 = call ptr @malloc(i64 %41)
  %43 = icmp sgt i64 %.unpack385.unpack.unpack387, 0
  br i1 %43, label %.lr.ph476.preheader, label %.thread472

.lr.ph476.preheader:                              ; preds = %40
  %44 = ptrtoint ptr %42 to i64
  %min.iters.check = icmp ult i64 %.unpack385.unpack.unpack387, 8
  %45 = sub i64 %44, %.unpack505
  %diff.check = icmp ult i64 %45, 32
  %or.cond538 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond538, label %.lr.ph476.preheader544, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph476.preheader
  %n.vec = and i64 %.unpack385.unpack.unpack387, -8
  br label %vector.body

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

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.unpack385.unpack.unpack387, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph476.preheader544

.lr.ph476.preheader544:                           ; preds = %.lr.ph476.preheader, %middle.block
  %.ph545 = phi i64 [ 0, %.lr.ph476.preheader ], [ %n.vec, %middle.block ]
  %51 = xor i64 %.ph545, -1
  %52 = add i64 %.unpack385.unpack.unpack387, %51
  %xtraiter = and i64 %.unpack385.unpack.unpack387, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph476.prol.loopexit, label %.lr.ph476.prol

.lr.ph476.prol:                                   ; preds = %.lr.ph476.preheader544, %.lr.ph476.prol
  %53 = phi i64 [ %56, %.lr.ph476.prol ], [ %.ph545, %.lr.ph476.preheader544 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph476.prol ], [ 0, %.lr.ph476.preheader544 ]
  %54 = getelementptr i32, ptr %.unpack, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !3
  %56 = add nuw nsw i64 %53, 1
  %57 = getelementptr i32, ptr %42, i64 %53
  store i32 %55, ptr %57, align 4, !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.ph476.prol.loopexit, label %.lr.ph476.prol, !llvm.loop !15

.lr.ph476.prol.loopexit:                          ; preds = %.lr.ph476.prol, %.lr.ph476.preheader544
  %.unr = phi i64 [ %.ph545, %.lr.ph476.preheader544 ], [ %56, %.lr.ph476.prol ]
  %58 = icmp ult i64 %52, 3
  br i1 %58, label %.loopexit, label %.lr.ph476

.lr.ph476:                                        ; preds = %.lr.ph476.prol.loopexit, %.lr.ph476
  %59 = phi i64 [ %74, %.lr.ph476 ], [ %.unr, %.lr.ph476.prol.loopexit ]
  %60 = getelementptr i32, ptr %.unpack, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !3
  %62 = add nuw nsw i64 %59, 1
  %63 = getelementptr i32, ptr %42, i64 %59
  store i32 %61, ptr %63, align 4, !tbaa !3
  %64 = getelementptr i32, ptr %.unpack, i64 %62
  %65 = load i32, ptr %64, align 4, !tbaa !3
  %66 = add nuw nsw i64 %59, 2
  %67 = getelementptr i32, ptr %42, i64 %62
  store i32 %65, ptr %67, align 4, !tbaa !3
  %68 = getelementptr i32, ptr %.unpack, i64 %66
  %69 = load i32, ptr %68, align 4, !tbaa !3
  %70 = add nuw nsw i64 %59, 3
  %71 = getelementptr i32, ptr %42, i64 %66
  store i32 %69, ptr %71, align 4, !tbaa !3
  %72 = getelementptr i32, ptr %.unpack, i64 %70
  %73 = load i32, ptr %72, align 4, !tbaa !3
  %74 = add nuw nsw i64 %59, 4
  %75 = getelementptr i32, ptr %42, i64 %70
  store i32 %73, ptr %75, align 4, !tbaa !3
  %exitcond491.not.3 = icmp eq i64 %74, %.unpack385.unpack.unpack387
  br i1 %exitcond491.not.3, label %.loopexit, label %.lr.ph476, !llvm.loop !16

.lr.ph477:                                        ; preds = %.lr.ph477.prol.loopexit, %.lr.ph477
  %76 = phi i64 [ %91, %.lr.ph477 ], [ %.unr550, %.lr.ph477.prol.loopexit ]
  %77 = getelementptr i32, ptr %.unpack, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !3
  %79 = add nuw nsw i64 %76, 1
  %80 = getelementptr i32, ptr %.unpack390, i64 %76
  store i32 %78, ptr %80, align 4, !tbaa !3
  %81 = getelementptr i32, ptr %.unpack, i64 %79
  %82 = load i32, ptr %81, align 4, !tbaa !3
  %83 = add nuw nsw i64 %76, 2
  %84 = getelementptr i32, ptr %.unpack390, i64 %79
  store i32 %82, ptr %84, align 4, !tbaa !3
  %85 = getelementptr i32, ptr %.unpack, i64 %83
  %86 = load i32, ptr %85, align 4, !tbaa !3
  %87 = add nuw nsw i64 %76, 3
  %88 = getelementptr i32, ptr %.unpack390, i64 %83
  store i32 %86, ptr %88, align 4, !tbaa !3
  %89 = getelementptr i32, ptr %.unpack, i64 %87
  %90 = load i32, ptr %89, align 4, !tbaa !3
  %91 = add nuw nsw i64 %76, 4
  %92 = getelementptr i32, ptr %.unpack390, i64 %87
  store i32 %90, ptr %92, align 4, !tbaa !3
  %exitcond492.not.3 = icmp eq i64 %91, %.unpack385.unpack.unpack387
  br i1 %exitcond492.not.3, label %._crit_edge478, label %.lr.ph477, !llvm.loop !17

93:                                               ; preds = %._crit_edge
  %94 = shl i64 %.unpack385.unpack.unpack387, 2
  %95 = call ptr @malloc(i64 %94)
  %96 = icmp sgt i64 %.unpack385.unpack.unpack387, 0
  br i1 %96, label %.lr.ph480.preheader, label %.loopexit.thread

.lr.ph480.preheader:                              ; preds = %93
  %97 = ptrtoint ptr %95 to i64
  %min.iters.check527 = icmp ult i64 %.unpack385.unpack.unpack387, 8
  %98 = sub i64 %97, %.unpack505
  %diff.check524 = icmp ult i64 %98, 32
  %or.cond539 = select i1 %min.iters.check527, i1 true, i1 %diff.check524
  br i1 %or.cond539, label %.lr.ph480.preheader540, label %vector.ph528

vector.ph528:                                     ; preds = %.lr.ph480.preheader
  %n.vec530 = and i64 %.unpack385.unpack.unpack387, -8
  br label %vector.body533

vector.body533:                                   ; preds = %vector.body533, %vector.ph528
  %index534 = phi i64 [ 0, %vector.ph528 ], [ %index.next537, %vector.body533 ]
  %99 = getelementptr i32, ptr %.unpack, i64 %index534
  %wide.load535 = load <4 x i32>, ptr %99, align 4, !tbaa !3
  %100 = getelementptr i32, ptr %99, i64 4
  %wide.load536 = load <4 x i32>, ptr %100, align 4, !tbaa !3
  %101 = getelementptr i32, ptr %95, i64 %index534
  store <4 x i32> %wide.load535, ptr %101, align 4, !tbaa !3
  %102 = getelementptr i32, ptr %101, i64 4
  store <4 x i32> %wide.load536, ptr %102, align 4, !tbaa !3
  %index.next537 = add nuw i64 %index534, 8
  %103 = icmp eq i64 %index.next537, %n.vec530
  br i1 %103, label %middle.block525, label %vector.body533, !llvm.loop !18

middle.block525:                                  ; preds = %vector.body533
  %cmp.n532 = icmp eq i64 %.unpack385.unpack.unpack387, %n.vec530
  br i1 %cmp.n532, label %.loopexit, label %.lr.ph480.preheader540

.lr.ph480.preheader540:                           ; preds = %.lr.ph480.preheader, %middle.block525
  %.ph541 = phi i64 [ 0, %.lr.ph480.preheader ], [ %n.vec530, %middle.block525 ]
  %104 = xor i64 %.ph541, -1
  %105 = add i64 %.unpack385.unpack.unpack387, %104
  %xtraiter551 = and i64 %.unpack385.unpack.unpack387, 3
  %lcmp.mod552.not = icmp eq i64 %xtraiter551, 0
  br i1 %lcmp.mod552.not, label %.lr.ph480.prol.loopexit, label %.lr.ph480.prol

.lr.ph480.prol:                                   ; preds = %.lr.ph480.preheader540, %.lr.ph480.prol
  %106 = phi i64 [ %109, %.lr.ph480.prol ], [ %.ph541, %.lr.ph480.preheader540 ]
  %prol.iter553 = phi i64 [ %prol.iter553.next, %.lr.ph480.prol ], [ 0, %.lr.ph480.preheader540 ]
  %107 = getelementptr i32, ptr %.unpack, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !3
  %109 = add nuw nsw i64 %106, 1
  %110 = getelementptr i32, ptr %95, i64 %106
  store i32 %108, ptr %110, align 4, !tbaa !3
  %prol.iter553.next = add i64 %prol.iter553, 1
  %prol.iter553.cmp.not = icmp eq i64 %prol.iter553.next, %xtraiter551
  br i1 %prol.iter553.cmp.not, label %.lr.ph480.prol.loopexit, label %.lr.ph480.prol, !llvm.loop !19

.lr.ph480.prol.loopexit:                          ; preds = %.lr.ph480.prol, %.lr.ph480.preheader540
  %.unr554 = phi i64 [ %.ph541, %.lr.ph480.preheader540 ], [ %109, %.lr.ph480.prol ]
  %111 = icmp ult i64 %105, 3
  br i1 %111, label %.loopexit, label %.lr.ph480

.lr.ph480:                                        ; preds = %.lr.ph480.prol.loopexit, %.lr.ph480
  %112 = phi i64 [ %127, %.lr.ph480 ], [ %.unr554, %.lr.ph480.prol.loopexit ]
  %113 = getelementptr i32, ptr %.unpack, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !3
  %115 = add nuw nsw i64 %112, 1
  %116 = getelementptr i32, ptr %95, i64 %112
  store i32 %114, ptr %116, align 4, !tbaa !3
  %117 = getelementptr i32, ptr %.unpack, i64 %115
  %118 = load i32, ptr %117, align 4, !tbaa !3
  %119 = add nuw nsw i64 %112, 2
  %120 = getelementptr i32, ptr %95, i64 %115
  store i32 %118, ptr %120, align 4, !tbaa !3
  %121 = getelementptr i32, ptr %.unpack, i64 %119
  %122 = load i32, ptr %121, align 4, !tbaa !3
  %123 = add nuw nsw i64 %112, 3
  %124 = getelementptr i32, ptr %95, i64 %119
  store i32 %122, ptr %124, align 4, !tbaa !3
  %125 = getelementptr i32, ptr %.unpack, i64 %123
  %126 = load i32, ptr %125, align 4, !tbaa !3
  %127 = add nuw nsw i64 %112, 4
  %128 = getelementptr i32, ptr %95, i64 %123
  store i32 %126, ptr %128, align 4, !tbaa !3
  %exitcond493.not.3 = icmp eq i64 %127, %.unpack385.unpack.unpack387
  br i1 %exitcond493.not.3, label %.loopexit, label %.lr.ph480, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph476.prol.loopexit, %.lr.ph476, %.lr.ph480.prol.loopexit, %.lr.ph480, %middle.block, %middle.block525
  %.ph = phi ptr [ %95, %middle.block525 ], [ %42, %middle.block ], [ %95, %.lr.ph480 ], [ %95, %.lr.ph480.prol.loopexit ], [ %42, %.lr.ph476 ], [ %42, %.lr.ph476.prol.loopexit ]
  br i1 %.not, label %.loopexit.thread, label %.thread472

.thread472:                                       ; preds = %40, %.loopexit
  %.ph501 = phi ptr [ %.ph, %.loopexit ], [ %42, %40 ]
  call void @free(ptr nonnull %.unpack390)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %93, %.thread472, %.loopexit
  %.ph498 = phi ptr [ %.ph501, %.thread472 ], [ %.ph, %.loopexit ], [ %95, %93 ]
  store ptr %.ph498, ptr @_QFEb2.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb2.7, align 8, !tbaa !7
  store i64 %.unpack385.unpack.unpack387, ptr @_QFEb2.8, align 8, !tbaa !7
  br label %._crit_edge478

._crit_edge478:                                   ; preds = %.lr.ph477.prol.loopexit, %.lr.ph477, %middle.block510, %.preheader, %.loopexit.thread
  %.unpack439 = phi ptr [ %.ph498, %.loopexit.thread ], [ %.unpack390, %.preheader ], [ %.unpack390, %middle.block510 ], [ %.unpack390, %.lr.ph477 ], [ %.unpack390, %.lr.ph477.prol.loopexit ]
  %129 = load i32, ptr %2, align 4, !tbaa !3
  %130 = icmp sgt i32 %129, 0
  br i1 %130, label %.lr.ph487, label %._crit_edge488

.lr.ph487:                                        ; preds = %._crit_edge478
  %131 = zext i32 %129 to i64
  %.unpack446.unpack.unpack = load i64, ptr @_QFEb2.7, align 8
  %.unpack427 = load ptr, ptr @_QFEb.0, align 8
  br label %132

132:                                              ; preds = %.lr.ph487, %193
  %133 = phi i64 [ %131, %.lr.ph487 ], [ %195, %193 ]
  %134 = phi i32 [ 1, %.lr.ph487 ], [ %194, %193 ]
  %.0485 = phi i32 [ 1, %.lr.ph487 ], [ %.1, %193 ]
  %135 = load i32, ptr %2, align 4, !tbaa !3
  %136 = sub i32 %135, %134
  %137 = add i32 %136, 1
  %138 = sdiv i32 %135, %137
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %.lr.ph483.preheader, label %._crit_edge484.thread

._crit_edge484.thread:                            ; preds = %132
  %140 = sext i32 %137 to i64
  %141 = sub i64 %140, %.unpack446.unpack.unpack
  %142 = getelementptr i32, ptr %.unpack439, i64 %141
  store i32 0, ptr %142, align 4, !tbaa !3
  br label %193

.lr.ph483.preheader:                              ; preds = %132
  %143 = zext i32 %138 to i64
  %xtraiter555 = and i64 %143, 3
  %144 = icmp ult i32 %138, 4
  br i1 %144, label %._crit_edge484.unr-lcssa, label %.lr.ph483.preheader.new

.lr.ph483.preheader.new:                          ; preds = %.lr.ph483.preheader
  %unroll_iter = and i64 %143, 4294967292
  br label %.lr.ph483

.lr.ph483:                                        ; preds = %.lr.ph483, %.lr.ph483.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph483.preheader.new ], [ %indvars.iv.next.3, %.lr.ph483 ]
  %.0345481 = phi i32 [ 0, %.lr.ph483.preheader.new ], [ %175, %.lr.ph483 ]
  %niter = phi i64 [ 0, %.lr.ph483.preheader.new ], [ %niter.next.3, %.lr.ph483 ]
  %145 = trunc i64 %indvars.iv to i32
  %146 = mul i32 %137, %145
  %147 = sext i32 %146 to i64
  %148 = sub i64 %147, %.unpack446.unpack.unpack
  %149 = getelementptr i32, ptr %.unpack439, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !3
  %151 = add i32 %150, %.0345481
  %152 = trunc i64 %indvars.iv to i32
  %153 = add i32 %152, 1
  %154 = mul i32 %137, %153
  %155 = sext i32 %154 to i64
  %156 = sub i64 %155, %.unpack446.unpack.unpack
  %157 = getelementptr i32, ptr %.unpack439, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !3
  %159 = add i32 %158, %151
  %160 = trunc i64 %indvars.iv to i32
  %161 = add i32 %160, 2
  %162 = mul i32 %137, %161
  %163 = sext i32 %162 to i64
  %164 = sub i64 %163, %.unpack446.unpack.unpack
  %165 = getelementptr i32, ptr %.unpack439, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !3
  %167 = add i32 %166, %159
  %168 = trunc i64 %indvars.iv to i32
  %169 = add i32 %168, 3
  %170 = mul i32 %137, %169
  %171 = sext i32 %170 to i64
  %172 = sub i64 %171, %.unpack446.unpack.unpack
  %173 = getelementptr i32, ptr %.unpack439, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !3
  %175 = add i32 %174, %167
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge484.unr-lcssa, label %.lr.ph483

._crit_edge484.unr-lcssa:                         ; preds = %.lr.ph483, %.lr.ph483.preheader
  %.lcssa.ph = phi i32 [ undef, %.lr.ph483.preheader ], [ %175, %.lr.ph483 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph483.preheader ], [ %indvars.iv.next.3, %.lr.ph483 ]
  %.0345481.unr = phi i32 [ 0, %.lr.ph483.preheader ], [ %175, %.lr.ph483 ]
  %lcmp.mod556.not = icmp eq i64 %xtraiter555, 0
  br i1 %lcmp.mod556.not, label %._crit_edge484, label %.lr.ph483.epil

.lr.ph483.epil:                                   ; preds = %._crit_edge484.unr-lcssa, %.lr.ph483.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph483.epil ], [ %indvars.iv.unr, %._crit_edge484.unr-lcssa ]
  %.0345481.epil = phi i32 [ %182, %.lr.ph483.epil ], [ %.0345481.unr, %._crit_edge484.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph483.epil ], [ 0, %._crit_edge484.unr-lcssa ]
  %176 = trunc i64 %indvars.iv.epil to i32
  %177 = mul i32 %137, %176
  %178 = sext i32 %177 to i64
  %179 = sub i64 %178, %.unpack446.unpack.unpack
  %180 = getelementptr i32, ptr %.unpack439, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !3
  %182 = add i32 %181, %.0345481.epil
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter555
  br i1 %epil.iter.cmp.not, label %._crit_edge484, label %.lr.ph483.epil, !llvm.loop !21

._crit_edge484:                                   ; preds = %.lr.ph483.epil, %._crit_edge484.unr-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %._crit_edge484.unr-lcssa ], [ %182, %.lr.ph483.epil ]
  %183 = srem i32 %.lcssa, 2
  %184 = sext i32 %137 to i64
  %185 = sub i64 %184, %.unpack446.unpack.unpack
  %186 = getelementptr i32, ptr %.unpack439, i64 %185
  store i32 %183, ptr %186, align 4, !tbaa !3
  %187 = icmp eq i32 %183, 1
  br i1 %187, label %188, label %193

188:                                              ; preds = %._crit_edge484
  %189 = sext i32 %.0485 to i64
  %190 = add nsw i64 %189, -1
  %191 = getelementptr i32, ptr %.unpack427, i64 %190
  store i32 %137, ptr %191, align 4, !tbaa !3
  %192 = add i32 %.0485, 1
  br label %193

193:                                              ; preds = %._crit_edge484.thread, %188, %._crit_edge484
  %.1 = phi i32 [ %192, %188 ], [ %.0485, %._crit_edge484 ], [ %.0485, %._crit_edge484.thread ]
  %194 = add nuw i32 %134, 1
  %195 = add nsw i64 %133, -1
  %196 = icmp sgt i64 %133, 1
  br i1 %196, label %132, label %._crit_edge488

._crit_edge488:                                   ; preds = %193, %._crit_edge478
  %.0.lcssa = phi i32 [ 1, %._crit_edge478 ], [ %.1, %193 ]
  %197 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.88babaff4cbcce3631432a54e6af795e, i32 27)
  %198 = add i32 %.0.lcssa, -1
  %199 = call i1 @_FortranAioOutputInteger32(ptr %197, i32 %198)
  %200 = call i32 @_FortranAioEndIoStatement(ptr %197)
  %.not402 = icmp eq i32 %.0.lcssa, 1
  br i1 %.not402, label %207, label %201

201:                                              ; preds = %._crit_edge488
  %202 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.88babaff4cbcce3631432a54e6af795e, i32 29)
  %.unpack403 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %203 = call i32 @llvm.smax.i32(i32 %198, i32 0)
  %204 = zext i32 %203 to i64
  store ptr %.unpack403, 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 %204, 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
  %205 = call i1 @_FortranAioOutputDescriptor(ptr %202, ptr nonnull %1)
  %206 = call i32 @_FortranAioEndIoStatement(ptr %202)
  br label %207

207:                                              ; preds = %201, %._crit_edge488
  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 @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputDescriptor(ptr, ptr) local_unnamed_addr

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

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) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !11}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !13}
